aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorF. Eugene Aumson <feuGeneA@users.noreply.github.com>2018-12-15 08:11:00 +0800
committerF. Eugene Aumson <feuGeneA@users.noreply.github.com>2018-12-15 08:11:00 +0800
commit6639201fdbfe28f9d49e19f29b5606ba9cebdd85 (patch)
tree3914d0282d1466987750207cfd5f4206829fee96
parent57ac2f28a43067e51f1db1736b48893189ce9dd0 (diff)
downloaddexon-0x-contracts-6639201fdbfe28f9d49e19f29b5606ba9cebdd85.tar.gz
dexon-0x-contracts-6639201fdbfe28f9d49e19f29b5606ba9cebdd85.tar.zst
dexon-0x-contracts-6639201fdbfe28f9d49e19f29b5606ba9cebdd85.zip
Tweak special case: only strip Schema as suffix
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py4
1 files changed, 3 insertions, 1 deletions
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"