Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(openapi): publishes oas that passes linter #251

Merged
merged 2 commits into from
Dec 14, 2024
Merged
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
2 changes: 1 addition & 1 deletion aep/general/0135/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Delete methods implement a common request pattern:

{% tab oas %}

{% sample '../example.oas.yaml', '$.paths./publishers/{publisher}/books/{book}.delete.responses.200' %}
{% sample '../example.oas.yaml', '$.paths./publishers/{publisher}/books/{book}.delete.responses.204' %}

- Delete methods **should** return `204 No Content` with no response body.

Expand Down
21 changes: 11 additions & 10 deletions aep/general/0136/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ 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, `camelCase` **must** be used.
- If word separation is required, `kebab-case` **must** be used.
- 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.).

{% tab proto %}

{% sample 'library.proto', 'rpc ArchiveBook' %}

- The name of the RPC **should** be a verb followed by a noun.
- The name **must not** contain prepositions ("for", "with", etc.).
- The `body` clause in the `google.api.http` annotation **should** be `"*"`.
- However, if using `GET` or `DELETE`, the `body` clause **must** be absent.
- Custom methods **must** take a request message exactly matching the RPC name,
Expand All @@ -45,11 +46,11 @@ apply consistently:

{% tab oas %}

{% sample 'library.oas.yaml', '$.paths./publishers/{publisherId}/books/{bookId}:archive' %}

- 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.).
```http
POST /v1/publishers/{publisher}/book/{book}:archive HTTP/2
Host: bookstore.example.com
Accept: application/json
```

{% endtabs %}

Expand All @@ -64,14 +65,14 @@ such:

{% tab proto %}

{% sample 'library.proto', 'rpc ArchiveBook' %}
{% sample '../example.proto', 'rpc ArchivePublisher' %}

- The parameter for the resource's path **must** be called `path`, and **must**
be the only variable in the URI path.

{% tab oas %}

**Note:** OAS example not yet written.
{% sample '../example.oas.yaml', '$.paths./publishers/{publisher}/books/{book}:archive' %}

{% endtabs %}

Expand Down
Loading
Loading