Visualize REST API calls and API objects in Kubernetes using swagger-ui
7.5K
See deployment.png in the repo or run
docker run --rm -it -p 8080:8080 -e MASTER_API_SWAGGER_URL=https://console.starter-ca-central-1.openshift.com/swaggerapi janosroden/oc-swagger
Then go to http://localhost:8080/
false by default, which means the REST API paths will be removed, you can browse the object models only. Keep in mind you can't use swagger's 'Try it' feature due to the missing auth token.oc new-app swagger --env MASTER_API_SWAGGER_URL=https://example.cloud:8443/swaggerapi --env KEEP_API_CALLS=false https://github.com/janosroden/oc-swagger.git
Then create a route and browse.
oc new-app --env MASTER_API_SWAGGER_URL=https://example.cloud:8443/swaggerapi --env KEEP_API_CALLS=false janosroden/oc-swagger
Then create a route and browse.
docker run -d -p 8080:8080 -e KEEP_API_CALLS=false -e MASTER_API_SWAGGER_URL=https://example.cloud:8443/swaggerapi janosroden/oc-swagger
Then go to http://localhost:8080/
At the start of the container api-spec-converter converts $MASTER_API_SWAGGER_URL to swagger 2.0 format. Then depending on $KEEP_API_CALLS it removes the REST API paths from the swagger file with jq. Finally the http-server serves the static files.
Content type
Image
Digest
Size
82.9 MB
Last updated
almost 8 years ago
docker pull blacksalt/kube-swagger