mcs set basepath on swagger yaml (#16)

This commit is contained in:
César Nieto
2020-04-03 13:17:31 -07:00
committed by GitHub
parent 35877973a9
commit 334b7ce671
62 changed files with 232 additions and 142 deletions

View File

@@ -21,7 +21,7 @@
// Schemes:
// http
// Host: localhost
// BasePath: /
// BasePath: /api/v1
// Version: 0.1.0
//
// Consumes:

View File

@@ -49,8 +49,9 @@ func init() {
"title": "MinIO Console Server",
"version": "0.1.0"
},
"basePath": "/api/v1",
"paths": {
"/api/v1/admin/info": {
"/admin/info": {
"get": {
"tags": [
"AdminAPI"
@@ -73,7 +74,7 @@ func init() {
}
}
},
"/api/v1/buckets": {
"/buckets": {
"get": {
"tags": [
"UserAPI"
@@ -143,7 +144,7 @@ func init() {
}
}
},
"/api/v1/buckets/{bucket_name}/events": {
"/buckets/{bucket_name}/events": {
"get": {
"tags": [
"UserAPI"
@@ -220,7 +221,7 @@ func init() {
}
}
},
"/api/v1/buckets/{name}": {
"/buckets/{name}": {
"get": {
"tags": [
"UserAPI"
@@ -277,7 +278,7 @@ func init() {
}
}
},
"/api/v1/buckets/{name}/set-policy": {
"/buckets/{name}/set-policy": {
"put": {
"tags": [
"UserAPI"
@@ -316,7 +317,7 @@ func init() {
}
}
},
"/api/v1/configs": {
"/configs": {
"get": {
"tags": [
"AdminAPI"
@@ -353,7 +354,7 @@ func init() {
}
}
},
"/api/v1/configs/{name}": {
"/configs/{name}": {
"get": {
"tags": [
"AdminAPI"
@@ -418,7 +419,7 @@ func init() {
}
}
},
"/api/v1/groups": {
"/groups": {
"get": {
"tags": [
"AdminAPI"
@@ -483,7 +484,7 @@ func init() {
}
}
},
"/api/v1/groups/{name}": {
"/groups/{name}": {
"get": {
"tags": [
"AdminAPI"
@@ -577,7 +578,7 @@ func init() {
}
}
},
"/api/v1/login": {
"/login": {
"get": {
"security": [],
"tags": [
@@ -633,7 +634,7 @@ func init() {
}
}
},
"/api/v1/policies": {
"/policies": {
"get": {
"tags": [
"AdminAPI"
@@ -701,7 +702,7 @@ func init() {
}
}
},
"/api/v1/policies/{name}": {
"/policies/{name}": {
"get": {
"tags": [
"AdminAPI"
@@ -758,7 +759,7 @@ func init() {
}
}
},
"/api/v1/profiling/start": {
"/profiling/start": {
"post": {
"tags": [
"AdminAPI"
@@ -791,7 +792,7 @@ func init() {
}
}
},
"/api/v1/profiling/stop": {
"/profiling/stop": {
"post": {
"produces": [
"application/octet-stream"
@@ -817,7 +818,7 @@ func init() {
}
}
},
"/api/v1/service/restart": {
"/service/restart": {
"post": {
"tags": [
"AdminAPI"
@@ -837,7 +838,7 @@ func init() {
}
}
},
"/api/v1/session": {
"/session": {
"get": {
"tags": [
"UserAPI"
@@ -860,7 +861,7 @@ func init() {
}
}
},
"/api/v1/set-policy/{name}": {
"/set-policy/{name}": {
"put": {
"tags": [
"AdminAPI"
@@ -896,7 +897,7 @@ func init() {
}
}
},
"/api/v1/users": {
"/users": {
"get": {
"tags": [
"AdminAPI"
@@ -1552,8 +1553,9 @@ func init() {
"title": "MinIO Console Server",
"version": "0.1.0"
},
"basePath": "/api/v1",
"paths": {
"/api/v1/admin/info": {
"/admin/info": {
"get": {
"tags": [
"AdminAPI"
@@ -1576,7 +1578,7 @@ func init() {
}
}
},
"/api/v1/buckets": {
"/buckets": {
"get": {
"tags": [
"UserAPI"
@@ -1646,7 +1648,7 @@ func init() {
}
}
},
"/api/v1/buckets/{bucket_name}/events": {
"/buckets/{bucket_name}/events": {
"get": {
"tags": [
"UserAPI"
@@ -1723,7 +1725,7 @@ func init() {
}
}
},
"/api/v1/buckets/{name}": {
"/buckets/{name}": {
"get": {
"tags": [
"UserAPI"
@@ -1780,7 +1782,7 @@ func init() {
}
}
},
"/api/v1/buckets/{name}/set-policy": {
"/buckets/{name}/set-policy": {
"put": {
"tags": [
"UserAPI"
@@ -1819,7 +1821,7 @@ func init() {
}
}
},
"/api/v1/configs": {
"/configs": {
"get": {
"tags": [
"AdminAPI"
@@ -1856,7 +1858,7 @@ func init() {
}
}
},
"/api/v1/configs/{name}": {
"/configs/{name}": {
"get": {
"tags": [
"AdminAPI"
@@ -1921,7 +1923,7 @@ func init() {
}
}
},
"/api/v1/groups": {
"/groups": {
"get": {
"tags": [
"AdminAPI"
@@ -1986,7 +1988,7 @@ func init() {
}
}
},
"/api/v1/groups/{name}": {
"/groups/{name}": {
"get": {
"tags": [
"AdminAPI"
@@ -2080,7 +2082,7 @@ func init() {
}
}
},
"/api/v1/login": {
"/login": {
"get": {
"security": [],
"tags": [
@@ -2136,7 +2138,7 @@ func init() {
}
}
},
"/api/v1/policies": {
"/policies": {
"get": {
"tags": [
"AdminAPI"
@@ -2204,7 +2206,7 @@ func init() {
}
}
},
"/api/v1/policies/{name}": {
"/policies/{name}": {
"get": {
"tags": [
"AdminAPI"
@@ -2261,7 +2263,7 @@ func init() {
}
}
},
"/api/v1/profiling/start": {
"/profiling/start": {
"post": {
"tags": [
"AdminAPI"
@@ -2294,7 +2296,7 @@ func init() {
}
}
},
"/api/v1/profiling/stop": {
"/profiling/stop": {
"post": {
"produces": [
"application/octet-stream"
@@ -2320,7 +2322,7 @@ func init() {
}
}
},
"/api/v1/service/restart": {
"/service/restart": {
"post": {
"tags": [
"AdminAPI"
@@ -2340,7 +2342,7 @@ func init() {
}
}
},
"/api/v1/session": {
"/session": {
"get": {
"tags": [
"UserAPI"
@@ -2363,7 +2365,7 @@ func init() {
}
}
},
"/api/v1/set-policy/{name}": {
"/set-policy/{name}": {
"put": {
"tags": [
"AdminAPI"
@@ -2399,7 +2401,7 @@ func init() {
}
}
},
"/api/v1/users": {
"/users": {
"get": {
"tags": [
"AdminAPI"

View File

@@ -48,7 +48,7 @@ func NewAddGroup(ctx *middleware.Context, handler AddGroupHandler) *AddGroup {
return &AddGroup{Context: ctx, Handler: handler}
}
/*AddGroup swagger:route POST /api/v1/groups AdminAPI addGroup
/*AddGroup swagger:route POST /groups AdminAPI addGroup
Add Group

View File

@@ -52,9 +52,12 @@ func (o *AddGroupURL) SetBasePath(bp string) {
func (o *AddGroupURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/groups"
var _path = "/groups"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewAddPolicy(ctx *middleware.Context, handler AddPolicyHandler) *AddPolicy
return &AddPolicy{Context: ctx, Handler: handler}
}
/*AddPolicy swagger:route POST /api/v1/policies AdminAPI addPolicy
/*AddPolicy swagger:route POST /policies AdminAPI addPolicy
Add Policy

View File

@@ -52,9 +52,12 @@ func (o *AddPolicyURL) SetBasePath(bp string) {
func (o *AddPolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/policies"
var _path = "/policies"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewAddUser(ctx *middleware.Context, handler AddUserHandler) *AddUser {
return &AddUser{Context: ctx, Handler: handler}
}
/*AddUser swagger:route POST /api/v1/users AdminAPI addUser
/*AddUser swagger:route POST /users AdminAPI addUser
Add User

View File

@@ -52,9 +52,12 @@ func (o *AddUserURL) SetBasePath(bp string) {
func (o *AddUserURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/users"
var _path = "/users"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewAdminInfo(ctx *middleware.Context, handler AdminInfoHandler) *AdminInfo
return &AdminInfo{Context: ctx, Handler: handler}
}
/*AdminInfo swagger:route GET /api/v1/admin/info AdminAPI adminInfo
/*AdminInfo swagger:route GET /admin/info AdminAPI adminInfo
Returns information about the deployment

View File

@@ -52,9 +52,12 @@ func (o *AdminInfoURL) SetBasePath(bp string) {
func (o *AdminInfoURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/admin/info"
var _path = "/admin/info"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewConfigInfo(ctx *middleware.Context, handler ConfigInfoHandler) *ConfigIn
return &ConfigInfo{Context: ctx, Handler: handler}
}
/*ConfigInfo swagger:route GET /api/v1/configs/{name} AdminAPI configInfo
/*ConfigInfo swagger:route GET /configs/{name} AdminAPI configInfo
Configuration info

View File

@@ -57,7 +57,7 @@ func (o *ConfigInfoURL) SetBasePath(bp string) {
func (o *ConfigInfoURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/configs/{name}"
var _path = "/configs/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *ConfigInfoURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewGroupInfo(ctx *middleware.Context, handler GroupInfoHandler) *GroupInfo
return &GroupInfo{Context: ctx, Handler: handler}
}
/*GroupInfo swagger:route GET /api/v1/groups/{name} AdminAPI groupInfo
/*GroupInfo swagger:route GET /groups/{name} AdminAPI groupInfo
Group info

View File

@@ -57,7 +57,7 @@ func (o *GroupInfoURL) SetBasePath(bp string) {
func (o *GroupInfoURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/groups/{name}"
var _path = "/groups/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *GroupInfoURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewListConfig(ctx *middleware.Context, handler ListConfigHandler) *ListConf
return &ListConfig{Context: ctx, Handler: handler}
}
/*ListConfig swagger:route GET /api/v1/configs AdminAPI listConfig
/*ListConfig swagger:route GET /configs AdminAPI listConfig
List Configurations

View File

@@ -59,9 +59,12 @@ func (o *ListConfigURL) SetBasePath(bp string) {
func (o *ListConfigURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/configs"
var _path = "/configs"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
qs := make(url.Values)

View File

@@ -48,7 +48,7 @@ func NewListGroups(ctx *middleware.Context, handler ListGroupsHandler) *ListGrou
return &ListGroups{Context: ctx, Handler: handler}
}
/*ListGroups swagger:route GET /api/v1/groups AdminAPI listGroups
/*ListGroups swagger:route GET /groups AdminAPI listGroups
List Groups

View File

@@ -59,9 +59,12 @@ func (o *ListGroupsURL) SetBasePath(bp string) {
func (o *ListGroupsURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/groups"
var _path = "/groups"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
qs := make(url.Values)

View File

@@ -48,7 +48,7 @@ func NewListPolicies(ctx *middleware.Context, handler ListPoliciesHandler) *List
return &ListPolicies{Context: ctx, Handler: handler}
}
/*ListPolicies swagger:route GET /api/v1/policies AdminAPI listPolicies
/*ListPolicies swagger:route GET /policies AdminAPI listPolicies
List Policies

View File

@@ -59,9 +59,12 @@ func (o *ListPoliciesURL) SetBasePath(bp string) {
func (o *ListPoliciesURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/policies"
var _path = "/policies"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
qs := make(url.Values)

View File

@@ -48,7 +48,7 @@ func NewListUsers(ctx *middleware.Context, handler ListUsersHandler) *ListUsers
return &ListUsers{Context: ctx, Handler: handler}
}
/*ListUsers swagger:route GET /api/v1/users AdminAPI listUsers
/*ListUsers swagger:route GET /users AdminAPI listUsers
List Users

View File

@@ -59,9 +59,12 @@ func (o *ListUsersURL) SetBasePath(bp string) {
func (o *ListUsersURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/users"
var _path = "/users"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
qs := make(url.Values)

View File

@@ -48,7 +48,7 @@ func NewPolicyInfo(ctx *middleware.Context, handler PolicyInfoHandler) *PolicyIn
return &PolicyInfo{Context: ctx, Handler: handler}
}
/*PolicyInfo swagger:route GET /api/v1/policies/{name} AdminAPI policyInfo
/*PolicyInfo swagger:route GET /policies/{name} AdminAPI policyInfo
Policy info

View File

@@ -57,7 +57,7 @@ func (o *PolicyInfoURL) SetBasePath(bp string) {
func (o *PolicyInfoURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/policies/{name}"
var _path = "/policies/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *PolicyInfoURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewProfilingStart(ctx *middleware.Context, handler ProfilingStartHandler) *
return &ProfilingStart{Context: ctx, Handler: handler}
}
/*ProfilingStart swagger:route POST /api/v1/profiling/start AdminAPI profilingStart
/*ProfilingStart swagger:route POST /profiling/start AdminAPI profilingStart
Start recording profile data

View File

@@ -52,9 +52,12 @@ func (o *ProfilingStartURL) SetBasePath(bp string) {
func (o *ProfilingStartURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/profiling/start"
var _path = "/profiling/start"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewProfilingStop(ctx *middleware.Context, handler ProfilingStopHandler) *Pr
return &ProfilingStop{Context: ctx, Handler: handler}
}
/*ProfilingStop swagger:route POST /api/v1/profiling/stop AdminAPI profilingStop
/*ProfilingStop swagger:route POST /profiling/stop AdminAPI profilingStop
Stop and download profile data

View File

@@ -52,9 +52,12 @@ func (o *ProfilingStopURL) SetBasePath(bp string) {
func (o *ProfilingStopURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/profiling/stop"
var _path = "/profiling/stop"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewRemoveGroup(ctx *middleware.Context, handler RemoveGroupHandler) *Remove
return &RemoveGroup{Context: ctx, Handler: handler}
}
/*RemoveGroup swagger:route DELETE /api/v1/groups/{name} AdminAPI removeGroup
/*RemoveGroup swagger:route DELETE /groups/{name} AdminAPI removeGroup
Remove group

View File

@@ -57,7 +57,7 @@ func (o *RemoveGroupURL) SetBasePath(bp string) {
func (o *RemoveGroupURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/groups/{name}"
var _path = "/groups/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *RemoveGroupURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewRemovePolicy(ctx *middleware.Context, handler RemovePolicyHandler) *Remo
return &RemovePolicy{Context: ctx, Handler: handler}
}
/*RemovePolicy swagger:route DELETE /api/v1/policies/{name} AdminAPI removePolicy
/*RemovePolicy swagger:route DELETE /policies/{name} AdminAPI removePolicy
Remove policy

View File

@@ -57,7 +57,7 @@ func (o *RemovePolicyURL) SetBasePath(bp string) {
func (o *RemovePolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/policies/{name}"
var _path = "/policies/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *RemovePolicyURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewRestartService(ctx *middleware.Context, handler RestartServiceHandler) *
return &RestartService{Context: ctx, Handler: handler}
}
/*RestartService swagger:route POST /api/v1/service/restart AdminAPI restartService
/*RestartService swagger:route POST /service/restart AdminAPI restartService
Restart Service

View File

@@ -52,9 +52,12 @@ func (o *RestartServiceURL) SetBasePath(bp string) {
func (o *RestartServiceURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/service/restart"
var _path = "/service/restart"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewSetConfig(ctx *middleware.Context, handler SetConfigHandler) *SetConfig
return &SetConfig{Context: ctx, Handler: handler}
}
/*SetConfig swagger:route PUT /api/v1/configs/{name} AdminAPI setConfig
/*SetConfig swagger:route PUT /configs/{name} AdminAPI setConfig
Set Configuration

View File

@@ -57,7 +57,7 @@ func (o *SetConfigURL) SetBasePath(bp string) {
func (o *SetConfigURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/configs/{name}"
var _path = "/configs/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *SetConfigURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewSetPolicy(ctx *middleware.Context, handler SetPolicyHandler) *SetPolicy
return &SetPolicy{Context: ctx, Handler: handler}
}
/*SetPolicy swagger:route PUT /api/v1/set-policy/{name} AdminAPI setPolicy
/*SetPolicy swagger:route PUT /set-policy/{name} AdminAPI setPolicy
Set policy

View File

@@ -57,7 +57,7 @@ func (o *SetPolicyURL) SetBasePath(bp string) {
func (o *SetPolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/set-policy/{name}"
var _path = "/set-policy/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *SetPolicyURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewUpdateGroup(ctx *middleware.Context, handler UpdateGroupHandler) *Update
return &UpdateGroup{Context: ctx, Handler: handler}
}
/*UpdateGroup swagger:route PUT /api/v1/groups/{name} AdminAPI updateGroup
/*UpdateGroup swagger:route PUT /groups/{name} AdminAPI updateGroup
Update Group Members or Status

View File

@@ -57,7 +57,7 @@ func (o *UpdateGroupURL) SetBasePath(bp string) {
func (o *UpdateGroupURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/groups/{name}"
var _path = "/groups/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *UpdateGroupURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -520,119 +520,119 @@ func (o *McsAPI) initHandlerCache() {
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/groups"] = admin_api.NewAddGroup(o.context, o.AdminAPIAddGroupHandler)
o.handlers["POST"]["/groups"] = admin_api.NewAddGroup(o.context, o.AdminAPIAddGroupHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/policies"] = admin_api.NewAddPolicy(o.context, o.AdminAPIAddPolicyHandler)
o.handlers["POST"]["/policies"] = admin_api.NewAddPolicy(o.context, o.AdminAPIAddPolicyHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/users"] = admin_api.NewAddUser(o.context, o.AdminAPIAddUserHandler)
o.handlers["POST"]["/users"] = admin_api.NewAddUser(o.context, o.AdminAPIAddUserHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/admin/info"] = admin_api.NewAdminInfo(o.context, o.AdminAPIAdminInfoHandler)
o.handlers["GET"]["/admin/info"] = admin_api.NewAdminInfo(o.context, o.AdminAPIAdminInfoHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/buckets/{name}"] = user_api.NewBucketInfo(o.context, o.UserAPIBucketInfoHandler)
o.handlers["GET"]["/buckets/{name}"] = user_api.NewBucketInfo(o.context, o.UserAPIBucketInfoHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/api/v1/buckets/{name}/set-policy"] = user_api.NewBucketSetPolicy(o.context, o.UserAPIBucketSetPolicyHandler)
o.handlers["PUT"]["/buckets/{name}/set-policy"] = user_api.NewBucketSetPolicy(o.context, o.UserAPIBucketSetPolicyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/configs/{name}"] = admin_api.NewConfigInfo(o.context, o.AdminAPIConfigInfoHandler)
o.handlers["GET"]["/configs/{name}"] = admin_api.NewConfigInfo(o.context, o.AdminAPIConfigInfoHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/buckets/{bucket_name}/events"] = user_api.NewCreateBucketEvent(o.context, o.UserAPICreateBucketEventHandler)
o.handlers["POST"]["/buckets/{bucket_name}/events"] = user_api.NewCreateBucketEvent(o.context, o.UserAPICreateBucketEventHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/api/v1/buckets/{name}"] = user_api.NewDeleteBucket(o.context, o.UserAPIDeleteBucketHandler)
o.handlers["DELETE"]["/buckets/{name}"] = user_api.NewDeleteBucket(o.context, o.UserAPIDeleteBucketHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/groups/{name}"] = admin_api.NewGroupInfo(o.context, o.AdminAPIGroupInfoHandler)
o.handlers["GET"]["/groups/{name}"] = admin_api.NewGroupInfo(o.context, o.AdminAPIGroupInfoHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/buckets/{bucket_name}/events"] = user_api.NewListBucketEvents(o.context, o.UserAPIListBucketEventsHandler)
o.handlers["GET"]["/buckets/{bucket_name}/events"] = user_api.NewListBucketEvents(o.context, o.UserAPIListBucketEventsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/buckets"] = user_api.NewListBuckets(o.context, o.UserAPIListBucketsHandler)
o.handlers["GET"]["/buckets"] = user_api.NewListBuckets(o.context, o.UserAPIListBucketsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/configs"] = admin_api.NewListConfig(o.context, o.AdminAPIListConfigHandler)
o.handlers["GET"]["/configs"] = admin_api.NewListConfig(o.context, o.AdminAPIListConfigHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/groups"] = admin_api.NewListGroups(o.context, o.AdminAPIListGroupsHandler)
o.handlers["GET"]["/groups"] = admin_api.NewListGroups(o.context, o.AdminAPIListGroupsHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/policies"] = admin_api.NewListPolicies(o.context, o.AdminAPIListPoliciesHandler)
o.handlers["GET"]["/policies"] = admin_api.NewListPolicies(o.context, o.AdminAPIListPoliciesHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/users"] = admin_api.NewListUsers(o.context, o.AdminAPIListUsersHandler)
o.handlers["GET"]["/users"] = admin_api.NewListUsers(o.context, o.AdminAPIListUsersHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/login"] = user_api.NewLogin(o.context, o.UserAPILoginHandler)
o.handlers["POST"]["/login"] = user_api.NewLogin(o.context, o.UserAPILoginHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/login"] = user_api.NewLoginDetail(o.context, o.UserAPILoginDetailHandler)
o.handlers["GET"]["/login"] = user_api.NewLoginDetail(o.context, o.UserAPILoginDetailHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/buckets"] = user_api.NewMakeBucket(o.context, o.UserAPIMakeBucketHandler)
o.handlers["POST"]["/buckets"] = user_api.NewMakeBucket(o.context, o.UserAPIMakeBucketHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/policies/{name}"] = admin_api.NewPolicyInfo(o.context, o.AdminAPIPolicyInfoHandler)
o.handlers["GET"]["/policies/{name}"] = admin_api.NewPolicyInfo(o.context, o.AdminAPIPolicyInfoHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/profiling/start"] = admin_api.NewProfilingStart(o.context, o.AdminAPIProfilingStartHandler)
o.handlers["POST"]["/profiling/start"] = admin_api.NewProfilingStart(o.context, o.AdminAPIProfilingStartHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/profiling/stop"] = admin_api.NewProfilingStop(o.context, o.AdminAPIProfilingStopHandler)
o.handlers["POST"]["/profiling/stop"] = admin_api.NewProfilingStop(o.context, o.AdminAPIProfilingStopHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/api/v1/groups/{name}"] = admin_api.NewRemoveGroup(o.context, o.AdminAPIRemoveGroupHandler)
o.handlers["DELETE"]["/groups/{name}"] = admin_api.NewRemoveGroup(o.context, o.AdminAPIRemoveGroupHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/api/v1/policies/{name}"] = admin_api.NewRemovePolicy(o.context, o.AdminAPIRemovePolicyHandler)
o.handlers["DELETE"]["/policies/{name}"] = admin_api.NewRemovePolicy(o.context, o.AdminAPIRemovePolicyHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/api/v1/service/restart"] = admin_api.NewRestartService(o.context, o.AdminAPIRestartServiceHandler)
o.handlers["POST"]["/service/restart"] = admin_api.NewRestartService(o.context, o.AdminAPIRestartServiceHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/api/v1/session"] = user_api.NewSessionCheck(o.context, o.UserAPISessionCheckHandler)
o.handlers["GET"]["/session"] = user_api.NewSessionCheck(o.context, o.UserAPISessionCheckHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/api/v1/configs/{name}"] = admin_api.NewSetConfig(o.context, o.AdminAPISetConfigHandler)
o.handlers["PUT"]["/configs/{name}"] = admin_api.NewSetConfig(o.context, o.AdminAPISetConfigHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/api/v1/set-policy/{name}"] = admin_api.NewSetPolicy(o.context, o.AdminAPISetPolicyHandler)
o.handlers["PUT"]["/set-policy/{name}"] = admin_api.NewSetPolicy(o.context, o.AdminAPISetPolicyHandler)
if o.handlers["PUT"] == nil {
o.handlers["PUT"] = make(map[string]http.Handler)
}
o.handlers["PUT"]["/api/v1/groups/{name}"] = admin_api.NewUpdateGroup(o.context, o.AdminAPIUpdateGroupHandler)
o.handlers["PUT"]["/groups/{name}"] = admin_api.NewUpdateGroup(o.context, o.AdminAPIUpdateGroupHandler)
}
// Serve creates a http handler to serve the API over HTTP

View File

@@ -48,7 +48,7 @@ func NewBucketInfo(ctx *middleware.Context, handler BucketInfoHandler) *BucketIn
return &BucketInfo{Context: ctx, Handler: handler}
}
/*BucketInfo swagger:route GET /api/v1/buckets/{name} UserAPI bucketInfo
/*BucketInfo swagger:route GET /buckets/{name} UserAPI bucketInfo
Bucket Info

View File

@@ -57,7 +57,7 @@ func (o *BucketInfoURL) SetBasePath(bp string) {
func (o *BucketInfoURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/buckets/{name}"
var _path = "/buckets/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *BucketInfoURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewBucketSetPolicy(ctx *middleware.Context, handler BucketSetPolicyHandler)
return &BucketSetPolicy{Context: ctx, Handler: handler}
}
/*BucketSetPolicy swagger:route PUT /api/v1/buckets/{name}/set-policy UserAPI bucketSetPolicy
/*BucketSetPolicy swagger:route PUT /buckets/{name}/set-policy UserAPI bucketSetPolicy
Bucket Set Policy

View File

@@ -57,7 +57,7 @@ func (o *BucketSetPolicyURL) SetBasePath(bp string) {
func (o *BucketSetPolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/buckets/{name}/set-policy"
var _path = "/buckets/{name}/set-policy"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *BucketSetPolicyURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewCreateBucketEvent(ctx *middleware.Context, handler CreateBucketEventHand
return &CreateBucketEvent{Context: ctx, Handler: handler}
}
/*CreateBucketEvent swagger:route POST /api/v1/buckets/{bucket_name}/events UserAPI createBucketEvent
/*CreateBucketEvent swagger:route POST /buckets/{bucket_name}/events UserAPI createBucketEvent
Create Bucket Event

View File

@@ -57,7 +57,7 @@ func (o *CreateBucketEventURL) SetBasePath(bp string) {
func (o *CreateBucketEventURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/buckets/{bucket_name}/events"
var _path = "/buckets/{bucket_name}/events"
bucketName := o.BucketName
if bucketName != "" {
@@ -67,6 +67,9 @@ func (o *CreateBucketEventURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewDeleteBucket(ctx *middleware.Context, handler DeleteBucketHandler) *Dele
return &DeleteBucket{Context: ctx, Handler: handler}
}
/*DeleteBucket swagger:route DELETE /api/v1/buckets/{name} UserAPI deleteBucket
/*DeleteBucket swagger:route DELETE /buckets/{name} UserAPI deleteBucket
Delete Bucket

View File

@@ -57,7 +57,7 @@ func (o *DeleteBucketURL) SetBasePath(bp string) {
func (o *DeleteBucketURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/buckets/{name}"
var _path = "/buckets/{name}"
name := o.Name
if name != "" {
@@ -67,6 +67,9 @@ func (o *DeleteBucketURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewListBucketEvents(ctx *middleware.Context, handler ListBucketEventsHandle
return &ListBucketEvents{Context: ctx, Handler: handler}
}
/*ListBucketEvents swagger:route GET /api/v1/buckets/{bucket_name}/events UserAPI listBucketEvents
/*ListBucketEvents swagger:route GET /buckets/{bucket_name}/events UserAPI listBucketEvents
List Bucket Events

View File

@@ -62,7 +62,7 @@ func (o *ListBucketEventsURL) SetBasePath(bp string) {
func (o *ListBucketEventsURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/buckets/{bucket_name}/events"
var _path = "/buckets/{bucket_name}/events"
bucketName := o.BucketName
if bucketName != "" {
@@ -72,6 +72,9 @@ func (o *ListBucketEventsURL) Build() (*url.URL, error) {
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
qs := make(url.Values)

View File

@@ -48,7 +48,7 @@ func NewListBuckets(ctx *middleware.Context, handler ListBucketsHandler) *ListBu
return &ListBuckets{Context: ctx, Handler: handler}
}
/*ListBuckets swagger:route GET /api/v1/buckets UserAPI listBuckets
/*ListBuckets swagger:route GET /buckets UserAPI listBuckets
List Buckets

View File

@@ -60,9 +60,12 @@ func (o *ListBucketsURL) SetBasePath(bp string) {
func (o *ListBucketsURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/buckets"
var _path = "/buckets"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
qs := make(url.Values)

View File

@@ -46,7 +46,7 @@ func NewLogin(ctx *middleware.Context, handler LoginHandler) *Login {
return &Login{Context: ctx, Handler: handler}
}
/*Login swagger:route POST /api/v1/login UserAPI login
/*Login swagger:route POST /login UserAPI login
Login to mcs

View File

@@ -46,7 +46,7 @@ func NewLoginDetail(ctx *middleware.Context, handler LoginDetailHandler) *LoginD
return &LoginDetail{Context: ctx, Handler: handler}
}
/*LoginDetail swagger:route GET /api/v1/login UserAPI loginDetail
/*LoginDetail swagger:route GET /login UserAPI loginDetail
Returns login strategy, form or sso.

View File

@@ -52,9 +52,12 @@ func (o *LoginDetailURL) SetBasePath(bp string) {
func (o *LoginDetailURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/login"
var _path = "/login"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -52,9 +52,12 @@ func (o *LoginURL) SetBasePath(bp string) {
func (o *LoginURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/login"
var _path = "/login"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewMakeBucket(ctx *middleware.Context, handler MakeBucketHandler) *MakeBuck
return &MakeBucket{Context: ctx, Handler: handler}
}
/*MakeBucket swagger:route POST /api/v1/buckets UserAPI makeBucket
/*MakeBucket swagger:route POST /buckets UserAPI makeBucket
Make bucket

View File

@@ -52,9 +52,12 @@ func (o *MakeBucketURL) SetBasePath(bp string) {
func (o *MakeBucketURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/buckets"
var _path = "/buckets"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -48,7 +48,7 @@ func NewSessionCheck(ctx *middleware.Context, handler SessionCheckHandler) *Sess
return &SessionCheck{Context: ctx, Handler: handler}
}
/*SessionCheck swagger:route GET /api/v1/session UserAPI sessionCheck
/*SessionCheck swagger:route GET /session UserAPI sessionCheck
Endpoint to check if your session is still valid

View File

@@ -52,9 +52,12 @@ func (o *SessionCheckURL) SetBasePath(bp string) {
func (o *SessionCheckURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/api/v1/session"
var _path = "/session"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil

View File

@@ -8,6 +8,7 @@ produces:
- application/json
schemes:
- http
basePath: /api/v1
# We are going to be taking `Authorization: Bearer TOKEN` header for our authentication
securityDefinitions:
key:
@@ -19,7 +20,7 @@ securityDefinitions:
security:
- key: []
paths:
/api/v1/buckets:
/buckets:
get:
summary: List Buckets
operationId: ListBuckets
@@ -67,7 +68,7 @@ paths:
$ref: "#/definitions/error"
tags:
- UserAPI
/api/v1/buckets/{name}:
/buckets/{name}:
get:
summary: Bucket Info
operationId: BucketInfo
@@ -104,7 +105,7 @@ paths:
$ref: "#/definitions/error"
tags:
- UserAPI
/api/v1/buckets/{name}/set-policy:
/buckets/{name}/set-policy:
put:
summary: Bucket Set Policy
operationId: BucketSetPolicy
@@ -129,7 +130,7 @@ paths:
$ref: "#/definitions/error"
tags:
- UserAPI
/api/v1/buckets/{bucket_name}/events:
/buckets/{bucket_name}/events:
get:
summary: List Bucket Events
operationId: ListBucketEvents
@@ -181,7 +182,7 @@ paths:
$ref: "#/definitions/error"
tags:
- UserAPI
/api/v1/users:
/users:
get:
summary: List Users
operationId: ListUsers
@@ -227,7 +228,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/groups:
/groups:
get:
summary: List Groups
operationId: ListGroups
@@ -271,7 +272,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/groups/{name}:
/groups/{name}:
get:
summary: Group info
operationId: GroupInfo
@@ -332,7 +333,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/policies:
/policies:
get:
summary: List Policies
operationId: ListPolicies
@@ -378,7 +379,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/policies/{name}:
/policies/{name}:
delete:
summary: Remove policy
operationId: RemovePolicy
@@ -415,7 +416,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/configs:
/configs:
get:
summary: List Configurations
operationId: ListConfig
@@ -441,7 +442,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/set-policy/{name}:
/set-policy/{name}:
put:
summary: Set policy
operationId: SetPolicy
@@ -464,7 +465,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/configs/{name}:
/configs/{name}:
get:
summary: Configuration info
operationId: ConfigInfo
@@ -506,7 +507,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/service/restart:
/service/restart:
post:
summary: Restart Service
operationId: RestartService
@@ -519,7 +520,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/login:
/login:
get:
summary: Returns login strategy, form or sso.
operationId: LoginDetail
@@ -558,7 +559,7 @@ paths:
security: []
tags:
- UserAPI
/api/v1/profiling/start:
/profiling/start:
post:
summary: Start recording profile data
operationId: ProfilingStart
@@ -579,7 +580,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/profiling/stop:
/profiling/stop:
post:
summary: Stop and download profile data
operationId: ProfilingStop
@@ -596,7 +597,7 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/api/v1/session:
/session:
get:
summary: Endpoint to check if your session is still valid
operationId: SessionCheck
@@ -611,7 +612,7 @@ paths:
$ref: "#/definitions/error"
tags:
- UserAPI
/api/v1/admin/info:
/admin/info:
get:
summary: Returns information about the deployment
operationId: AdminInfo