File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/apispec_webframeworks Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,10 @@ def path_helper(
141141 ** kwargs : Any ,
142142 ) -> Optional [str ]:
143143 """Path helper that allows passing a Flask view function."""
144- assert view is not None or rule is not None
145144 assert operations is not None
146145
147146 if rule is None :
147+ assert view is not None
148148 rule = self ._rule_for_view (view , app = app )
149149 if view is None :
150150 view = self ._view_for_rule (rule , app = app )
@@ -153,7 +153,7 @@ def path_helper(
153153 doc_operations = {
154154 k : v
155155 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-" )
157157 }
158158 operations .update (doc_operations )
159159 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