Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a schema_hook for generating JSON schemas #605

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Conversation

jcrist
Copy link
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
8 checks passed
@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.

None yet

1 participant