No description
  • Go 93%
  • Makefile 5.6%
  • Shell 1.4%
Find a file
dependabot[bot] 43ae5ebd4c
Chore(deps): Bump github.com/onsi/gomega from 1.36.2 to 1.36.3 (#304)
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.36.2 to 1.36.3.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.36.2...v1.36.3)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-24 09:50:29 +01:00
.github Update REUSE configuration (#301) 2025-03-10 10:16:00 +01:00
cmd/openapi-extractor Bump k8s.io/* deps to v0.30.7 (#282) 2024-11-22 13:22:21 +01:00
envtestutils Bump k8s.io/* deps to v0.30.7 (#282) 2024-11-22 13:22:21 +01:00
hack Move project to ironcore-dev (#185) 2023-11-28 15:36:31 +01:00
internal/testing Make project REUSE compliant (#187) 2023-11-29 11:20:44 +01:00
LICENSES Make project REUSE compliant (#187) 2023-11-29 11:20:44 +01:00
sample Bump k8s.io/* deps to v0.32.2 (#296) 2025-03-06 12:29:15 +01:00
testutils Make project REUSE compliant (#187) 2023-11-29 11:20:44 +01:00
.gitignore Add module build and fix timeout handling 2022-10-07 10:28:49 +02:00
.golangci.yaml Make project REUSE compliant (#187) 2023-11-29 11:20:44 +01:00
CODE_OF_CONDUCT.md Move project to ironcore-dev (#185) 2023-11-28 15:36:31 +01:00
CODEOWNERS Move project to ironcore-dev (#185) 2023-11-28 15:36:31 +01:00
go.mod Chore(deps): Bump github.com/onsi/gomega from 1.36.2 to 1.36.3 (#304) 2025-03-24 09:50:29 +01:00
go.sum Chore(deps): Bump github.com/onsi/gomega from 1.36.2 to 1.36.3 (#304) 2025-03-24 09:50:29 +01:00
LICENSE Add LICENSE file 2023-11-29 14:19:32 +01:00
Makefile Bump k8s.io/* deps to v0.32.2 (#296) 2025-03-06 12:29:15 +01:00
README.md Update README 2023-11-29 11:32:48 +01:00
REUSE.toml Update REUSE configuration (#301) 2025-03-10 10:16:00 +01:00

openapi-extractor

REUSE status Go Report Card GitHub License PRs Welcome

The openapi-extractor extracts the OpenAPI v2 and v3 specifications of a given Kubernetes API server.

Installation

From source

To install the openapi-extractor binary into your Go bin path run

go install github.com/ironcore-dev/openapi-extractor/cmd/openapi-extractor@main

Usage

Command based extraction

In case you have the api server binary present, you can extract the OpenAPI specifications by running

openapi-extractor --apiserver-command=<PATH-TO-APISERVER-BIN> \
  --apiservices=<PATH-TO-APISERVICES-DIR>

Go module based extraction

The sample folder contains an example on how to extract the Open API spec from an api server package. In our example we are using the ironcore aggregated api server.

openapi-extractor --apiserver-package=github.com/ironcore-dev/ironcore/cmd/ironcore-apiserver \
  --apiserver-build-opts=mod \
  --apiservices=<PATH-TO-APISERVICES-DIR>

In case you want to use your own package, first go get it so you have to correct dependencies in your go.mod file and adjust the --apiserver-package flag accordingly.

Output

The extracted OpenAPI v2 and v3 files can be found in current folder where the v2 version will be stored in the swagger.json file and the v3 versions will be stored in individual files per group in the ./v3 folder.

To override the location of the output pass on the --output flag e.g. via --output=dev store extract the files into the ./dev folder.

Contributing

We'd love to get feedback from you. Please report bugs, suggestions or post questions by opening a GitHub issue.

License

Copyright 2022.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.