# rswag/rswag

Seamlessly adds a Swagger to Rails-based API's

Repository: https://github.com/rswag/rswag
Canonical: https://ross.abutalabs.com/products/rswag
Language: Ruby
License: MIT
License Family: permissive
Topics: swagger-ui, rswag, openapi
Last push: 2026-08-24T12:22:55+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 23, longevity 100
- inputs: {"age_days": 4251, "days_push": 9, "days_rel": 301, "gap_med": 198.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2201, forks 455 (observed 2026-08-28T04:06:25.620771+00:00)

## What it is
Rswag extends rspec-rails request specs with a Swagger-based DSL for describing and testing Rails API operations, then generates OpenAPI (Swagger) files from passing tests. It also embeds swagger-ui so the generated documentation can be explored and tested from a browser.

## Use cases
- generate OpenAPI documentation from Rails rspec tests
- document a Rails API with Swagger
- test API endpoints and produce living documentation
- serve swagger-ui for a Rails API
- export API spec as JSON or YAML endpoints
- keep API docs in sync with integration tests

## When to choose
- you have a Rails API tested with rspec request specs and want auto-generated OpenAPI docs
- you want documentation that is validated by your test suite
- you want an embedded swagger-ui powered by your spec files

## When to avoid
- your API is not Rails/Ruby-based
- you prefer generating specs from an OpenAPI file rather than the reverse
- you don't use rspec

## Facets
- artifact type: library
- maturity: active
- function: testing, api-framework, api-documentation, documentation
- domain: web-development, backend, apis, documentation, testing
- platform: ruby
- tags: rails, rspec, openapi, swagger-ui, api-documentation, web-server

## Member repositories
- rswag/rswag (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:25.620771+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:47:04.144468+00:00, confidence not recorded.
  - readme: https://github.com/rswag/rswag (fetched 2026-08-28T04:06:25.620771+00:00, sha 4dde43f1c059)
- Data as of 2026-08-30T08:39:29.467469+00:00.
