in schema-induction/src/main/java/aws/json/schema/induction/JsonSchemaGenerator.java [25:40]
public ObjectNode generateSchemaTree(SchemaNode root, String definitionName) {
String key = "#/definitions/" + definitionName;
JsonNode schemaNodeDefinition = schema.getRefSchemaNode(key);
if (schemaNodeDefinition == null)
throw new RuntimeException("Cannot find root level definition in schema : " + definitionName);
ObjectNode rootSchema = generateCurrent(root, schemaNodeDefinition);
rootSchema.put("name", definitionName);
JsonNode description = schemaNodeDefinition.get("description");
// Enriching the induced schema with description from the Json Schema
if (description != null) {
rootSchema.set("description", description);
root.setDescription(description.asText());
}
return rootSchema;
}