Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Require jsonschema>=4.10.0 for schema validation #46

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/packtivity/environment/localproc-schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/packtivity/environment/noop-env-schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/packtivity/packtivity-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/packtivity/process/scriptproc-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/packtivity/process/stringinterp-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/packtivity/publisher/frompar-pub-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions yadageschemas/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion yadageschemas/yadage/predicates/exprfulfilled-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/yadage/predicates/jsonpathready-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/yadage/scheduler/cases.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/yadage/scheduler/jq-stage-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/yadage/scheduler/multistep-stage-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/yadage/scheduler/parameterselection.json
Original file line number Diff line number Diff line change
@@ -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":{
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/yadage/scheduler/value_registration.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object"
}
4 changes: 2 additions & 2 deletions yadageschemas/yadage/stage-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -8,7 +8,7 @@
"type": "string"
},
"dependencies": {
"type": "object",
"type": "array",
"oneOf":[
{"$ref":"predicates/jsonpathready-schema.json#"},
{"$ref":"predicates/exprfulfilled-schema.json#"}
Expand Down
2 changes: 1 addition & 1 deletion yadageschemas/yadage/workflow-schema.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Loading