Skip to content

Commit 5457d04

Browse files
authored
Merge pull request #75 from foodszhang/fix_response_example
Change example object
2 parents 25969f3 + 1fd9ad2 commit 5457d04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

swagger_py_codegen/flask.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ def _process_data(self):
173173

174174
for status, res_data in data[method].get('responses', {}).iteritems():
175175
if isinstance(status, int) or status.isdigit():
176-
example = res_data.get('schema', {}).get('application/json')
176+
example = res_data.get('examples', {}).get('application/json')
177+
177178
if not example:
178179
example = build_default(res_data.get('schema'))
179180
response = example, int(status), build_default(res_data.get('headers'))

0 commit comments

Comments
 (0)