lightblue-platform / lightblue-core

Document based data access layer framework
GNU General Public License v3.0
32 stars 23 forks source link

Allow requests with just major entity version #646

Open alechenninger opened 8 years ago

alechenninger commented 8 years ago

Ultimately I think clients probably just care about major version, as long as they can accept additional fields beyond what they currently know about when unmarshalling the response, and metadata maintainers don't release backwards incompatible constraints or schema changes (which they shouldn't obviously).

This is consistent with most REST API design where you only specify a single version (such as GitHub, Google APIs, etc.), and this single version can be updated with backwards compatible changes.

If we only use default, not major, then it's harder to make breaking changes (inevitably updating that default to a new major version is risky). Currently there are probably bigger challenges RE: breaking changes, but in any case I thought it might be nice for clients to use major only.

Cheers!

bserdar commented 8 years ago

If the client specifies only major version, which full version should the backend use? Largest? Should we come up with the concept of a default minor version for each major?

alechenninger commented 8 years ago

Latest per semver rules I think

alechenninger commented 8 years ago

I found this interesting versioning scheme that I think has a similar spirit to what I am suggesting here: http://blog.appliedcompscilab.com/monotonic_versioning_manifesto/

@kahowell I thought you might find that link interesting ^

Edit: not suggestion we follow that, just food for thought since it has similar reasoning I think