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

feat(openapi): add max and min attribute parsing #524

Merged
merged 1 commit into from
Jun 28, 2024
Merged

Conversation

tiagolobocastro
Copy link
Collaborator

@tiagolobocastro tiagolobocastro commented Jun 28, 2024

This allows adding maximum an minimum as attributes to a field, example:

#[openapi(maximum = 2.0)]
age: u8

The max and min must be either string, float or int. They are then converted to the openapi f32 format.

Resolves: #515

This allows adding maximum an minimum as attributes to a field,
example:
```
\#[openapi(maximum = 2.0)]
age: u8
```

The max and min must be either string, float or int.
They are then converted to the openapi f32 format.

Signed-off-by: Tiago Castro <[email protected]>
@tiagolobocastro tiagolobocastro merged commit b20eeab into master Jun 28, 2024
7 checks passed
@tiagolobocastro tiagolobocastro deleted the num-attr branch June 28, 2024 12:39
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.

[request] [help] Ranged values
1 participant