Spectrum

Spectrum is a multi-purpose OpenAPI specification toolkit for Go. It wraps getkin/kin-openapi with convenience methods for reading, inspecting, comparing, merging, linting, editing, and converting OpenAPI specs — as an importable library and as a set of CLIs.

What it does

OpenAPI 3

  • Read & parse JSON or YAML specs into a rich SpecMore wrapper
  • Inspect operations, schemas, parameters, and spec metadata
  • Compare two specs — intersection and diff across endpoints, operation IDs, and schema names
  • Merge multiple specs into one
  • Lint against configurable rule policies
  • Fix and programmatically edit specs
  • Validate specs
  • Convert to Postman Collection v2

OpenAPI 2 (Swagger)

  • Convert OAS2 → OAS3
  • Convert OAS2 → Postman Collection v2
  • Merge multiple OAS2 specs

Getting started

  • Getting Started — install the library and CLIs, read and inspect your first spec

User guide

Linting

CLI reference

  • Command-line toolsoas2meta, oas3diff, oas3validate, oas3lint, openapi2to3, openapi2postman, openapi2csv

Releases