-
Notifications
You must be signed in to change notification settings - Fork 209
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
Support for OpenAPI v3 #247
Conversation
4cf9bc2
to
2fc535a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
} | ||
|
||
// Aggregating common parameters make API spec (and generated clients) simpler | ||
inPathCommonParamsMap, err := o.findCommonParameters(routes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trying to understand how this aggregator works as an aggregator? this finds the common parameters and copy the spec. right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops sorry I missed this comment earlier. Yes, it finds all parameters in the route's different operations and collects them together (and their spec) to publish.
/cc @p0lyn0mial @sttts |
Would it make sense to generate a v3 spec for k/k repo and use a validator to validate the generated spec? |
@p0lyn0mial I've been using the kin-openapi repo to validate the OpenAPI v3 in the integration tests in kube-openapi. The PR for k/k kubernetes/kubernetes#105945 also generates the static |
@p0lyn0mial I've ran your suggested script on the set of files generated in the k/k PR per group.
and all the group/version paths passed the validation. (https://pastebin.com/6TRfebs5) |
sgtm, we should validate a spec generated directly from this repo
nothing specific, I just wanted to make sure the spec generated from k/k repo is a valid OAS v3 spec. |
d22ae4f
to
619a821
Compare
Looks good to me, feel free to tag @sttts, thanks! |
577b8dc
to
0e745f0
Compare
/retest (the robot doesn't work here?) |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: apelisse, Jefftree The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Most of work around the spec was from https://github.com/p0lyn0mial/kube-openapi/tree/spec3/pkg/spec3.
This PR provides the structs for OpenAPI v3, the builder3 package for building OpenAPI v3, and handler3 for serving OpenAPI v3 separated by group/version.
See kubernetes/kubernetes#105945 for k/k integration