@@ -28,15 +28,15 @@ In the guidance below, we use the following terms:
2828 This usually (but not necessarily) matches the hostname that users use to
2929 call the service. Example: ` pubsub.googleapis.com ` . This is equivalent to an
3030 [ API Group] [ ] in Kubernetes.
31- - ** Type:** This is the name used for the type within the API. This * should*
32- match the name of the protobuf message. This is equivalent to an [ Object] [ ] in
33- Kubernetes.
31+ - ** Type:** This is the name used for the type within the API e.g. the name of
32+ the Protobuf ` message ` . This is equivalent to an [ Object] [ ] in Kubernetes.
3433
3534## Guidance
3635
3736APIs ** must** define a resource type for each resource in the API, according to
3837the following pattern: ` {Service Name}/{Type} ` . The type name ** must** :
3938
39+ - Match the containing API type's name.
4040- Start with an uppercase letter.
4141- Only contain alphanumeric characters.
4242- Be of the singular form of the noun.
@@ -104,6 +104,15 @@ resource:
104104
105105## Rationale
106106
107+ ### Type and message name alignment
108+
109+ In addition to simple schema-resource coherence and alignment, a number of
110+ consumers benefit from the ` {Type} ` and ` message ` names matching. Consumers have
111+ simpler lookups, client libraries get the same in addition to aligned user
112+ experience where resource-oriented code has naming aligned with the generated
113+ ` message ` code, generated reference documentation aligns resources with
114+ ` message ` docs, etc.
115+
107116### Singular and Plural
108117
109118Well-defined singular and plurals of a resource enable clients to determine the
@@ -124,6 +133,7 @@ such as UpperCamelCase and snake_case.
124133
125134## Changelog
126135
136+ - ** 2025-01-09** : Strongly align resource type and message naming.
127137- ** 2024-08-07** : Added multi-pattern ordering compatibility requirements.
128138- ** 2023-09-19** : Prohibited duplicate pattern variables.
129139- ** 2023-05-06** : Added requirement of singular and plural.
0 commit comments