Skip to content
Draft
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
9 changes: 2 additions & 7 deletions compiletojsonschema/compiletojsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from collections import OrderedDict
from copy import deepcopy

import jsonref


class CompileToJsonSchema:
def __init__(
Expand All @@ -31,15 +29,12 @@ def __init__(
def get(self):
if self.input_filename:
with open(self.input_filename) as fp:
resolved = jsonref.load(
resolved = json.load(
fp,
object_pairs_hook=OrderedDict,
base_uri=pathlib.Path(
os.path.realpath(self.input_filename)
).as_uri(),
)
elif isinstance(self.input_schema, dict):
resolved = jsonref.JsonRef.replace_refs(self.input_schema)
resolved = self.input_schema
else:
raise Exception("Must pass input_filename or input_schema")

Expand Down