In #2354 , in Section #2.4 of the style guide we say that Get and Delete requests for a resource should carry a name field holding the sub-resource name. For a singleton sub-resource that name must be default. Today we have EgressPolicy (Actor), AccessPolicy (Atespace) and AccessPolicy (Global) as singleton subresources. Neither of them have it.
This is inconsistent with Create, where clients must already set metadata.name to default. The same resource should be named the same way on every method. It also means singleton subresources use different request shape from other subresources, which makes the style guide confusing.
Proposed change
- Add a
name field to each Get<Parent><Resource>Request and Delete<Parent><Resource>Request> message.
- Reject any value other than
default with INVALID_ARGUMENT (we already have a custom validator).
In #2354 , in Section #2.4 of the style guide we say that Get and Delete requests for a resource should carry a name field holding the sub-resource name. For a singleton sub-resource that name must be default. Today we have EgressPolicy (Actor), AccessPolicy (Atespace) and AccessPolicy (Global) as singleton subresources. Neither of them have it.
This is inconsistent with Create, where clients must already set
metadata.nametodefault. The same resource should be named the same way on every method. It also means singleton subresources use different request shape from other subresources, which makes the style guide confusing.Proposed change
namefield to eachGet<Parent><Resource>RequestandDelete<Parent><Resource>Request>message.defaultwithINVALID_ARGUMENT(we already have a custom validator).