{"id":28789433,"url":"https://github.com/adrianhdezm/openapi-tools","last_synced_at":"2026-03-14T00:16:37.710Z","repository":{"id":297244847,"uuid":"996120448","full_name":"adrianhdezm/openapi-tools","owner":"adrianhdezm","description":"Just another CLI tool to work with OpenAPI specifications, including generation, validation, and more.","archived":false,"fork":false,"pushed_at":"2025-06-11T19:48:23.000Z","size":154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T22:11:23.237Z","etag":null,"topics":["openapi","openapi-tooling","python","zod"],"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/adrianhdezm.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2025-06-04T13:38:28.000Z","updated_at":"2025-06-11T07:42:09.000Z","dependencies_parsed_at":"2025-06-08T06:03:08.047Z","dependency_job_id":null,"html_url":"https://github.com/adrianhdezm/openapi-tools","commit_stats":null,"previous_names":["adrianhdezm/openapi-tools"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/adrianhdezm/openapi-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianhdezm%2Fopenapi-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianhdezm%2Fopenapi-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianhdezm%2Fopenapi-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianhdezm%2Fopenapi-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianhdezm","download_url":"https://codeload.github.com/adrianhdezm/openapi-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianhdezm%2Fopenapi-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260634862,"owners_count":23039586,"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":["openapi","openapi-tooling","python","zod"],"created_at":"2025-06-17T22:10:19.166Z","updated_at":"2026-03-14T00:16:37.683Z","avatar_url":"https://github.com/adrianhdezm.png","language":"TypeScript","readme":"# openapi-tools\n\n**openapi-tools** is a small toolbox for slicing, validating and generating code from OpenAPI specifications. It ships as a command line utility so you can keep your API definitions tidy and reusable.\n\n## Features\n\n- **Filter paths** – create a minimal spec containing only the operations you care about.\n- **Generate Zod schemas** – produce TypeScript models ready for runtime validation.\n- **Generate Python `TypedDicts`** – build strongly typed models for Python projects.\n\n## Installation\n\nUse `npx` for one-off runs or install globally:\n\n```bash\nnpm install -g @ai-foundry/openapi-tools\n```\n\nThe examples below use the OpenAPI Pet Store specification. More scenarios are available in the [examples directory](examples/README.md).\n\n### Quick Start\n\n```bash\nnpx @ai-foundry/openapi-tools filter --input openapi.yaml --output filtered.yaml --select-paths \"/pet/{petId}\"\n```\n\n### Using Docker\n\n```bash\ndocker run --rm -v $(pwd)/local-schemas:/app/schemas adrianhdezm/openapi-tools filter --input ./schemas/openapi.yaml --output ./schemas/filtered.yaml --select-paths \"/pet/{petId}\"\n```\n\n## Command Reference\n\n```bash\nUsage: openapi-tools [options] [command]\n\nOpenAPI Tools CLI\n\nOptions:\n  -V, --version                   output the version number\n  -h, --help                      display help for command\n\nCommands:\n  filter [options]                Filter OpenAPI spec by comma-separated list of path names\n  generate-zod [options]          Generate Zod schemas from an OpenAPI spec\n  generate-python-dict [options]  Generate Python TypedDicts from an OpenAPI spec\n  help [command]                  display help for command\n```\n\n### Filter Command\n\n```bash\nUsage: openapi-tools filter [options]\n\nFilter OpenAPI spec by comma-separated list of path names\n\nOptions:\n  --input \u003cinput\u003e         Input OpenAPI (YAML or JSON) file or URL\n  --output \u003coutput\u003e       Output filtered YAML file\n  --select-paths \u003cpaths\u003e  Comma-separated list of path names, e.g.,\n                          \"/v1/chat/completions,/v1/models\"\n  -h, --help              display help for command\n```\n\n### Generate Zod Command\n\n```bash\nUsage: openapi-tools generate-zod [options]\n\nGenerate Zod schemas from an OpenAPI spec\n\nThe output will be a single TypeScript file with all schemas.\n\nOptions:\n  --input \u003cinput\u003e             Input OpenAPI file (YAML or JSON) or URL\n  --output \u003coutput\u003e           Output file for schemas\n  -p, --select-paths \u003cpaths\u003e  Comma-separated list of path prefixes\n  -h, --help                  display help for command\n```\n\n### Generate Python TypedDict Command\n\n```bash\nUsage: openapi-tools generate-python-dict [options]\n\nGenerate Python TypedDicts from an OpenAPI spec\n\nOptions:\n  --input \u003cinput\u003e             Input OpenAPI file (YAML or JSON) or URL\n  --output \u003coutput\u003e           Output file for schemas\n  -p, --select-paths \u003cpaths\u003e  Comma-separated list of path prefixes\n  -h, --help                  display help for command\n```\n\n## Contributing\n\n1. Clone this repository and run `npm install`.\n2. Make your changes and add tests if applicable.\n3. Open a pull request – we welcome improvements and new features!\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianhdezm%2Fopenapi-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianhdezm%2Fopenapi-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianhdezm%2Fopenapi-tools/lists"}