Hi,

Is there a simple way to generate XSD from a Java class?

I successfully generated JSON with Jackson Module JsonSchema but I didn't 
found how to do it with XSD (no module existing ?).
I would like to be able to to it like in JSON, see this code:

ObjectMapper jsonMapper = new ObjectMapper();
JsonSchemaGenerator jsonSchemaGen = new JsonSchemaGenerator(jsonMapper);
JsonSchema jsonSchema = jsonSchemaGen.generateSchema(ServiceModel.class);
jsonMapper.writeValue(new File("exampleSchema.json"), jsonSchema);

But with XmlMapper instead of ObjectMapper, and something instead of 
JsonSchemaGenerator?

I was able te generate JSON Schema with XML instead of JSON, but this is 
not the same syntax as XSD.

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to