diff --git a/aep/general/0136/aep.md.j2 b/aep/general/0136/aep.md.j2 index 5255d692..01228d52 100644 --- a/aep/general/0136/aep.md.j2 +++ b/aep/general/0136/aep.md.j2 @@ -25,7 +25,8 @@ apply consistently: - The HTTP URI **must** use a `:` character followed by the custom verb (`:archive` in the above example), and the verb in the URI **must** match the verb in the name of the RPC. - - If word separation is required, `kebab-case` **must** be used. + - If word separation is required, `kebab-case` **must** be used (e.g. + `:translate-text`, not `:translateText`). - The name of the RPC **should** be a verb followed by a noun. - The name of the RPC **must not** contain prepositions ("for", "with", etc.). @@ -106,7 +107,7 @@ permanent effect on data within the API. {% tab oas %} -{% sample 'translate.oas.yaml', '$.paths./projects/{projectId}:translateText' %} +{% sample 'translate.oas.yaml', '$.paths./projects/{project_id}:translate-text' %} {% endtabs %} @@ -116,7 +117,8 @@ permanent effect on data within the API. used. - The URI **should** place both the verb and noun after the `:` separator (avoid a "faux collection key" in the URI in this case, as there is no - collection). For example, `:translateText` is preferable to `text:translate`. + collection). For example, `:translate-text` is preferable to + `text:translate`. - Stateless methods **must** use `POST` if they involve billing. ### Usage in declarative clients diff --git a/aep/general/0136/translate.oas.yaml b/aep/general/0136/translate.oas.yaml index 2974bc7a..dfe741fb 100644 --- a/aep/general/0136/translate.oas.yaml +++ b/aep/general/0136/translate.oas.yaml @@ -4,7 +4,7 @@ info: title: Library version: 1.0.0 paths: - /projects/{projectId}:translateText: + /projects/{project_id}:translate-text: post: operationId: translateText description: Translates the provided text from one language to another. @@ -37,7 +37,7 @@ paths: application/json: schema: description: | - Response structure for the translateText operation. + Response structure for the translate-text operation. properties: translated_text: type: string diff --git a/aep/general/0136/translate.proto b/aep/general/0136/translate.proto index 37f6e26d..2f7362e2 100644 --- a/aep/general/0136/translate.proto +++ b/aep/general/0136/translate.proto @@ -22,7 +22,7 @@ service Translate { // Translates the provided text from one language to another. rpc TranslateText(TranslateTextRequest) returns (TranslateTextResponse) { option (google.api.http) = { - post: "/v1/{project=projects/*}:translateText" + post: "/v1/{project=projects/*}:translate-text" body: "*" }; }