I have such an annotation
* collectionOperations={
* "get" = {"method" = "GET", "path"="/users/{id}/badges"}
* }
But it says
Unable to generate an IRI for "{MyClass}"
This is happening due to these lines (parameters are not passed)
public function getIriFromResourceClass(string $resourceClass, int $referenceType = UrlGeneratorInterface::ABS_PATH): string
{
try {
return $this->router->generate($this->routeNameResolver->getRouteName($resourceClass, true), [], $referenceType);
} catch (RoutingExceptionInterface $e) {
throw new InvalidArgumentException(sprintf('Unable to generate an IRI for "%s".', $resourceClass), $e->getCode(), $e);
}
}
What do you think about passing a query from the current request there?