# go-swagger

> Swagger 2.0 (OpenAPI 2.0) toolkit for Go: generate servers, clients, CLIs and models, or a spec from code

Source: https://talira.ai/catalog/go-swagger-x5s28yp6
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool, Library
- Categories: [developer tools / api / sdk generation](https://talira.ai/categories/developer-tools/api/sdk-generation), [languages / go](https://talira.ai/categories/languages/go)
- Platforms: linux, macos, windows, docker[^3]
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Self-hostable: yes[^3]
- Backed by: [go-swagger](https://talira.ai/orgs/go-swagger.md)

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.

## Links

- Website: https://goswagger.io/go-swagger/
- GitHub: https://github.com/go-swagger/go-swagger
- Docs: https://goswagger.io/go-swagger/

## 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.x[^1]

## Capabilities

- Has a command line tool: plan not known
- Has official SDKs: plan not known

## Trust

Overall: 0.32 out of 1.
Signals: backing 0.30, extensibility 0.20.

- has a company behind it

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [OpenAPI Generator](https://talira.ai/catalog/openapi-generator-ypxw453r.md): Generates API clients, server stubs and documentation from OpenAPI 2.0 and 3.x documents

## Sources

[^1]: https://github.com/go-swagger/go-swagger#readme (checked 22 Nov 2026)
[^2]: https://github.com/go-swagger/go-swagger/blob/master/LICENSE (checked 22 Nov 2026)
[^3]: https://goswagger.io/go-swagger/ (checked 22 Nov 2026)
