I am using api-platform 2.6 with symfony 6. I have a model
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Annotation\ApiProperty;
#[ApiResource(
itemOperations: [
'get' => [
'path' => '',
],
]
)]
class SomeName
{
#[ApiProperty(identifier: true)]
public string $pathInfo;
$pathInfo is a identifier and can take values of the form like "/some/path/.../". I would like to use this api method like
/some-name/?pathInfo=/some/path/.../
where $pathInfo is a query (GET) parameter. How can I do this?
I have tried this
itemOperations: [
'get' => [
'path' => '?pathInfo={pathInfo}',
],
],
but I get error "No route found for..." and I don't like that in OpenApi documentation this api method looks like "/some-name?pathInfo={pathInfo}"