private static @Nullable Operation getOperationForConflict(@NotNull JsonSchemaObject schema,
                                                             @NotNull JsonSchemaService service,
                                                             @Nullable JsonSchemaNodeExpansionRequest expansionRequest) {
    // in case of several incompatible operations, choose the most permissive one
    var anyOf = Registry.is("json.schema.object.v2") && schema.hasChildNode(ANY_OF) || schema.getAnyOf() != null;
    var oneOf = Registry.is("json.schema.object.v2") && schema.hasChildNode(ONE_OF) || schema.getOneOf() != null;
    var allOf = Registry.is("json.schema.object.v2") && schema.hasChildNode(ALL_OF) || schema.getAllOf() != null;


    if (anyOf && (oneOf || allOf)) {
      return new AnyOfOperation(schema, service, expansionRequest) {{
        myState = SchemaResolveState.conflict;
      }};
    }
    else if (oneOf && allOf) {
      return new OneOfOperation(schema, service, expansionRequest) {{
        myState = SchemaResolveState.conflict;
      }};
    }
    return null;
  }
private static @Nullable Operation getOperationForConflict(@NotNull JsonSchemaObject schema,
                                                             @NotNull JsonSchemaService service,
                                                             @Nullable JsonSchemaNodeExpansionRequest expansionRequest)