@@ -350,6 +350,10 @@ class Book
350350Parameters declared on properties are automatically applied to all operations on the resource. You
351351can restrict a parameter to specific operations using the `operations` argument.
352352
353+ The restriction matches on the operation class, not on a single configured operation. If a resource
354+ declares two `Get` operations with different URI templates, `operations : [new Get()]` applies the
355+ parameter to both of them.
356+
353357# ## Filtering a Single Property
354358
355359Most of the time, a parameter maps directly to a property on your resource. For example, a
@@ -1015,21 +1019,22 @@ class User {}
10151019
10161020## Parameter Attribute Reference
10171021
1018- | Property | Description |
1019- | ------------------ | --------------------------------------------------------------------------------------------------------------------- |
1020- | ` key ` | The name of the parameter (e.g., ` name ` , ` order ` ). |
1021- | ` filter ` | The filter service or instance that processes the parameter's value. |
1022- | ` provider ` | A service that transforms the parameter's value before it's used. |
1023- | ` description ` | A description for the API documentation. |
1024- | ` property ` | The resource property this parameter is mapped to. |
1025- | ` required ` | Whether the parameter is required. |
1026- | ` constraints ` | Symfony Validator constraints to apply to the value. |
1027- | ` schema ` | A JSON Schema for validation and documentation. |
1028- | ` castToArray ` | Casts the parameter value to an array. Useful for query parameters like ` foo[]=1&foo[]=2 ` . Defaults to ` true ` . |
1029- | ` castToNativeType ` | Casts the parameter value to its native PHP type based on the ` schema ` . |
1030- | ` openApi ` | Customize OpenAPI documentation or hide the parameter (` false ` ). |
1031- | ` hydra ` | Hide the parameter from Hydra documentation (` false ` ). |
1032- | ` security ` | A [ Symfony expression] ( https://symfony.com/doc/current/security/expressions.html ) to control access to the parameter. |
1022+ | Property | Description |
1023+ | ------------------ | ----------------------------------------------------------------------------------------------------------------------- |
1024+ | ` key ` | The name of the parameter (e.g., ` name ` , ` order ` ). |
1025+ | ` filter ` | The filter service or instance that processes the parameter's value. |
1026+ | ` provider ` | A service that transforms the parameter's value before it's used. |
1027+ | ` description ` | A description for the API documentation. |
1028+ | ` property ` | The resource property this parameter is mapped to. |
1029+ | ` required ` | Whether the parameter is required. |
1030+ | ` constraints ` | Symfony Validator constraints to apply to the value. |
1031+ | ` schema ` | A JSON Schema for validation and documentation. |
1032+ | ` castToArray ` | Casts the parameter value to an array. Useful for query parameters like ` foo[]=1&foo[]=2 ` . Defaults to ` true ` . |
1033+ | ` castToNativeType ` | Casts the parameter value to its native PHP type based on the ` schema ` . |
1034+ | ` openApi ` | Customize OpenAPI documentation or hide the parameter (` false ` ). |
1035+ | ` hydra ` | Hide the parameter from Hydra documentation (` false ` ). |
1036+ | ` operations ` | On a property-level parameter, the operation classes the parameter applies to. Applies to every operation when not set. |
1037+ | ` security ` | A [ Symfony expression] ( https://symfony.com/doc/current/security/expressions.html ) to control access to the parameter. |
10331038
10341039## Parameter Security
10351040
0 commit comments