Is there a way to add the id property when generating jsonschema? Using the jackson databind, I am:
ObjectMapper mapper = new ObjectMapper();
SchemaFactoryWrapper visitor = new SchemaFactoryWrapper();
JsonSchemaGenerator jsg = new JsonSchemaGenerator(mapper, visitor);
JsonSchema jsonSchema = jsg.generateSchema(Status.class);
On the following enum:
public enum Status {
ON,
OFF;
}
It generates:
{
"type" : "string",
"enum" : [ "ON", "OFF" ]
}
However, if would like it to include the id:
{
"id" : "urn:jsonschema:com:example:enums:Status"
"type" : "string",
"enum" : [ "ON", "OFF" ]
}
Is this possible?