ApplicantPortal/app/util/schema.py
2025-03-12 20:43:26 -06:00

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)