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 Composed Constraints #4799

Open
michael-arndt-gcx opened this issue Nov 26, 2024 · 0 comments
Open

Support Composed Constraints #4799

michael-arndt-gcx opened this issue Nov 26, 2024 · 0 comments

Comments

@michael-arndt-gcx
Copy link

Jakarta Bean Validation allows to compose constraints as described in 3.3. Constraint composition.

I'd like to implement basic support for this. My idea would be to add a preprocessing step to

protected void applyBeanValidatorAnnotations(BeanPropertyDefinition propDef, Schema property, Annotation[] annotations, Schema parent, boolean applyNotNullAnnotations) {

which flattens all Annotations. That means: when an annotation is annotated with javax.validation.Constraint, all its annotations are treated as if all annotations are on the annotated element.

This has been requested as feature e.g. in springdoc/springdoc-openapi#1486

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