[GH-ISSUE #2218] [BUG]: Invalid OpenAPI specification in generated Swagger schema #1449

Closed
opened 2026-02-22 18:24:51 -05:00 by yindo · 0 comments
Owner

Originally created by @MrSimonC on GitHub (Sep 4, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2218

How are you running AnythingLLM?

Docker (local)

What happened?

Firstly, I apologize that this is probably going to be one of the most boring pull requests you can ever come across!

Further to the previously logged issue #1988, where @acrive82 pointed out the OpenAPI v3 spec was invalid (honestly, I didn't even realize there was such a thing as a specification until about three weeks ago), I also confirmed this and found a fix (see referenced pull request later).

The issue is that the JSON payload generated by the Swagger API endpoint does not conform to the OpenAPI 3.0 specification. If for example, I use, I wanted to generate their own API client code, they could use open API tools open API generator. e.g. Specifically, running the command:

docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i openapi.json -g csharp -o /local/out/csharp

results in an "invalid spec" error.

Please see the referenced pull request for the proposed fix.

Are there known steps to reproduce?

Copy the existing openapi.json file from https://raw.githubusercontent.com/Mintplex-Labs/anything-llm/master/server/swagger/openapi.json and insert it into the Swagger Parser Online Tool, which confirmed that it fails validation.

Originally created by @MrSimonC on GitHub (Sep 4, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2218 ### How are you running AnythingLLM? Docker (local) ### What happened? Firstly, I apologize that this is probably going to be one of the most boring pull requests you can ever come across! Further to the previously logged issue #1988, where @acrive82 pointed out the OpenAPI v3 spec was invalid _(honestly, I didn't even realize there was such a thing as a specification until about three weeks ago)_, I also confirmed this and found a fix (see referenced pull request later). The issue is that the JSON payload generated by the Swagger API endpoint does not conform to the OpenAPI 3.0 specification. If for example, I use, I wanted to generate their own API client code, they could use [open API tools open API generator](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#16---docker). e.g. Specifically, running the command: ``` docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate -i openapi.json -g csharp -o /local/out/csharp ``` results in an "invalid spec" error. Please see the referenced pull request for the proposed fix. ### Are there known steps to reproduce? Copy the existing `openapi.json` file from `https://raw.githubusercontent.com/Mintplex-Labs/anything-llm/master/server/swagger/openapi.json` and insert it into the [Swagger Parser Online Tool](https://apitools.dev/swagger-parser/online/), which confirmed that it fails validation.
yindo added the possible bug label 2026-02-22 18:24:51 -05:00
yindo closed this issue 2026-02-22 18:24:51 -05:00
yindo changed title from [BUG]: Invalid OpenAPI specification in generated Swagger schema to [GH-ISSUE #2218] [BUG]: Invalid OpenAPI specification in generated Swagger schema 2026-06-05 14:40:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1449