Switch to using $ instead of # for sub-types

# is reserved by the swagger validator as a way to include partial content from a JSON object (eg: "#/path" would include {"test": true} from the object {"path":{"test":true}}). Instead of trying to convince the validator that it is wrong, we'll just use a different character.

Note that our rendering tools do not care about #-style references to objects. It's still somewhat worth changing the character though.
This commit is contained in:
Travis Ralston 2019-05-29 15:23:45 -06:00
parent c25afa663e
commit d6d74c4cbe
37 changed files with 29 additions and 29 deletions

View file

@ -112,8 +112,8 @@ def check_example_dir(exampledir, schemadir):
continue
examplepath = os.path.join(root, filename)
schemapath = examplepath.replace(exampledir, schemadir)
if schemapath.find("#") >= 0:
schemapath = schemapath[:schemapath.find("#")]
if schemapath.find("$") >= 0:
schemapath = schemapath[:schemapath.find("$")]
try:
check_example_file(examplepath, schemapath)
except Exception as e: