Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the Openshift API swagger.json exposed anywhere? #22122

Closed
lholmquist opened this issue Feb 21, 2019 · 7 comments
Closed

Is the Openshift API swagger.json exposed anywhere? #22122

lholmquist opened this issue Feb 21, 2019 · 7 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@lholmquist
Copy link

I know there are swagger endpoint docs accessible at OPENSHIFT_URL/openapi/v2 and also OPENSHIFT_URL/swagger.json for the Kubernetes related API's.

Is there also an equivalent endpoint for the Openshift api in swagger format. I see in this repo, there is this document, https://raw.githubusercontent.com/openshift/origin/master/api/swagger-spec/openshift-openapi-spec.json, but i'm not really sure if that is exposed as an endpoint in my Openshift Cluster.

@jboxman
Copy link

jboxman commented Feb 26, 2019

@lholmquist, as near as I can tell, for release-3.11 that file is generated by this script: https://github.com/openshift/origin/blob/release-3.11/hack/update-generated-swagger-spec.sh

Out of curiosity, what were you planning on doing with spec file?

@lholmquist
Copy link
Author

We have a Node.js module, openshift-rest-client, that we created and have been adding functionality "manually".

we are looking to refactor the library so it generates the api automatically, instead of us adding things in manually. There is a nice kubernetes node module, which does something similar. One of the ways it can load the api is querying the running clusters /openapi/v2 or /swagger.json endpoint.

If there isn't a similar endpoint for the Openshift api's, i can just use this file, which i've started to do, nodeshift/openshift-rest-client#113

@jboxman
Copy link

jboxman commented Feb 27, 2019

@lholmquist, that looks quite interesting.

My own interest in this is using the OpenShift OpenAPI specs to create REST API docs. I'll let you know if I learn anything helpful.

It does look like a running cluster is queried to generate the spec for 3.11 here:

oc get --raw "/swaggerapi/${type}/${endpoint}" --config="${MASTER_CONFIG_DIR}/admin.kubeconfig" > "${generated_file}"

@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 28, 2019
@openshift-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci-robot openshift-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 27, 2019
@openshift-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci-robot
Copy link

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants