Open Swag Go

Open Swag Go generates beautiful, interactive OpenAPI documentation for your Go APIs. Define endpoints as Go structs, mount a handler, and get a full-featured docs UI powered by Scalar.

Key Features

  • 5 Framework Adapters — First-class support for Chi, Gin, Echo, Fiber, and net/http
  • Auth Playground — Test authentication flows (Bearer, Basic, API Key, Cookie, OAuth2) directly in the docs
  • Try-It Console — Send live API requests with environment management and request history
  • Code Snippets — Auto-generated examples in curl, JavaScript, Go, Python, and PHP
  • Version Diffing — Compare spec versions and detect breaking changes with migration guides
  • Schema Generation — Derive OpenAPI schemas from Go structs using standard tags (json, validate, example, etc.)
  • Theming — Predefined themes (purple, blue, green, light), dark mode, and custom CSS via Scalar
  • Docs Auth — Protect your documentation with basic auth or API key authentication
  • Smart Examples — Auto-generate realistic example values from struct field names and tags

Quick Navigation