validators

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceSchema

type ResourceSchema struct {
	TypeName string
	Schema   *openapi3.SchemaRef
}

ResourceSchema represents a validation schema for a specific resource type

type SchemaValidator

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

SchemaValidator validates JSON objects against OpenAPI schemas

func NewSchemaValidator

func NewSchemaValidator(schemaPath string) (*SchemaValidator, error)

NewSchemaValidator creates a new schema validator by loading an OpenAPI spec from the given path

func (*SchemaValidator) Validate

func (v *SchemaValidator) Validate(resourceType string, spec map[string]interface{}) error

Validate validates a spec for the given resource type Returns nil if resourceType is not found in schemas (allows graceful handling)

func (*SchemaValidator) ValidateClusterSpec deprecated

func (v *SchemaValidator) ValidateClusterSpec(spec map[string]interface{}) error

ValidateClusterSpec validates a cluster spec against the ClusterSpec schema

Deprecated: Use Validate("cluster", spec) instead

func (*SchemaValidator) ValidateNodePoolSpec deprecated

func (v *SchemaValidator) ValidateNodePoolSpec(spec map[string]interface{}) error

ValidateNodePoolSpec validates a nodepool spec against the NodePoolSpec schema

Deprecated: Use Validate("nodepool", spec) instead

Jump to

Keyboard shortcuts

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