Skip to content

Commit afefe76

Browse files
authored
Merge pull request #314 from DSpace/backport-312-to-dspace-8_x
[Port dspace-8_x] Explain metadata registry requirement for PATCH paths
2 parents 242e60a + 3520b25 commit afefe76

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

metadata-patch.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ The examples in each section below build on each other, assuming an initial meta
3535
}
3636
```
3737

38+
PATCH operations targeting metadata must specify a JSON `path` relative to the DSpace object, valid for the following levels:
39+
- All metadata: `/metadata``value` must be an object (if applicable)
40+
- All values of one metadata field: `/metadata/dc.title``value` must be an array (if applicable)
41+
- One values of one metadata field: `/metadata/dc.title/0``value` must be an object (if applicable)
42+
43+
Any metadata field explicitly included in the `path` must be part the metadata registry. PATCH requests targeting unknown metadata fields will fail with HTTP 422 (unprocessable entity).
44+
3845
Note: The metadata of items _in submission_ is modeled in the same way described here -- as a map
3946
of metadata keys to an ordered array of values. The primary difference is where the metadata
4047
is located within the JSON representation. The documentation and examples below apply to archived

0 commit comments

Comments
 (0)