Skip to content

Commit

Permalink
fix: make sure the route prefix is only applied once (#4490)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCrealm committed Oct 7, 2021
1 parent da82888 commit 366ba96
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -90,8 +90,7 @@ public function create(string $resourceClass): ResourceMetadataCollection

private function generateUriTemplate(Operation $operation): string
{
$uriTemplate = $operation->getRoutePrefix() ?: '';
$uriTemplate = sprintf('%s/%s', $uriTemplate, $this->pathSegmentNameGenerator->getSegmentName($operation->getShortName()));
$uriTemplate = sprintf('/%s', $this->pathSegmentNameGenerator->getSegmentName($operation->getShortName()));
$uriVariables = $operation->getUriVariables() ?? [];

if ($parameters = array_keys($uriVariables)) {
Expand Down

0 comments on commit 366ba96

Please sign in to comment.