Skip to content
Snippets Groups Projects
Commit 9a2399cf authored by Alok Joshi's avatar Alok Joshi
Browse files

type changing in bold

parent f4090ce9
No related branches found
No related tags found
4 merge requests!760Vulnerability fixes,!745Draft: M18 Upgraded packages to mitigate vulns in netty, guava, snakeyaml,!744Upgraded packages to mitigated vulns in netty, guava, snakeyaml,!665Patch fixes
......@@ -682,15 +682,15 @@ Records patch API has the following response codes:
To remain compliant with the domain data models and business requirements, we perform certain input validation
on the request payload. Please see below table for details:
| | Add | Replace | Remove | Remarks |
|------------------------------------------------------------------------------|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| /kind | Bad Request | Replaces kind | Bad Request | `kind` can only be replaced; `value` must be a raw string & valid kind. Path must match exactly to `/kind` |
| /tags | Replaces tags with `value`. Creates `/tags` if it doesn't exist | Replaces tags with `value`. `/tags` must exist | Removes tags, `value` is ignored. `/tags` must exist | `add` and `replace` behavior similar because `/tags` is an object member |
| /tags/key | Adds `"key" : "value"` to tags, `/tags` must exist | Replaces `/tags/key` with `value`. `/tags/key` must exist | Removes `"key" : "value"` from tags, `/tags/key` must exist | |
| /acl/viewers OR /acl/owners OR /legal/legaltags OR /ancestry/parents | Replaces the target array with value. Creates the attribute if it doesn't exist | Replaces the target attribute with new value. Target location must exist | Only `/ancestry/parents` can be removed | In case of add or replace, Path should be an exact match and value must be an array of string values |
| /acl/viewers/0 OR /acl/owners/0 OR /legal/legaltags/0 OR /ancestry/parents/0 | Adds value to the target index in the array | Replaces value at the target index in the array. Target location must exist | Removes value at the target index in the array. Target location must exist | Character `-` can be used to mention last index of the target array. For acl and legaltag, the target value must not be an empty array after applying Patch |
| /data | | | | `/data` doesn't adhere to a rigid structure, therefore users must be cautious when modifying `/data` attributes. Value type must adhere to attribute type defined in Schema service. Any type change can potentially cause indexing/search issues. |
| /meta | | | | if an update for `/meta`, it should be compliant with its structure (i.e. array of Map<String, Object>) |
| | Add | Replace | Remove | Remarks |
|------------------------------------------------------------------------------|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| /kind | Bad Request | Replaces kind | Bad Request | `kind` can only be replaced; `value` must be a raw string & valid kind. Path must match exactly to `/kind` |
| /tags | Replaces tags with `value`. Creates `/tags` if it doesn't exist | Replaces tags with `value`. `/tags` must exist | Removes tags, `value` is ignored. `/tags` must exist | `add` and `replace` behavior similar because `/tags` is an object member |
| /tags/key | Adds `"key" : "value"` to tags, `/tags` must exist | Replaces `/tags/key` with `value`. `/tags/key` must exist | Removes `"key" : "value"` from tags, `/tags/key` must exist | |
| /acl/viewers OR /acl/owners OR /legal/legaltags OR /ancestry/parents | Replaces the target array with value. Creates the attribute if it doesn't exist | Replaces the target attribute with new value. Target location must exist | Only `/ancestry/parents` can be removed | In case of add or replace, Path should be an exact match and value must be an array of string values |
| /acl/viewers/0 OR /acl/owners/0 OR /legal/legaltags/0 OR /ancestry/parents/0 | Adds value to the target index in the array | Replaces value at the target index in the array. Target location must exist | Removes value at the target index in the array. Target location must exist | Character `-` can be used to mention last index of the target array. For acl and legaltag, the target value must not be an empty array after applying Patch |
| /data | | | | **`/data` doesn't adhere to a rigid structure, therefore users must be cautious when modifying `/data` attributes. Value type must adhere to attribute type defined in Schema service. Any type change can potentially cause indexing/search issues.** |
| /meta | | | | **if an update for `/meta`, it should be compliant with its structure (i.e. array of Map<String, Object>)** |
Check out some examples below, but refer to the [Patch RFC spec](https://www.rfc-editor.org/rfc/rfc6902) for a comprehensive documentation on JsonPatch and more examples.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment