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

Version number #23

Closed
smythp opened this issue Mar 22, 2018 · 2 comments
Closed

Version number #23

smythp opened this issue Mar 22, 2018 · 2 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@smythp
Copy link

smythp commented Mar 22, 2018

Think it will prevent some trouble if you add a version number to your URIs:

/api/v0.1/subjects/detectivefiction

Interesting discussion here, though some of it is probably overkill for this:

https://stackoverflow.com/questions/389169/best-practices-for-api-versioning

@JonathanReeve JonathanReeve added bug Something isn't working wontfix This will not be worked on labels Mar 23, 2018
@JonathanReeve
Copy link
Owner

I thought about this, but I ended up deciding that it just looks friendlier without the version number there, for now. If I make it to 2.0, and anyone at all is using this thing, then I might do something like /api2/.

@smythp
Copy link
Author

smythp commented Mar 23, 2018

OK. Only issue is that if I, or someone else, makes a script using this version, and then you update it, you're stuck either keeping all the endpoints the same or breaking the scripts. As an API designer you're making an implicit contract with the user, if you change stuff then people will be hesitant to build anything with it.

You might consider supporting an optional query parameter that allows the old version. Alternatively you could call all of this a beta and just say it's not ready for prime time yet. Since you have to support old versions once you have them that might be the way to go. But I do feel like an API is not like a website, if people are building stuff then you have to trust that stuff won't break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants