Skip to content

Commit 06c00ec

Browse files
committed
Merge pull request getsling#4 from abhaga/patch-1
Handling multiple views for same route
2 parents d7c9a50 + 4e85ce6 commit 06c00ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flask_swagger.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,8 @@ def spec():
125125
rule = str(rule)
126126
for arg in re.findall('(<(.*?\:)?(.*?)>)', rule):
127127
rule = rule.replace(arg[0], '{%s}' % arg[2])
128-
paths[rule] = operations
128+
if rule in paths:
129+
paths[rule].update(operations)
130+
else:
131+
paths[rule] = operations
129132
return output

0 commit comments

Comments
 (0)