Encapsulates GroupVersion not found as one of the paths at OpenAPI V3 endpoint.
type GroupVersionNotFoundError struct {
// contains filtered or unexported fields
}
func (r *GroupVersionNotFoundError) Error() string
Root interface defines functions implemented against the root OpenAPI V3 document. The root OpenAPI V3 document maps the API Server relative url for all GroupVersions to the relative url for the OpenAPI relative url. Example for single GroupVersion apps/v1:
"apis/apps/v1": { "ServerRelativeURL": "/openapi/v3/apis/apps/v1?hash=<HASH>" }
type Root interface { // GroupVersions returns every GroupVersion for which there is an // OpenAPI V3 GroupVersion document. Returns an error for problems // retrieving or parsing the OpenAPI V3 root document. GroupVersions() ([]schema.GroupVersion, error) // GVSpec returns the specification for all the resources in a // GroupVersion as a pointer to a spec3.OpenAPI struct. // Returns an error for problems retrieving or parsing the root // document or GroupVersion OpenAPI V3 document. GVSpec(gv schema.GroupVersion) (*spec3.OpenAPI, error) // GVSpecAsMap returns the specification for all the resources in a // GroupVersion as unstructured bytes. Returns an error for // problems retrieving or parsing the root or GroupVersion // OpenAPI V3 document. GVSpecAsMap(gv schema.GroupVersion) (map[string]interface{}, error) }
func NewRoot(client openapi.Client) Root
NewRoot returns a structure implementing the Root interface, created with the passed rest client.