Skip to content

Commit bb0c84e

Browse files
Fix the response format for actions/workflows. (#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 55f3505 commit bb0c84e

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)