It could be nice to have some formal way for the server to inform clients about changes to the API. Right now it is possible to write such information as @meta.@description - but no one should/would be looking at that in a deployed up-and-running system.
Suggestion:
"@meta":
{
"@messages":
[
{
"id": "hwer87932hj",
"message": "This resource is deprecated. Clients should move on to ...",
"@links": { ... links to relevant resources ...}
}.
{
...
}
]
}
I was thinking about a "level" property for "warning", "debug" or "fatal" - but I don't think it makes sense: "Debug" - what should the client do here? "Fatal" - use some 4xx status code instead.
If message are to be handled "in production" then it should not be part of the @meta element since this can be removed at runtime by request of the client.
It could be nice to have some formal way for the server to inform clients about changes to the API. Right now it is possible to write such information as @meta.@description - but no one should/would be looking at that in a deployed up-and-running system.
Suggestion:
I was thinking about a "level" property for "warning", "debug" or "fatal" - but I don't think it makes sense: "Debug" - what should the client do here? "Fatal" - use some 4xx status code instead.