Skip to content

Get and Delete request messages for singleton subresources should take a name field. #2363

Description

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions