ruby-grape / ruby-grape/grape-swagger

custom rewriting of endpoint paths

Open
#830 0 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

So we have paths like:

/public/foo
/public/bar

which get rewritten by another service like so

/service/foo
/service/bar

I'd like to be able to add something in our grape swagger settings to be able to replace /public/ in all the paths with /service/ so that the outputted swagger matches the actual paths that one hits - is that currently possible in grape-swagger. I've been all through the docs and not found anything that looks like that option ...

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 by reviewing the grape-swagger documentation and settings related to generated endpoint paths, then inspect how /public/ appears in the generated Swagger output. The work is done when a documented setting can consistently rewrite that prefix to /service/ and the generated paths match the actual endpoints.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.