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
SpecMorewrapper - 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¶
- Inspecting specs — operations, schemas, and metadata via
SpecMore - Comparing specs — intersection and diff
- Merging specs — combine multiple specs
- Converting specs — OAS2 → OAS3, OpenAPI → Postman, CSV export
- Fixing specs — programmatic fixes
- Recommendations — authoring guidance
Linting¶
CLI reference¶
- Command-line tools —
oas2meta,oas3diff,oas3validate,oas3lint,openapi2to3,openapi2postman,openapi2csv