feat: added support for num types + dev tools fixes - #1578
Open
Dzordzu wants to merge 8 commits into
Open
Conversation
|
|
||
| #[cfg(feature = "non_strict_integers")] | ||
| #[test] | ||
| fn test_partial_schema_non_strict_integers() { |
Contributor
There was a problem hiding this comment.
Can you add the respective new cases here too?
I know that this is not going to change the correctness, but more as a way to know that we are not going to regress on this 😉
CommanderStorm
approved these changes
Jul 6, 2026
Comment on lines
+1691
to
+1696
| assert_compact_json_snapshot!(NonZeroI8::schema(), @r#"{"type": "integer", "format": "int8"}"#); | ||
| assert_compact_json_snapshot!(NonZeroI16::schema(), @r#"{"type": "integer", "format": "int16"}"#); | ||
| assert_compact_json_snapshot!(NonZeroI32::schema(), @r#"{"type": "integer", "format": "int32"}"#); | ||
| assert_compact_json_snapshot!(NonZeroI64::schema(), @r#"{"type": "integer", "format": "int64"}"#); | ||
| assert_compact_json_snapshot!(NonZeroI128::schema(), @r#"{"type": "integer"}"#); | ||
| assert_compact_json_snapshot!(NonZeroIsize::schema(), @r#"{"type": "integer"}"#); |
Contributor
There was a problem hiding this comment.
On second thought:
Would this be better modeled by the union of an integer with an exclusive minimum and one with an exclusive maxium of 0?
I don't have a strong oppinion on this..
Author
There was a problem hiding this comment.
Hm. Not a bad idea tbh. Will try to do it today!
Author
There was a problem hiding this comment.
Sorry for the delay. I'll try to implement this in the upcoming days
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Added support for
Added
non_strict_integersto test targetsIt was failing on the master. Better to have it tested.
Added
bacon + nextestto configsIt's a better dev experience ;)
Why?
Because these types are used by
typify. And they are in the stdlibNotes