Skip to content

Commit c5fc7c9

Browse files
committed
Enable JSON schema validator support for "format" keyword
Support for the JSON schema "format" keyword was moved to a separate package in ajv v7.0.0 (ajv-cli v4.0.0). If this package is not installed and specified as a module via the ajv-cli command, validation against any schema that uses "format" fails, even when the instance document is completely valid. Even though none of the JSON schemas currently in use by the templates and CI system have a "format" keyword, there's no reason one couldn't be added at any moment, so it's safest to just add support now. The change to ajv was done for security purposes when used with untrusted data, which is not a concern here.
1 parent b396c1e commit c5fc7c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Taskfile.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,11 @@ tasks:
347347
{{.WORKFLOW_SCHEMA_URL}}
348348
- |
349349
npx \
350-
ajv-cli validate \
350+
--package=ajv-cli \
351+
--package=ajv-formats \
352+
ajv validate \
351353
--strict=false \
354+
-c ajv-formats \
352355
-s "{{.WORKFLOW_SCHEMA_PATH}}" \
353356
-d "{{.WORKFLOWS_DATA_PATH}}"
354357

0 commit comments

Comments
 (0)