One can generate a json schema from a msgspec.Struct
using msgspec.json.schema
. Where does one put that schema so that FastAPI uses it as the schema for the endpoint's response body in the OpenAPI docs that it generates?
There doesn't seem to be a way to achive this in FastAPI despite some schema customization options. Nor is it possible to generate a pydantic model (so that it could be used for the docs) from a json schema.