Multiple GetCollection() declaration in ApiResource #2402
Unanswered
SimonAmade
asked this question in
Q&A
Replies: 1 comment 5 replies
-
It may be a bug and yes declaring 2 resources is better. Anyways, it should work. Still, what is your use case this looks wrong semantically. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I have multiple GetCollection with each a specific logic, it seems that I can't declare multiple GetCollection like so
#[ApiResource( operations: [ new Get(), new GetCollection(uriTemplate: 'uri/template/one'), new GetCollection(uriTemplate: 'uri/template/two') ] )]
The second returns 'This route does not aim to be called'. I have tried to name each collection. Nothing is working.
The only solution is for me to declare two ApiResource within my entity and one GetCollection in each.
Is it the correct way, I am doing something wrong ?
Beta Was this translation helpful? Give feedback.
All reactions