use of nl.nn.adapterframework.align.XmlTypeToJsonSchemaConverter in project iaf by ibissource.
the class ApiServiceDispatcher method addComponentsToTheSchema.
private void addComponentsToTheSchema(JsonObjectBuilder schemas, List<XSModel> models) {
XmlTypeToJsonSchemaConverter converter = new XmlTypeToJsonSchemaConverter(models, true, SCHEMA_DEFINITION_PATH);
JsonObject jsonSchema = converter.getDefinitions();
if (jsonSchema != null) {
for (Entry<String, JsonValue> entry : jsonSchema.entrySet()) {
schemas.add(entry.getKey(), entry.getValue());
}
}
}
use of nl.nn.adapterframework.align.XmlTypeToJsonSchemaConverter in project iaf by ibissource.
the class Json2XmlValidator method createJsonSchema.
public JsonStructure createJsonSchema(String elementName, String namespace) {
List<XSModel> models = validator.getXSModels();
XmlTypeToJsonSchemaConverter converter = new XmlTypeToJsonSchemaConverter(models, isCompactJsonArrays(), !isJsonWithRootElements(), getSchemaLocation());
JsonStructure jsonschema = converter.createJsonSchema(elementName, namespace);
return jsonschema;
}
use of nl.nn.adapterframework.align.XmlTypeToJsonSchemaConverter in project iaf by ibissource.
the class Json2XmlValidator method createJsonSchemaDefinitions.
public JsonObject createJsonSchemaDefinitions(String definitionsPath) {
List<XSModel> models = validator.getXSModels();
XmlTypeToJsonSchemaConverter converter = new XmlTypeToJsonSchemaConverter(models, isCompactJsonArrays(), !isJsonWithRootElements(), getSchemaLocation(), definitionsPath);
JsonObject jsonschema = converter.getDefinitions();
return jsonschema;
}
Aggregations