1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-25 19:58:36 +00:00

Fix API response for swagger spec (#35029)

Co-authored-by: Scion <scion@studiowhy.net>
This commit is contained in:
wxiaoguang
2025-07-10 15:27:34 +08:00
committed by GitHub
parent e5c1b8b632
commit e13deb7a16
3 changed files with 5 additions and 4 deletions

View File

@@ -57,7 +57,7 @@ type Repository struct {
Private bool `json:"private"`
Fork bool `json:"fork"`
Template bool `json:"template"`
Parent *Repository `json:"parent"`
Parent *Repository `json:"parent,omitempty"`
Mirror bool `json:"mirror"`
Size int `json:"size"`
Language string `json:"language"`
@@ -112,7 +112,7 @@ type Repository struct {
ObjectFormatName string `json:"object_format_name"`
// swagger:strfmt date-time
MirrorUpdated time.Time `json:"mirror_updated,omitempty"`
RepoTransfer *RepoTransfer `json:"repo_transfer"`
RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"`
Topics []string `json:"topics"`
Licenses []string `json:"licenses"`
}