[EPIC] Use _id suffix for all object reference in REST APIs
[EPIC] Future-proof AURA API (#192)
Parent:Attribute names of object references or object reference lists in REST APIs should include an _id
suffix.
Take the following show object from steering as an example.
// Before the change:
{
"id": 1,
...,
"type": 0,
"funding_category": 0,
"predecessor": 0,
"cba_series_id": 0,
"default_playlist_id": 0,
"category": [0],
"hosts": [0],
"owners": [0],
"language": [0],
"topic": [0],
"musicfocus": [0],
"thumbnails": ["string"],
"links": [
{
"description": "string",
"url": "string"
}
]
}
// After the change:
{
"id": 1,
...,
"type_id": 0,
"funding_category_id": 0,
"predecessor_id": 0,
"cba_series_id": 0,
"default_playlist_id": 0,
"category_ids": [0],
"host_ids": [0],
"owner_ids": [0],
"language_ids": [0],
"topic_ids": [0],
"music_focus_ids": [0],
"thumbnails": ["string"],
"is_active": true,
"is_public": true,
"links": [
{
"description": "string",
"url": "string"
}
]
}
This should make it easier to reason about code using these APIs because
- it is more clear if an object with properties or just a reference is handled
- it opens up the possibility to include an actual object that is not a reference.
This issue follows a discussion in our mid-sprint meeting today.
Sub Tasks
-
Steering: API - @eigenwijsje - Use _id suffix for all object reference in REST... (steering#155 - closed) -
Tank: API - @eigenwijsje - Use _id suffix for all object reference in REST... (tank#57 - closed) -
Tank Cut & Glue: API Client - Use _id suffix for all object reference in REST... (tank-cut-glue#28 - closed) -
Dashboard: API Client - @kmohrf - Update API model reference attribute names with... (dashboard#172 - closed) -
Engine: API Client - Use _id suffix for all object reference in REST... (engine#130 - closed)
Edited by Ernesto Rico Schmidt