Skip to content

Commit

Permalink
Update update-resource.markdown
Browse files Browse the repository at this point in the history
Added note for patching array elements
  • Loading branch information
ThomasJejkal authored Apr 2, 2024
1 parent ca3ad4f commit 990628d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _base-repo/documentation/update-resource.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ If you now obtain the patched resource you'll see that there are two alternate i
{% capture my_include %}{% include_relative snippets/get-patched-resource-complex/http-response.md %}{% endcapture %}
{{ my_include | markdownify }}

---
**NOTE**
While many list-based properties, e.g., alternateIdentifiers, creators, titles, are handles as lists, which implies that they stick to a defined order, some properties are implemented as arrays without ensuring any order. This applies to 'creators.affiliations', 'contributors.affiliations', 'sizes', and 'formats'. Patching a certain index of these properties may result in a different element position than expected.

---

Besides the possiblity of patching resources there is also the option to apply updates to an existing resource via HTTP PUT. This rather traditional approach requires the user to read a resource,
apply updates locally and send the modified resource back to the server. This approach may seem more intuitive but can also causes a comparibly huge overhead as also unchanged content is sent between
client and server. To illustrate the impact, let's go back to the update example in the beginning. In order to update the publication year the following requests are necessary:
Expand Down

0 comments on commit 990628d

Please sign in to comment.