openapi logo

OPEN SWAG GO

Define endpoints as structs, build schemas fluently, and visualize with Scalar.

$go get github.com/gopackx/open-swag-go
Get StartedView Examples

Everything you need for OpenAPI docs in Go

5 Framework Adapters

First-class support for Chi, Gin, Echo, Fiber, and net/http. Mount docs with a single line of code.

Auth Playground

Test Bearer, Basic, API Key, Cookie, and OAuth2 flows directly in the docs UI.

Try-It Console

Send live API requests with environment management, request history, and auto-generated code snippets.

Schema Generation

Derive OpenAPI schemas from Go structs using standard tags — json, validate, example, and more.

Version Diffing

Compare spec versions, detect breaking changes, and generate migration guides automatically.

Theming & Scalar UI

Predefined themes, dark mode, and custom CSS via Scalar integration for beautiful output.

Code Snippets

Auto-generated examples in curl, JS, Go, Python, and PHP for every single endpoint.

Docs Auth

Protect your documentation with basic auth or API key authentication out of the box.

Smart Examples

Auto-generate realistic example values from struct field names and validation tags.

OPEN SWAG GO© 2026
GitHubMIT License
Made for Andrian Prasetya