This repository has been archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Generate OpenAPI Specs #243
Open
zoidyzoidzoid
wants to merge
8
commits into
bookingcom:master
Choose a base branch
from
zoidyzoidzoid:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on Dec 4, 2019
-
Add code to generate openapi specs
Some of the modern Kubernetes clients use clients generated from a swagger.json kubernetes-client/javascript uses kubernetes-client/gen which uses OpenApiTools/openapi-generator and kubernetes/kubernetes/api/openapi-spec/swagger.json There are open/closed/rotten/ignored issues all over the place about making these easier to use with CRDs. Wrongly closed issue on kubernetes-client/javascript: kubernetes-client/javascript#341 Open issue on kubernetes-client/gen: kubernetes-client/gen#121 It seems like kubernetes/kube-openapi is one of the repos working on solving the main part of this problem, generating the Go code to make it easy to generate a swagger.json I found the following Argo code via the following issue: kubernetes/kube-openapi#13 https://github.com/argoproj/argo/blob/master/hack/gen-openapi-spec/main.go https://github.com/argoproj/argo/blob/master/pkg/apis/workflow/v1alpha1/openapi_generated.go#L14:6 https://github.com/kubernetes/kube-openapi/blob/master/cmd/openapi-gen/openapi-gen.go So I'm working on adding similar stuff to Shipper. gen-openapi-spec uses the generated openapi_generated.go module that is generated via the openapi-gen command. The following commit adds the code to generate openapi_generated.go Signed-off-by: William Stewart <zoidbergwill@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 95d39c3 - Browse repository at this point
Copy the full SHA 95d39c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c37212 - Browse repository at this point
Copy the full SHA 6c37212View commit details -
Configuration menu - View commit details
-
Copy full SHA for 733876a - Browse repository at this point
Copy the full SHA 733876aView commit details -
Generated with: go run ./hack/gen-openapi-spec/main.go v1alpha1 > api/openapi-spec/swagger.json Signed-off-by: William Stewart <zoidbergwill@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0f3dfb9 - Browse repository at this point
Copy the full SHA 0f3dfb9View commit details
Commits on Dec 6, 2019
-
Add missing fields/types from upstream
Added these by hand, not 100% sure how to add them to generation. Signed-off-by: William Stewart <zoidbergwill@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 16ff230 - Browse repository at this point
Copy the full SHA 16ff230View commit details -
Signed-off-by: William Stewart <zoidbergwill@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a845e55 - Browse repository at this point
Copy the full SHA a845e55View commit details
Commits on Dec 9, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 592c7e6 - Browse repository at this point
Copy the full SHA 592c7e6View commit details -
Maybe this shouldn't go in the final PR that is merged. Also probably blocked by other 0.9 PR updating dependencies
Configuration menu - View commit details
-
Copy full SHA for 2a79949 - Browse repository at this point
Copy the full SHA 2a79949View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.