Show HN: OasRails – AutoGenerate Interactive API Docs in Rails with Yard and OAS
github.comI built OasRails, a Rails engine that automatically generates OpenAPI 3.1 documentation from YARD comments in your Rails controllers. It renders the docs using RapiDoc for a slick, interactive UI—no DSLs, no generators, and no dependency on RSpec or Grape.
I was inspired by FastAPI’s interactive docs and wanted something similar for Rails. After not finding anything that met my needs, I built OasRails during downtime as a freelancing dev.
How does oas_rails dynamically generate OpenAPI 3.1 documentation from my Rails routes and controllers—does it rely on specific annotations or conventions?
Yes, it relies on YARD tags (Comments) describing the method. I create some specific YARD tags for document every endpoint.