Guides
Output
Where Portman writes the generated Postman collection, how to set the output path, and how to save the filtered OpenAPI document.
Portman writes the generated Postman collection to a JSON file that you can import into Postman, run with Newman or commit to version control. By default it goes to ./tmp/converted/${specName}.json.
Set the output location
Use -o or --output:
bash
portman -l ./tmp/specs/crm.yml -o ./tmp/specs/crm.Postman.jsonName the collection
--collectionName overwrites the OpenAPI title as the Postman collection name:
bash
portman -l ./tmp/specs/crm.yml -o ./crm.postman.json --collectionName "CRM API - Test suite"Generate without tests
To only convert the spec without injecting tests:
bash
portman -l ./tmp/specs/crm.yml -t falseKeep the collection compact
Every request gets response examples from the conversion. With many variations the collection grows quickly. Set stripResponseExamples in globals:
json
{ "version": 1.0, "globals": { "stripResponseExamples": true }}Save the filtered OpenAPI document
When you filter the spec, --oaOutput writes the filtered OpenAPI document to a file:
bash
portman -u https://specs.apideck.com/crm.yml --filterFile ./oas-format-filter.json --oaOutput ./crm.filtered.ymlUsing the collection
- Import the file into Postman manually; no Postman account is needed to generate it.
- Upload it automatically with Postman sync.
- Run it with Newman.