11 lines
265 B
Python
11 lines
265 B
Python
import os
|
|
import jsonref
|
|
|
|
|
|
def load_json_schema(filename):
|
|
base_path = os.path.dirname(filename)
|
|
base_url = f'file://{base_path}/'
|
|
|
|
with open(filename) as schema_file:
|
|
return jsonref.loads(schema_file.read(), base_uri=base_url, jsonschema=True)
|