From 6639201fdbfe28f9d49e19f29b5606ba9cebdd85 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Fri, 14 Dec 2018 16:11:00 -0800 Subject: Tweak special case: only strip Schema as suffix --- python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python-packages') diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py b/python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py index f609ea103..1752c5761 100644 --- a/python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py +++ b/python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py @@ -27,7 +27,9 @@ class _LocalRefResolver(jsonschema.RefResolver): # handle weird special cases _ref = _ref.replace("ECSignature", "EcSignature") - _ref = _ref.replace("Schema", "") + if _ref.endswith("Schema"): + # strip off the Schema suffix + _ref = _ref[:-6] return f"{snakecase(_ref)}_schema.json" -- cgit