schemagen

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: Apache-2.0 Imports: 29 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ApiVersionMismatch = func(expected, actual string) error {
		return eris.Errorf("Expected ApiVersion [%s] but found [%s]", expected, actual)
	}
)

Functions

func GenerateOpenApiValidationSchemas

func GenerateOpenApiValidationSchemas(project *model.Project, options *ValidationSchemaOptions, importsCollector collector.Collector, absoluteRoot string) error

func NewCueGenerator

func NewCueGenerator(importsCollector collector.Collector, absoluteRoot string) *cueGenerator

func NewProtocGenerator

func NewProtocGenerator(importsCollector collector.Collector, absoluteRoot string) *protocGenerator

Types

type CrdWriter

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

func NewCrdWriter

func NewCrdWriter(crdDirectory string) *CrdWriter

func (*CrdWriter) ApplyValidationSchemaToCRD

func (c *CrdWriter) ApplyValidationSchemaToCRD(crd apiextv1beta1.CustomResourceDefinition, validationSchema *apiextv1beta1.CustomResourceValidation) error

type JsonSchemaGenerator

type JsonSchemaGenerator interface {
	GetJsonSchemaForProject(project *model.Project) (map[schema.GroupVersionKind]*apiextv1beta1.JSONSchemaProps, error)
}

type OpenApiSchemas

type OpenApiSchemas map[string]*openapi.OrderedMap

Mapping from protobuf message name to OpenApi schema

type ValidationSchemaOptions

type ValidationSchemaOptions struct {
	// Path to the directory where CRDs will be read from and written to
	CrdDirectory string

	// Tool used to generate JsonSchemas, defaults to protoc
	JsonSchemaTool string
}

Jump to

Keyboard shortcuts

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