p-meier / hapi-api-version

An API versioning plugin for hapi.
Apache License 2.0
74 stars 26 forks source link

Support semantic versioning #29

Closed thrashtronaut closed 5 years ago

thrashtronaut commented 5 years ago

Really enjoying hapi-api-version! Currently, it looks like hapi-api-version supports integer version types. Have you given any thought to supporting semantic versioning? This sort of thing is super helpful in a pre-release stage where contracts can change throughout development.

timcosta commented 5 years ago

Hey @thrashtronaut, thanks for posting! I have not considered supporting semver, because it hasn't been requested, and I don't personally use it when creating APIs.

Thinking about it, I'm not sure that it makes sense to add to this module. This module can be thought of as major version only versioning at this point, and I'm not sure where the use case is for minor/patch versions in APIs. By definition minor/patch version contain non-breaking changes, and could be added to the existing vX route without issue.

I'd love to hear more about the exact use case you see for this with examples!

thrashtronaut commented 5 years ago

Thanks for your response! I've thought on this and done a little more research; it seems uncommon (and definitely not standard) for semantic versioning to be exposed to the consumer, as you mentioned.

I'm gonna close this out. I agree with you. 😃