Generating an OpenAPI/Swagger spec from a Ruby on Rails API

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • rswag

    Seamlessly adds a Swagger to Rails-based API's

  • We will be creating a "Coffee Ordering API" using Ruby on Rails, and using a tool called rswag to create tests that verify the behaviour of our API and generate an OpenAPI reference.

  • ruby-on-rails-openapi-example

    Demo project showing how to use rswag to generate an OpenAPI spec for a Ruby on Rails API

  • Note: You can view the source code for this tutorial on GitHub

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rspec-rails

    RSpec for Rails 6+

  • This is where rswag comes in. It is an extension to rspec-rails for "describing and testing API operations".

  • swagger-ui

    Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

  • rswag also includes a bundled version of Swagger UI if you want to inspect your OpenAPI spec visually during testing.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts