hug
hug copied to clipboard
Hug Option to select the default API version
When using the keyword "versions" on hug decorators, a request without the prefix v# (selecting a specific version) the highest API version is presented by default.
When introducing a new API version it would be useful when a running server could work seamlessly with a dedicated API version number, rather than selecting to newest one automatically.
I think I understand what you want,
/users
should return /v2/users
even if you have a version 3?
But why?
If an API is being updated, but the Default (old) behaviour, when no specific API version number is contained in the url, shall still be used for a period of time.
Von: Gabbeh Gesendet: Sonntag, 30. September 2018 02:46 An: timothycrosley/hug Cc: alcalda; Author Betreff: Re: [timothycrosley/hug] Hug Option to select the default API version(#619)
I think I understand what you want, /users should return /v2/users even if you have a version 3? But why? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I think I understand what you want,
/users
should return/v2/users
even if you have a version 3?But why?
I am not sure but I think he meant that if you have specified f.e. versions 1 and 2 than
/v1/users
should invoke v1 code
/v2/users
should invoke v2 code
/users
should invoke v2 code - as it is the newest.
Or if something like default_version will be specified explicitly then
/users
should invoke default_version code
I think this could be a useful feature. I would definitely use it.
@timothycrosley - Do you think it is worth developing ? I can prepare a PR if it is something you would want in hug.