File tree 1 file changed +2
-2
lines changed
src/apispec_webframeworks 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,10 @@ def path_helper(
141
141
** kwargs : Any ,
142
142
) -> Optional [str ]:
143
143
"""Path helper that allows passing a Flask view function."""
144
- assert view is not None or rule is not None
145
144
assert operations is not None
146
145
147
146
if rule is None :
147
+ assert view is not None
148
148
rule = self ._rule_for_view (view , app = app )
149
149
if view is None :
150
150
view = self ._view_for_rule (rule , app = app )
@@ -153,7 +153,7 @@ def path_helper(
153
153
doc_operations = {
154
154
k : v
155
155
for k , v in doc_operations .items ()
156
- if k .upper () in rule .methods or k .startswith ("x-" )
156
+ if rule . methods is None or k .upper () in rule .methods or k .startswith ("x-" )
157
157
}
158
158
operations .update (doc_operations )
159
159
if hasattr (view , "view_class" ) and issubclass (view .view_class , MethodView ): # noqa: E501
You can’t perform that action at this time.
0 commit comments