diff --git a/schema/mise-task.json b/schema/mise-task.json index 169a6393f7..c9b7cd0ae7 100644 --- a/schema/mise-task.json +++ b/schema/mise-task.json @@ -98,11 +98,21 @@ }, { "description": "task with args to run before this task", + "type": "array", "items": { "description": "task name and args", - "type": "string" - }, - "type": "array" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } } ] }, @@ -114,11 +124,21 @@ }, { "description": "task with args to run after this task", + "type": "array", "items": { "description": "task name and args", - "type": "string" - }, - "type": "array" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } } ] }, diff --git a/schema/mise.json b/schema/mise.json index dca68a3d07..72b532fc25 100644 --- a/schema/mise.json +++ b/schema/mise.json @@ -1148,11 +1148,21 @@ }, { "description": "task with args to run before this task", + "type": "array", "items": { "description": "task name and args", - "type": "string" - }, - "type": "array" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } } ] }, @@ -1164,11 +1174,21 @@ }, { "description": "task with args to run after this task", + "type": "array", "items": { "description": "task name and args", - "type": "string" - }, - "type": "array" + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } } ] }, diff --git a/xtasks/lint/schema b/xtasks/lint/schema index 6cb44a3666..863fb6c308 100755 --- a/xtasks/lint/schema +++ b/xtasks/lint/schema @@ -2,6 +2,6 @@ #MISE description="Lint schemas" set -euo pipefail -ajv compile -s schema/mise.json --spec=draft2019 --strict=true -ajv compile -s schema/mise-task.json --spec=draft2019 --strict=true -ajv compile -s schema/mise.plugin.json --spec=draft2020 --strict=true +ajv compile -s schema/mise.json --spec=draft2019 --strict-schema=true +ajv compile -s schema/mise-task.json --spec=draft2019 --strict-schema=true +ajv compile -s schema/mise.plugin.json --spec=draft2020 --strict-schema=true