diff --git a/mappyfile.pyproj b/mappyfile.pyproj index 52c5805..0d4bc2d 100644 --- a/mappyfile.pyproj +++ b/mappyfile.pyproj @@ -12,7 +12,7 @@ mappyfile mappyfile MSBuild|mappyfile3|$(MSBuildProjectFullPath) - tests\test_utils.py + tests\test_validation.py Standard Python launcher False PATH=C:\MapServer\bin;%PATH% @@ -1199,6 +1199,15 @@ PROJ_LIB=C:\MapServer\bin\proj\SHARE + + mappyfile313 + 0.0 + mappyfile313 (Python 3.13 (64-bit)) + Scripts\python.exe + Scripts\pythonw.exe + PYTHONPATH + X64 + mappyfile3 3.10 diff --git a/mappyfile/validator.py b/mappyfile/validator.py index c699e8f..e79cb59 100644 --- a/mappyfile/validator.py +++ b/mappyfile/validator.py @@ -318,7 +318,9 @@ def get_expanded_schema( base_uri = self.get_schema_path(schemas_folder) with open(fn, encoding="utf-8") as f: - jsn_schema = jsonref.load(f, base_uri=base_uri) + jsn_schema = jsonref.load( + f, base_uri=base_uri, lazy_load=False, proxies=False + ) # cache the schema for future use self.expanded_schemas[cache_schema_name] = jsn_schema diff --git a/tests/test_validation.py b/tests/test_validation.py index 87548cb..9f0b2cf 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -333,6 +333,8 @@ def test_deref(): print(json.dumps(deref_schema, indent=4)) print(deref_schema["properties"]["filter"]) assert list(deref_schema["properties"]["filter"].keys())[0] == "anyOf" + print(json.dumps(deref_schema["properties"]["filter"])) + assert json.dumps(deref_schema["properties"]["filter"]) is not None def test_cached_schema(): @@ -622,6 +624,7 @@ def run_tests(): if __name__ == "__main__": logging.basicConfig(level=logging.INFO) - run_tests() + # run_tests() # test_double_error() + test_deref() print("Done!")