Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet v3 Query api take maximum value or 1000 #23191

Closed
m2nlight opened this issue Feb 28, 2023 · 2 comments · Fixed by #25613
Closed

NuGet v3 Query api take maximum value or 1000 #23191

m2nlight opened this issue Feb 28, 2023 · 2 comments · Fixed by #25613
Labels
topic/packages type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@m2nlight
Copy link

Feature Description

NuGet UI Manager of VS2022 only get latest few version list from gitea api returns 10 items.

The api not support MAX_RESPONSE_ITEMS and DEFAULT_PAGING_NUM.

see: https://learn.microsoft.com/en-us/nuget/api/search-query-service-resource?source=recommendations

The skip parameter defaults to 0.
The take parameter should be an integer greater than zero. The server implementation may impose a maximum value.
Note
nuget.org limits the skip parameter to 3,000 and the take parameter to 1,000.

Screenshots

No response

@m2nlight m2nlight added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Feb 28, 2023
@KN4CK3R
Copy link
Member

KN4CK3R commented Feb 28, 2023

If there are no skip/task parameters present, the api uses DEFAULT_PAGING_NUM and MAX_RESPONSE_ITEMS.
What request does the NuGetUI Manager perform?

@m2nlight
Copy link
Author

m2nlight commented Mar 7, 2023

This screenshot is capture vs2022 nuget manager request api

'''
https://192.168.xxx.xx/api/packages/shuzi/nuget/query?q=&skip=0&take=26&prerelease=true&supportedFramework=net6.0-windows7.0&supportedFramework=.NETFramework,Version=v4.6.1&supportedFramework=.NETFramework,Version=v4.0&supportedFramework=net6.0&semVerLevel=2.0.0
'''

25A33E4E-E764-46CD-A8C6-DD8535510D3F

Actual

  1. Query api always returns 10 items.
  2. Each item has 3 version.

Expect

  1. Take number or more items
  2. All versions

techknowlogick pushed a commit that referenced this issue Aug 14, 2023
Fixes #25564
Fixes #23191

- Api v2 search endpoint should return only the latest version matching
the query
- Api v3 search endpoint should return `take` packages not package
versions
KN4CK3R added a commit to KN4CK3R/gitea that referenced this issue Aug 14, 2023
Fixes go-gitea#25564
Fixes go-gitea#23191

- Api v2 search endpoint should return only the latest version matching
the query
- Api v3 search endpoint should return `take` packages not package
versions
KN4CK3R added a commit that referenced this issue Aug 16, 2023
Backport of #25613

Fixes #25564
Fixes #23191

- Api v2 search endpoint should return only the latest version matching
the query
- Api v3 search endpoint should return `take` packages not package
versions
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/packages type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants