-
Notifications
You must be signed in to change notification settings - Fork 84
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
Part 4: Should PUT or PATCH be allowed to change the id? #678
Comments
@philvarner Part 4 will have a dependency on a The update schema controls which properties a client is allowed to change via a PATCH. So, if a server did not want to allow the At the OGC member meeting this week the SWG announced that we have more-or-less finished with Part 3/CQL2 and will now start working on the other parts & proposals so you should start seeing more activity on Part 4 and the schema proposal! Hope this gives you some idea where we are heading ... |
Meeting 2022-05-09: We agreed that changing the ID (the URI of resource) through PUT or PATCH has a bad smell. Is that even allowed in HTTP? Maybe through a permanent redirect? We should check and then decide whether it should be prohibited or a server decision. |
After looking at the specification of PUT in HTTP, I think that it should be prohibited. The specification is quite explicit that only the representation is changed, but that it is the same resource:
|
@cportele if you mean that changing the the identifier be prohibited, then I would agree with you. Perhaps some guidance for a workaround might be welcomed? For example, an implementation could allow for a permanent redirect to a new resource created via HTTP POST. |
Meeting 2022-06-06:
@cportele will check, if the document needs an update and create a PR, if necessary. |
I looked through the spec and could not find clear guidance on this, so I'm filing this ticket.
The semantics of a PUT or PATCH allow the entity to be changed. This means you could make this call:
This should presumably change the feature to have an id of 2, and thereby change the url to
/collections/c1/items/2
.I think this should be explicitly disallowed, as the ID should considered immutable.
The text was updated successfully, but these errors were encountered: