{"id":15046226,"url":"https://github.com/chha25/openapi-operation-splitter","last_synced_at":"2025-09-11T21:09:26.838Z","repository":{"id":42564502,"uuid":"428415438","full_name":"chha25/openapi-operation-splitter","owner":"chha25","description":"Module and library that can use for splitting a given swagger/open-api file by an operation.","archived":false,"fork":false,"pushed_at":"2025-07-21T23:27:22.000Z","size":744,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T12:45:52.906Z","etag":null,"topics":["open-api","openapi","operation","splitter","swagger"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/chha25.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-11-15T20:41:52.000Z","updated_at":"2024-11-12T11:45:53.000Z","dependencies_parsed_at":"2023-12-20T14:31:17.506Z","dependency_job_id":"8312c247-1ff4-435d-a3ac-7e586bbcdb6e","html_url":"https://github.com/chha25/openapi-operation-splitter","commit_stats":{"total_commits":56,"total_committers":4,"mean_commits":14.0,"dds":0.2857142857142857,"last_synced_commit":"790ec45e5c3b824efc3e157bafde3c0b9aedd3ea"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/chha25/openapi-operation-splitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chha25%2Fopenapi-operation-splitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chha25%2Fopenapi-operation-splitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chha25%2Fopenapi-operation-splitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chha25%2Fopenapi-operation-splitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chha25","download_url":"https://codeload.github.com/chha25/openapi-operation-splitter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chha25%2Fopenapi-operation-splitter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274705151,"owners_count":25334470,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["open-api","openapi","operation","splitter","swagger"],"created_at":"2024-09-24T20:52:52.857Z","updated_at":"2025-09-11T21:09:26.777Z","avatar_url":"https://github.com/chha25.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenApi Operation Splitter\n[![NodeJS](https://github.com/chha25/openapi-operation-splitter/actions/workflows/main.yml/badge.svg)](https://github.com/chha25/openapi-operation-splitter/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/chha25/openapi-operation-splitter/branch/master/graph/badge.svg?token=MS5QBY5G4X)](https://codecov.io/gh/chha25/openapi-operation-splitter)\n![GitHub](https://img.shields.io/github/license/chha25/openapi-operation-splitter)\n![npm](https://img.shields.io/npm/v/openapi-operation-splitter)\n![GitHub top language](https://img.shields.io/github/languages/top/chha25/openapi-operation-splitter)\n\nModule and library that can use for splitting a given swagger/open-api file (YAML or JSON) by an operation.\n\n## Installation\n```bash\nnpm i openapi-operation-splitter\n```\n\n## Cli\n```bash\n$ node_modules/.bin/openapi-operation-splitter --inputFile=api-filename --targetFile=filename-with-extention --ignore path-to-ignore --operations=passedValue1 passedValue2\n```\n### Options\n\n| Argument       | Alias | Type     | Description                                  |\n|----------------| ----- | -------- |----------------------------------------------|\n| **inputFile**  |       | string   | input file (JSON or YAML)                    |\n| **targetFile** |       | string   | output file (e.g. target.json or target.yaml |\n| **ignore**     |       | string   | optional: path to ignore (e.g. api-internal) |\n| **operations** |       | string[] | http operations to extract                   |\n| **help**       | **h** | boolean  | optional: Prints this usage guide            |\n\n\n## Library Usage\n\n```typescript\nimport { OpenApiOperationSplitter } from 'openapi-operation-splitter';\n\nasync function main() {\n    const splitter = new OpenApiOperationSplitter();\n    const api = await splitter.parse('inputFile.yml');\n    const paths = splitter.getPathsObjectByOperation(api, \"get\");\n    api.paths = paths;\n    await splitter.saveApiToYaml(api, 'targetFile.yml');\n}\n\nmain()\n```\n\n### BTW\n\nIf your output is a JSON file you could beautify it with:\n\n```shell\npython -m json.tool target.json \u003e target-beauty.json \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchha25%2Fopenapi-operation-splitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchha25%2Fopenapi-operation-splitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchha25%2Fopenapi-operation-splitter/lists"}