ruby-grape / ruby-grape/grape

Parameter type support

Open
#684 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

discuss! feature request
Dominant language
Ruby
Stars
10k
Forks
1.2k
Avg merge
14h 38m
Merged PRs (30d)
92

Description

With grape-swagger issue 49 and 120. some discussion started about responsibilities and parameter types.

Swagger UI supports

  • path
  • query
  • body
  • header
  • form

as paramter types. For grape all parameters are equal and add's no further information.
grape-swagger walks around this by adding custom options to swagger or use some logic to determine the parameter type.

I would suggest that grape make this kind of parameters too to first class citizens like
it already does for route params and marks the type into the documentation.

Maybe it can also be checked that a query param does not be set via a body param.

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

Start with the linked grape-swagger pull request #49 and issue #120 to understand the parameter-type discussion and expected responsibilities. No repository file or test is named, so first locate the parameter-handling entry point and define the expected behavior; done should mean the agreed parameter types are represented for documentation, with any query/body validation covered by tests if it remains in scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.