Raml to Postman is a small project that takes in a RAML file and converts it to a postman collection that can be imported.
It works with the use of a few libraries. The NodeJS script takes in a RAML file and using the raml-1-parser library it
converts it to a json object. The script then executes the Java cmd-dw program which takes in a payload (RAML json) and a
dataweave script. Then, using the two files it executes the script in the dataweave file against the payload file.
The script provided is made special for a RAML JSON payload to be converted to a postman collection.
- fs
- yargs
- js-yaml
- raml-1-parser
- Java 8
- Clone the project where ever you would like
- Install the package with
npm install -g /path/to/download/
- Install the project with
npm install -g raml2postman
- Usage:
raml2postman [options]
- Usage:
raml2postman -i [input file] -o [output file]
- Show help menu:
-h --help
- Show version number:
-v --version
- Set input file:
-i --input
- Set output file:
-o --output
- Bear in mind: Output tag can only be used with relative pathing currently