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

Jsonpath changes #234

Merged
merged 2 commits into from
Nov 1, 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
9 changes: 5 additions & 4 deletions aep/general/0124/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ associated with other resources through other fields on the resource.

{% tab oas %}

{% sample 'multiple_many_to_one.oas.yaml', 'Book' %}
{% sample 'multiple_many_to_one.oas.yaml', '$.components.schema.Book' %}


{% endtabs %}

Expand Down Expand Up @@ -51,7 +52,7 @@ described for repeated fields in [arrays][/arrays].

{% tab oas %}

{% sample 'many_to_many_repeated.oas.yaml', 'Book' %}
{% sample 'many_to_many_repeated.oas.yaml', '$.components.schema.Book' %}

{% endtabs %}

Expand All @@ -68,7 +69,7 @@ relationship using a sub-resource with two one-to-many associations.

{% tab oas %}

{% sample 'many_to_many_subresource.oas.yaml', 'BookAuthor' %}
{% sample 'many_to_many_subresource.oas.yaml', '$.components.schema.BookAuthor' %}

{% endtabs %}

Expand Down Expand Up @@ -133,7 +134,7 @@ to define a view enum simply because another resource references it.

{% tab oas %}

{% sample 'embedded_resource.oas.yaml', 'Book' %}
{% sample 'embedded_resource.oas.yaml', '$.components.schema.Book' %}

{% endtabs %}

Expand Down
2 changes: 1 addition & 1 deletion aep/general/0126/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ choice (although `google.protobuf.BoolValue` is also available).

{% tab oas %}

{% sample 'enum.oas.yaml', 'format' %}
{% sample 'enum.oas.yaml', '$.components.schema.Book.properties.format.enum' %}

- Enumerated fields **should** be strings.
- If the enum is optional, The `null` value **should** be used as the empty
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0132/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ when the REST/JSON interface is used.

`List` operations **must** be specified with consistent OpenAPI metadata:

{% sample 'list.oas.yaml', 'paths' %}
{% sample 'list.oas.yaml', '$.paths' %}

- The `operationId` **must** begin with the word `list`. The remainder of the
`operationId` **should** be the plural form of the resource type's name.
Expand Down
8 changes: 4 additions & 4 deletions aep/general/0135/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ rpc DeleteBook(DeleteBookRequest) returns (google.protobuf.Empty) {

{% tab oas %}

{% sample 'delete.oas.yaml', 'paths' %}
{% sample 'delete.oas.yaml', '$.paths' %}

- The response body **should** be omitted.
- The HTTP response code **should** be `204 No Content` if the delete was
Expand Down Expand Up @@ -104,7 +104,7 @@ message DeleteBookRequest {

{% tab oas -%}

{% sample 'delete.oas.yaml', 'paths' %}
{% sample 'delete.oas.yaml', '$.paths' %}

- Delete methods **should** return `204 No Content` with no response body, or
`202 Accepted` with a representation of the operation in the response body if
Expand Down Expand Up @@ -149,7 +149,7 @@ rpc DeleteBook(DeleteBookRequest) returns (aep.api.Operation) {

{% tab oas -%}

{% sample 'long_running_delete.oas.yaml', 'paths' %}
{% sample 'long_running_delete.oas.yaml', '$.paths' %}

- The response status code should be `202 Accepted` if the request was accepted
for later processing. When the request is processed it could still fail.
Expand Down Expand Up @@ -191,7 +191,7 @@ is `false` (or unset) and child resources are present.

{% tab oas -%}

{% sample 'cascading_delete.oas.yaml', 'paths' %}
{% sample 'cascading_delete.oas.yaml', '$.paths' %}

The API **must** fail with a `409 Conflict` error if the `force` field is
`false` (or unset) and child resources are present.
Expand Down
6 changes: 3 additions & 3 deletions aep/general/0136/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ apply consistently:

{% tab oas %}

{% sample 'library.oas.yaml', '/publishers/{publisherId}/books/{bookId}:archive' %}
{% 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",
Expand Down Expand Up @@ -86,7 +86,7 @@ While most custom methods operate on a single resource, some custom methods

{% tab oas %}

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

{% endtabs %}

Expand All @@ -106,7 +106,7 @@ permanent effect on data within the API.

{% tab oas %}

{% sample 'translate.oas.yaml', '/projects/{projectId}:translateText' %}
{% sample 'translate.oas.yaml', '$.paths./projects/{projectId}:translateText' %}

{% endtabs %}

Expand Down
4 changes: 2 additions & 2 deletions aep/general/0144/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ define custom methods using the verbs `Add` and `Remove`:

{% tab oas %}

{% sample 'add_remove.oas.yaml', 'paths' %}
{% sample 'add_remove.oas.yaml', '$.paths' %}

- The data being added or removed **should** be a primitive (usually a
`string`).
Expand Down Expand Up @@ -157,7 +157,7 @@ subresource instead.

{% tab oas %}

{% sample 'add_remove.oas.yaml', 'requestBody' %}
{% sample 'add_remove.oas.yaml', '$./publishers/{publisherId}/books/{bookId}:addAuthor.requestBody' %}

- A field for the value being added or removed **must** be included. It
**should** be the singular name of the field.
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0151/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ When using protocol buffers, the common component

{% tab oas %}

{% sample 'lro.oas.yaml', 'paths' %}
{% sample 'lro.oas.yaml', '$.paths' %}

- `202` **must** be the only success status code defined.
- The `202` response **must** define an `application/json` response body and no
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0164/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ A resource that supports soft delete **should** provide an `Undelete` method:

{% tab oas %}

{% sample 'undelete.oas.yaml', 'paths' %}
{% sample 'undelete.oas.yaml', '$.paths' %}

- The HTTP method **must** be `POST`.
- The response message **must** be the resource itself.
Expand Down
4 changes: 2 additions & 2 deletions aep/general/0231/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ message BatchGetBooksRequest {

{% tab oas %}

{% sample 'batchget.oas.yaml', 'paths' %}
{% sample 'batchget.oas.yaml', '$.paths' %}

- The `paths` parameter **must** be a query parameter which accepts an array of
resource paths specifying the resources to retrieve.
Expand Down Expand Up @@ -124,7 +124,7 @@ message BatchGetBooksResponse {

{% tab oas %}

{% sample 'batchget.oas.yaml', '/publishers/{publisherId}/books:BatchGet' %}
{% sample 'batchget.oas.yaml', '$.paths./publishers/{publisherId}/books:BatchGet' %}

Example response body:

Expand Down
Loading