Skip to content

Commit 004ab64

Browse files
author
Phil Varner
authored
Merge pull request #310 from philvarner/pv/txn-wording-updates
update wording in transaction extension
2 parents 914cf81 + 2561d03 commit 004ab64

File tree

1 file changed

+27
-20
lines changed
  • ogcapi-features/extensions/transaction

1 file changed

+27
-20
lines changed

ogcapi-features/extensions/transaction/README.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,47 +40,54 @@ work to get it incorporated.
4040

4141
When the body is a partial Item:
4242

43-
- Shall only create a new resource.
44-
- Shall return 409 if an Item exists for the same collection and id values.
45-
- Shall populate the `collection` field in the Item from the URI.
46-
- Shall return 201 and a Location header with the URI of the newly added resource for a successful operation.
43+
- Must only create a new resource.
44+
- Must have an id field.
45+
- Must return 409 if an Item exists for the same collection and id field values.
46+
- Must populate the `collection` field in the Item from the URI.
47+
- Must return 201 and a Location header with the URI of the newly added resource for a successful operation.
4748
- May return the content of the newly added resource for a successful operation.
4849

4950
When the body is a partial ItemCollection:
5051

51-
- Shall only create a new resource.
52-
- Shall return 409 if an Item exists for any of the same collection and id values.
53-
- Shall populate the `collection` field in each Item from the URI.
54-
- Shall return 201 without a Location header.
55-
- May create only some of the Items in the ItemCollection.
52+
- Must only create a new resource.
53+
- Each Item in the ItemCollection must have an id field.
54+
- Must return 409 if an Item exists for any of the same collection and id values.
55+
- Must populate the `collection` field in each Item from the URI.
56+
- Must return 201 without a Location header.
57+
- May create only some of the Items in the ItemCollection. Implementations are not
58+
required to implement all-or-none sematics for this operation. For example, if an
59+
ItemCollection contains two Items and one is successfully created and the other
60+
fails to be created, the server is not required to then delete the successfully
61+
created one. When only some of the Items in the ItemCollection are created, the
62+
server should communicate this failure back to the client with an error status code.
5663

5764
All cases:
5865

59-
- Shall return 202 if the operation is queued for asynchronous execution.
66+
- Must return 202 if the operation is queued for asynchronous execution.
6067

6168
### PUT
6269

63-
- Shall populate the `id` and `collection` fields in the Item from the URI.
64-
- Shall return 200 or 204 for a successful operation.
70+
- Must populate the `id` and `collection` fields in the Item from the URI.
71+
- Must return 200 or 204 for a successful operation.
6572
- If 200 status code is returned, the server shall return the content of the updated resource for a successful operation.
66-
- Shall return 202 if the operation is queued for asynchronous execution.
67-
- Shall return 404 if no Item exists for this resource URI.
73+
- Must return 202 if the operation is queued for asynchronous execution.
74+
- Must return 404 if no Item exists for this resource URI.
6875
- If the `id` or `collection` fields are different from those in the URI, status code 400 shall be returned.
6976

7077
### PATCH
7178

72-
- Shall populate the `id` and `collection` fields in the Item from the URI.
73-
- Shall return 200 or 204 for a successful operation.
79+
- Must populate the `id` and `collection` fields in the Item from the URI.
80+
- Must return 200 or 204 for a successful operation.
7481
- If status code 200 is returned, the server shall return the content of the updated resource for a successful operation.
7582
- May return the content of the updated resource for a successful operation.
76-
- Shall return 202 if the operation is queued for asynchronous execution.
77-
- Shall return 404 if no Item exists for this resource URI.
83+
- Must return 202 if the operation is queued for asynchronous execution.
84+
- Must return 404 if no Item exists for this resource URI.
7885
- If the `id` or `collection` fields are different from those in the URI, status code 400 shall be returned.
7986

8087
PATCH is compliant with [RFC 7386](https://tools.ietf.org/html/rfc7386).
8188

8289
### DELETE
8390

84-
- Shall return 200 or 204 for a successful operation.
85-
- Shall return a 202 if the operation is queued for asynchronous execution.
91+
- Must return 200 or 204 for a successful operation.
92+
- Must return a 202 if the operation is queued for asynchronous execution.
8693
- May return a 404 if no Item existed prior to the delete operation. Returning a 200 or 204 is also valid in this situation.

0 commit comments

Comments
 (0)