Lasagna-Love-Portal / bechamel-api

Bechamel: a REST API for Lasagna Love request, requester and volunteer management
Eclipse Public License 2.0
5 stars 4 forks source link

API versioning #24

Open mattkuznicki-ll opened 1 year ago

mattkuznicki-ll commented 1 year ago

Let's discuss API versioning. In the comments on https://github.com/Lasagna-Love-Portal/bechamel-api/pull/18 there are two votes for a major versioning scheme on the routes, e.g.

/v1/login

How do we want to do versioning?

mkantzer commented 1 year ago

I think there's 2 major options here:

  1. version the whole API together (v1/[login, signup, whatever other paths])
  2. version per components/domains (login/v1/, signup/v2, ...)

I'd tend to stick with 1.: it gives us significant freedom with organizing the backend however we want, without really needing to worry the front end about it. 2. could have us making a lot of assumptions about organization that may not stay true.

There's also a world where we do both (v1/login/v1/), but that's.... gross? I'd rather just bump the global version more often.

mattkuznicki-ll commented 1 year ago

I'm more in favor of (1) - /v#/endpoint - than (2) personally as well. Would like to version efforts up to our v1 initial launch as v0 to make it clear things are in flux.

patmejia commented 1 year ago