Closed SanderWegter closed 1 year ago
I looked into this a bit since we happened to notice it today as well.
It looks like it applies to both request bodies and responses.
Looking at the source it appears litestart._signature.field.SignatureField
doesn't support descriptions. There's an extra
attribute but that appears to be used for creating examples.
It looks like it applies to both request bodies and responses.
Correct.
I went down the rabbit hole and tried to figure out why this happens. Looks like construct_open_api_with_schema_class
isn't called anymore from app.py:update_openapi_schema
when I'm comparing it to 1.51.10.
Simply adding this doesn't work because the OpenAPI
class isnt based on pydantic BaseModel
anymore but the litestar BaseSchemaObject
.
The function construct_open_api_with_schema_class
relies on the BaseModel.copy(deep=True)
which doesn't exist on BaseSchemaObject
.
Description
Referencing a discussion on Discord: https://discord.com/channels/919193495116337154/1093516724864811038
It seems that the pydantic
Field()
in the model isn't parsed and generating title/description fields in the openapi.json.Running on docker
python:3.11-alpine
URL to code causing the issue
No response
MCVE
Steps to reproduce
No response
Screenshots
Current (as in
2.0.0a4
):Expected (as in
1.51.9
):Logs
No response
Litestar Version
litestar==2.0.0a4
Platform