diff --git a/core/filters.md b/core/filters.md index fbf442ee2c9..4306ae9771b 100644 --- a/core/filters.md +++ b/core/filters.md @@ -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 = ''; } @@ -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