Closed hasan7n closed 1 year ago
Follow this description: https://semver.org/
It's highly discouraged to do Incompatible API changes for minor versions. If there's an exceptional case, both the client and the server should have an isolated place where backwards-compatible logic is located. Both Client and Server implement the required logic to handle communications with parties of a lower minor version.
The api has the major version written explicitly (e.g. api.medperf.org/v1/datasets). Clients with a version mismatch will hit a different endpoint, and therefore will not communicate with the server. To provide indication as to why an error happened when trying to talk to the api, we can also provide a version endpoint that specifies what version the server is using (e.g. api.medperf.org/version). That way the client can then indicate the user what major version is required to talk to the given server.
TODO: change version to 0.1.0 inside the server and pypi setup file
handled by #354
Is your feature request related to a problem? Please describe. Given that some breaking changes have happened (and will keep happening) with the server and the client, a lot of boilerplate code will start showing up just to cover edge cases with backwards compatibility.
Describe the solution you'd like
We will follow
{Major}.{Minor}.{Patch}
versioning for both the client and the server:Compatibility rules
How/when versions will be released
How client-server compatibility check happens:
api.medperf.org/version
. The client would then call this endpoint before every request, and check for incompatibility. Possible Cons: This results in an extra server call each time a medperf command is invoked.