Java library for RFC 9457 Problems with support for standard problem types of the Belgif REST guide (https://www.belgif.be/specification/rest/api-guide/#error-handling)
A workaround is to add x-field-extra-annotation: "@jakarta.validation.constraints.NotBlank" hints to the schema, but that's not exactly clean. As not all parameters have a regex we can use to enforce certain content we sometimes have to check that in our code.
The idea would be to add a nullOrNotBlank(Input<String>... inputs) method to the RequestValidator that allows us to integrate that check with others in the validator (without resorting to the more verbose .custom(...) method). Maybe it's a bit too specific? What do you think?
The OpenAPI generator plugin doesn't add
@NotBlank/@NotEmpty
annotations to the generated interfaces: https://stackoverflow.com/questions/77515177/openapi-generator-do-not-insert-notblank-annotation-for-stringA workaround is to add
x-field-extra-annotation: "@jakarta.validation.constraints.NotBlank"
hints to the schema, but that's not exactly clean. As not all parameters have a regex we can use to enforce certain content we sometimes have to check that in our code.The idea would be to add a
nullOrNotBlank(Input<String>... inputs)
method to theRequestValidator
that allows us to integrate that check with others in the validator (without resorting to the more verbose.custom(...)
method). Maybe it's a bit too specific? What do you think?