Skip to content

Add schemars v1 support#109

Open
bidord wants to merge 1 commit into
danlehmann:mainfrom
bidord:schemars1
Open

Add schemars v1 support#109
bidord wants to merge 1 commit into
danlehmann:mainfrom
bidord:schemars1

Conversation

@bidord

@bidord bidord commented Jun 30, 2026

Copy link
Copy Markdown

Adds optional schemars v1 support via a new schemars1 feature. Since v1 is a breaking release with an incompatible API, it's exposed separately and the v1 dep is aliased so it coexists with the existing v0.8 schemars feature.

JsonSchema is implemented for UInt/Int through the preexisting impl_schemars! macro.

Following schemars' own handling of primitive integers, minimum/maximum are only emitted for integers smaller than 32 bits (see added code comment and GREsau/schemars#298).


AI disclosure: the implementation and tests were written by me. Claude Code assisted with fixing grammar in code comment, adding changelog and drafting this PR.

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