File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,14 @@ public static function createFromRoute(Route $route): RouteInformation
83
83
$ actionAttributes = collect ($ reflectionMethod ->getAttributes ())
84
84
->map (fn (ReflectionAttribute $ attribute ) => $ attribute ->newInstance ());
85
85
86
+ $ containsControllerLevelParamter = $ actionAttributes ->contains (fn ($ value ) => $ value instanceof \Vyuldashev \LaravelOpenApi \Attributes \Parameters);
87
+
86
88
$ instance ->domain = $ route ->domain ();
87
89
$ instance ->method = $ method ;
88
90
$ instance ->uri = Str::start ($ route ->uri (), '/ ' );
89
91
$ instance ->name = $ route ->getName ();
90
92
$ instance ->controller = $ controller ;
91
- $ instance ->parameters = $ parameters ;
93
+ $ instance ->parameters = $ containsControllerLevelParamter ? collect ([]) : $ parameters ;
92
94
$ instance ->controllerAttributes = $ controllerAttributes ;
93
95
$ instance ->action = $ action ;
94
96
$ instance ->actionParameters = $ reflectionMethod ->getParameters ();
You can’t perform that action at this time.
0 commit comments