Generating Java classes with @NotNull and @NotEmpty annotations from xsd file in spring boot

53 Views Asked by At

I want to generate Java classes from xsd in spring boot v3.2.1. I need JSR-380 annotations there for validation. Is there a way of generating them? I want to validate mandatory elements (using @NotNull, @NotEmty) I also have class of classes so I need to use @Valid on parent class.

I’ve found that I could generate json-schema from xsd and then generate Java classes from json-schema. The classes would contain the JSR-380 annotations after that.

0

There are 0 best solutions below