ruby-grape / ruby-grape/grape-swagger

Default consumes setting for desc method

Open
#623 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
1.1k
Forks
479
Avg merge
2d 14h
Merged PRs (30d)
6

Description

My POST apis almost do with formData.
Now, these methods have consumes setting manually:

desc 'method1', consumes: ['application/x-www-form-urlencoded']
params {}
post {}

desc 'method3', consumes: ['application/x-www-form-urlencoded']
params {}
post {}

...

Is the way to set default consumes to ['application/x-www-form-urlencoded'] ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names repeated Grape desc declarations with a consumes option but no repository files or tests. Start by locating how desc options are handled and how existing consumes values are documented or tested; done should mean a documented, tested default for application/x-www-form-urlencoded, if the project supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.