ruby-grape / ruby-grape/grape-swagger
Think about add the desc options 'consumes' or 'produces' to add_swagger_documentation?
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
Can you add the API desc options 'consumes' or 'produces' to add_swagger_documentation?
So that I don't need to add option 'consumes' to every API desc.
desc 'Retrieve Authentication Token', consumes: ['application/x-www-form-urlencoded']
params do
requires :code, type: String
end
post 'token' do
.....
end
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 by locating add_swagger_documentation and how it handles API description options. Trace how consumes and produces are currently read from individual desc declarations, then verify that the requested global options are reflected in the generated Swagger documentation without requiring each API description to repeat them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, ruby
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100