Skip to content

Commit

Permalink
switch to draft/2020-12 default
Browse files Browse the repository at this point in the history
  • Loading branch information
kratsg committed Dec 7, 2023
1 parent fcfab82 commit 862aabb
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/pyhf/schema/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ def validate(

Validator = jsonschema.Draft202012Validator

# downgrade Validator for v1.0.0
if version == '1.0.0':
Validator = jsonschema.Draft6Validator # type: ignore[assignment]

if allow_tensors:
type_checker = Validator.TYPE_CHECKER.redefine(
"array", _is_array_or_tensor
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/schemas/1.0.0/defs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$schema": "http://json-schema.org/draft/2020-12/schema#",
"$id": "https://scikit-hep.org/pyhf/schemas/1.0.0/defs.json",
"definitions": {
"workspace": {
Expand Down
2 changes: 1 addition & 1 deletion src/pyhf/schemas/1.0.0/jsonpatch.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$schema": "http://json-schema.org/draft/2020-12/schema#",
"$id": "https://scikit-hep.org/pyhf/schemas/1.0.0/jsonpatch.json",
"$ref": "defs.json#/definitions/jsonpatch"
}
2 changes: 1 addition & 1 deletion src/pyhf/schemas/1.0.0/measurement.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$schema": "http://json-schema.org/draft/2020-12/schema#",
"$id": "https://scikit-hep.org/pyhf/schemas/1.0.0/measurement.json",
"$ref": "defs.json#/definitions/measurement"
}
2 changes: 1 addition & 1 deletion src/pyhf/schemas/1.0.0/model.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$schema": "http://json-schema.org/draft/2020-12/schema#",
"$id": "https://scikit-hep.org/pyhf/schemas/1.0.0/model.json",
"$ref": "defs.json#/definitions/model"
}
2 changes: 1 addition & 1 deletion src/pyhf/schemas/1.0.0/patchset.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$schema": "http://json-schema.org/draft/2020-12/schema#",
"$id": "https://scikit-hep.org/pyhf/schemas/1.0.0/patchset.json",
"$ref": "defs.json#/definitions/patchset"
}
2 changes: 1 addition & 1 deletion src/pyhf/schemas/1.0.0/workspace.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$schema": "http://json-schema.org/draft/2020-12/schema#",
"$id": "https://scikit-hep.org/pyhf/schemas/1.0.0/workspace.json",
"$ref": "defs.json#/definitions/workspace"
}

0 comments on commit 862aabb

Please sign in to comment.