Skip to content
railsengines.com

Swaggard

Add Swagger documentation to your Rails REST endpoints

No ratings yet
Gem
swaggard
Repository
adrian-gomez/swaggard
License
MIT
Stars
55
Added
August 16, 2026

About

Add Swagger documentation to your Rails REST endpoints.

Swaggard is a Rails Engine that documents a REST API by generating a JSON file compliant with OpenAPI 3.1 and displaying it using Swagger UI 5. This gem is inspired and based on SwaggerYard by Chris Trinh.

What you get

  • @tag name — Group this controller under name. Defaults to the controller path if ignore_untagged_controllers is false.
  • @query_parameter [type] name — Query string parameter.
  • @form_parameter [type] name — Form data parameter (application/x-www-form-urlencoded).
  • @parameter_list — Enum-style query parameter list.
  • @response_class type — Response schema type. Supports Array for array responses.
  • @response_status 200 — HTTP response status code.
  • @response_root name — Wrap the response in a root key.

Mounting it

ruby
# Gemfile
gem "swaggard"

# config/routes.rb
mount Swaggard::Engine, at: "/api_docs/swagger/"

Details

55 stars on GitHub · MIT licensed · maintained by adrian-gomez. Source: https://github.com/adrian-gomez/swaggard

Discussion (0)

Sign in to join the discussion.

No comments yet.