Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata: document parent.access.owned_by breaking change #691

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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