Skip to content

Commit 0ee67a7

Browse files
chensonggrochacbruno
authored andcommitted
apispec_to_template definition bugfix
generate spec dict after loading definitions
1 parent 1c6ecde commit 0ee67a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flasgger/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ def apispec_to_template(app, spec, definitions=None, paths=None):
378378
"""
379379
definitions = definitions or []
380380
paths = paths or []
381-
spec_dict = spec.to_dict()
382381

383382
with app.app_context():
384383
for definition in definitions:
@@ -393,6 +392,7 @@ def apispec_to_template(app, spec, definitions=None, paths=None):
393392
for path in paths:
394393
spec.path(view=path)
395394

395+
spec_dict = spec.to_dict()
396396
ret = ordered_dict_to_dict(spec_dict)
397397
return ret
398398

0 commit comments

Comments
 (0)