-
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
options[:version] missing, changed to route.version. #438
Conversation
please use the same pattern for |
Done. |
This most definitely needs a spec, too. |
Made a spec, at last :) |
Seems to be in good shape now. |
👍 |
@@ -2,7 +2,7 @@ module GrapeSwagger | |||
module DocMethods | |||
class PathString | |||
class << self | |||
def build(path, options = {}) | |||
def build(path, route_version, options = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it'd be cleaner if this received the entire route? So def build(route, options = {})
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was my first thought eca701f but the PathString specs would need then some complex route initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make the request an OpenStruct
in the spec, it will actually look simpler I think. API > spec anyway.
It looks good, still needs a CHANGELOG entry and possibly a README update. |
Now it is clean, the specs updated, CHANGELOG entry added. |
👍 |
Merged, 👍 |
…ions options[:version] missing, changed to route.version.
A small change, because the :version is missing in options, but I've found it in route.options. So better to pass the route to PathString - to have it there for .path and .options