You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Import Postman collections (v2.1) and environments #47
Postman is where most teams' requests live today, and "can I bring my collection?" is the first question from anyone evaluating a replacement. apic import only reads OpenAPI 3 (internal/cli/import.go:17-22). Bruno's success with migration shows the value.
What
apic import collection.postman.json -o api --postman-env staging.postman_environment.json
Acceptance criteria:
Detects a Postman v2.1 collection by its info.schema; v2.0 is accepted where the shapes coincide, v1 is refused with a message.
Folders become files (<folder>.http), nested folders join with -; requests become named requests (kebab-case of the name, de-duplicated); the request description becomes # @description.
URL, method, headers, query, path variables (:id → {{id}}), raw/JSON/urlencoded/form-data bodies, and {{var}} placeholders map 1:1. GraphQL bodies map onto the GraphQL form once that lands.
Collection and environment variables become http-client.env.json ($shared for collection-level, one environment per --postman-env file); values marked secret go to the private file.
pm.test scripts: translate the trivial forms (pm.response.to.have.status(200), pm.expect(jsonData.x).to.eql(y), header equals) to # @assert; anything else is reported in skipped with the request and a one-line reason.
New internal/postman/ (decoder as a small hand-written model like internal/openapi/model.go; no library), internal/cli/import.go (dispatch on file type), reuse the file-writing helpers from the OpenAPI importer.
A fixture collection under internal/postman/testdata/ covering folders, every body type, every auth type, path variables and three pm.test shapes; golden .http output; environment mapping; refusal of v1.
Shipped in #103: apic import collection.postman.json -o api --postman-env staging.postman_environment.json, detected from the file (v2.1, v2.0 where the shapes coincide, v1 refused). Folders to files, requests to named requests, every body mode, bearer/basic/awsv4/oauth2/apikey auth (the collection's auth becomes auth.default), variables and environments to the env files with secrets in the private one, and the simple pm.test shapes to # @assert and # @capture. One deviation: what cannot be translated is reported under unsupported (request, what, reason) rather than skipped, so skipped keeps meaning "existing files kept". Docs: cli (import), cookbook (Migrate a Postman collection), comparison.
Activity
import: Postman collections and environments (#47)
dataGriff commentedon Sep 20, 2026
Shipped in #103:
apic import collection.postman.json -o api --postman-env staging.postman_environment.json, detected from the file (v2.1, v2.0 where the shapes coincide, v1 refused). Folders to files, requests to named requests, every body mode, bearer/basic/awsv4/oauth2/apikey auth (the collection's auth becomesauth.default), variables and environments to the env files with secrets in the private one, and the simplepm.testshapes to# @assertand# @capture. One deviation: what cannot be translated is reported underunsupported(request, what, reason) rather thanskipped, soskippedkeeps meaning "existing files kept". Docs: cli (import), cookbook (Migrate a Postman collection), comparison.Generated by Claude Code