From 8fd54f285ab73ec824a29a44e50b4ddc1a25f950 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Fri, 21 Mar 2025 15:52:41 +0100 Subject: [PATCH] update swagger docu --- routers/api/v1/repo/action.go | 24 ++++++++++++------------ templates/swagger/v1_json.tmpl | 25 ++++++++++++------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/routers/api/v1/repo/action.go b/routers/api/v1/repo/action.go index d2abab9577..b8ccdb0a31 100644 --- a/routers/api/v1/repo/action.go +++ b/routers/api/v1/repo/action.go @@ -912,14 +912,19 @@ func GetWorkflowRuns(ctx *context.APIContext) { // description: name of the repository // type: string // required: true - // - name: run - // in: path - // description: runid of the workflow run - // type: integer - // required: true - // - name: name + // - name: event // in: query - // description: name of the artifact + // description: workflow event name + // type: string + // required: false + // - name: branch + // in: query + // description: workflow branch + // type: string + // required: false + // - name: status + // in: query + // description: workflow status (pending, queued, in_progress, failure, success, skipped) // type: string // required: false // responses: @@ -1042,11 +1047,6 @@ func GetWorkflowJobs(ctx *context.APIContext) { // description: runid of the workflow run // type: integer // required: true - // - name: name - // in: query - // description: name of the artifact - // type: string - // required: false // responses: // "200": // "$ref": "#/responses/ArtifactsList" diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index e93add7642..9ee75770e1 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -4292,16 +4292,21 @@ "required": true }, { - "type": "integer", - "description": "runid of the workflow run", - "name": "run", - "in": "path", - "required": true + "type": "string", + "description": "workflow event name", + "name": "event", + "in": "query" }, { "type": "string", - "description": "name of the artifact", - "name": "name", + "description": "workflow branch", + "name": "branch", + "in": "query" + }, + { + "type": "string", + "description": "workflow status (pending, queued, in_progress, failure, success, skipped)", + "name": "status", "in": "query" } ], @@ -4447,12 +4452,6 @@ "name": "run", "in": "path", "required": true - }, - { - "type": "string", - "description": "name of the artifact", - "name": "name", - "in": "query" } ], "responses": {