Skip to content

Commit

Permalink
Corrijo cantidad de forward slashes en base_uri scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
capitantoto committed Jan 10, 2017
1 parent 661362a commit 272a7d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pydatajson/pydatajson.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,13 @@ def _create_validator(cls, schema_filename, schema_dir):

# Según https://github.com/Julian/jsonschema/issues/98
# Permite resolver referencias locales a otros esquemas.
base_uri = "file:///" + schema_path.replace("\\", "/")
base_uri = "file://" + schema_path.replace("\\", "/")
# print(base_uri)
resolver = jsonschema.RefResolver(
base_uri=base_uri,
referrer=schema)

# print(resolver.base_uri)
# print(urlparse(resolver.base_uri))
format_checker = jsonschema.FormatChecker()

validator = jsonschema.Draft4Validator(
Expand Down

0 comments on commit 272a7d8

Please sign in to comment.