openapi3

package
v0.31.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupVersionNotFoundError

type GroupVersionNotFoundError struct {
	// contains filtered or unexported fields
}

Encapsulates GroupVersion not found as one of the paths at OpenAPI V3 endpoint.

func (*GroupVersionNotFoundError) Error

func (r *GroupVersionNotFoundError) Error() string

type Root

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)
}

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>"
}

func NewRoot

func NewRoot(client openapi.Client) Root

NewRoot returns a structure implementing the Root interface, created with the passed rest client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL