Tweak special case: only strip Schema as suffix

This commit is contained in:
F. Eugene Aumson
2018-12-14 16:11:00 -08:00
parent 57ac2f28a4
commit 6639201fdb

View File

@@ -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"