private void objectExample(StringBuilder sb, int maxlength, String indent, JsonSchema schema,
Map<String, JsonSchema> refs, Set<String> followed, Set<String> referenced, String id) {
sb.append("{");
if (referenced.contains(id)) {
shortId(sb, schema);
}
ObjectSchema os = schema.asObjectSchema();
if (os.getProperties().isEmpty()) {
AdditionalProperties additionalProperties = os.getAdditionalProperties();
if (additionalProperties instanceof SchemaAdditionalProperties) {
sb.append("\n").append(indent).append(" ").append("abc").append(": ");
example(sb, maxlength, indent + " ", ((SchemaAdditionalProperties) additionalProperties).getJsonSchema(), refs, followed, referenced);
sb.append(", ...");
}
}
Map<String, JsonSchema> props = new TreeMap<>(os.getProperties());
for (Entry<String, JsonSchema> entry : props.entrySet()) {
sb.append("\n").append(indent).append(" ").append(entry.getKey()).append(": ");
example(sb, maxlength, indent + " ", entry.getValue(), refs, followed, referenced);
sb.append(",");
}
sb.append("\n").append(indent).append("}");
}