-
Notifications
You must be signed in to change notification settings - Fork 472
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
Issue with camel case endpoints #457
Labels
Comments
The HEAD version was to support swagger 2.0, I suspect this got lost in the shuffle. You should write a spec and re-apply the fix in a PR, please, also cc: @gekola who made the fix you mention above. |
There you go, I'll notify the other author about it. |
rayko
referenced
this issue
in gekola/grape-swagger
Jun 15, 2016
dblock
pushed a commit
that referenced
this issue
Jun 15, 2016
LeFnord
pushed a commit
to LeFnord/grape-swagger
that referenced
this issue
Feb 9, 2019
* Fixed camel case issue ruby-grape#457 * Description of fixed issue in CHANGELOG.md * Fixing api_swagger_v2_detail_spec.rb with updated expectation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using camel case on endpoint names, the app throws an error while loading the grape clases and modules:
The following method in grape-swagger.rb
Causes to change the name that is picked up in the next step on the method:
If you have an endpoint like "userCompanies", it gets mapped to "usercompanies" in
combine_routes
, andcombine_namespace_routes
will expect@target_class.combined_routes
to have a key "userCompanies", but since it doesn't exist, it will return nil andreject
will be executed on nil.There was a PR about this and it was merged: https://github.com/ruby-grape/grape-swagger/pull/321/files but the change is not in master or the 0.21.0 version. I wonder what happened to it. It looks like the PR was done on an old version, since the method
combine_routes
isn't present there, I suppose it was extracted as a method on a refactor after that.What happened to this fix?
The text was updated successfully, but these errors were encountered: