schemagen

package
v0.48.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProtocGenerator

func NewProtocGenerator(validationSchemaOptions *ValidationSchemaOptions) *protocGenerator

Types

type GeneratorKind

type GeneratorKind string
const (
	Cue              GeneratorKind = "cue"
	ProtocGenOpenAPI GeneratorKind = "protoc-gen-openapi"
)

type ValidationSchemaOptions

type ValidationSchemaOptions struct {
	// Whether to assign Enum fields the `x-kubernetes-int-or-string` property
	// which allows the value to either be an integer or a string
	// If this is false, only string values are allowed
	// Default: false
	EnumAsIntOrString bool

	// A list of messages (e.g. ratelimit.api.solo.io.Descriptor) whose validation schema should
	// not be generated
	MessagesWithEmptySchema []string

	// Whether to exclude kubebuilder markers and validations (such as PreserveUnknownFields, MinItems, default, and all CEL rules)
	// Type and Required markers will be included regardless
	// Default: false
	DisableKubeMarkers bool

	// when set, this list of substrings will be used to identify kubebuilder markers to ignore. When multiple are
	// supplied, this will function as a logical OR i.e. any rule which contains a provided substring will be ignored
	IgnoredKubeMarkerSubstrings []string
}

Jump to

Keyboard shortcuts

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