-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Add GroupVersionKind extension to OpenAPI operations #44787
Conversation
ed1ea94
to
feae9f8
Compare
Woot! This is awesome. |
@@ -43,7 +43,8 @@ import ( | |||
) | |||
|
|||
const ( | |||
ROUTE_META_GVK = "x-kuberentes-group-version-kind" | |||
ROUTE_META_GVK = "x-kuberentes-group-version-kind" | |||
ROUTE_META_ACTION = "x-kuberentes-action" |
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.
s/kuberentes/kubernetes/g?
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.
Done.
@@ -800,6 +801,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag | |||
} | |||
for _, route := range routes { | |||
route.Metadata(ROUTE_META_GVK, reqScope.Kind) | |||
route.Metadata(ROUTE_META_ACTION, action.Verb) |
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.
seems like this should match the verbs used by authorization and published in discovery
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.
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.
Not sure what you mean, where can I find those verbs?
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.
@liggitt friendly ping. Can you explain what you mean here?
@mbohlool: The following test(s) failed:
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Expected test failures? |
It constantly need rebase :( I will do a final rebase-fix tests after this got LGTM. |
Automatic merge from submit-queue (batch tested with PRs 43006, 45305, 45390, 45412, 45392) Update go-restful dependency This is required by #44787. But because both this and the changes in 44787 need constant rebase, I am trying to get this one in separately to make less rebases. The change is only a dependency update.
@lavalamp This PR is ready for review (tests are finally green after submitting godep update separately). |
"x-kubernetes-group-version-kind": { | ||
"Group": "", | ||
"Version": "v1", | ||
"Kind": "ConfigMap" |
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.
Shouldn't this be ConfigMapList?
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.
The kind is not the response type, it is the resource Kind that this operation is for. So I think the Kind is correct here (operation List, resource ConfigMap). The response type is included in the non-extension portion of the API operation.
Just the one comment. Might not be a bad idea to also state the kind of the elements of lists? |
@lavalamp The List kind is present in the operation response kind. Is this sufficient, or were you linking of some other semantic?? |
I agree with @pwittrock, |
Not sure what this new GH approval feature is. LGTM, will defer to Daniel for final approval. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lavalamp, mbohlool
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 45684, 45266, 45669, 44787, 44984) |
Fixes: #43249
ref: #34254