diff --git a/setup.py b/setup.py index 493100f..26d1414 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ 'jsonref', 'pyyaml', 'requests[security]>=2.9', - 'jsonschema<=4.9.1', # c.f. https://github.com/yadage/yadage-schemas/issues/38 + 'jsonschema>=4.10.0', # c.f. https://github.com/yadage/yadage-schemas/issues/38 'click', 'six>=1.4.0', # six.moves added in six v1.4.0 'importlib-resources>=5.10;python_version<"3.9"' # for accessing package filepaths diff --git a/yadageschemas/packtivity/environment/docker-enc-schema.json b/yadageschemas/packtivity/environment/docker-enc-schema.json index 66d681d..3b2bacd 100644 --- a/yadageschemas/packtivity/environment/docker-enc-schema.json +++ b/yadageschemas/packtivity/environment/docker-enc-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Docker Encapsulated Environment", "additionalProperties": false, diff --git a/yadageschemas/packtivity/environment/localproc-schema.json b/yadageschemas/packtivity/environment/localproc-schema.json index 5edc7d2..f75bb94 100644 --- a/yadageschemas/packtivity/environment/localproc-schema.json +++ b/yadageschemas/packtivity/environment/localproc-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Local Process Environment for Testing", "properties": { diff --git a/yadageschemas/packtivity/environment/manual-instructions-env-schema.json b/yadageschemas/packtivity/environment/manual-instructions-env-schema.json index eb2b169..7605058 100644 --- a/yadageschemas/packtivity/environment/manual-instructions-env-schema.json +++ b/yadageschemas/packtivity/environment/manual-instructions-env-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Manual Instructions Environment", "additionalProperties": false, diff --git a/yadageschemas/packtivity/environment/noop-env-schema.json b/yadageschemas/packtivity/environment/noop-env-schema.json index 14f457e..3e0f7f8 100644 --- a/yadageschemas/packtivity/environment/noop-env-schema.json +++ b/yadageschemas/packtivity/environment/noop-env-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Noop Environment for Testing", "properties": { diff --git a/yadageschemas/packtivity/packtivity-schema.json b/yadageschemas/packtivity/packtivity-schema.json index fa30a63..fb4b341 100644 --- a/yadageschemas/packtivity/packtivity-schema.json +++ b/yadageschemas/packtivity/packtivity-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Packtivity Meta Description", "additionalProperties": false, diff --git a/yadageschemas/packtivity/process/manual-instructions-proc-schema.json b/yadageschemas/packtivity/process/manual-instructions-proc-schema.json index 484ce52..d404f2d 100644 --- a/yadageschemas/packtivity/process/manual-instructions-proc-schema.json +++ b/yadageschemas/packtivity/process/manual-instructions-proc-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Manual Instructions Process", "additionalProperties": false, diff --git a/yadageschemas/packtivity/process/scriptproc-schema.json b/yadageschemas/packtivity/process/scriptproc-schema.json index 54d6686..18a6b51 100644 --- a/yadageschemas/packtivity/process/scriptproc-schema.json +++ b/yadageschemas/packtivity/process/scriptproc-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "String Interpolated Script", "additionalProperties": false, diff --git a/yadageschemas/packtivity/process/stringinterp-schema.json b/yadageschemas/packtivity/process/stringinterp-schema.json index 14dc12b..dea62f6 100644 --- a/yadageschemas/packtivity/process/stringinterp-schema.json +++ b/yadageschemas/packtivity/process/stringinterp-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "String Interpolated Command", "additionalProperties": false, diff --git a/yadageschemas/packtivity/publisher/constant-pub-schema.json b/yadageschemas/packtivity/publisher/constant-pub-schema.json index 8478eee..a843603 100644 --- a/yadageschemas/packtivity/publisher/constant-pub-schema.json +++ b/yadageschemas/packtivity/publisher/constant-pub-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Constant Publisher", "additionalProperties": false, diff --git a/yadageschemas/packtivity/publisher/fromglob-pub-schema.json b/yadageschemas/packtivity/publisher/fromglob-pub-schema.json index 65b8a13..26cf555 100644 --- a/yadageschemas/packtivity/publisher/fromglob-pub-schema.json +++ b/yadageschemas/packtivity/publisher/fromglob-pub-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Glob Publisher", "additionalProperties": false, diff --git a/yadageschemas/packtivity/publisher/frompar-pub-schema.json b/yadageschemas/packtivity/publisher/frompar-pub-schema.json index c3ad5fe..726442a 100644 --- a/yadageschemas/packtivity/publisher/frompar-pub-schema.json +++ b/yadageschemas/packtivity/publisher/frompar-pub-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Parameter Publisher", "additionalProperties": false, diff --git a/yadageschemas/packtivity/publisher/fromparjq-pub-schema.json b/yadageschemas/packtivity/publisher/fromparjq-pub-schema.json index 770893e..43b913c 100644 --- a/yadageschemas/packtivity/publisher/fromparjq-pub-schema.json +++ b/yadageschemas/packtivity/publisher/fromparjq-pub-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Parameter Publisher", "additionalProperties": false, diff --git a/yadageschemas/packtivity/publisher/fromyaml-pub-schema.json b/yadageschemas/packtivity/publisher/fromyaml-pub-schema.json index a660565..f25f5d3 100644 --- a/yadageschemas/packtivity/publisher/fromyaml-pub-schema.json +++ b/yadageschemas/packtivity/publisher/fromyaml-pub-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "YAML Publisher", "additionalProperties": false, diff --git a/yadageschemas/packtivity/publisher/interpolated-pub-schema.json b/yadageschemas/packtivity/publisher/interpolated-pub-schema.json index a130f63..7ab9f20 100644 --- a/yadageschemas/packtivity/publisher/interpolated-pub-schema.json +++ b/yadageschemas/packtivity/publisher/interpolated-pub-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Simple Interpolated Publisher", "additionalProperties": false, diff --git a/yadageschemas/packtivity/publisher/manual-instructions-pub-schema.json b/yadageschemas/packtivity/publisher/manual-instructions-pub-schema.json index e631853..ee2c50a 100644 --- a/yadageschemas/packtivity/publisher/manual-instructions-pub-schema.json +++ b/yadageschemas/packtivity/publisher/manual-instructions-pub-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Manual Instructions Publisher", "additionalProperties": false, diff --git a/yadageschemas/validator.py b/yadageschemas/validator.py index 0dcaafd..ffcfed8 100644 --- a/yadageschemas/validator.py +++ b/yadageschemas/validator.py @@ -3,11 +3,11 @@ from .dialects import raw_with_defaults assert raw_with_defaults -from jsonschema import Draft4Validator +from jsonschema import Draft6Validator def validator(schema_name,schemadir): schema, resolver = schema_and_refresolver(schema_name,schemadir) - return Draft4Validator(schema, resolver = resolver) + return Draft6Validator(schema, resolver = resolver) def validate_spec(data, validopts): return validator(**validopts).validate(data) diff --git a/yadageschemas/yadage/predicates/exprfulfilled-schema.json b/yadageschemas/yadage/predicates/exprfulfilled-schema.json index c72357b..ff71fa0 100644 --- a/yadageschemas/yadage/predicates/exprfulfilled-schema.json +++ b/yadageschemas/yadage/predicates/exprfulfilled-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "JSONPath ready predicate", "additionalProperties": false, diff --git a/yadageschemas/yadage/predicates/jsonpathready-schema.json b/yadageschemas/yadage/predicates/jsonpathready-schema.json index f6bf5c2..45089d9 100644 --- a/yadageschemas/yadage/predicates/jsonpathready-schema.json +++ b/yadageschemas/yadage/predicates/jsonpathready-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "JSONPath ready predicate", "additionalProperties": false, diff --git a/yadageschemas/yadage/scheduler/cases.json b/yadageschemas/yadage/scheduler/cases.json index 085376b..a8127e2 100644 --- a/yadageschemas/yadage/scheduler/cases.json +++ b/yadageschemas/yadage/scheduler/cases.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type":"array", "items":{ "type":"object", diff --git a/yadageschemas/yadage/scheduler/jq-stage-schema.json b/yadageschemas/yadage/scheduler/jq-stage-schema.json index 93bc608..98e4e5d 100644 --- a/yadageschemas/yadage/scheduler/jq-stage-schema.json +++ b/yadageschemas/yadage/scheduler/jq-stage-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "jq Scheduler", "additionalProperties": true, diff --git a/yadageschemas/yadage/scheduler/multistep-stage-schema.json b/yadageschemas/yadage/scheduler/multistep-stage-schema.json index c254e42..b2f3284 100644 --- a/yadageschemas/yadage/scheduler/multistep-stage-schema.json +++ b/yadageschemas/yadage/scheduler/multistep-stage-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Multiple Step Scheduler", "additionalProperties": false, diff --git a/yadageschemas/yadage/scheduler/parameterselection.json b/yadageschemas/yadage/scheduler/parameterselection.json index 4f7bc4d..224c4bb 100644 --- a/yadageschemas/yadage/scheduler/parameterselection.json +++ b/yadageschemas/yadage/scheduler/parameterselection.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type":"array", "title": "Parameter Selection", "items":{ diff --git a/yadageschemas/yadage/scheduler/singlestep-stage-schema.json b/yadageschemas/yadage/scheduler/singlestep-stage-schema.json index 9805210..9d2071f 100644 --- a/yadageschemas/yadage/scheduler/singlestep-stage-schema.json +++ b/yadageschemas/yadage/scheduler/singlestep-stage-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Single Step Scheduler", "additionalProperties": false, diff --git a/yadageschemas/yadage/scheduler/value_registration.json b/yadageschemas/yadage/scheduler/value_registration.json index 70090b1..ef26520 100644 --- a/yadageschemas/yadage/scheduler/value_registration.json +++ b/yadageschemas/yadage/scheduler/value_registration.json @@ -1,4 +1,4 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object" } diff --git a/yadageschemas/yadage/stage-schema.json b/yadageschemas/yadage/stage-schema.json index b1b1792..809def0 100644 --- a/yadageschemas/yadage/stage-schema.json +++ b/yadageschemas/yadage/stage-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Yadage Stage", "additionalProperties": false, @@ -8,7 +8,7 @@ "type": "string" }, "dependencies": { - "type": "object", + "type": "array", "oneOf":[ {"$ref":"predicates/jsonpathready-schema.json#"}, {"$ref":"predicates/exprfulfilled-schema.json#"} diff --git a/yadageschemas/yadage/workflow-schema.json b/yadageschemas/yadage/workflow-schema.json index dffd0cc..60f5822 100644 --- a/yadageschemas/yadage/workflow-schema.json +++ b/yadageschemas/yadage/workflow-schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-06/schema#", "type": "object", "title": "Yadage Workflow", "additionalProperties": false,