Skip to content

Commit a4778cc

Browse files
ScionOfDesignChristopherHX
authored andcommitted
Fix the response format for actions/workflows. (go-gitea#35009)
Backport go-gitea#35009 This PR fixes the response format for the OpenAPI Spec of `ActionsListRepositoryWorkflows`. It was specified in the OpenAPI spec as returning a `[]*ActionWorkflow`, but it actually should return a `api.ActionWorkflowResponse`. The test already expects an `api.ActionWorkflowResponse` like expected.
1 parent 68fcdb6 commit a4778cc

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

routers/api/v1/swagger/action.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ type swaggerResponseActionWorkflow struct {
4444
// swagger:response ActionWorkflowList
4545
type swaggerResponseActionWorkflowList struct {
4646
// in:body
47-
Body []api.ActionWorkflow `json:"body"`
47+
Body api.ActionWorkflowResponse `json:"body"`
4848
}

templates/swagger/v1_json.tmpl

Lines changed: 20 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)