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
Example Swagger/OpenAPI definition:
{ "openapi": "3.1.0", "info": { "title": "FastAPI", "version": "0.1.0" }, "paths": { "/test_model": { "post": { "summary": "Test Model", "operationId": "test_model_test_model_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestModel" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestModel" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "ChildModel1": { "properties": { "c1": { "type": "string", "title": "C1" } }, "type": "object", "required": [ "c1" ], "title": "ChildModel1" }, "ChildModel3": { "properties": { "c3": { "type": "string", "title": "C3" } }, "type": "object", "required": [ "c3" ], "title": "ChildModel3" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "TestModel": { "properties": { "tuple_field1": { "prefixItems": [ { "type": "integer" }, { "type": "string" } ], "type": "array", "maxItems": 2, "minItems": 2, "title": "Tuple Field1" }, "tuple_field2": { "prefixItems": [ { "$ref": "#/components/schemas/ChildModel1" }, { "$ref": "#/components/schemas/ChildModel3" } ], "type": "array", "maxItems": 2, "minItems": 2, "title": "Tuple Field2" } }, "type": "object", "required": [ "tuple_field1", "tuple_field2" ], "title": "TestModel" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" } } } }
Get a valid example for try out with prefixItems.
example in swagger ui:
schema in swagger ui (lftm):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Expected behavior
Get a valid example for try out with prefixItems.
Screenshots
example in swagger ui:

schema in swagger ui (lftm):

The text was updated successfully, but these errors were encountered: