feat: add --version flag to upgrade command#160
Merged
disintegrator merged 2 commits intomainfrom Feb 17, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
📊 Test Coverage ReportCurrent Coverage: Coverage Change: ✅ No change Coverage by Package
📋 Detailed Coverage by Function (click to expand)
Generated by GitHub Actions |
TristanSpeakEasy
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--version/-Vflag toopenapi spec upgradeso users can target a specific OpenAPI version (e.g.,3.1.0) instead of always upgrading to the latest--versionand--minor-onlyare mutually exclusive — the command exits with an error if both are providedupgradeOpenAPIto accept variadicopenapi.Option[openapi.UpgradeOptions]instead of separate bool/string parametersTest plan
mise test ./cmd/openapi/...— all existing and new tests passopenapi spec upgrade --version 3.1.0upgrades a 3.0.x spec to 3.1.0openapi spec upgrade --version 3.1.0 --minor-onlyexits with mutual exclusivity error