Skip to content

Commit 472bf4f

Browse files
author
Philip de Nier
committed
review: add 'flow(s)' to referenced by property names
1 parent 358b5e4 commit 472bf4f

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

api/examples/objects-get-200.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"object_id": "tams-6229dd5a-1781-4f80-859f-1a82ee5fa883.ts",
3-
"referenced_by": [
3+
"referenced_by_flows": [
44
"4f79cfd1-c057-47f4-8e4d-1b126ca7bf34",
55
"0fde9c11-da9d-434a-a113-d3b20a2cf251"
66
],
7-
"first_referenced_by": "4f79cfd1-c057-47f4-8e4d-1b126ca7bf34"
7+
"first_referenced_by_flow": "4f79cfd1-c057-47f4-8e4d-1b126ca7bf34"
88
}

api/schemas/object.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
"title": "Object",
55
"required": [
66
"object_id",
7-
"referenced_by"
7+
"referenced_by_flows"
88
],
99
"properties": {
1010
"object_id": {
1111
"description": "The media object identifier.",
1212
"type": "string"
1313
},
14-
"referenced_by": {
14+
"referenced_by_flows": {
1515
"type": "array",
1616
"description": "List of Flows that reference this media object via Flow Segments in this store.",
1717
"items": {
1818
"type": "string",
1919
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
2020
}
2121
},
22-
"first_referenced_by": {
23-
"description": "The first Flow that had a Flow Segment reference the media object in this store. This Flow is also present in 'referenced_by' if it is still referenced by the Flow. This property is optional and may in some implementations become unset if the Flow no longer references the media object, e.g. because it was deleted.",
22+
"first_referenced_by_flow": {
23+
"description": "The first Flow that had a Flow Segment reference the media object in this store. This Flow is also present in 'referenced_by_flows' if it is still referenced by the Flow. This property is optional and may in some implementations become unset if the Flow no longer references the media object, e.g. because it was deleted.",
2424
"type": "string",
2525
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
2626
}

docs/adr/0027-add-objects-api-endpoint.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The proposal is to add a `/objects?object_id={object-id}` endpoint that provides
1717
* Option 2: Add a `/objects?object_id={object-id}` endpoint that lists all Flows that reference a media object
1818
* Option 3a: Extend 2 to optionally signal which Flow first referenced the media object in the TAMS instance
1919
* Option 3b: Restrict 3a to require signalling which Flow referenced the media object first
20-
* Option 3c: Allow a user to set `first_referenced_by`
20+
* Option 3c: Allow a user to set `first_referenced_by_flow`
2121
* Option 4: Add an endpoint to list media objects for a Flow
2222

2323
## Decision Outcome
@@ -42,7 +42,7 @@ The Flows (and Flow Segments) referencing a media object can be found by using a
4242
### Option 2: Add a `/objects?object_id={object-id}` endpoint that lists all Flows that reference a media object
4343

4444
This `/objects?object_id={object-id}` endpoint provides JSON that lists of all Flows referencing a media object.
45-
The `referenced_by` property contains the list of Flow IDs.
45+
The `referenced_by_flows` property contains the list of Flow IDs.
4646

4747
The Flow Segments that reference the media object can all be found using a GET on `/flows/{flow-id}/segments?object_id={object-id}` for every Flow in the listing rather than every Flow.
4848
The Flow Segments that reference the media object can all be deleted using a DELETE on `/flows/{flow-id}/segments?object_id={object-id}` for every Flow in the listing.
@@ -68,12 +68,12 @@ This allows Flow-level permissions to be used to restrict which Flow Segments ca
6868
It may be useful to know which Flow was the first to reference the media object in the TAMS instance.
6969
This could help determine the origins of the media object.
7070

71-
An optional `first_referenced_by` property is added to the `/objects?object_id={object-id}` resource that contains the Flow ID.
71+
An optional `first_referenced_by_flow` property is added to the `/objects?object_id={object-id}` resource that contains the Flow ID.
7272

73-
The Flow ID in `first_referenced_by` is set by the TAMS instance and is not settable by a user.
73+
The Flow ID in `first_referenced_by_flow` is set by the TAMS instance and is not settable by a user.
7474

7575
The TAMS instance should set the property to the first Flow that had a new Flow Segment created that referenced the media object.
76-
The TAMS instance should also include the Flow ID in the `referenced_by` property if the Flow exists in the TAMS and has a Flow Segment referencing the media object.
76+
The TAMS instance should also include the Flow ID in the `referenced_by_flows` property if the Flow exists in the TAMS and has a Flow Segment referencing the media object.
7777
The TAMS instance may either remove or keep the property if the first Flow or the Flow Segments referencing the media object in the first Flow are deleted.
7878

7979
* Good, because it retains some information that could be used to trace the origins of a media object
@@ -82,15 +82,15 @@ The TAMS instance may either remove or keep the property if the first Flow or th
8282

8383
### Option 3b: Restrict 3a to require signalling which Flow referenced the media object first
8484

85-
This option restricts 3a to require the `first_referenced_by` to be always be set and retain its value.
85+
This option restricts 3a to require the `first_referenced_by_flow` to be always be set and retain its value.
8686

8787
* Good, because users can rely on the property being set and the value not changing
8888
* Neutral, because it could reference a Flow that no longer exists
8989
* Neutral, because it requires a TAMS to record which Flow first referenced a media object
9090

91-
### Option 3c: Allow a user to set `first_referenced_by`
91+
### Option 3c: Allow a user to set `first_referenced_by_flow`
9292

93-
This options allows a user to set `first_referenced_by` to provide potentially different information about the origins of the media object.
93+
This options allows a user to set `first_referenced_by_flow` to provide potentially different information about the origins of the media object.
9494
The Flow ID could be external to the TAMS instance and therefore signal the origin being elsewhere.
9595

9696
* Good, because it could provide information that better informs about the origins of the media object

0 commit comments

Comments
 (0)