Skip to content

fix(swagger): describe backend metadata as an object - #12178

Open
localai-org-maint-bot wants to merge 1 commit into
masterfrom
fix/swagger-backend-metadata
Open

localai-org-maint-bot wants to merge 1 commit into
masterfrom
fix/swagger-backend-metadata

Conversation

@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

Description

Fix the daily Swagger generator failure on master: OpenAIResponse.metadata uses json.RawMessage, which swag cannot resolve. Declare its Swagger type as an object and regenerate the checked-in specifications. JSON encoding stays unchanged.

Failure: https://github.com/mudler/LocalAI/actions/runs/35534355205

Notes for Reviewers

Reproduced the original failure after generating protobuf bindings. With this change, make protogen-go swagger and CGO_ENABLED=0 go test ./core/schema pass. The generated schema.OpenAIResponse.metadata has type object.

Signed commits

  • Human DCO sign-off pending.
  • Documentation: generated API specifications updated; no runtime behavior change.

Swag cannot resolve json.RawMessage in OpenAIResponse and aborts the daily
schema generation. Set its Swagger type without changing JSON encoding,
and regenerate the checked-in specifications.

Assisted-by: Codex:gpt-6

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant