diff --git a/schemas/v1.0/schema.json b/schemas/v1.0/schema.json index 47bc21c..bea7c03 100644 --- a/schemas/v1.0/schema.json +++ b/schemas/v1.0/schema.json @@ -404,28 +404,26 @@ "condition": { "description": "The condition to apply", "type": "string" - } - }, - "anyOf": [ - { - "type": "object", - "properties": { - "type": { - "description": "The type of condition to be applied", - "enum": [ - "simple", - "regex", - "jsonpath", - "xpath" - ], - "default": "simple" - } - } }, - { - "$ref": "#/$defs/criterion-expression-type-object" + "type": { + "description": "The type of condition to be applied", + "default": "simple", + "oneOf": [ + { + "enum": [ + "simple", + "regex", + "jsonpath", + "xpath" + ], + "type": "string" + }, + { + "$ref": "#/$defs/criterion-expression-type-object" + } + ] } - ], + }, "required": [ "condition" ], @@ -473,7 +471,9 @@ "then": { "properties": { "version": { - "const": "draft-goessner-dispatch-jsonpath-00" + "enum": [ + "draft-goessner-dispatch-jsonpath-00" + ] } } } diff --git a/schemas/v1.0/schema.yaml b/schemas/v1.0/schema.yaml index c2a22a3..00bdd73 100644 --- a/schemas/v1.0/schema.yaml +++ b/schemas/v1.0/schema.yaml @@ -275,18 +275,17 @@ $defs: condition: description: The condition to apply type: string - anyOf: - - type: object - properties: - type: - description: The type of condition to be applied - enum: + type: + description: The type of condition to be applied + default: simple + oneOf: + - enum: - simple - regex - jsonpath - xpath - default: simple - - $ref: '#/$defs/criterion-expression-type-object' + type: string + - $ref: '#/$defs/criterion-expression-type-object' required: - condition dependentRequired: @@ -320,7 +319,8 @@ $defs: then: properties: version: - const: draft-goessner-dispatch-jsonpath-00 + enum: + - draft-goessner-dispatch-jsonpath-00 - if: required: - type