Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class Book
#[QueryParameter(key: 'name', filter: new PartialSearchFilter(), operations: [new GetCollection()])]
public string $name = '';

// Applies only to GetCollection (Patch is not in the list of operations)
// Error: Patch is not declared in the resource operations
#[HeaderParameter(key: 'X-Authorization', operations: [new GetCollection(), new Patch()])]
public string $authToken = '';
}
Expand All @@ -354,6 +354,9 @@ The restriction matches on the operation class, not on a single configured opera
declares two `Get` operations with different URI templates, `operations: [new Get()]` applies the
parameter to both of them.

Every operation listed in `operations` must be declared in the resource operations, otherwise an
error is thrown.

### Filtering a Single Property

Most of the time, a parameter maps directly to a property on your resource. For example, a
Expand Down
Loading