Skip to content

Add response status for POST with inexistent related resource. #1036

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

Merged
merged 3 commits into from
Sep 28, 2016
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
5 changes: 5 additions & 0 deletions _format/1.0/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,11 @@ had returned it back in a `201` response.
A server **MAY** return `403 Forbidden` in response to an unsupported request
to create a resource.

##### <a href="#crud-creating-responses-404" id="crud-creating-responses-404" class="headerlink"></a> 404 Not Found

A server **MUST** return `404 Not Found` when processing a request that
references a related resource that does not exist.

##### <a href="#crud-creating-responses-409" id="crud-creating-responses-409" class="headerlink"></a> 409 Conflict

A server **MUST** return `409 Conflict` when processing a `POST` request to
Expand Down
14 changes: 14 additions & 0 deletions _format/1.0/normative-statements.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ layout: null
{ "id": "create-responses-202", "type": "normative-statements" },
{ "id": "create-responses-204", "type": "normative-statements" },
{ "id": "create-responses-403", "type": "normative-statements" },
{ "id": "create-responses-404-related", "type": "normative-statements" },
{ "id": "create-responses-409-exists", "type": "normative-statements" },
{ "id": "create-responses-409-bad-type", "type": "normative-statements" },
{ "id": "create-responses-409-error-details", "type": "normative-statements" },
Expand Down Expand Up @@ -1770,6 +1771,19 @@ layout: null
}
}
},
{
"id": "create-responses-404-related",
"type": "normative-statements",
"attributes": {
"level": "MAY",
"description": "A server **MUST** return `404 Not Found` when processing a request that references a related resource that does not exist."
},
"relationships": {
"section": {
"data": { "id": "creating-updating-deleting", "type": "sections" }
}
}
},
{
"id": "create-responses-409-exists",
"type": "normative-statements",
Expand Down
5 changes: 5 additions & 0 deletions _format/1.1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,11 @@ had returned it back in a `201` response.
A server **MAY** return `403 Forbidden` in response to an unsupported request
to create a resource.

##### <a href="#crud-creating-responses-404" id="crud-creating-responses-404" class="headerlink"></a> 404 Not Found

A server **MUST** return `404 Not Found` when processing a request that
references a related resource that does not exist.

##### <a href="#crud-creating-responses-409" id="crud-creating-responses-409" class="headerlink"></a> 409 Conflict

A server **MUST** return `409 Conflict` when processing a `POST` request to
Expand Down
14 changes: 14 additions & 0 deletions _format/1.1/normative-statements.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ layout: null
{ "id": "create-responses-202", "type": "normative-statements" },
{ "id": "create-responses-204", "type": "normative-statements" },
{ "id": "create-responses-403", "type": "normative-statements" },
{ "id": "create-responses-404-related", "type": "normative-statements" },
{ "id": "create-responses-409-exists", "type": "normative-statements" },
{ "id": "create-responses-409-bad-type", "type": "normative-statements" },
{ "id": "create-responses-409-error-details", "type": "normative-statements" },
Expand Down Expand Up @@ -1826,6 +1827,19 @@ layout: null
}
}
},
{
"id": "create-responses-404-related",
"type": "normative-statements",
"attributes": {
"level": "MAY",
"description": "A server **MUST** return `404 Not Found` when processing a request that references a related resource that does not exist."
},
"relationships": {
"section": {
"data": { "id": "creating-updating-deleting", "type": "sections" }
}
}
},
{
"id": "create-responses-409-exists",
"type": "normative-statements",
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy