openapi

package
v0.15.12-beta.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: Apache-2.0 Imports: 34 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSwagger

func BuildSwagger(crd *apiextensions.CustomResourceDefinition, version string) (*spec.Swagger, error)

BuildSwagger builds swagger for the given crd in the given version

func ToStructuralOpenAPIV2

func ToStructuralOpenAPIV2(in *structuralschema.Structural) *structuralschema.Structural

ToStructuralOpenAPIV2 converts our internal OpenAPI v3 structural schema to to a v2 compatible schema.

Types

type CRDCanonicalTypeNamer

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

CRDCanonicalTypeNamer implements CanonicalTypeNamer interface for CRDs to seed kube-openapi canonical type name without Go types

func (*CRDCanonicalTypeNamer) OpenAPICanonicalTypeName

func (c *CRDCanonicalTypeNamer) OpenAPICanonicalTypeName() string

OpenAPICanonicalTypeName returns canonical type name for given CRD

type Controller

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

Controller watches CustomResourceDefinitions and publishes validation schema

func NewController

func NewController(crdInformer informers.CustomResourceDefinitionInformer) *Controller

NewController creates a new Controller with input CustomResourceDefinition informer

func (*Controller) Run

func (c *Controller) Run(staticSpec *spec.Swagger, openAPIService *handler.OpenAPIService, stopCh <-chan struct{})

Run sets openAPIAggregationManager and starts workers

Jump to

Keyboard shortcuts

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