1

I am looking for a gem which will generate swagger doc and showed it on the swagger UI, I came across rswag gem but it requires spec file needs to be present for generating the swagger doc

Is there any gem that will auto generate swagger doc if I put it in on the API controller?

ray
  • 5,454
  • 1
  • 18
  • 40
hepzi
  • 435
  • 4
  • 17

1 Answers1

0

I built an open-source tool to make this easy. Instead of integrating at the code level, the project uses a local proxy to analyze real development traffic and updates your API spec when it observes new behavior in the API. https://github.com/opticdev/optic

For Rails, the only change you have to make is to make the switch from using:

rails server

To starting your API with Optic's start command.

api start

When new API behavior is detected, you can add it to your spec using our UI. Here's an example.

centree
  • 2,399
  • 7
  • 28
  • 32