validators

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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