github.com/swaggo/swag

swag

Package swag converts Go annotations to Swagger Documentation 2.0.

72

Decision Signals

Health score 72/100, confidence 75/100.

Strong
Maintenance 63
Adoption 69
Security 92
Maturity 62
Developer DX 83
Confidence 75

Install

go get github.com/swaggo/swag

Package Data

updated Jun 10, 2026
Latest versionv1.16.6
Imported by11.8K packages
Stars0
Forks0
Last activity10 months ago
Latest releaseUnknown
LicenseUnknown
Known vuln records0

API Surface

203 symbols
SymbolKindSynopsis
AstFileInfo Type type AstFileInfo struct{ ... }
AstFileInfo.File Field File *ast.File
AstFileInfo.FileSet Field FileSet *token.FileSet
AstFileInfo.PackagePath Field PackagePath string
AstFileInfo.ParseFlag Field ParseFlag ParseFlag
AstFileInfo.Path Field Path string
ConstVariable Type type ConstVariable struct{ ... }
ConstVariable.Comment Field Comment *ast.CommentGroup
ConstVariable.File Field File *ast.File
ConstVariable.Name Field Name *ast.Ident
ConstVariable.Pkg Field Pkg *PackageDefinitions
ConstVariable.Type Field Type ast.Expr

Similar Packages

Go OpenAPI Libraries

#1 go-doudou

go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.

Go OpenAPI Libraries 1.2K stars 0 imported-by 100% confidence
86

#2 swag

Package swag contains a bunch of helper functions for go-openapi and go-swagger projects.

Go OpenAPI Libraries 0 stars 16.2K imported-by 75% confidence
80

#3 validate

Package validate provides methods to validate a swagger specification, as well as tools to validate data against their schema.

Go OpenAPI Libraries 0 stars 5.9K imported-by 75% confidence
78

#4 go-redoc

Embedded OpenAPI/Swagger documentation ui for Go using [ReDoc](https://redocly.com/).

Go OpenAPI Libraries 94 stars 39 imported-by 100% confidence
74

#5 Goa

Package goa implements a Go framework for writing microservices that promotes best practice by providing a single source of truth from which server code, client code, and documentation is derived.

Go OpenAPI Libraries 0 stars 2.0K imported-by 80% confidence
55