In the documentation regarding search of the REST API, the following is indicated about the case when a Resource has more than one field with the same name and a search by query parameters is to be done:
Some search parameters defined by resources are associated with more than one path in a resource. This means that the search parameter matches if any of the paths contain matching content. If a path matches, the whole resource is returned in the search results. The client may have to examine the resource to determine which path contains the match.
This means that the client is the one handling the responsability of these cases. My doubt is:
- Is there any way to handle this behaviour in the backend? Maybe by making some kind of distinction between the duplicated query parameters?