Home > Software design >  Is there a way to generate an interactive documentation for Rails APIs?
Is there a way to generate an interactive documentation for Rails APIs?

Time:04-27

I mean something like the interactive documentation that generate FastApi, but for a Rails API. I know there is rswag, but to use this I need to write the Rspec files with the description of my endpoints in others files and then generate the json or xml for to be interpreted by rswag-ui or something like that. And what about if a have my tests already all with minitest? Rewrite it for Rspec?

But Is there a short way to do this? Like, write the method name and description on my controller for to be read for an OAS generator? And don't care about update my OAS JSON file every time I change some parameters for my controller, a route or a response because it will be updated automatically. And of course including the UI in the project.

Already exists some magical tool like this? Or a project in initial state trying to do something similar?

CodePudding user response:

i used Apipie that generates swagger file and local documentation as you can see in its demo. You basically write ruby code to generate documentation.

  • Related