Documentation ¶
Index ¶
- func ToProtoBinary(json map[string]interface{}) ([]byte, error)
- type OpenAPIService
- func BuildAndRegisterOpenAPIVersionedService(servePath string, webServices []*restful.WebService, config *common.Config, ...) (*OpenAPIService, error)
- func NewOpenAPIService(spec *spec.Swagger) (*OpenAPIService, error)
- func RegisterOpenAPIVersionedService(spec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error)deprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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 NewOpenAPIService ¶
func NewOpenAPIService(spec *spec.Swagger) (*OpenAPIService, error)
NewOpenAPIService builds an OpenAPIService starting with the given spec.
func RegisterOpenAPIVersionedService
deprecated
func RegisterOpenAPIVersionedService(spec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error)
RegisterOpenAPIVersionedService registers a handler to provide access to provided swagger spec.
Deprecated: use OpenAPIService.RegisterOpenAPIVersionedService instead.
func (*OpenAPIService) RegisterOpenAPIVersionedService ¶
func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handler common.PathHandler) error
RegisterOpenAPIVersionedService registers a handler to provide access to provided swagger spec.
func (*OpenAPIService) UpdateSpec ¶
func (o *OpenAPIService) UpdateSpec(openapiSpec *spec.Swagger) (err error)