v0.2.2
apic v0.2.2
A feature release centered on importing existing Postman collections into apic, plus recursive folder validation and full HTTP-method coverage.
New: apic convert — import Postman collections
Bring an existing Postman Collection into apic as per-endpoint contract files.
apic convert --postman MyAPI.postman_collection.json [--destination <dir>]
- All export versions supported: v1.0.0, v2.0.0, and v2.1.0 (auto-detected).
- Mirrors your collection's folders — each Postman folder becomes a directory, each request becomes one JSON contract (
folder/request_name.json), at any nesting depth. --destinationis optional — defaults to the working directory from.apic/config.toml. Paths are confined to the working directory; existing files are never overwritten.- Robust parser — only the fields apic uses are read, so any real-world collection imports cleanly regardless of Postman features it uses (auth, scripts, events, cookies, …). Those unused fields are ignored.
- No silent data loss on methods — see HEAD/OPTIONS below.
Recursive folder validation
apic validate can now validate a whole subtree:
apic validate -f auth/ # validates every contract under auth/, recursively
apic validate -f auth/login # single contract (unchanged)
apic validate # everything (unchanged)
A query ending in / means "validate this folder"; without the slash, resolution is the usual single-contract behavior. Validation output now uses forward-slash paths consistently across platforms.
--filename → --find
The long flag is renamed on the commands that resolve an existing contract: read, open, remove, validate now use --find (the flag does a fuzzy find, not a filename). create keeps --filename since it names a new file. The short -f is unchanged everywhere, so existing -f usage keeps working.
Scripts using the long form
--filenameon read/open/remove/validate must switch to--find.
HEAD and OPTIONS methods
HEAD and OPTIONS are now first-class HTTP methods across apic — in contracts, the read/validate rendering (HEAD cyan, OPTIONS white), and the TUI method cycler. apic convert maps them natively. Any method apic still doesn't model (e.g. TRACE, CONNECT, custom verbs) is imported as GET with a clear warning, so nothing is downgraded silently:
warning: request "Debug" uses method TRACE, unsupported by apic — imported as GET
Converted 3 contract(s) into out (1 warning)
Notes
- Existing contracts are fully compatible — no migration needed.
- Verified on Linux, macOS, and Windows;
cargo fmt,clippy -D warnings, and the full test suite (199 tests) pass.
Full changelog: v0.2.1...v0.2.2