upgrade swagger version to v0.27.0 (#798)

This commit is contained in:
Harshavardhana
2021-06-08 12:35:39 -07:00
committed by GitHub
parent 6f0df68200
commit 6791631904
400 changed files with 5257 additions and 1128 deletions

View File

@@ -23,6 +23,7 @@ package admin_api
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"io"
"net/http"
@@ -30,12 +31,14 @@ import (
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/validate"
"github.com/minio/console/models"
)
// NewUpdateUserGroupsParams creates a new UpdateUserGroupsParams object
// no default values defined in spec.
//
// There are no default values defined in the spec.
func NewUpdateUserGroupsParams() UpdateUserGroupsParams {
return UpdateUserGroupsParams{}
@@ -86,6 +89,11 @@ func (o *UpdateUserGroupsParams) BindRequest(r *http.Request, route *middleware.
res = append(res, err)
}
ctx := validate.WithOperationRequest(context.Background())
if err := body.ContextValidate(ctx, route.Formats); err != nil {
res = append(res, err)
}
if len(res) == 0 {
o.Body = &body
}
@@ -93,11 +101,11 @@ func (o *UpdateUserGroupsParams) BindRequest(r *http.Request, route *middleware.
} else {
res = append(res, errors.Required("body", "body", ""))
}
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -113,7 +121,6 @@ func (o *UpdateUserGroupsParams) bindName(rawData []string, hasKey bool, formats
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil