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

Support Bean Validation for Maps' generic parameter are ignored #4447

Open
mpressmar opened this issue Jul 3, 2023 · 0 comments
Open

Support Bean Validation for Maps' generic parameter are ignored #4447

mpressmar opened this issue Jul 3, 2023 · 0 comments

Comments

@mpressmar
Copy link

mpressmar commented Jul 3, 2023

While validation annotations of generic parameters are now supported for Optionals and Array-like structures (see #4373) that is not the case for Map structures.

Example:

@NotNull private final Map<Integer, @NotNull BigDecimal> vintages;

will produce an OpenAPI specification:

"vintages":{"type":"object","additionalProperties":{"type":"number"}}

Any annotation on the Map's value is ignored.

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

No branches or pull requests

1 participant