-
Notifications
You must be signed in to change notification settings - Fork 219
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
Prefixing path of all operations in a service #2233
Comments
Two approaches to this come to mind: include the version in the Lots of services need a prefix when they deploy their service. One reason might be that they run multiple services from the same host and disambiguate based on a base path. In these cases, the prefix isn't really part of the API itself but rather part of where the API is hosted. As such, path prefixing is handled in the endpoint resolution of the service. So when a client resolves the endpoint, it also gets a base path of |
fair point here tho. |
Yeah it would need to be per operation. I think it’s manageable organizationally if you add a validator to ensure the prefix is consistent. We don’t have plans to add a kind of shared prefix to any of the built-in HTTP traits. A protocol trait could add this if they wanted though. Barring that, using endpoints addresses this. |
Let's say I have:
I'd like my operations to be available at:
v1/foo
v1/bar
v1/baz
so that when I make changes to the api and get
v2
, I can deploy both versions side by side and get both:v1/foo
v2/foo
etc.
Can I do this without hardcoding this for every operation individually?
The text was updated successfully, but these errors were encountered: