-
-
Notifications
You must be signed in to change notification settings - Fork 248
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
It would be useful to be able to link operations to another. Hypermedia links can link endpoints that are commonly used as follow-up to the current endpoint. The links could be defined on operation creation and be added to the API response automatically.
Example response to GET /users/1
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"_links": {
"self": {
"href": "https://api.example.com/users/1"
},
"update": {
"href": "https://api.example.com/users/1",
"method": "PUT"
},
"delete": {
"href": "https://api.example.com/users/1",
"method": "DELETE"
}
}
}
This could, for example, be achieved by adding a parameter to the Operation struct that is called "HypermediaLinks" that takes a string slice of operation ids. On the api creation, it should panic if a linked operation is not found.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request