Skip to content

Add @DecimalMin and @DecimalMax for Hal+Forms Property Metadata #1557

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

Closed
talentedasian opened this issue Jun 26, 2021 · 5 comments
Closed

Add @DecimalMin and @DecimalMax for Hal+Forms Property Metadata #1557

talentedasian opened this issue Jun 26, 2021 · 5 comments
Assignees
Labels
in: configuration Configuration and setup in: mediatypes Media type related functionality type: enhancement
Milestone

Comments

@talentedasian
Copy link

In the current Spring Hateoas, it is not possible to add a limit for decimal values. It would be useful for fields accepting decimal values.

@DecimalMin/@DecimalMax currently does not work and is only limited to having the @Min/@Max annotations.

@talentedasian
Copy link
Author

talentedasian commented Jun 28, 2021

Since Hal+Forms currently does not have specifications for decimals I suppose a decimal is still a "number" thus the Spring Hateoas team can just add support to @DecimalMin/@DecimalMax in the Min/Max Hal+Forms specification.

@talentedasian
Copy link
Author

talentedasian commented Jun 28, 2021

This feature would possibly require the min and max field properties to be changed from Long to either a BigDecimal or a Double.

gregturn added a commit that referenced this issue Jun 28, 2021
gregturn added a commit that referenced this issue Jun 28, 2021
Add support for decimal-based type validation constraints.
gregturn added a commit that referenced this issue Jun 28, 2021
Add support for decimal-based type validation constraints.
gregturn added a commit that referenced this issue Jun 28, 2021
Add support for decimal-based type validation constraints.
gregturn added a commit that referenced this issue Jun 28, 2021
Add support for decimal-based type validation constraints.
@talentedasian talentedasian reopened this Jun 29, 2021
@talentedasian
Copy link
Author

Would be wonderful to also update the reference documentation.

@odrotbohm
Copy link
Member

odrotbohm commented Jun 29, 2021

@talentedasian – Would you mind stopping to mess with the tickets and pull requests? I'm getting lost in all the notifications for this ticket. Please let us take care of that, thanks!

Reopening as there's pending work in an issue branch.

gregturn added a commit that referenced this issue Jun 29, 2021
Add support for decimal-based type validation constraints.
gregturn added a commit that referenced this issue Jun 29, 2021
Add support for decimal-based type validation constraints.
@gregturn gregturn reopened this Jun 29, 2021
gregturn added a commit that referenced this issue Jun 29, 2021
Add support for decimal-based type validation constraints.
@gregturn gregturn self-assigned this Jun 29, 2021
@gregturn gregturn added in: configuration Configuration and setup in: mediatypes Media type related functionality type: enhancement labels Jun 29, 2021
@gregturn gregturn added this to the 1.4 M1 milestone Jun 29, 2021
gregturn added a commit that referenced this issue Jun 30, 2021
Add support for decimal-based type validation constraints.
gregturn added a commit that referenced this issue Jun 30, 2021
Add support for decimal-based type validation constraints.
gregturn added a commit that referenced this issue Jun 30, 2021
odrotbohm pushed a commit that referenced this issue Jul 6, 2021
Add support for decimal-based type validation constraints.
odrotbohm pushed a commit that referenced this issue Jul 6, 2021
@odrotbohm
Copy link
Member

That's in place with the current snapshots for inclusion in 1.4 M1.

@gregturn gregturn reopened this Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: configuration Configuration and setup in: mediatypes Media type related functionality type: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants