mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-07-15 05:01:41 +08:00
Fixes #21291, allowing icons and other missing attributes to appear for NuGet packages from inside Visual Studio like they do with GitHub Nuget packages. Adds additional NuGet package information, particularly `IconURL`, to bring the Gitea NuGet API more in-line with GitHub's NuGet API. ref: https://learn.microsoft.com/en-us/nuget/api/search-query-service-resource
This commit is contained in:
@ -71,6 +71,7 @@ type Metadata struct {
|
||||
ReleaseNotes string `json:"release_notes,omitempty"`
|
||||
RepositoryURL string `json:"repository_url,omitempty"`
|
||||
RequireLicenseAcceptance bool `json:"require_license_acceptance"`
|
||||
Summary string `json:"summary,omitempty"`
|
||||
Tags string `json:"tags,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
|
||||
@ -105,6 +106,7 @@ type nuspecPackage struct {
|
||||
Readme string `xml:"readme"`
|
||||
ReleaseNotes string `xml:"releaseNotes"`
|
||||
RequireLicenseAcceptance bool `xml:"requireLicenseAcceptance"`
|
||||
Summary string `xml:"summary"`
|
||||
Tags string `xml:"tags"`
|
||||
Title string `xml:"title"`
|
||||
|
||||
@ -204,6 +206,7 @@ func ParseNuspecMetaData(archive *zip.Reader, r io.Reader) (*Package, error) {
|
||||
ReleaseNotes: p.Metadata.ReleaseNotes,
|
||||
RepositoryURL: p.Metadata.Repository.URL,
|
||||
RequireLicenseAcceptance: p.Metadata.RequireLicenseAcceptance,
|
||||
Summary: p.Metadata.Summary,
|
||||
Tags: p.Metadata.Tags,
|
||||
Title: p.Metadata.Title,
|
||||
|
||||
|
Reference in New Issue
Block a user