From 248a8b350611e5ee92461c2a365f59169989894a Mon Sep 17 00:00:00 2001 From: Atli Thorbjornsson Date: Wed, 15 Apr 2015 23:53:24 +0000 Subject: [PATCH] JSON Schema for Swagger 2.0 now disallows 'id' in definitions, so we simply pop before output --- flask_swagger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_swagger.py b/flask_swagger.py index afee414..22c68ea 100644 --- a/flask_swagger.py +++ b/flask_swagger.py @@ -136,7 +136,7 @@ def spec(): if responses is not None: defs = defs + _extract_definitions(responses.values()) for definition in defs: - def_id = definition.get('id') + def_id = definition.pop('id') if def_id is not None: definitions[def_id].update(definition) operation = dict(