Importing
Supported formats:
- Postman collection v2.x (JSON)
- OpenAPI 3 and Swagger 2 (JSON or YAML)
App: Import Postman / OpenAPI at the top of the sidebar.
CLI:
cactus-cli import . payments.postman_collection.jsonimported 42 requests from postmanadded to opencollection.yml: baseUrlImporting only adds files. Variables already in opencollection.yml keep their values.
Postman
Section titled “Postman”| Imported | |
|---|---|
| Folders and requests | Order kept |
| Method, URL, params, headers | |
| Bodies | Raw, form, multipart |
| Auth | Bearer, basic, API key |
| Descriptions | As request docs |
| Collection variables | Added to opencollection.yml |
| Scripts | Kept in the file, not run |
Environments aren’t imported.
OpenAPI / Swagger
Section titled “OpenAPI / Swagger”| Imported | |
|---|---|
| Operations | One request each, named from summary or operationId |
| Tags | First tag becomes the folder |
| Server URL | baseUrl collection variable; URLs become {{baseUrl}}/path |
| Path params | /pets/{id} becomes /pets/:id with an empty value |
| JSON bodies | From the spec’s example, or {} |
| Form bodies | Field names, empty values |
| Descriptions | As request docs |
Query and header parameters aren’t imported.