apiextensions-apiserver: k8s.io/apiextensions-apiserver/pkg/apiserver/validation Index | Files

package validation

import "k8s.io/apiextensions-apiserver/pkg/apiserver/validation"

Index

Package Files

validation.go

func ConvertJSONSchemaProps Uses

func ConvertJSONSchemaProps(in *apiextensions.JSONSchemaProps, out *spec.Schema) error

ConvertJSONSchemaProps converts the schema from apiextensions.JSONSchemaPropos to go-openapi/spec.Schema.

func ConvertJSONSchemaPropsWithPostProcess Uses

func ConvertJSONSchemaPropsWithPostProcess(in *apiextensions.JSONSchemaProps, out *spec.Schema, postProcess PostProcessFunc) error

ConvertJSONSchemaPropsWithPostProcess converts the schema from apiextensions.JSONSchemaPropos to go-openapi/spec.Schema and run a post process step on each JSONSchemaProps node.

func NewSchemaValidator Uses

func NewSchemaValidator(customResourceValidation *apiextensions.CustomResourceValidation) (*validate.SchemaValidator, *spec.Schema, error)

NewSchemaValidator creates an openapi schema validator for the given CRD validation.

func ValidateCustomResource Uses

func ValidateCustomResource(fldPath *field.Path, customResource interface{}, validator *validate.SchemaValidator) field.ErrorList

ValidateCustomResource validates the Custom Resource against the schema in the CustomResourceDefinition. CustomResource is a JSON data structure.

type PostProcessFunc Uses

type PostProcessFunc func(*spec.Schema) error

PostProcessFunc post-processes one node of a spec.Schema.

Package validation imports 8 packages (graph) and is imported by 24 packages. Updated 2019-09-18. Refresh now. Tools for package owners.