code: func NewSchemaValidator(customResourceValidation *apiextensions.CustomResourceValidation) (*validate.SchemaValidator, *spec.Schema, error) {
  	// Convert CRD schema to openapi schema
  	openapiSchema := &spec.Schema{}
  	if customResourceValidation != nil {
  		if err := ConvertJSONSchemaProps(customResourceValidation.OpenAPIV3Schema, openapiSchema); err != nil {
  			return nil, nil, err
  		}
  	}
  	return validate.NewSchemaValidator(openapiSchema, nil, "", strfmt.Default), openapiSchema, nil
  }
docs: // NewSchemaValidator creates an openapi schema validator for the given CRD validation.