api docs: Render example responses as with JSON codehilite.

This makes the example responses a lot prettier visually.
This commit is contained in:
Tim Abbott
2020-03-26 21:15:46 -07:00
parent 820f0e275e
commit 06c97b5be2

View File

@@ -337,7 +337,7 @@ class APICodeExamplesPreprocessor(Preprocessor):
fixture_json = json.dumps(fixture_dict, indent=4, sort_keys=True,
separators=(',', ': '))
fixture.append('```')
fixture.append('``` json')
fixture.extend(fixture_json.splitlines())
fixture.append('```')