mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-12 15:39:45 +00:00
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.
This commit is contained in:
parent
55f350542c
commit
bb0c84e8c3
@ -44,5 +44,5 @@ type swaggerResponseActionWorkflow struct {
|
|||||||
// swagger:response ActionWorkflowList
|
// swagger:response ActionWorkflowList
|
||||||
type swaggerResponseActionWorkflowList struct {
|
type swaggerResponseActionWorkflowList struct {
|
||||||
// in:body
|
// in:body
|
||||||
Body []api.ActionWorkflow `json:"body"`
|
Body api.ActionWorkflowResponse `json:"body"`
|
||||||
}
|
}
|
||||||
|
24
templates/swagger/v1_json.tmpl
generated
24
templates/swagger/v1_json.tmpl
generated
@ -21248,6 +21248,25 @@
|
|||||||
},
|
},
|
||||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
"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": {
|
"ActionWorkflowRun": {
|
||||||
"description": "ActionWorkflowRun represents a WorkflowRun",
|
"description": "ActionWorkflowRun represents a WorkflowRun",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -28592,10 +28611,7 @@
|
|||||||
"ActionWorkflowList": {
|
"ActionWorkflowList": {
|
||||||
"description": "ActionWorkflowList",
|
"description": "ActionWorkflowList",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "array",
|
"$ref": "#/definitions/ActionWorkflowResponse"
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/ActionWorkflow"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ActivityFeedsList": {
|
"ActivityFeedsList": {
|
||||||
|
Loading…
Reference in New Issue
Block a user