Swagger 2.0 (OpenAPI 2.0) toolkit for Go: generate servers, clients, CLIs and models, or a spec from code
open sourceApache-2.0self-hostablefree
go-swagger is a Go implementation of Swagger 2.0 (OpenAPI 2.0). Its swagger CLI generates idiomatic Go API servers, clients, command-line clients (alpha) and data models from a spec, generates a spec from annotations in your Go source, validates, flattens, expands, mixes and diffs specs, renders Markdown docs and serves a spec UI. Code generation uses customizable templates and vendor extensions, and the output plays well with golint and go vet. Built on the go-openapi toolkit. It doesn't support OpenAPI 3.x. Apache-2.0.
Problems it solves
- generate a Go API server from a Swagger 2.0 spec
- generate a typed Go client for a REST API described in Swagger
- produce a Swagger spec from annotations in my Go code
- validate a Swagger spec and see what changed between two versions
Features
- generate Go servers, clients and models from a Swagger 2.0 spec
- generate a CLI client from a spec (alpha)
- generate a spec from Go source annotations
- validate, flatten, expand, mixin and diff specs
- generate Markdown docs and serve a spec UI
- customizable code generation templates and vendor extensions
Limitations
- Supports Swagger 2.0 (OpenAPI 2.0) only, not OpenAPI 3.x1
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
Alternatives
The same job
These do what go-swagger does.
- OpenAPI Generator Generates API clients, server stubs and documentation from OpenAPI 2.0 and 3.x documents
