Skip to content

Commit e13deb7

Browse files
Fix API response for swagger spec (#35029)
Co-authored-by: Scion <[email protected]>
1 parent e5c1b8b commit e13deb7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ This changelog goes through the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.com).
66

7-
## [1.24.3](https://github.com/go-gitea/gitea/releases/tag/1.24.3) - 2025-07-06
7+
## [1.24.3](https://github.com/go-gitea/gitea/releases/tag/1.24.3) - 2025-07-10
88

99
* BUGFIXES
10+
* Fix API response for swagger spec (#35029)
1011
* Start automerge check again after the conflict check and the schedule (#34988) (#35002)
1112
* Fix the response format for actions/workflows (#35009) (#35016)
1213
* Fix repo settings and protocol log problems (#35012) (#35013)

modules/structs/repo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type Repository struct {
5757
Private bool `json:"private"`
5858
Fork bool `json:"fork"`
5959
Template bool `json:"template"`
60-
Parent *Repository `json:"parent"`
60+
Parent *Repository `json:"parent,omitempty"`
6161
Mirror bool `json:"mirror"`
6262
Size int `json:"size"`
6363
Language string `json:"language"`
@@ -112,7 +112,7 @@ type Repository struct {
112112
ObjectFormatName string `json:"object_format_name"`
113113
// swagger:strfmt date-time
114114
MirrorUpdated time.Time `json:"mirror_updated,omitempty"`
115-
RepoTransfer *RepoTransfer `json:"repo_transfer"`
115+
RepoTransfer *RepoTransfer `json:"repo_transfer,omitempty"`
116116
Topics []string `json:"topics"`
117117
Licenses []string `json:"licenses"`
118118
}

services/convert/repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
245245
RepoTransfer: transfer,
246246
Topics: util.SliceNilAsEmpty(repo.Topics),
247247
ObjectFormatName: repo.ObjectFormatName,
248-
Licenses: repoLicenses.StringList(),
248+
Licenses: util.SliceNilAsEmpty(repoLicenses.StringList()),
249249
}
250250
}
251251

0 commit comments

Comments
 (0)