enforce key order when writing swagger docs JSON

This commit is contained in:
Ryan Petrello 2019-01-16 16:00:27 -05:00
parent 584ec9cf75
commit 6d04bd34ce
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -163,7 +163,7 @@ class TestSwaggerGeneration():
@classmethod
def teardown_class(cls):
with open('swagger.json', 'w') as f:
data = json.dumps(cls.JSON, cls=i18nEncoder, indent=2)
data = json.dumps(cls.JSON, cls=i18nEncoder, indent=2, sort_keys=True)
# replace ISO dates w/ the same value so we don't generate
# needless diffs
data = re.sub(