Merge pull request #3012 from ryanpetrello/fix-swagger-key-ordering

enforce key order when writing swagger docs JSON
This commit is contained in:
Ryan Petrello 2019-01-16 16:43:43 -05:00 committed by GitHub
commit 27f98163ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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(