The current "Filtering" spec says:
This specification only supports filtering based upon strict matching.
This is great, however, it doesn't mention anything about filtering on collections (arrays) or to-many relationships.
To take the existing example of filtering on "author", let's assume that there are multiple "authors" for a single post:
{
"id": "1",
"title": "Rails is Omakase",
"links": {
"authors": ["17", "19", "21"]
},
"tags": ["foo", "bar"]
}
To filter posts on the to-many relationship of authors by value "19", I would expect the request to be:
When a filter condition is provided for a collection (array) or to-many relationship, I would expect it to filter posts where the value of 19 is IN the authors collection.
Another example would be to filter posts by a tag:
I would expect the results to include posts that had the value of "bar" in the tags array.
Thoughts?
The current "Filtering" spec says:
This is great, however, it doesn't mention anything about filtering on collections (arrays) or to-many relationships.
To take the existing example of filtering on "author", let's assume that there are multiple "authors" for a single post:
To filter posts on the to-many relationship of authors by value "19", I would expect the request to be:
When a filter condition is provided for a collection (array) or to-many relationship, I would expect it to filter posts where the value of 19 is IN the authors collection.
Another example would be to filter posts by a tag:
I would expect the results to include posts that had the value of "bar" in the tags array.
Thoughts?