ApiPlatform\Core\Swagger\Serializer\DocumentationNormalizer::getPath PHP Method

getPath() private method

If the path ends with the optional _format parameter, it is removed as optional path parameters are not yet supported.
See also: https://github.com/OAI/OpenAPI-Specification/issues/93
private getPath ( string $resourceShortName, array $operation, boolean $collection ) : string
$resourceShortName string
$operation array
$collection boolean
return string
    private function getPath(string $resourceShortName, array $operation, bool $collection) : string
    {
        $path = $this->operationPathResolver->resolveOperationPath($resourceShortName, $operation, $collection);
        if ('.{_format}' === substr($path, -10)) {
            $path = substr($path, 0, -10);
        }
        return $path;
    }