We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/Tanvir786123/fastapi-swagger-ui-issue/tree/main contains a complete rundown of what this issue is, i.e., the inability to correctly display the name of the return object if it is a List.
List
Example Swagger/OpenAPI definition:
{ "openapi": "3.1.0", "info": { "title": "FastAPI", "version": "0.1.0" }, "paths": { "/item": { "get": { "summary": "Get a single book", "description": "Returns a single book with full details.", "operationId": "get_book_item_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Book" } } } } } } }, "/items": { "get": { "summary": "Get list of books", "description": "Returns a list of books with full details.", "operationId": "get_books_items_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/Book" }, "type": "array", "title": "Response Get Books Items Get" } } } } } } } }, "components": { "schemas": { "Book": { "properties": { "id": { "type": "integer", "title": "Id" }, "title": { "type": "string", "title": "Title" }, "author": { "type": "string", "title": "Author" }, "summary": { "type": "string", "title": "Summary" } }, "type": "object", "required": [ "id", "title", "author", "summary" ], "title": "Book" } } } }
Swagger-UI configuration options:
SwaggerUI({ // your config options here })
?yourQueryStringConfig
Steps to reproduce the behavior: Please follow the steps on the linked repository.
The inline schema name for the second endpoint should have been: Books.
Inside https://github.com/Tanvir786123/fastapi-swagger-ui-issue/tree/main.
This problem may potentially extend to more objects than just List. However, the objective of this issue is to solve the problem using a List type.
The text was updated successfully, but these errors were encountered:
Please let me know if this issue should be moved to the https://github.com/fastapi/fastapi repository.
Sorry, something went wrong.
No branches or pull requests
Q&A (please complete the following information)
Content & configuration
https://github.com/Tanvir786123/fastapi-swagger-ui-issue/tree/main contains a complete rundown of what this issue is, i.e., the inability to correctly display the name of the return object if it is a
List
.Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
Describe the bug you're encountering
https://github.com/Tanvir786123/fastapi-swagger-ui-issue/tree/main contains a complete rundown of what this issue is, i.e., the inability to correctly display the name of the return object if it is a
List
.To reproduce...
Steps to reproduce the behavior:
Please follow the steps on the linked repository.
Expected behavior
The inline schema name for the second endpoint should have been: Books.
Screenshots
Inside https://github.com/Tanvir786123/fastapi-swagger-ui-issue/tree/main.
Additional context or thoughts
This problem may potentially extend to more objects than just
List
. However, the objective of this issue is to solve the problem using aList
type.The text was updated successfully, but these errors were encountered: