Skip to content

Add a schema_hook for generating JSON schemas#605

Merged
jcrist merged 1 commit intomainfrom
json-schema-hook
Dec 7, 2023
Merged

Add a schema_hook for generating JSON schemas#605
jcrist merged 1 commit intomainfrom
json-schema-hook

Conversation

@jcrist
Copy link
Copy Markdown
Owner

@jcrist jcrist commented Dec 7, 2023

Previously custom types needed to be annotated with Meta(extra_json_schema=...) to be supported in msgspec.json.schema. This adds a new schema_hook which supports generating json schemas for custom types without requiring an extra annotation.

Previously custom types needed to be annotated with
`Meta(extra_json_schema=...)` to be supported in `msgspec.json.schema`.
This adds a new `schema_hook` which supports generating json schemas for
custom types without requiring an extra annotation.
@jcrist jcrist merged commit ba316c4 into main Dec 7, 2023
@jcrist jcrist deleted the json-schema-hook branch December 7, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant