talira

go-openapi/spec

The Go object model for OpenAPI v2 (Swagger) specification documents

open sourceApache-2.0free

go-openapi/spec is a Go package that models OpenAPI v2 (Swagger) specification documents: it marshals and unmarshals Swagger specs to and from a Go object model, and resolves and expands $ref references into a single root document. It's at the core of the go-openapi suite of packages and the go-swagger code generator, with a companion package (go-openapi/loads) for fetching specs as JSON or YAML. Its API is stable.

Problems it solves

  • parse a Swagger 2.0 spec in Go
  • resolve $ref references in an OpenAPI v2 document
  • work with Swagger specs as Go structs

Features

  • Go object model for Swagger 2.0 specs
  • marshal and unmarshal specs
  • resolve and expand $ref references
  • stable API