{"_id":"@atlaspay/postman-to-openapi","name":"@atlaspay/postman-to-openapi","dist-tags":{"latest":"3.0.1"},"versions":{"3.0.1":{"name":"@atlaspay/postman-to-openapi","version":"3.0.1","description":"Convert postman collection to OpenAPI spec","main":"lib/index.js","types":"types/index.d.ts","bin":{"p2o":"bin/cli.js"},"scripts":{"lint":"eslint **/*.js","lint:fix":"eslint **/*.js --fix","lint:ts":"tsc --build types","test:unit":"mocha","test:unit-no-only":"npm run test:unit -- --forbid-only","test":"nyc npm run test:unit-no-only","changelog:all":"conventional-changelog --config ./changelog.config.js -i CHANGELOG.md -s -r 0","changelog":"conventional-changelog --config ./changelog.config.js -i CHANGELOG.md -s","prepare":"husky install"},"repository":{"type":"git","url":"git+https://github.com/AtlasPay/postman-to-openapi-atlas.git"},"keywords":["swagger","OpenAPI","postman","collection","convert","converter","transform","specification","yml"],"author":{"name":"joolfe04@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/AtlasPay/postman-to-openapi-atlas/issues"},"homepage":"https://github.com/AtlasPay/postman-to-openapi-atlas#readme","devDependencies":{"@commitlint/cli":"^17.3.0","@commitlint/config-conventional":"^17.3.0","eslint":"^8.30.0","eslint-config-standard":"^17.0.0","eslint-plugin-import":"^2.26.0","eslint-plugin-n":"^15.6.0","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^6.1.1","execa":"^5.1.1","husky":"^7.0.4","mocha":"^10.2.0","nyc":"^15.1.0","typescript":"^4.9.4"},"commitlint":{"extends":["@commitlint/config-conventional"]},"engines":{"node":">=14"},"nyc":{"all":true,"include":["lib/**/*.js","test/**/*.js","bin/**/*.js"],"exclude":[],"reporter":["lcovonly","html","text"],"lines":90,"statements":90,"functions":90,"branches":90,"check-coverage":true},"dependencies":{"commander":"^8.3.0","js-yaml":"^4.1.0","jsonc-parser":"3.2.0","lodash.camelcase":"^4.3.0","marked":"^4.2.5","mustache":"^4.2.0"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS"}},"gitHead":"476c8e114614f963e14a296c1c87a23c6c78d8dc","_id":"@atlaspay/postman-to-openapi@3.0.1","_nodeVersion":"18.14.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-/66FhehsTzJpm/cfmjA8WNHYVNua1zsPaDAfS24gVjky5TgFQxmOOmKu6CReWfjTjiSHUi4xd+bMUOWoPSEn9w==","shasum":"5b14e7d5831182ba486f714cc69c43bd8647bca4","tarball":"https://registry.npmjs.org/@atlaspay/postman-to-openapi/-/postman-to-openapi-3.0.1.tgz","fileCount":10,"unpackedSize":37029,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICuGNg5TilKUl4HrGFLvyhx74z4UZ2P0S5wiy/7DP4SiAiBda5VYY/ih180R5peF8+n1gnNUE86EbvYCQP9xTa4Pbw=="}]},"_npmUser":{"name":"kir-npm-user","email":"rrock-k@yandex.ru"},"directories":{},"maintainers":[{"name":"kir-npm-user","email":"rrock-k@yandex.ru"},{"name":"clayminer","email":"clay.miner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postman-to-openapi_3.0.1_1698233925241_0.6825926055204703"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-25T11:38:45.141Z","3.0.1":"2023-10-25T11:38:45.559Z","modified":"2023-10-25T11:38:45.879Z"},"maintainers":[{"name":"kir-npm-user","email":"rrock-k@yandex.ru"},{"name":"clayminer","email":"clay.miner@gmail.com"}],"description":"Convert postman collection to OpenAPI spec","homepage":"https://github.com/AtlasPay/postman-to-openapi-atlas#readme","keywords":["swagger","OpenAPI","postman","collection","convert","converter","transform","specification","yml"],"repository":{"type":"git","url":"git+https://github.com/AtlasPay/postman-to-openapi-atlas.git"},"author":{"name":"joolfe04@gmail.com"},"bugs":{"url":"https://github.com/AtlasPay/postman-to-openapi-atlas/issues"},"license":"MIT","readme":"![logo](./docs/assets/img/logoBanner.png)\n\n# [postman-to-openapi](https://joolfe.github.io/postman-to-openapi/)\n\n🛸 Convert Postman Collection v2.1/v2.0 to OpenAPI v3.0.\n\nOr in other words, transform [this specification](https://schema.getpostman.com/json/collection/v2.1.0/collection.json) and [also this](https://schema.getpostman.com/json/collection/v2.0.0/collection.json) to [this one](http://spec.openapis.org/oas/v3.0.3.html)\n\n[![build](https://github.com/joolfe/postman-to-openapi/workflows/Build/badge.svg)](https://github.com/joolfe/postman-to-openapi/actions)\n[![codecov](https://codecov.io/gh/joolfe/postman-to-openapi/branch/master/graph/badge.svg)](https://codecov.io/gh/joolfe/postman-to-openapi)\n[![npm version](https://img.shields.io/npm/v/postman-to-openapi\n)](https://www.npmjs.com/package/postman-to-openapi)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)\n[![CodeQL](https://github.com/joolfe/postman-to-openapi/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/joolfe/postman-to-openapi/actions/workflows/codeql-analysis.yml)\n\n## Installation\n\nUsing `npm`:\n\n```bash\nnpm i postman-to-openapi\n```\n\nUsing `yarn`:\n\n```bash\nyarn add postman-to-openapi\n```\n\nTo install as a `cli` just\n\n```bash\nnpm i postman-to-openapi -g\n```\n\n## Quick Usage\n\nAs a library\n\n```js\n// Require Package\nconst postmanToOpenApi = require('postman-to-openapi')\n\n// Postman Collection Path\nconst postmanCollection = './path/to/postman/collection.json'\n// Output OpenAPI Path\nconst outputFile = './api/collection.yml'\n\n// Async/await\ntry {\n    const result = await postmanToOpenApi(postmanCollection, outputFile, { defaultTag: 'General' })\n    // Without save the result in a file\n    const result2 = await postmanToOpenApi(postmanCollection, null, { defaultTag: 'General' })\n    console.log(`OpenAPI specs: ${result}`)\n} catch (err) {\n    console.log(err)\n}\n\n// Promise callback style\npostmanToOpenApi(postmanCollection, outputFile, { defaultTag: 'General' })\n    .then(result => {\n        console.log(`OpenAPI specs: ${result}`)\n    })\n    .catch(err => {\n        console.log(err)\n    })\n```\n\nAs a cli\n\n```bash\np2o ./path/to/PostmantoCollection.json -f ./path/to/result.yml -o ./path/to/options.json\n```\n\n## Cli Demo\n\n![cli demo gif](./docs/assets/img/demo.gif)\n\n## Documentation\n\nAll features, usage instructions and help can be found in the [Documentation page](https://joolfe.github.io/postman-to-openapi/)\n\n## Development\n\nThis project use for development:\n\n- Node.js v12.x to v17.x\n- [Standard JS](https://standardjs.com/) rules to maintain clean code.\n- Use [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages.\n- Test with [mocha.js](https://mochajs.org/).\n\nUse the scripts in `package.json`:\n\n- `test:unit`: Run mocha unit test.\n- `test`: Execute `test:lint` plus code coverage.\n- `lint`: Execute standard lint to review errors in code.\n- `lint:fix`: Execute standard lint and automatically fix errors.\n- `changelog`: Update changelog automatically.\n\nSteps to generate the gif demo:\n\n- Install terminalizer `npm install -g terminalizer`\n- Start a recording using `terminalizer record demo -d 'zsh'`\n- Stop recording with `Ctrl+D`\n- Check demo with `terminalizer play demo`\n- Adjust delays in `demo.yml`, change `rows` to 15 (is the height) and anonymize terminal session.\n- Generate the gif with `terminalizer render demo`\n\n[Husky](https://www.npmjs.com/package/husky) is configured to avoid push incorrect content to git.\n\n## Tags\n\n`Nodejs` `Javascript` `OpenAPI` `Postman` `Newman` `Collection` `Transform` `Convert`\n\n## License\n\nSee the [LICENSE](LICENSE.txt) file.\n","readmeFilename":"README.md"}