ruby-grape / ruby-grape/grape-swagger

intercept generated swagger doc for modification/extension

Open
#452 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Often we will run into a swagger feature that isn't supported by the grape-swagger integration. So my question is, is there a way to intercept the generated swagger json documentation and modify/extend it?

Our specific problems is we have some magic rails(not grape) routes from doorkeeper in addition to standard grape routes that we want to document in swagger. So being able to intercept the generated swagger doc and generate json for these routes would solve the problem.

T

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

No files or tests are named. Start by tracing where grape-swagger generates the Swagger JSON, then determine how an extension point could expose that document for adding Rails and Doorkeeper routes; done when the supported modification path is defined and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, rails, ruby
Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.