Update vendor

This commit is contained in:
Jefftree
2023-05-24 18:55:36 +00:00
parent 7024beeeeb
commit 4373ae05f3
45 changed files with 133 additions and 106 deletions

View File

@@ -119,13 +119,14 @@ func ToProtoBinary(json []byte) ([]byte, error) {
// RegisterOpenAPIVersionedService registers a handler to provide access to provided swagger spec.
//
// Deprecated: use OpenAPIService.RegisterOpenAPIVersionedService instead.
func RegisterOpenAPIVersionedService(spec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error) {
func RegisterOpenAPIVersionedService(spec *spec.Swagger, servePath string, handler common.PathHandler) *OpenAPIService {
o := NewOpenAPIService(spec)
return o, o.RegisterOpenAPIVersionedService(servePath, handler)
o.RegisterOpenAPIVersionedService(servePath, handler)
return o
}
// RegisterOpenAPIVersionedService registers a handler to provide access to provided swagger spec.
func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handler common.PathHandler) error {
func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handler common.PathHandler) {
// Mutex protects the cache chain
var mutex sync.Mutex
@@ -183,8 +184,6 @@ func (o *OpenAPIService) RegisterOpenAPIVersionedService(servePath string, handl
return
}),
))
return nil
}
// BuildAndRegisterOpenAPIVersionedService builds the spec and registers a handler to provide access to it.
@@ -203,5 +202,6 @@ func BuildAndRegisterOpenAPIVersionedServiceFromRoutes(servePath string, routeCo
return nil, err
}
o := NewOpenAPIService(spec)
return o, o.RegisterOpenAPIVersionedService(servePath, handler)
o.RegisterOpenAPIVersionedService(servePath, handler)
return o, nil
}