openapi_generator

package
v0.0.0-...-baa1f0e Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBackwardCompatibility

func CheckBackwardCompatibility(existingCRDsPath, yamlsPath string, force bool) error

Types

type Generator

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

func NewGenerator

func NewGenerator(rawDefinitions map[string]common.OpenAPIDefinition) (*Generator, error)

NewGenerator returns a new Generator instance and an error. rawDefinitions is a value returned by GetOpenAPIDefinitions functions created by openapi-gen from k8s.io/kube-openapi.

func (*Generator) AddDefinition

func (g *Generator) AddDefinition(name string, rawDef common.OpenAPIDefinition) error

AddDefinition is a helper for adding default definitions. This should not be needed in day to day usage, useful for testing.

func (*Generator) MissingDefinitions

func (g *Generator) MissingDefinitions() map[string]struct{}

MissingDefinitions is a simple getter for g.missingDefinitions.

func (*Generator) ResolveRefs

func (g *Generator) ResolveRefs() error

ResolveRefs calls resolveRefsForPackage for each package which has not been resolved yet

func (*Generator) SetNamePrefix

func (g *Generator) SetNamePrefix(namePrefix string)

SetNamePrefix sets the namePrefix used in name creation. This should not be needed in day to day usage, useful for testing.

func (*Generator) UpdateYAMLs

func (g *Generator) UpdateYAMLs(yamlsPath string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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