kubernetes/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/convert.go

// NewStructural converts an OpenAPI v3 schema into a structural schema. A pre-validated JSONSchemaProps will
// not fail on NewStructural. This means that we require that:
//
// - items is not an array of schemas
// - the following fields are not set:
//   - id
//   - schema
//   - $ref
//   - patternProperties
//   - dependencies
//   - additionalItems
//   - definitions.
//
// The follow fields are not preserved:
// - externalDocs
// - example.
func NewStructural(s *apiextensions.JSONSchemaProps) (*Structural, error) {}

func newGenerics(s *apiextensions.JSONSchemaProps) (*Generic, error) {}

func newValueValidation(s *apiextensions.JSONSchemaProps) (*ValueValidation, error) {}

func newNestedValueValidation(s *apiextensions.JSONSchemaProps) (*NestedValueValidation, error) {}

func newExtensions(s *apiextensions.JSONSchemaProps) (*Extensions, error) {}

func newValidationExtensions(s *apiextensions.JSONSchemaProps) (*ValidationExtensions, error) {}

// validateUnsupportedFields checks that those fields rejected by validation are actually unset.
func validateUnsupportedFields(s *apiextensions.JSONSchemaProps) error {}