pydantic_model_creator
should support JSONField annotation (type hints)
#1702
Labels
pydantic
Issue related to tortoise.contrib.pydantic
Is your feature request related to a problem? Please describe.
The types of JSONField are all displayed as Any in swagger:
I need to import
openapi.json
into a TypeScript project for use, and this makes the generatedopenapi.json
very poor in usability.Describe the solution you'd like
I found in
tortoise/contrib/pydantic/creator.py
hasI think we can avoid any by adding an optional type
json_schema
when defining the field, like this:Or is there any better way to achieve this?
The text was updated successfully, but these errors were encountered: