Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Fix netflify deploy previews
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesrosiers committed Dec 17, 2021
1 parent 99ae132 commit c49169b
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 51 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pypi"
sphinx = "<2.0.0"
sphinx-bootstrap-theme = "*"
jsonschema = "*"
jschon = "0.6.0"
jschon = "0.7.3"

[dev-packages]

Expand Down
144 changes: 98 additions & 46 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions source/sphinxext/jsonschemaext.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from sphinx.util.nodes import set_source_info

import jsonschema
from jschon import Catalogue, JSON, JSONSchema, URI
from jschon import create_catalog, JSON, JSONSchema, URI


legacy = {
Expand All @@ -31,14 +31,13 @@ def validate(schema, part, standard):

return (is_valid, message)
else:
catalogue = Catalogue('2019-09', '2020-12')
Catalogue._default_catalogue = catalogue
catalogue = create_catalog('2019-09', '2020-12')

compiled_schema = JSONSchema(schema.json, metaschema_uri=URI(standard))
if not compiled_schema.validate().valid:
raise ValueError("Schema is invalid:\n{0}\n\n{1}".format(
"INVALID SCHEMA", schema.content))
elif part.json is (1+1j):
elif part.json == (1+1j):
return (False, 'INVALID JSON')
else:
jsonValue = JSON.loads(part.content)
Expand Down

0 comments on commit c49169b

Please sign in to comment.