OSS Tanbou

test Rails APIs through request specs and generate OpenAPI documents and Swagger UI from the same definitions

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
2,202
Primary language
Ruby
License
MIT
Repository last updated
Aug 24, 2026
On this page

Overview

Rswag extends rspec-rails request specs with an OpenAPI-based DSL so API behavior testing and documentation can share the same source. rswag-specs validates requests and responses and generates OpenAPI JSON or YAML, while rswag-api and rswag-ui expose the specification and Swagger UI from the Rails application.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Describe and execute request specs as an OpenAPI DSL

Define paths, HTTP methods, parameters, responses, and schemas as RSpec examples, then use run_test! to send real requests and validate status codes and response bodies.

Sources: [2]

Generate OpenAPI files and a browser UI from passing specs

A rake task converts request specs into OpenAPI JSON or YAML, Rails engines can expose the files, and the bundled Swagger UI lets consumers inspect and exercise operations.

Sources: [2][3]

Best fit

Fits Rails APIs that want integration tests and consumer-facing API documentation to share one definition

It is useful for Rails APIs already using RSpec request specs when teams want to reduce duplicated test and documentation definitions and include response-schema validation in the same workflow.

Sources: [2]

Before adoption

Treat spec edits as API-contract changes when generated documents are public

Because the test DSL is also the documentation source, changes to parameters or response schemas can affect both tests and the consumer-facing contract. Review them with API compatibility in mind.

Sources: [2]

Check the 2.17.0 dependency range and maintainer status

In 2.17.0, rswag-specs allows Rails-related dependencies from 5.2 up to but not including 8.2, and the release adds Rails 8.1 support. The README also says the project is seeking maintainers, so long-term adoption should consider issue and release cadence.

Sources: [4][5][2]

Official sources

  1. [1]rswag/rswag repository(2026-09-30)
  2. [2]Rswag 2.17.0 README(2026-09-30)
  3. [3]Rswag 2.17.0 gemspec(2026-09-30)
  4. [4]Rswag Specs 2.17.0 gemspec(2026-09-30)
  5. [5]Rswag 2.17.0 release(2026-09-30)
  6. [6]Rswag MIT license(2026-09-30)
Supplemental curator note

Sharing one definition between API tests and OpenAPI documentation can reduce duplication in Rails APIs. Because spec edits can also change the public contract, review them for API compatibility rather than only test correctness.

Try it in 3 steps

  1. 1

    Install Rswag 2.17.0

    Add the stable Rswag release to an existing Rails application.

    bundle add rswag --version 2.17.0
  2. 2

    Generate the Rswag setup

    Create the OpenAPI helper, API endpoint, Swagger UI, and related initial configuration.

    rails g rswag:install
  3. 3

    Generate the OpenAPI document

    After defining and running request specs, generate OpenAPI JSON or YAML from their metadata.

    bundle exec rake rswag:specs:swaggerize
Check the official README

Growth

Growth trends · Last 30 days

2,202 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • openapi
  • rswag
  • swagger-ui
Stars
2,202
Forks
454
Watchers
28
Open issues
26
Owner type
Organization
Primary language
Ruby
License
MIT
Repository last updated
Aug 24, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?