Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAPIServiceNotFound = errors.New("resource not found")
Functions ¶
func IsLocalAPIService ¶
IsLocalAPIService returns true for local specs from delegates.
Types ¶
type Downloader ¶
type Downloader struct { }
Downloader is the OpenAPI downloader type. It will try to download spec from /openapi/v3 and /openap/v3/<group>/<version> endpoints.
func NewDownloader ¶
func NewDownloader() Downloader
NewDownloader creates a new OpenAPI Downloader.
func (*Downloader) OpenAPIV3Root ¶ added in v0.24.0
func (s *Downloader) OpenAPIV3Root(handler http.Handler) (*handler3.OpenAPIV3Discovery, int, error)
OpenAPIV3Root downloads the OpenAPI V3 root document from an APIService
type NotFoundError ¶ added in v0.24.0
type NotFoundError struct { }
func (*NotFoundError) Error ¶ added in v0.24.0
func (e *NotFoundError) Error() string
type SpecProxier ¶ added in v0.24.0
type SpecProxier interface { AddUpdateAPIService(handler http.Handler, apiService *v1.APIService) // UpdateAPIServiceSpec updates the APIService. It returns ErrAPIServiceNotFound if the APIService doesn't exist. UpdateAPIServiceSpec(apiServiceName string) error RemoveAPIServiceSpec(apiServiceName string) GetAPIServiceNames() []string }
SpecProxier proxies OpenAPI V3 requests to their respective APIService
func BuildAndRegisterAggregator ¶
func BuildAndRegisterAggregator(downloader Downloader, delegationTarget server.DelegationTarget, aggregatorService *restful.Container, openAPIConfig *common.Config, pathHandler common.PathHandlerByGroupVersion) (SpecProxier, error)
BuildAndRegisterAggregator registered OpenAPI aggregator handler. This function is not thread safe as it only being called on startup.
Click to show internal directories.
Click to hide internal directories.