Skip to content
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

Merged
merged 8 commits into from
May 30, 2016

Conversation

texpert
Copy link
Contributor

@texpert texpert commented May 22, 2016

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

@LeFnord
Copy link
Member

LeFnord commented May 23, 2016

please use the same pattern for version as for the other route methods, see: https://github.com/ruby-grape/grape-swagger/blob/master/lib/grape-swagger/grape/route.rb, thanks

@texpert
Copy link
Contributor Author

texpert commented May 23, 2016

Done.

@texpert texpert changed the title options[:version] missing, changed to route.options[:version]. options[:version] missing, changed to route.version. May 23, 2016
@dblock
Copy link
Member

dblock commented May 23, 2016

This most definitely needs a spec, too.

@texpert
Copy link
Contributor Author

texpert commented May 28, 2016

Made a spec, at last :)

@texpert
Copy link
Contributor Author

texpert commented May 28, 2016

Seems to be in good shape now.

@LeFnord
Copy link
Member

LeFnord commented May 29, 2016

👍

@@ -2,7 +2,7 @@ module GrapeSwagger
module DocMethods
class PathString
class << self
def build(path, options = {})
def build(path, route_version, options = {})
Copy link
Member

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 = {})?

Copy link
Contributor Author

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.

Copy link
Member

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.

@dblock
Copy link
Member

dblock commented May 29, 2016

It looks good, still needs a CHANGELOG entry and possibly a README update.

@texpert
Copy link
Contributor Author

texpert commented May 30, 2016

Now it is clean, the specs updated, CHANGELOG entry added.

@LeFnord
Copy link
Member

LeFnord commented May 30, 2016

👍

@dblock dblock merged commit a162e7c into ruby-grape:master May 30, 2016
@dblock
Copy link
Member

dblock commented May 30, 2016

Merged, 👍

@texpert texpert deleted the version_from_route_options branch June 7, 2016 12:04
LeFnord pushed a commit to LeFnord/grape-swagger that referenced this pull request Feb 9, 2019
…ions

options[:version] missing, changed to route.version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants