A Go implementation of Swagger 2.0 (OpenAPI 2.0) for generating servers, clients, and CLI tools from API specifications.
go-swagger is a comprehensive Go implementation of the Swagger 2.0 (OpenAPI 2.0) specification. It provides a suite of high-performance tools to generate idiomatic Go code for building and consuming RESTful APIs, streamlining API development and ensuring consistency between specification and implementation.
Go developers and teams building or consuming RESTful APIs who want to use Swagger/OpenAPI 2.0 specifications for code generation and API consistency.
Developers choose go-swagger for its focus on generating high-performance, idiomatic Go code that integrates seamlessly with the Go ecosystem and standard tools like golint and go vet, along with a complete and stable toolset for Swagger 2.0.
Swagger 2.0 implementation for go
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates code that adheres to Go conventions and integrates seamlessly with standard tools like golint and go vet, ensuring high quality and performance.
Provides server, client, and CLI generation from Swagger specs, covering the full API development lifecycle in a single tool, as highlighted in the features list.
Ensures alignment between Swagger specification and Go implementation, reducing manual errors and maintaining API integrity through automated code generation.
Allows extensive customization via vendor extensions and template overrides, enabling tailored code generation for specific project needs, as mentioned in the README.
Only supports Swagger 2.0, which is outdated compared to OpenAPI 3.x with modern features, limiting its use for newer API specifications.
CLI tool generation is in alpha stage, as noted in the README, making it unreliable for production use and potentially buggy.
Requires Go 1.25 or higher, which can be a barrier for legacy projects or teams unable to upgrade their Go environment promptly.