Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 248a8b3

Browse files
committed
JSON Schema for Swagger 2.0 now disallows 'id' in definitions, so we simply pop before output
1 parent c8e799b commit 248a8b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_swagger.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def spec():
136136
if responses is not None:
137137
defs = defs + _extract_definitions(responses.values())
138138
for definition in defs:
139-
def_id = definition.get('id')
139+
def_id = definition.pop('id')
140140
if def_id is not None:
141141
definitions[def_id].update(definition)
142142
operation = dict(

0 commit comments

Comments
 (0)