definitions

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 24 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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