hopfenspace / MateBot

Micro service providing an API for MateBot clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad endpoint design choice

myOmikron opened this issue · comments

You are using endpoints like /communisms.

It is common practice to use some kind of prefix, e.g. /api/v1/communisms or /v1/communisms.
This prevents breaking SDKs, or applications depending on a certain behavior when updating an endpoint.

As long as there is no security related problem, you can just add new versions of an endpoint with an iterated prefix (best would be your current release) and deprecate the old endpoints - of course the prefix should be used for all endpoints, even if one did not got updated.

commented

This issue has been addressed in the already merged PR #91. Take a look there for some implementation details.