-
Notifications
You must be signed in to change notification settings - Fork 9
Description
The API explicitly allows the usage of content modifiers such as $value
, $metadata
, etc. with HTTP PATCH, for example in the SubmodelServiceSpecification
HTTP PATCH /submodel/submodel-elements/{idShortPath}
HTTP PATCH /submodel/submodel-elements/{idShortPath}/$metadata
HTTP PATCH /submodel/submodel-elements/{idShortPath}/$value
As an HTTP PATCH request typically only contains the properties that should be updated leaving out all other properties, how exactly do these calls differ? The only way this differentiation makes sense that I can think of is if it is required to always send the full object - but this would contradict the fundamental principle of HTTP PATCH (only sending the properties that actually should be updated) and be more in line with HTTP PUT.
Please, either
- provide a detailed explanation/justification how this is intended to work and why it is in line with the concept of HTTP PATCH, or
- change HTTP PATCH to HTTP PUT, or
- disallow the usage of HTTP PATCH im combination with content modifiers, i.e. only keep a single PATCH operation without content modifiers in the path (e.g. HTTP PATCH /submodel/submodel-elements/{idShortPath}). The payload should contain only the properties that should be updated according to JSON Merge Patch.
Personally, I would strongly prefer option 3 as it would allow to minimize the payload while at the same time keep the API small and simple and follow well established patterns and standards.
[x] I have signed the required Developer Certificate of Origin (DCO) already.