Skip to content

Add schemars v1 support - #109

Merged
danlehmann merged 2 commits into
danlehmann:mainfrom
bidord:schemars1
Jul 31, 2026
Merged

danlehmann merged 2 commits into
danlehmann:mainfrom
bidord:schemars1

Conversation

@bidord

@bidord bidord commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

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.

@danlehmann

Copy link
Copy Markdown
Owner

Thanks for the contribution. Looks great and happy to take it, but it currently fails tests (test step).

@bidord

bidord commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the contribution. Looks great and happy to take it, but it currently fails tests (test step).

The test failure is unrelated to this PR. main branch fails the same way on recent nightly.

See #112

@danlehmann

Copy link
Copy Markdown
Owner

Fixed the two test failures on main. merged them over. landing the PR now.

Thanks again for your contribution!

@danlehmann
danlehmann merged commit 2dd73a2 into danlehmann:main Jul 31, 2026
16 checks passed
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.

2 participants