Skip to content

Commit

Permalink
fix cached route naming issues when route name is with prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko committed May 24, 2024
1 parent 24a27c9 commit 97a7b72
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private function getOperationId(RouteInfo $routeInfo)

// Using route name as operation ID if set. We need to avoid using generated route names as this
// will result gibberish operation IDs when routes without names are cached.
if (($name = $routeInfo->route->getName()) && ! Str::startsWith($name, 'generated::')) {
if (($name = $routeInfo->route->getName()) && ! Str::contains($name, 'generated::')) {
return Str::startsWith($name, 'api.') ? Str::replaceFirst('api.', '', $name) : $name;
}

Expand Down

0 comments on commit 97a7b72

Please sign in to comment.