Search in sources :

Example 1 with Validator

use of com.reprezen.swagedit.core.validation.Validator in project KaiZen-OpenAPI-Editor by RepreZen.

the class OpenApi3Editor method createValidator.

@Override
protected Validator createValidator() {
    Map<String, JsonNode> preloadedSchemas = Maps.newHashMap();
    preloadedSchemas.put("http://openapis.org/v3/schema.json", Activator.getDefault().getSchema().getRootType().asJson());
    return new Validator(new JsonReferenceValidator(new JsonReferenceFactory()), preloadedSchemas);
}
Also used : JsonReferenceValidator(com.reprezen.swagedit.core.json.references.JsonReferenceValidator) JsonReferenceFactory(com.reprezen.swagedit.core.json.references.JsonReferenceFactory) JsonNode(com.fasterxml.jackson.databind.JsonNode) JsonReferenceValidator(com.reprezen.swagedit.core.json.references.JsonReferenceValidator) Validator(com.reprezen.swagedit.core.validation.Validator)

Aggregations

JsonNode (com.fasterxml.jackson.databind.JsonNode)1 JsonReferenceFactory (com.reprezen.swagedit.core.json.references.JsonReferenceFactory)1 JsonReferenceValidator (com.reprezen.swagedit.core.json.references.JsonReferenceValidator)1 Validator (com.reprezen.swagedit.core.validation.Validator)1