Skip to content

Commit 5030bc1

Browse files
author
Martin Zihlmann
committed
filter out methods
1 parent bde7a99 commit 5030bc1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/apispec_webframeworks/flask.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def path_helper(
150150
view = self._view_for_rule(rule, app=app)
151151
view_doc = view.__doc__ or ""
152152
doc_operations = yaml_utils.load_operations_from_docstring(view_doc)
153+
doc_operations = {k: v for k, v in doc_operations.items() if k.upper() in rule.methods}
153154
operations.update(doc_operations)
154155
if hasattr(view, "view_class") and issubclass(view.view_class, MethodView): # noqa: E501
155156
# method attribute is dynamically added, which is supported by mypy

0 commit comments

Comments
 (0)