Closed EricWebsmith closed 8 months ago
Thanks for the comment! The actual spec of an item is generated by Pydantic (either V1 or V2) so if the OpenAPI document is missing data, it might be because Pydantic doesn't generate that.
Have you got an example of what's missing and if it's in Pydantic when getting the schema for a model with an Enum value?
Thanks, I changed the pydantic code and our problem is solved.
The function dealing with this is GenerateJsonSchema.literal_schema. I just changed this one.
Describe the bug In our project, we need to export both enum name and values to the frontend using Open API. We find other Open API generators have already provide solutions to this. We hope
flask-pydantic-spec
can support that as well.Reference: here