restdocs-api-spec
restdocs-api-spec copied to clipboard
Documenting Bean Validation constraints not supporting spring boot 3
Hello!
I discovered that documentation of constraint conditions is not working properly while migrating to Spring Boot version 3.
I think adding jakarta.validation.constraints classes within the com.epages.restdocs.apispec.jsonschema.ConstraintResolver file might work.
Can you take care of this?
any update on this issue?
Hello
any update on it
Currently, when using Jakarta Bean Validation constraints in the OAS file, we have to manually add validation metadata like this:
.attributes(key("validationConstraints")
.value(List.of(new Constraint(
"javax.validation.constraints.NotBlank",
Map.of()
))))
This process is quite cumbersome. I would like to improve this by:
Extending ConstraintResolver to support jakarta.validation.constraints.*
Adding relevant unit tests
If no one else is working on this issue, I'd be happy to take it on and open a PR. Please let me know if that's okay.