Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceSchema ¶
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
Click to show internal directories.
Click to hide internal directories.