-
Notifications
You must be signed in to change notification settings - Fork 3
How should file-information be returned in element and collection endpoints? #446
Copy link
Copy link
Open
Labels
FeatureIntroducing new capabilities.Introducing new capabilities.QuestionSeeking clarifications or information.Seeking clarifications or information.
Milestone
Description
Currently individual elements as well as collections of elements return data in the following schema:
{
"type": "Comment",
"id": "74a8fcd9-6cb0-4b0d-8d42-0b6c3c54d1ac",
"data": {
"created": "2025-09-27T10:39:51+00:00",
"name": "Blue",
"updated": "2025-09-27T10:39:51+00:00",
"content": "Blue is ..."
}
}We now have two different options to represent file data:
Option A: As data properties
{
"type": "Comment",
"id": "74a8fcd9-6cb0-4b0d-8d42-0b6c3c54d1ac",
"data": {
"created": "2025-09-27T10:39:51+00:00",
"name": "Blue",
"updated": "2025-09-27T10:39:51+00:00",
"content": "Blue is ...",
"file": {
"contentLength": 1234,
...
}
}
}Option B: As a new root level property
{
"type": "Comment",
"id": "74a8fcd9-6cb0-4b0d-8d42-0b6c3c54d1ac",
"data": {
"created": "2025-09-27T10:39:51+00:00",
"name": "Blue",
"updated": "2025-09-27T10:39:51+00:00",
"content": "Blue is ..."
},
"file": {
"contentLength": 1234,
...
}
}Acceptance criteria
- Create pro- / contra-list of both variants
- Think about side effects, e.g. Elasticsearch serialization, search, event listeners to block users from directly modifying file properties, ...
- Define the chosen variant
- Implement chosen variant
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FeatureIntroducing new capabilities.Introducing new capabilities.QuestionSeeking clarifications or information.Seeking clarifications or information.
Type
Projects
Status
No status