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
3 changes: 2 additions & 1 deletion aep/general/0133/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ Create methods implement a common request message pattern:

{% tab oas %}

{% sample '../example.oas.yaml', '$.paths./publishers/{publisher_id}/books.post.responses.200' %}
{% sample '../example.oas.yaml', '$.paths./publishers/{publisher_id}/books.post.responses.201' %}

- The response **must** return a `201 Created` HTTP status code.
- The response **must** be the resource itself. There is no separate response
schema.
- The response **should** include the fully-populated resource, and **must**
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0137/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Apply methods implement a common request message pattern:

{% tab oas %}

{% sample '../example.oas.yaml', '$.paths./publishers/{publisher_id}/books/{book_id}.put.responses.200' %}
{% sample '../example.oas.yaml', '$.paths./publishers/{publisher_id}/books/{book_id}.put.responses' %}

- If the resource is created, the response **must** return a `201` status code.
- If the resource is updated, the response **must** return a `200` status code.
Expand Down
24 changes: 18 additions & 6 deletions aep/general/example.oas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ paths:
$ref: '#/components/schemas/isbn'
required: true
responses:
'200':
'201':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these examples are generated via aepc: https://github.com/aep-dev/aepc. It would be great to update that first. But I can do so after to align if that's too much effort.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll give it a shot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aep-dev/aep-lib-go#15 - I think this needs to happen first unless I'm mistaken?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep! thanks for drafting that, and it's a go get to update aepc.

content:
application/json:
schema:
Expand Down Expand Up @@ -269,7 +269,7 @@ paths:
$ref: '#/components/schemas/publisher'
required: true
responses:
'200':
'201':
content:
application/json:
schema:
Expand Down Expand Up @@ -354,7 +354,13 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/publisher'
description: Successful response
description: Successful response (updated)
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/publisher'
description: Successful response (created)
/publishers/{publisher_id}/books:
get:
description: List method for book
Expand Down Expand Up @@ -411,7 +417,7 @@ paths:
$ref: '#/components/schemas/book'
required: true
responses:
'200':
'201':
content:
application/json:
schema:
Expand Down Expand Up @@ -516,7 +522,13 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/book'
description: Successful response
description: Successful response (updated)
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/book'
description: Successful response (created)
/publishers/{publisher_id}/books/{book_id}/editions:
get:
description: List method for book-edition
Expand Down Expand Up @@ -579,7 +591,7 @@ paths:
$ref: '#/components/schemas/book-edition'
required: true
responses:
'200':
'201':
content:
application/json:
schema:
Expand Down