[#15] Enable swagger UI

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-07-07 18:21:41 +03:00 committed by Alex Vanin
parent e604222f60
commit 592be967f6

View file

@ -68,6 +68,8 @@ func New(prm *PrmAPI) *API {
func (a *API) Configure(api *operations.NeofsRestGwAPI) http.Handler { func (a *API) Configure(api *operations.NeofsRestGwAPI) http.Handler {
api.ServeError = errors.ServeError api.ServeError = errors.ServeError
api.UseSwaggerUI()
api.AuthHandler = operations.AuthHandlerFunc(a.PostAuth) api.AuthHandler = operations.AuthHandlerFunc(a.PostAuth)
api.PutObjectHandler = operations.PutObjectHandlerFunc(a.PutObjects) api.PutObjectHandler = operations.PutObjectHandlerFunc(a.PutObjects)