definitions

package
v0.0.0-...-4787160 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

Register registers the schemaDefinition schema.

Types

type SchemaDefinitionHandler

type SchemaDefinitionHandler struct {
	// contains filtered or unexported fields
}

SchemaDefinitionHandler provides a schema definition for the schema ID provided. The schema definition is built using the following information, in order:

  1. If the schema ID refers to a BaseSchema (a schema that doesn't exist in Kubernetes), then we use the schema to return the schema definition - we return early. Otherwise:
  2. We build a schema definition from the OpenAPI V2 info.
  3. If the schemaID refers to a CRD, then we also build a schema definition from the CRD.
  4. We merge both the OpenAPI V2 and the CRD schema definition. CRD will ALWAYS override whatever is in OpenAPI V2. This makes sense because CRD is defined by OpenAPI V3, so has more information. This merged schema definition is returned.

Note: SchemaDefinitionHandler only implements a ByID handler. It does not implement any method allowing a caller to list definitions for all schemas.

func (*SchemaDefinitionHandler) Refresh

func (s *SchemaDefinitionHandler) Refresh() error

Refresh writeLocks and updates the cache with new schemaDefinitions. Will result in a call to kubernetes to retrieve the openAPI schemas.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL