Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

430 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

oastools - for validating, parsing, fixing, converting, diffing, joining, and building specs

A complete, self-contained OpenAPI toolkit for Go with minimal dependencies.

CI: Go CI: golangci-lint codecov Go Reference License: MIT Try it Online

Parse, validate, fix, convert, diff, join, generate, and build OpenAPI specs (2.0–3.2) β€” all in one tool.

What It Does

Spec Lifecycle β€” parser Β· validator Β· fixer Β· converter
Multi-Spec Ops β€” joiner Β· differ Β· overlay
Code & Query β€” generator Β· builder Β· walker
Runtime β€” httpvalidator Β· oaserrors

12 packages covering the full OpenAPI lifecycle. See full details β†’

Highlights

  • πŸ“¦ Minimal Dependencies β€” Only go.yaml.in/yaml, golang.org/x/tools, golang.org/x/text, and the MCP Go SDK at runtime
  • βœ… Battle-Tested β€” 8,000+ tests against 10 production APIs (Stripe, GitHub, Discord, MS Graph 34MB)
  • ⚑ Performance β€” Pre-parsed workflows 11–150x faster; 340+ benchmarks
  • πŸ“‹ OAS 2.0–3.2 β€” Full JSON Schema Draft 2020-12 for OAS 3.1+; automatic format detection and preservation
  • πŸ€– AI-Ready β€” Built-in MCP server exposes all capabilities to LLM agents
  • 🌐 Try Online β€” oastools.robnrob.com β€” no install required

Quick Start

CLI

oastools validate openapi.yaml                          # Validate a spec
oastools convert -t 3.0.3 swagger.yaml -o openapi.yaml  # Convert versions
oastools diff --breaking v1.yaml v2.yaml                 # Detect breaking changes
oastools fix api.yaml -o fixed.yaml                      # Auto-fix errors
oastools join -o merged.yaml base.yaml ext.yaml          # Merge specs
oastools generate --client --server -o ./gen -p api openapi.yaml  # Generate Go code

Library

// Parse, validate, and fix β€” consistent functional options API
result, _ := parser.ParseWithOptions(parser.WithFilePath("api.yaml"))
vResult, _ := validator.ValidateWithOptions(validator.WithParsed(*result))
fResult, _ := fixer.FixWithOptions(fixer.WithParsed(*result))

Full library guide β†’

Installation

CLI

brew install erraggy/oastools/oastools                   # Homebrew (macOS/Linux)
go install github.com/erraggy/oastools/cmd/oastools@latest  # Go install

Pre-built binaries for macOS, Linux, and Windows on the Releases page.

Library

go get github.com/erraggy/oastools@latest

Requires Go 1.25+.

Documentation

πŸ“š Documentation Site β€” Guides, examples, and package deep dives

πŸ“– CLI Reference β€” All commands, flags, and output formats

πŸ€– MCP Server β€” LLM agent integration via Model Context Protocol

πŸ“¦ API Reference β€” Go package documentation with runnable examples

Contributing

Fork, branch, make check, conventional commits. See WORKFLOW.md for the full process.

License

MIT

Initial code was generated by Claude Code using claude-4-5-sonnet/opus with minor edits and full control by @erraggy. As of May 29th, 2026, all code is no longer LLM generated.

About

OpenAPI Specification (OAS) tools for validating, parsing, fixing, converting, diffing, joining, and building specs; as well as generating client/servers/types from specs.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages