Documentation ¶
Index ¶
- func ToV3ProtoBinary(json []byte) ([]byte, error)
- type OpenAPIService
- func (o *OpenAPIService) DeleteGroupVersion(group string)
- func (o *OpenAPIService) HandleDiscovery(w http.ResponseWriter, r *http.Request)
- func (o *OpenAPIService) HandleGroupVersion(w http.ResponseWriter, r *http.Request)
- func (o *OpenAPIService) RegisterOpenAPIV3VersionedService(servePath string, handler common.PathHandlerByGroupVersion) error
- func (o *OpenAPIService) UpdateGroupVersion(group string, openapi *spec3.OpenAPI) (err error)
- type OpenAPIV3Discovery
- type OpenAPIV3DiscoveryGroupVersion
- type OpenAPIV3Group
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToV3ProtoBinary ¶
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(spec *spec.Swagger) (*OpenAPIService, error)
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) (err error)
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
type OpenAPIV3Group ¶
type OpenAPIV3Group struct {
// contains filtered or unexported fields
}
func (*OpenAPIV3Group) UpdateSpec ¶
func (o *OpenAPIV3Group) UpdateSpec(openapi *spec3.OpenAPI) (err error)
Click to show internal directories.
Click to hide internal directories.