diff --git a/routers/api/v1/admin/runners.go b/routers/api/v1/admin/runners.go index 7c38b4e84e0..518888f3813 100644 --- a/routers/api/v1/admin/runners.go +++ b/routers/api/v1/admin/runners.go @@ -18,7 +18,7 @@ func GetRegistrationToken(ctx *context.APIContext) { // produces: // - application/json // parameters: - // - name: set-token + // - name: set_token // in: body // description: set a runner register token instead of generating one. // type: string diff --git a/routers/api/v1/org/action.go b/routers/api/v1/org/action.go index baee309ddd2..78b2e4bf7e4 100644 --- a/routers/api/v1/org/action.go +++ b/routers/api/v1/org/action.go @@ -182,7 +182,7 @@ func (Action) GetRegistrationToken(ctx *context.APIContext) { // description: name of the organization // type: string // required: true - // - name: set-token + // - name: set_token // in: body // description: set a runner register token instead of generating one. // type: string diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go index 980843cdf99..a161b05a216 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -500,7 +500,7 @@ func (Action) GetRegistrationToken(ctx *context.APIContext) { // description: name of the repo // type: string // required: true - // - name: set-token + // - name: set_token // in: body // description: set a runner register token instead of generating one. // type: string diff --git a/routers/api/v1/shared/runners.go b/routers/api/v1/shared/runners.go index 77e5c70edfc..97be75fc859 100644 --- a/routers/api/v1/shared/runners.go +++ b/routers/api/v1/shared/runners.go @@ -19,7 +19,7 @@ type RegistrationToken struct { } func GetRegistrationToken(ctx *context.APIContext, ownerID, repoID int64) { - setToken := ctx.FormString("set-token") + setToken := ctx.FormString("set_token") var token *actions_model.ActionRunnerToken var err error if setToken == "" { diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 2a21c657c07..0d0fc39d1d7 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -406,7 +406,7 @@ { "type": "string", "description": "set a runner register token instead of generating one.", - "name": "set-token", + "name": "set_token", "in": "body" } ], @@ -1714,7 +1714,7 @@ { "type": "string", "description": "set a runner register token instead of generating one.", - "name": "set-token", + "name": "set_token", "in": "body" } ], @@ -3909,7 +3909,7 @@ { "type": "string", "description": "set a runner register token instead of generating one.", - "name": "set-token", + "name": "set_token", "in": "body" } ],