-
Notifications
You must be signed in to change notification settings - Fork 68
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
Feature Request: API Versioning #1
Comments
hey,
Which could become in the controller:
or
This would also fit my actual needs... |
FYI: I'm currently implementing this. It will work like that:
Which can be used in the controller:
This does not only allow versioning but also to have multiple API representations of the model:
Any feedback is welcome! |
I think that for user syntax and readbility, the call should look something like:
or
currently, you have a comma after the api_accessible and the arg dictionary can be mandatory if you would like, instead of the open dictionary. The idea of multiple api representations is excellent and the standard syntax is great, i just think the syntax for the api specific versions can be more readable in order to evade any confusion |
you're right. it is a bit confusing, but your examples won't work, because you have to be able to pass symbols as well as hashes.
I think this looks already better than my last suggestion. edit: I think you have to use the curly brackets now for passing hashes, else it's not syntactically correct. |
I agree. It also frees up the user to use a database column "v1" |
yep - you don't need that. in fact you can use a simple controller method to access the right representation.
Then you could do something like this in the controllers:
That's what I was thinking of... Because you can basically set the API version wherever you like. |
good idea |
should work with the 0.2.1 gem version again! please note that you have to update your code, because you have to mention an api template now! |
It would be great to add versioning to the gem… something like
and so on
The text was updated successfully, but these errors were encountered: