diff --git a/routers/api/v1/swagger/action.go b/routers/api/v1/swagger/action.go index 16a250184a..0606505950 100644 --- a/routers/api/v1/swagger/action.go +++ b/routers/api/v1/swagger/action.go @@ -44,5 +44,5 @@ type swaggerResponseActionWorkflow struct { // swagger:response ActionWorkflowList type swaggerResponseActionWorkflowList struct { // in:body - Body []api.ActionWorkflow `json:"body"` + Body api.ActionWorkflowResponse `json:"body"` } diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 1cc3735b2b..6cf2810baf 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -21248,6 +21248,25 @@ }, "x-go-package": "code.gitea.io/gitea/modules/structs" }, + "ActionWorkflowResponse": { + "description": "ActionWorkflowResponse returns a ActionWorkflow", + "type": "object", + "properties": { + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "workflows": { + "type": "array", + "items": { + "$ref": "#/definitions/ActionWorkflow" + }, + "x-go-name": "Workflows" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "ActionWorkflowRun": { "description": "ActionWorkflowRun represents a WorkflowRun", "type": "object", @@ -28592,10 +28611,7 @@ "ActionWorkflowList": { "description": "ActionWorkflowList", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ActionWorkflow" - } + "$ref": "#/definitions/ActionWorkflowResponse" } }, "ActivityFeedsList": {