Skip to content

Commit

Permalink
metadata: document parent.access.owned_by breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
fenekku committed Aug 13, 2024
1 parent 43b18ef commit 298635c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 46 deletions.
10 changes: 4 additions & 6 deletions docs/reference/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ The ``access`` is described with the following subfields:

| Field | Cardinality | Description |
|:------------:|:-----------:|:--------------------|
| ``owned_by`` | (1-n) | An array of owners. |
| ``owned_by`` | (1) | A single owner. (*WARNING: This was changed in v12. It used to be an array.*)|

Owners are defined as:

Expand All @@ -179,11 +179,9 @@ Example:
"parent": {
"id": "fghij-12345",
"access": {
"owned_by": [
{
"user": 2
}
],
"owned_by": {
"user": 2
}
}
},
}
Expand Down
64 changes: 24 additions & 40 deletions docs/reference/rest_api_drafts_records.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,9 @@ Content-Type: application/json
"parent": {
"id": "{parent-id}",
"access": {
"owned_by": [
{
"user": {user-id}
}
],
"owned_by": {
"user": {user-id}
},
"links": []
}
},
Expand Down Expand Up @@ -259,11 +257,9 @@ Content-Type: application/json
"parent": {
"id": "{parent-id}",
"access": {
"owned_by": [
{
"user": {user-id}
}
],
"owned_by": {
"user": {user-id}
},
"links": []
}
},
Expand Down Expand Up @@ -410,11 +406,9 @@ Content-Type: application/json
"parent": {
"id": "{parent-id}",
"access": {
"owned_by": [
{
"user": {user-id}
}
],
"owned_by": {
"user": {user-id}
},
"links": []
}
},
Expand Down Expand Up @@ -513,11 +507,9 @@ Content-Type: application/json
"parent": {
"id": "{parent-id}",
"access": {
"owned_by": [
{
"user": {user-id}
}
],
"owned_by": {
"user": {user-id}
},
"links": []
}
},
Expand Down Expand Up @@ -618,11 +610,9 @@ Content-Type: application/json
"parent": {
"id": "{parent-id}",
"access": {
"owned_by": [
{
"user": {user-id}
}
],
"owned_by": {
"user": {user-id}
},
"links": []
}
},
Expand Down Expand Up @@ -1081,11 +1071,9 @@ Content-Type: application/json
"parent": {
"id": "{parent-id}",
"access": {
"owned_by": [
{
"user": {user-id}
}
],
"owned_by": {
"user": {user-id}
},
"links": []
}
},
Expand Down Expand Up @@ -1361,11 +1349,9 @@ Content-Type: application/json
"parent": {
"id": "{parent-id}",
"access": {
"owned_by": [
{
"user": {user-id}
}
],
"owned_by": {
"user": {user-id}
},
"links": []
}
},
Expand Down Expand Up @@ -1559,11 +1545,9 @@ Content-Type: application/json
"parent": {
"id": "{parent-id}",
"access": {
"owned_by": [
{
"user": {user-id}
}
],
"owned_by": {
"user": {user-id}
},
"links": []
}
},
Expand Down
1 change: 1 addition & 0 deletions docs/releases/versions/version-v12.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Here is a quick summary of the myriad other improvements in this release:
- Although not immediately breaking, the [`subject_nested` facet](https://github.com/inveniosoftware/invenio-rdm-records/blob/master/invenio_rdm_records/services/facets.py#L87) is deprecated in favor of [`subject_combined`](https://github.com/inveniosoftware/invenio-rdm-records/blob/master/invenio_rdm_records/services/facets.py#L103) to provide proper nested subject aggregation
- The Python module `flask_babelex` has been replaced by `invenio_i18n`
- Any imports should be replaced: `from flask_babelex import lazy_gettext as _` -> `from invenio_i18n import lazy_gettext as _`
- The cardinality of the Drafts and Records Metadata/REST API field `parent.access.owned_by` changed from `(1-n)` (an array of objects) to `(1)` (a single object).

## Limitations and known issues

Expand Down

0 comments on commit 298635c

Please sign in to comment.