What's New
Swagger 2.0 Support
This release adds comprehensive support for Swagger 2.0 specifications including full parsing, validation, walking, and an upgrade utility to convert to OpenAPI 3.0.
Core Features:
- Complete Swagger 2.0 data models with marshalling support
- Full validation against Swagger 2.0 specification
- Walking API to traverse Swagger documents with the same pattern as OpenAPI
- Comprehensive test coverage with 227 tests including round-trip testing with real-world specs (Petstore, DocuSign, Docker Engine API)
Upgrade Utility
Automatic conversion from Swagger 2.0 to OpenAPI 3.0 with proper schema mapping:
- swagger: "2.0"→- openapi: "3.0.0"
- host/basePath/schemes→- servers
- definitions→- components.schemas
- parameters(body) →- components.requestBodies
- securityDefinitions→- components.securitySchemes
- Request/response schema wrapping in contentobjects
- Reference rewriting (#/definitions/→#/components/schemas/)
- 17 upgrade tests covering common and edge case scenarios
CLI Commands
- openapi swagger upgrade- Convert Swagger 2.0 to OpenAPI 3.0
- openapi swagger validate- Validate Swagger 2.0 documents
Additional Improvements
- JSON marshalling: Fixed nul character handling to use proper JSON Unicode escapes (\u0000) instead of Go-style hex escapes (\x00)
- Code quality: Resolved all linting issues (gocritic, staticcheck, unparam, gosec, nilaway)
- Test improvements: All tests use t.Context()for better lifecycle management
Testing
- ✅ All 227 swagger tests pass
- ✅ All 513 total tests pass (including JSON Schema test suite)
- ✅ Linting passes with 0 issues
- ✅ Round-trip testing with real-world Swagger specs validates correctness
Breaking Changes
None - this is purely additive functionality.
Full Changelog: v1.10.1...v1.11.0
OpenAPI CLI v1.11.0
This release includes binaries for Linux, macOS, and Windows on both x86_64 and ARM64 architectures.
Installation
Download the appropriate binary for your platform from the assets below, extract it, and add it to your PATH.
Changes
Changelog
Features
Full Changelog: v1.10.1...v1.11.0
Released by GoReleaser.