Documentation ¶
Index ¶
- type OpenAPIService
- func BuildAndRegisterOpenAPIService(servePath string, webServices []*restful.WebService, config *common.Config, ...) (*OpenAPIService, error)
- func BuildAndRegisterOpenAPIVersionedService(servePath string, webServices []*restful.WebService, config *common.Config, ...) (*OpenAPIService, error)
- func RegisterOpenAPIService(openapiSpec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error)
- func RegisterOpenAPIVersionedService(openapiSpec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 BuildAndRegisterOpenAPIService ¶
func BuildAndRegisterOpenAPIService(servePath string, webServices []*restful.WebService, config *common.Config, handler common.PathHandler) (*OpenAPIService, error)
NOTE: [DEPRECATION] We will announce deprecation for format-separated endpoints for OpenAPI spec, and switch to a single /openapi/v2 endpoint in Kubernetes 1.10. The design doc and deprecation process are tracked at: https://docs.google.com/document/d/19lEqE9lc4yHJ3WJAJxS_G7TcORIJXGHyq3wpwcH28nU.
BuildAndRegisterOpenAPIService builds the spec and registers a handler to provide access to it. Use this method if your OpenAPI spec is static. If you want to update the spec, use BuildOpenAPISpec then RegisterOpenAPIService.
func BuildAndRegisterOpenAPIVersionedService ¶
func BuildAndRegisterOpenAPIVersionedService(servePath string, webServices []*restful.WebService, config *common.Config, handler common.PathHandler) (*OpenAPIService, error)
BuildAndRegisterOpenAPIVersionedService builds the spec and registers a handler to provide access to it. Use this method if your OpenAPI spec is static. If you want to update the spec, use BuildOpenAPISpec then RegisterOpenAPIVersionedService.
func RegisterOpenAPIService ¶
func RegisterOpenAPIService(openapiSpec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error)
NOTE: [DEPRECATION] We will announce deprecation for format-separated endpoints for OpenAPI spec, and switch to a single /openapi/v2 endpoint in Kubernetes 1.10. The design doc and deprecation process are tracked at: https://docs.google.com/document/d/19lEqE9lc4yHJ3WJAJxS_G7TcORIJXGHyq3wpwcH28nU.
RegisterOpenAPIService registers a handler to provide access to provided swagger spec. Note: servePath should end with ".json" as the RegisterOpenAPIService assume it is serving a json file and will also serve .pb and .gz files.
func RegisterOpenAPIVersionedService ¶
func RegisterOpenAPIVersionedService(openapiSpec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error)
RegisterOpenAPIVersionedService registers a handler to provide access to provided swagger spec.
func (*OpenAPIService) UpdateSpec ¶
func (o *OpenAPIService) UpdateSpec(openapiSpec *spec.Swagger) (err error)