Skip to content

Commit

Permalink
applied more suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
toumorokoshi committed Nov 16, 2024
1 parent 74a6cfa commit 5851b86
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions aep/general/0137/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ In REST APIs, it is customary to make a `PUT` request to a collection's URI (for
example, `/v1/publishers/{publisher}/books`) in order to create or replace a new
resource within that collection.

Resource-oriented design (AEP-121) honors this pattern through the `Apply`
[Resource-oriented design](/resources) honors this pattern through the `Apply`
method. These RPCs accept the parent collection and the resource to create or
replace, and then return, the final resource.

Expand All @@ -28,7 +28,7 @@ Apply methods are specified using the following pattern:
**should** be the only variable in the URI path.
- The collection identifier (`books` in the above example) **must** be a
literal string.
- The operation **must** have [strong consistency][].
- The operation **must** have [strong consistency](/resources#strong-consistency).

{% tab proto %}

Expand Down Expand Up @@ -71,12 +71,9 @@ Apply methods implement a common request message pattern:
{% sample '../example.proto', 'message ApplyBookRequest' %}

- A `path` field specifying the path of the resource **must** be included.
- The field **must** be [annotated as `REQUIRED`][aep-203].
- The field **must** identify the [resource type][aep-4] of the resource
- The field **must** be [annotated as `REQUIRED`](/field-behavior-documentation).
- The field **must** identify the [resource type](/resource-types) of the resource
being applied.
- The request message **must not** contain any other required fields and
**should not** contain other optional fields except those described in this
or another AEP.

{% tab oas %}

Expand All @@ -92,7 +89,7 @@ Apply methods implement a common request message pattern:
schema.
- The response **should** include the fully-populated resource, and **must**
include any fields that were provided unless they are input only (see
AEP-203).
[field behavior](/field-behavior-documentation)).

{% tab proto %}

Expand All @@ -106,8 +103,8 @@ Apply methods implement a common request message pattern:

### Errors

See [errors][], in particular [when to use PERMISSION_DENIED and NOT_FOUND
errors][permission-denied].
See [errors](/errors), in particular [when to use PERMISSION_DENIED and NOT_FOUND
errors](/errors#permission-denied).

## Interface Definitions

Expand All @@ -127,18 +124,7 @@ errors][permission-denied].

## Further reading

- For ensuring idempotency in `Apply` methods, see AEP-155.
- For naming resources involving Unicode, see AEP-210.

[aep-121]: ./0121.md
[aep-122]: ./0122.md
[aep-4]: ./0004.md
[aep-155]: ./0155.md
[aep-203]: ./0203.md
[aep-210]: ./0210.md
[data plane]: ./0111.md#data-plane
[errors]: ./0193.md
[field_behavior]: ./203.md
[Declarative clients]: ./0003.md#declarative-clients
[permission-denied]: ./0193.md#permission-denied
- For ensuring idempotency in `Apply` methods, see [idempotency](/idempotency).
- For naming resources involving Unicode, see [unicode](/unicode).

[strong consistency]: ./0121.md#strong-consistency

0 comments on commit 5851b86

Please sign in to comment.