Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions aep/general/0136/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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.).
Expand Down Expand Up @@ -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 %}

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions aep/general/0136/translate.oas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0136/translate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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: "*"
};
}
Expand Down
Loading