0.0.1 • Published 3 years ago
postman-update-oas v0.0.1
OpenAPI to Postman Collection Updater
This script updates an existing Postman collection with an updated OpenAPI file. It reads the OpenAPI file, converts it to a Postman collection, and updates the specified Postman collection using the Postman API.
You can use this script in order to keep downstream forks and stars intact.
Prerequisites
- Node.js installed
- A
.envfile with your Postman API key (POSTMAN_API_KEY)
Installation
- Clone the repository
- Run
npm installto install dependencies
Usage
$ node index.js <OAS_FILE_PATH> <COLLECTION_ID>Where:
<OAS_FILE_PATH>: The path to your OpenAPI file<COLLECTION_ID>: The Postman collection ID you want to update
Example
$ node script.js 'petstore.yaml' '308093-acbc504c-c371-432f-b7e0-8f8afc0f5364'This command will update the Postman collection with the specified ID using the OpenAPI file provided.
Troubleshooting
If you encounter any issues, ensure that:
- Your Postman API key is set correctly in the
.envfile - The OpenAPI file path is correct and the file is accessible
- The Postman collection ID is correct and exists in your Postman account
0.0.1
3 years ago