boolean (final boolean isObject, final @NotNull JsonSchemaObject schema) { final JsonSchemaType requiredType = isObject ? JsonSchemaType._object : JsonSchemaType._array; if (schema.getType() != null) { return requiredType.equals(schema.getType()); } if (schema.getTypeVariants() != null) { for (JsonSchemaType schemaType : schema.getTypeVariants()) { if (requiredType.equals(schemaType)) return true; } return false; } return true; }