feat(convert): --force to overwrite existing contracts; commas in messages - #68
Merged
Conversation
…sages Add `apic convert --postman --force`; the default still errors on an existing file and now suggests --force. Sweep user-facing messages to use commas instead of semicolons and em-dashes.
rizukirr
force-pushed
the
convert-force-overwrite
branch
from
July 6, 2026 17:59
914a199 to
46815a4
Compare
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
Two changes to
apic convert, plus a message-style sweep.apic convert --postman --force--forceflag that overwrites contracts that already exist.now suggests the flag:
Threaded through
convert::run/write_contracts; the GUI import keeps thesafe default (never overwrites).
Message style: commas over semicolons and em-dashes
Swept user-facing runtime messages (errors, warnings, status lines, TUI/GUI
labels, and
apic read's response-title line) to use commas instead of;or—, e.g.:already exists; refusing to overwrite->already exists, pass --force to overwriteNo project template found; create will use...->..., create will use...unsupported by apic — imported as GET->unsupported by apic, imported as GETRESPONSE 200 — OK->RESPONSE 200, OKScope is runtime message string literals; clap
--helpdoc comments and codecomments were left alone (say the word if you want those swept too).
Tests
Added an overwrite case to the
write_contractsunit test.cargo fmt --all --checkandcargo clippy --workspace --all-targets -- -D warningsare clean;cargo test --workspacepasses (258 tests). Smoke-tested the CLI end-to-end(first import succeeds, re-import errors with the
--forcehint,--forceoverwrites).