-
-
Notifications
You must be signed in to change notification settings - Fork 850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FindOne endpoint #72
Comments
What about a search with items by pages set to one? Supporting something like a findOne entry point looks over complicated and is against REST principles. |
Yeah but the items by page may be disabled right? Or we can consider that for this case the developer must enabled custom pagination and specify the value but it does not feel right. Since there is no doc for the custom pagination right now I can't check right away.
For that point you know a deal more than me^^ Whatever the solution should be it would be great to have it in the doc too. |
In REST, there is only resources and collection of resources (lists). It doesn't hurt me if a collection contain only one element. |
No I didn't mean the structure of the response, a collection with one item is perfectly fine by me. But the configuration seems a bit more annoying. |
I close it for the moment I'll repopen it depending of the configuration required if it's really too much for such simple use case. |
The current filters on collections allow to search for entities matching a given criteria. But sometimes we don't want to find entities, but the first entity matching a criteria. The easiest way to achieve that would be to add an endpoint
/offers/findOne?criteria
. So basically an endpoint on which the filters enabled for the collection are enabled too, but which returns the first entity found, pretty much like we did/offers?criteria
and then retrievedhydra:member[0]
.Do you think this could be added or do you deem it too specific?
The text was updated successfully, but these errors were encountered: