use of com.reprezen.swagedit.core.schema.ComplexTypeDefinition in project KaiZen-OpenAPI-Editor by RepreZen.
the class ComponentContextType method isReferenceToComponent.
protected boolean isReferenceToComponent(Model model, JsonPointer pointer) {
AbstractNode parentNode = model.find(pointer.head());
if (parentNode == null) {
return false;
}
TypeDefinition parentType = parentNode.getType();
if (parentType instanceof ComplexTypeDefinition) {
Collection<TypeDefinition> types = ((ComplexTypeDefinition) parentType).getComplexTypes();
for (TypeDefinition type : types) {
if (hasRefToComponent(type.getContent())) {
return true;
}
}
}
return hasRefToComponent(parentType.getContent());
}
Aggregations