mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-12 07:30:27 +00:00
Fix ListWorkflowRuns OpenAPI response model. (#35026)
Change the OpenAPI response of `ListWorkflowRuns` to `WorkflowRunsList` like it is supposed to be. --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
ea809a5220
commit
af0196c145
@ -57,7 +57,7 @@ type Repository struct {
|
|||||||
Private bool `json:"private"`
|
Private bool `json:"private"`
|
||||||
Fork bool `json:"fork"`
|
Fork bool `json:"fork"`
|
||||||
Template bool `json:"template"`
|
Template bool `json:"template"`
|
||||||
Parent *Repository `json:"parent"`
|
Parent *Repository `json:"parent,omitempty"`
|
||||||
Mirror bool `json:"mirror"`
|
Mirror bool `json:"mirror"`
|
||||||
Size int `json:"size"`
|
Size int `json:"size"`
|
||||||
Language string `json:"language"`
|
Language string `json:"language"`
|
||||||
@ -114,7 +114,7 @@ type Repository struct {
|
|||||||
ObjectFormatName string `json:"object_format_name"`
|
ObjectFormatName string `json:"object_format_name"`
|
||||||
// swagger:strfmt date-time
|
// swagger:strfmt date-time
|
||||||
MirrorUpdated time.Time `json:"mirror_updated"`
|
MirrorUpdated time.Time `json:"mirror_updated"`
|
||||||
RepoTransfer *RepoTransfer `json:"repo_transfer"`
|
RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"`
|
||||||
Topics []string `json:"topics"`
|
Topics []string `json:"topics"`
|
||||||
Licenses []string `json:"licenses"`
|
Licenses []string `json:"licenses"`
|
||||||
}
|
}
|
||||||
|
@ -747,7 +747,7 @@ func (Action) ListWorkflowRuns(ctx *context.APIContext) {
|
|||||||
// type: integer
|
// type: integer
|
||||||
// responses:
|
// responses:
|
||||||
// "200":
|
// "200":
|
||||||
// "$ref": "#/responses/ArtifactsList"
|
// "$ref": "#/responses/WorkflowRunsList"
|
||||||
// "400":
|
// "400":
|
||||||
// "$ref": "#/responses/error"
|
// "$ref": "#/responses/error"
|
||||||
// "404":
|
// "404":
|
||||||
|
@ -251,7 +251,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
|
|||||||
RepoTransfer: transfer,
|
RepoTransfer: transfer,
|
||||||
Topics: util.SliceNilAsEmpty(repo.Topics),
|
Topics: util.SliceNilAsEmpty(repo.Topics),
|
||||||
ObjectFormatName: repo.ObjectFormatName,
|
ObjectFormatName: repo.ObjectFormatName,
|
||||||
Licenses: repoLicenses.StringList(),
|
Licenses: util.SliceNilAsEmpty(repoLicenses.StringList()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
templates/swagger/v1_json.tmpl
generated
2
templates/swagger/v1_json.tmpl
generated
@ -5165,7 +5165,7 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"$ref": "#/responses/ArtifactsList"
|
"$ref": "#/responses/WorkflowRunsList"
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
"$ref": "#/responses/error"
|
"$ref": "#/responses/error"
|
||||||
|
Loading…
Reference in New Issue
Block a user