{"id":13491529,"url":"https://github.com/joolfe/postman-to-openapi","last_synced_at":"2025-04-11T16:34:00.625Z","repository":{"id":37028473,"uuid":"275560463","full_name":"joolfe/postman-to-openapi","owner":"joolfe","description":"🛸 Convert postman collection to OpenAPI","archived":true,"fork":false,"pushed_at":"2024-12-27T11:46:52.000Z","size":4606,"stargazers_count":630,"open_issues_count":0,"forks_count":117,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-11T16:33:21.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joolfe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-28T10:25:07.000Z","updated_at":"2025-04-09T14:36:26.000Z","dependencies_parsed_at":"2024-06-08T10:54:37.024Z","dependency_job_id":"06237a06-4a6a-46c2-84ab-a7673e32af13","html_url":"https://github.com/joolfe/postman-to-openapi","commit_stats":{"total_commits":292,"total_committers":15,"mean_commits":"19.466666666666665","dds":0.07534246575342463,"last_synced_commit":"476c8e114614f963e14a296c1c87a23c6c78d8dc"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joolfe%2Fpostman-to-openapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joolfe%2Fpostman-to-openapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joolfe%2Fpostman-to-openapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joolfe%2Fpostman-to-openapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joolfe","download_url":"https://codeload.github.com/joolfe/postman-to-openapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248441351,"owners_count":21103977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:00:57.898Z","updated_at":"2025-04-11T16:34:00.590Z","avatar_url":"https://github.com/joolfe.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Repository Archived\n\nThis project was developed as part of a larger initiative at a company I previously worked with. While it served its purpose during its active phase, it is no longer used or maintained.\n\nUnfortunately, I no longer have the time to maintain or update this repository. However, to preserve the work and make it available to the community, this repository is being archived.\n\nIf you find it useful or wish to build upon it, feel free to fork the project and continue development on your own.\n\nThank you for your interest and support!\n\n\n\n\n![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 =\u003e {\n        console.log(`OpenAPI specs: ${result}`)\n    })\n    .catch(err =\u003e {\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoolfe%2Fpostman-to-openapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoolfe%2Fpostman-to-openapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoolfe%2Fpostman-to-openapi/lists"}