Validator
@Documented
@Target({TYPE, ANNOTATION_TYPE})
@Retention(RUNTIME)
@Constraint(validatedBy = MyValidator.class)
public @interface MyAnnotation {
Swagger:
MyDTO:
type:object
x-constraints: '@MyAnnotation'
...
properties:
...
This is how I defined the annotation and the swagger. I noticed that the DTO is generated, but the annotation is not part of the generated class. I expect this annotation to be present there. Is there something wrong?