{"id":15091333,"url":"https://github.com/ironcore-dev/openapi-extractor","last_synced_at":"2026-03-08T18:38:37.626Z","repository":{"id":65433376,"uuid":"546069232","full_name":"ironcore-dev/openapi-extractor","owner":"ironcore-dev","description":"This project extracts the OpenAPI v2 and v3 specifications of a given Kubernetes API server","archived":false,"fork":false,"pushed_at":"2024-04-11T06:51:03.000Z","size":326,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-04-14T02:53:32.079Z","etag":null,"topics":["kube-apiserver","kubernetes","openapi","openapi-spec","openapi-specification","openapi3","swagger"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ironcore-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-10-05T13:22:32.000Z","updated_at":"2024-04-17T09:29:59.933Z","dependencies_parsed_at":"2023-10-10T17:54:40.898Z","dependency_job_id":"ab609a5b-0872-4b98-944a-37d35b423932","html_url":"https://github.com/ironcore-dev/openapi-extractor","commit_stats":null,"previous_names":["ironcore-dev/openapi-extractor"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironcore-dev%2Fopenapi-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironcore-dev%2Fopenapi-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironcore-dev%2Fopenapi-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ironcore-dev%2Fopenapi-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ironcore-dev","download_url":"https://codeload.github.com/ironcore-dev/openapi-extractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530575,"owners_count":21119600,"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":["kube-apiserver","kubernetes","openapi","openapi-spec","openapi-specification","openapi3","swagger"],"created_at":"2024-09-25T10:40:28.482Z","updated_at":"2026-03-08T18:38:37.585Z","avatar_url":"https://github.com/ironcore-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openapi-extractor\n\n[![REUSE status](https://api.reuse.software/badge/github.com/ironcore-dev/openapi-extractor)](https://api.reuse.software/info/github.com/ironcore-dev/openapi-extractor)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ironcore-dev/openapi-extractor)](https://goreportcard.com/report/github.com/ironcore-dev/openapi-extractor)\n[![GitHub License](https://img.shields.io/static/v1?label=License\u0026message=Apache-2.0\u0026color=blue)](LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com)\n\nThe `openapi-extractor` extracts the OpenAPI v2 and v3 specifications of a given Kubernetes API server.\n\n## Installation\n\n### From source\n\nTo install the `openapi-extractor` binary into your Go bin path run\n\n```bash\ngo install github.com/ironcore-dev/openapi-extractor/cmd/openapi-extractor@main\n```\n\n## Usage\n\n### Command based extraction\n\nIn case you have the api server binary present, you can extract the OpenAPI specifications by running\n\n```shell\nopenapi-extractor --apiserver-command=\u003cPATH-TO-APISERVER-BIN\u003e \\\n  --apiservices=\u003cPATH-TO-APISERVICES-DIR\u003e\n```\n\n### Go module based extraction\n\nThe [`sample`](/sample) folder contains an example on how to extract the Open API spec from an api server package. In \nour example we are using the [`ironcore`](https://github.com/ironcore-dev/ironcore) aggregated api server.\n\n```shell\nopenapi-extractor --apiserver-package=github.com/ironcore-dev/ironcore/cmd/ironcore-apiserver \\\n  --apiserver-build-opts=mod \\\n  --apiservices=\u003cPATH-TO-APISERVICES-DIR\u003e\n```\n\nIn case you want to use your own package, first `go get` it so you have to correct dependencies in your `go.mod` file and\nadjust the `--apiserver-package` flag accordingly.\n\n### Output\n\nThe extracted OpenAPI v2 and v3 files can be found in current folder where the v2 version will be stored in the `swagger.json`\nfile and the v3 versions will be stored in individual files per group in the `./v3` folder.\n\nTo override the location of the output pass on the `--output` flag e.g. via `--output=dev` store extract the files into\nthe `./dev` folder.\n\n## Contributing\n\nWe'd love to get feedback from you. Please report bugs, suggestions or post questions by opening a GitHub issue.\n\n## License\n\nCopyright 2022.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fironcore-dev%2Fopenapi-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fironcore-dev%2Fopenapi-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fironcore-dev%2Fopenapi-extractor/lists"}