1.0.2 • Published 1 year ago

@ahmedrowaihi/postman-sdk v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

postman-sdk

postman-sdk is a utility library that converts a Postman collection json file into axios client class.

Usage

To run the utility, you need to have Node.js installed on your machine. You can download it from here.

To install the utility, run the following command:

npm install -g postman-sdk

or using npx:

npx postman-sdk

Example To generate a TypeScript SDK, run the following command:

postman-sdk --ts --s ./collections/BigCollection.json --o ./SDK.ts --b https://api.example.com

Options

OptionDescriptionDefaultrequired
--src, -sPath to the Postman Collection./collections/BigCollection.jsonYes
--out, -oPath to the output file./SDK.tsNo
--baseURL, -bBase URL for the APIhttps://api.example.comNo
--typescript, -tsGenerate a TypeScript SDKtrueNo
--commonjs, -cGenerate a CommonJS SDKfalseNo
--help, -hShow this help messagefalseNo

License

MIT

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Authors

Requested Features

  • Add support for other HTTP methods (e.g. PUT, PATCH, DELETE, etc.)
  • Support TypeScript SDK generation
  • Support CommonJS SDK generation
  • basic class boilerplate strategey
  • Proof of concept
    • Add support for other languages (e.g. Python, Java, etc.)
  • Add support for other HTTP clients (e.g. fetch, etc.)
  • Assure that the generated SDK is compatible with the Postman collection version (e.g. v2.1, v2.0, etc.)
  • Add support for Postman environments
  • Add support for Postman variables
  • Add Paramas, Headers, and Body to the generated SDK methods with types if possible
  • Add more boilerplate strategies