0
votes

Is there a tool or maven plugin to generate a xsd-file for a JSR-303 annotation-based bean? I use SpringMVC for my REST services and validate the beans using JSR-303. Now i want to generate for based on the beans xsd files.

1

1 Answers

0
votes

I assume you re asking about generating XML configuration files. The xsd files are schema files the configuration files have to adhere to. For JSR 303 the schema file can be found at http://www.jboss.org/xml/ns/javax/validation/mapping/validation-mapping-1.0.xsd.

From what do you want to create the xml configuration from? From already annotated entities (annotations are the default configuration source which can be overridden by xml)? Or do you want to create xml configuration files from scratch? For the former, I don't think that there are any tools which generate Bean Validation xml configuration files from annotated entities. For the latter, some IDEs (for example Idea) have some basic support for Bean Validation and its xml configuration.

Is this answering your question?