Skip to content

Commit

Permalink
Bump the version of jsonschema (#1556)
Browse files Browse the repository at this point in the history
* Bump the version of jsonschema

OpenAPI 3.1 uses JSON Schema Draft 2020-12 so we need a version that
supports it.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Fix PR number

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
  • Loading branch information
zecakeh committed Jun 7, 2023
1 parent 45b6aaf commit f4aa7c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelogs/internal/newsfragments/1556.clarification
@@ -0,0 +1 @@
Bump jsonschema to validate JSON Schemas against Draft 2020-12.
2 changes: 1 addition & 1 deletion scripts/check-event-schema-examples.py
Expand Up @@ -88,7 +88,7 @@ def check_example_file(examplepath, schemapath):

fileurl = "file://" + os.path.abspath(schemapath)
schema["id"] = fileurl
resolver = jsonschema.RefResolver(schemapath, schema, handlers={"file": load_file})
resolver = jsonschema.RefResolver(fileurl, schema, handlers={"file": load_file})

print ("Checking schema for: %r %r" % (examplepath, schemapath))
try:
Expand Down
5 changes: 2 additions & 3 deletions scripts/requirements.txt
@@ -1,9 +1,8 @@
# no doubt older versions would be fine for many of these but these were
# current at the time of writing

# jsonschema 3.0.0 objects to the $refs in our schema file. TODO: figure out
# why.
jsonschema >= 2.6.0, < 3.0.0
# we need at least version 4.0.0 for support of JSON Schema Draft 2020-12.
jsonschema >= 4.0.0

PyYAML >= 3.12
requests >= 2.18.4
Expand Down

0 comments on commit f4aa7c0

Please sign in to comment.