msgspec
msgspec copied to clipboard
Ability to add an example to a Struct as output to the JSON schema
Description
Looking at https://github.com/jcrist/msgspec/blob/main/msgspec/_json_schema.py I think there is no way to give an example for the Struct to be included in the json schema. In pydantic, for example, there is a json_schema_extra meta addition https://docs.pydantic.dev/latest/concepts/json_schema/#using-json_schema_extra-with-a-dict.
I'd like to give fixed examples and see them in the generated schema.