use of com.reprezen.swagedit.core.model.Location in project KaiZen-OpenAPI-Editor by RepreZen.
the class JsonReferenceValidator method createReferenceError.
protected SwaggerError createReferenceError(int severity, String message, AbstractNode source) {
int line = 1;
if (source != null) {
AbstractNode ref = referenceFactory.getReferenceValue(source);
if (ref != null) {
Location location = ref != null ? ref.getStart() : source.getStart();
line = location.getLine() + 1;
}
}
return new SwaggerError(line, severity, message);
}
Aggregations