Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions schemas/v1.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down Expand Up @@ -473,7 +471,9 @@
"then": {
"properties": {
"version": {
"const": "draft-goessner-dispatch-jsonpath-00"
"enum": [
"draft-goessner-dispatch-jsonpath-00"
]
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions schemas/v1.0/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be anyOf

- enum:
- simple
- regex
- jsonpath
- xpath
default: simple
- $ref: '#/$defs/criterion-expression-type-object'
type: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary because the enums are only strings

Suggested change
type: string

- $ref: '#/$defs/criterion-expression-type-object'
required:
- condition
dependentRequired:
Expand Down Expand Up @@ -320,7 +319,8 @@ $defs:
then:
properties:
version:
const: draft-goessner-dispatch-jsonpath-00
enum:
- draft-goessner-dispatch-jsonpath-00
- if:
required:
- type
Expand Down