public String getSchemaForClass(Class<?> clazz) {
LOG.debug("Looking up schema for {}", clazz.getCanonicalName());
String name = clazz.getName();
try {
ObjectWriter writer = mapper.writer().withDefaultPrettyPrinter();
JsonSchema jsonSchema = mapper.generateJsonSchema(clazz);
customizeSchema(clazz, jsonSchema);
return writer.writeValueAsString(jsonSchema);
// SchemaFactoryWrapper schemaFactoryWrapper = new SchemaFactoryWrapper();
// mapper.acceptJsonFormatVisitor(mapper.constructType(clazz), schemaFactoryWrapper);
// com.fasterxml.jackson.module.jsonSchema.JsonSchema jsonSchema = schemaFactoryWrapper.finalSchema();