Generating OpenAPI docs for Ruby on Rails with RSwag
API Code-first is the art of building an API, and then popping some annotations or metadata in there to output API documentation in an API description format like OpenAPI.
The most popular API Code-first approach in Ruby on Rails uses a tool called RSwag. With RSwag you write the OpenAPI for each API endpoint into special tests, which help to confirm your responses are matching the OpenAPI you’ve just written.
Read the full guide over on Bump.sh.