-
-
Notifications
You must be signed in to change notification settings - Fork 954
Open
Description
Description
Add some native and easy to use way to allow to filter on relations of a resource, for instance applying filters on a Category resource with a OneToMany relationship to a Product resource, and only returning the products matching that filter.
Example
Something along the lines of
search[products.name]="egg"
Which would be defined as
'search[:property]' => new QueryParameter(
openApi: new Parameter(
name: 'search[:property][]',
in: 'query',
description: 'A fuzzy filter<br />Fields: `name`, `description`'
),
filter: new PartialSearchFilter(),
properties: ['name', 'description']
),Which would return a subset of Products on the Category resource matching the filter:
{
"@context": "/contexts/Category",
"@id": "/categories/12",
"@type": "Category",
"name": "Category Name",
"products": [
"/products/1",
"/products/5",
"/products/7"
]
}Metadata
Metadata
Assignees
Labels
No labels