Cloud-Harvest / CloudHarvestApi

interface between clients, the server cache, and other apis
Other
0 stars 0 forks source link

Endpoint Messages #42

Open fiona-june-leathers opened 2 months ago

fiona-june-leathers commented 2 months ago

The goal of this ticket is to provide messages to users when they use certain endpoints. Most relevant to a user's interest will be deprecation and endpoint change warnings.

One idea is an endpoint decorator such as:

from decorators import deprecated

#deprecated(message="")
def some_old_endpoint():
    return

This would mean a modification to the API return values:

{
    "result": [ { } ]
    "meta": { }
    "messages": [ {"level": "warning", "text": "something" ]
}