kube-openapik8s.io/kube-openapi/pkg/handler3 Index | Files

package handler3

import "k8s.io/kube-openapi/pkg/handler3"

Index

Functions

func ToV3ProtoBinary

func ToV3ProtoBinary(json []byte) ([]byte, error)

Types

type OpenAPIService

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

OpenAPIService is the service responsible for serving OpenAPI spec. It has the ability to safely change the spec while serving it.

func NewOpenAPIService

func NewOpenAPIService() *OpenAPIService

NewOpenAPIService builds an OpenAPIService starting with the given spec.

func (*OpenAPIService) DeleteGroupVersion

func (o *OpenAPIService) DeleteGroupVersion(group string)

func (*OpenAPIService) HandleDiscovery

func (o *OpenAPIService) HandleDiscovery(w http.ResponseWriter, r *http.Request)

func (*OpenAPIService) HandleGroupVersion

func (o *OpenAPIService) HandleGroupVersion(w http.ResponseWriter, r *http.Request)

func (*OpenAPIService) RegisterOpenAPIV3VersionedService

func (o *OpenAPIService) RegisterOpenAPIV3VersionedService(servePath string, handler common.PathHandlerByGroupVersion) error

func (*OpenAPIService) UpdateGroupVersion

func (o *OpenAPIService) UpdateGroupVersion(group string, openapi *spec3.OpenAPI)

func (*OpenAPIService) UpdateGroupVersionLazy

func (o *OpenAPIService) UpdateGroupVersionLazy(group string, openapi cached.Value[*spec3.OpenAPI])

UpdateGroupVersionLazy adds or updates an existing group with the new cached.

type OpenAPIV3Discovery

type OpenAPIV3Discovery struct {
	Paths map[string]OpenAPIV3DiscoveryGroupVersion `json:"paths"`
}

OpenAPIV3Discovery is the format of the Discovery document for OpenAPI V3 It maps Discovery paths to their corresponding URLs with a hash parameter included

type OpenAPIV3DiscoveryGroupVersion

type OpenAPIV3DiscoveryGroupVersion struct {
	// Path is an absolute path of an OpenAPI V3 document in the form of /openapi/v3/apis/apps/v1?hash=014fbff9a07c
	ServerRelativeURL string `json:"serverRelativeURL"`
}

OpenAPIV3DiscoveryGroupVersion includes information about a group version and URL for accessing the OpenAPI. The URL includes a hash parameter to support client side caching

Source Files

handler.go

Version
v0.0.0-20250318190949-c8a335a9a2ff (latest)
Published
Mar 18, 2025
Platform
linux/amd64
Imports
19 packages
Last checked
3 weeks ago

Tools for package owners.