Skip to content

Commit

Permalink
Fixed description of identifier parameter
Browse files Browse the repository at this point in the history
I think it is an unexprected behaviour that resource description and summary take the `shortName` parameter into consideration when generating the OpenApi documentation but the identifier parameter description doesn't.
  • Loading branch information
Timu57 committed Feb 23, 2024
1 parent 5e4b631 commit 633fc5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OpenApi/Factory/OpenApiFactory.php
Expand Up @@ -265,7 +265,7 @@ private function collectPaths(ApiResource $resource, ResourceMetadataCollection
continue;
}

$parameter = new Parameter($parameterName, 'path', (new \ReflectionClass($uriVariable->getFromClass()))->getShortName().' identifier', true, false, false, ['type' => 'string']);
$parameter = new Parameter($parameterName, 'path', "$resourceShortName identifier", true, false, false, ['type' => 'string']);
if ($this->hasParameter($openapiOperation, $parameter)) {
continue;
}
Expand Down

0 comments on commit 633fc5b

Please sign in to comment.