ruby-grape / ruby-grape/grape-swagger
Version does not get set correctly
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
According to the documentation I should be able to call the add_swagger_documentation method with a version like so:
add_swagger_documentation version: '1.2.3'
However, when I do this, my version is not set in the JSON response for /swagger_doc. I believe the offending line is here: https://github.com/ruby-grape/grape-swagger/blob/master/lib/grape-swagger.rb#L58-L60
Basically, it's check if version is set but that is wrong because it will never set the options key for it. Sort of odd I think.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/grape-swagger.rb at lines 58–60 and reproduce the documented add_swagger_documentation version: '1.2.3' call. Inspect the JSON returned by /swagger_doc and verify that the configured version appears there when the fix is complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100