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 parsing support for non strict integers #1012

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

juhaku
Copy link
Owner

@juhaku juhaku commented Aug 31, 2024

Prior to this PR the schema format = ... attribute was missing support for non_strict_integers feature flag enabled formats. This commit adds support for those formats.

E.g. now the following will work if non_strict_integers feature flag is enabled.

struct Numbers {
    #[schema(format = UInt8)]
    ui8: String,
}

Fixes #996

@juhaku juhaku force-pushed the add-parsing-for-non-strict-integers branch from 49fe3db to 8d3b623 Compare August 31, 2024 13:21
Prior to this PR the schema `format = ...` attribute was missing support
for `non_strict_integers` feature flag enabled formats. This commit adds
support for those formats.

E.g. now the following will work if `non_strict_integers` feature flag
is enabled.
```rust
struct Numbers {
    #[schema(format = UInt8)]
    ui8: String,
}
```

Fixes #996
@juhaku juhaku force-pushed the add-parsing-for-non-strict-integers branch from 8d3b623 to b118f66 Compare August 31, 2024 13:23
@juhaku juhaku merged commit 9c79ef2 into master Aug 31, 2024
18 checks passed
@juhaku juhaku deleted the add-parsing-for-non-strict-integers branch August 31, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released
Development

Successfully merging this pull request may close these issues.

Uint8 format lead to macro error
1 participant