Replies: 1 comment
-
It's worse than just the json schema. The typevar isn't used for validation at all when I've opened a PR to fix the issue: #1275 In the meantime, I've worked around this the same way you described: by using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
A using a generic SQLModel subclass to create,B using a generic BaseModel subclass to create, C is simple SQLModel.
The json schema generated by A[C] cannot be displayed correctly in the FastAPI /docs, the schema for C is not displayed.
The B[C] is normal.

Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.19
Python Version
3.10.10
Additional Context
pydantic 2.7.4
FastAPI 0.111.0
Beta Was this translation helpful? Give feedback.
All reactions