Add topics for repository API (#31127)

Fix ##31100
pull/31058/head^2
Lunny Xiao 6 months ago committed by GitHub
parent b6f15c7948
commit de4616690f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      modules/structs/repo.go
  2. 1
      services/convert/repository.go
  3. 7
      templates/swagger/v1_json.tmpl

@ -113,6 +113,7 @@ type Repository struct {
// swagger:strfmt date-time
MirrorUpdated time.Time `json:"mirror_updated,omitempty"`
RepoTransfer *RepoTransfer `json:"repo_transfer"`
Topics []string `json:"topics"`
}
// CreateRepoOption options when creating repository

@ -236,6 +236,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
MirrorInterval: mirrorInterval,
MirrorUpdated: mirrorUpdated,
RepoTransfer: transfer,
Topics: repo.Topics,
ObjectFormatName: repo.ObjectFormatName,
}
}

@ -23804,6 +23804,13 @@
"type": "boolean",
"x-go-name": "Template"
},
"topics": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Topics"
},
"updated_at": {
"type": "string",
"format": "date-time",

Loading…
Cancel
Save