Improve NuGet API Parity (#21291)#34940
Merged
Merged
Conversation
… bring the Gitea NuGet api more in-line with GitHub's NuGet API. This allows fixes go-gitea#21291, allowing icons to appear for NuGet packages from inside Visual Studio.
Contributor
|
Can we have some tests? Existing tests are in |
Contributor
Author
|
Alright, let me look into updating the tests. |
… the API requests.
Contributor
Author
|
I have updated the tests to check for the additional values present in the API response. |
lunny
approved these changes
Jul 7, 2025
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jul 9, 2025
* giteaofficial/main: Refactor mail template and support preview (go-gitea#34990) [skip ci] Updated translations via Crowdin Fix bug when displaying git user avatar in commits list (go-gitea#35003) Tweak placement of diff file menu (go-gitea#34999) Start automerge check again after the conflict check and the schedule (go-gitea#34989) Refactor time tracker UI (go-gitea#34983) [skip ci] Updated translations via Crowdin Improve NuGet API Parity (go-gitea#21291) (go-gitea#34940)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.copyrighticonUrlisPrereleaselanguagelicenseUrlsummarytagsdependencyGroupstotalDownloadsReferences
Octopus Samples - Examples of NuGet packages being pushed to GitHub.
When querying for packages, Visual Studio makes a request to a route like this one:
https://nuget.pkg.github.com/OctopusSamples/OctopusSamples.accept-message/index.json
Gitea was missing the properties that GitHub responds with.

Both Gitea and Github should now look like the following with the attached package, for example. (Rename it to .nupkg)
It should be noted that GitHub also has a boolean property called
verified, but this is not part of the NuGet specification.Please let me know if anything else should be changed.