Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versioning to API #12

Open
madhavajay opened this issue May 5, 2020 · 1 comment
Open

Add versioning to API #12

madhavajay opened this issue May 5, 2020 · 1 comment

Comments

@madhavajay
Copy link
Collaborator

All responses should include a field with API version in the header, starting with 1 for example:

Custom Header:
"X-API-Version": 1

JSON Payload:

{
    "status": "201",
    "message": "Description"
}
@joshlf
Copy link
Contributor

joshlf commented May 5, 2020

An alternative possibility would be for the client to indicate which API version it expects and for the API to respond with an error if that version is not supported. This would ensure that the API doesn't execute a stateful request only for the client to then learn that it can't understand the response and cannot continue the flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants