MXS-1220: Fix resource self links
The top level resource self links pointed to the collection instead of the resource itself. The individual resoures now also have a links field that contains the self link to the resource. This should make navigation of the API easier as all objects have valid links in them.
This commit is contained in:
@ -65,6 +65,19 @@ json_t* mxs_json_relationship(const char* host, const char* endpoint);
|
||||
*/
|
||||
void mxs_json_add_relation(json_t* rel, const char* id, const char* type);
|
||||
|
||||
/**
|
||||
* @brief Create self link object
|
||||
*
|
||||
* The self link points to the object itself.
|
||||
*
|
||||
* @param host Hostname of this server
|
||||
* @param path Base path to the resource collection
|
||||
* @param id The identified of this resource
|
||||
*
|
||||
* @return New self link object
|
||||
*/
|
||||
json_t* mxs_json_self_link(const char* host, const char* path, const char* id);
|
||||
|
||||
/**
|
||||
* @brief Return value at provided JSON Pointer
|
||||
*
|
||||
|
Reference in New Issue
Block a user