void (final @NotNull Set<JsonSchemaObject> visited) { JsonSchemaObject current = mySourceNode; while (!StringUtil.isEmptyOrSpaces(current.getRef())) { final JsonSchemaObject definition = current.resolveRefSchema(myService); if (definition == null) { myState = SchemaResolveState.brokenDefinition; return; } // this definition was already expanded; do not cycle if (!visited.add(definition)) break; current = JsonSchemaObject.merge(current, definition, current); } final Operation expandOperation = createExpandOperation(current, myService); if (expandOperation != null) myChildOperations.add(expandOperation); else myAnyOfGroup.add(current); }