File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,15 @@ public function generate()
5151 $ this ->docs ['paths ' ][$ this ->uri ] = [];
5252 }
5353
54- $ this ->addAuthParameters ($ route ->middleware ());
55-
54+
5655 foreach ($ methods as $ method ) {
5756 $ this ->method = strtolower ($ method );
58-
57+
5958 if (in_array ($ this ->method , $ this ->config ['ignoredMethods ' ])) continue ;
60-
59+
6160 $ this ->generatePath ();
61+
62+ $ this ->addAuthParameters ($ route ->middleware ());
6263 }
6364 }
6465
@@ -188,7 +189,7 @@ protected function addAuthParameters($middlewares)
188189 return (strpos ($ var , 'jwt ' ) > -1 );
189190 });
190191 if ($ hasAuth ) {
191- $ this ->docs ['paths ' ]['security ' ] = [
192+ $ this ->docs ['paths ' ][$ this -> uri ][ $ this -> method ][ 'security ' ] = [
192193 'api_key ' => []
193194 ];
194195 }
You can’t perform that action at this time.
0 commit comments