caTUstrophy / backend

Backend part for our catastrophe aid tool. Written in Go.
GNU General Public License v3.0
6 stars 3 forks source link

Reorganize Docu #80

Closed nielsrolf closed 8 years ago

nielsrolf commented 8 years ago

We return partial equal json many times: e.g. all the time when we send users or lists of users, we return the same json content or maybe two different variations. When something in our json-responses.go changes, it's much effort to update all concerned parts of the API. My suggestion is: let's save all variations of the json belonging to any object we return in our API and link to it whenever it occurs in a response. Good idea? Disadvantage would be that it might be harder to read, as stuff like this will occur:

[ link-to-user, ...]

when a response contains a list of users