// Resource is the name of the resource being requested. This is not the kind. For example: pods
// Resource is the name of the resource being requested. This is not the kind. For example: pods
Resourcestring
Resourcestring
// Subresource is the name of the subresource being requested. This is a different resource, scoped to the parent resource, but it may have a different kind.
// For instance, /pods has the resource "pods" and the kind "Pod", while /pods/foo/status has the resource "pods", the sub resource "status", and the kind "Pod"
// (because status operates on pods). The binding resource for a pod though may be /pods/foo/binding, which has resource "pods", subresource "binding", and kind "Binding".
Subresourcestring
// Kind is the type of object being manipulated. For example: Pod
// Kind is the type of object being manipulated. For example: Pod
Kindstring
Kindstring
// Name is empty for some verbs, but if the request directly indicates a name (not in body content) then this field is filled in.
// Name is empty for some verbs, but if the request directly indicates a name (not in body content) then this field is filled in.
...
@@ -251,22 +254,12 @@ type APIRequestInfo struct {
...
@@ -251,22 +254,12 @@ type APIRequestInfo struct {
Raw[]string
Raw[]string
}
}
// URLPath returns the URL path for this request, including /{resource}/{name} if present but nothing
// TODO write an integration test against the swagger doc to test the APIRequestInfo and match up behavior to responses
// GetAPIRequestInfo returns the information from the http request. If error is not nil, APIRequestInfo holds the information as best it is known before the failure
// GetAPIRequestInfo returns the information from the http request. If error is not nil, APIRequestInfo holds the information as best it is known before the failure