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

Document deprecation and vulnerabilities on V3 search API docs #10270

Open
KirillOsenkov opened this issue Nov 15, 2024 · 4 comments
Open

Document deprecation and vulnerabilities on V3 search API docs #10270

KirillOsenkov opened this issue Nov 15, 2024 · 4 comments

Comments

@KirillOsenkov
Copy link

As an example, if a package is deprecated, automatically add "deprecated" to the tag collection.

@khalidabuhakmeh
Copy link
Contributor

I suggested this solution as it could work in the existing specification without altering the return structure of data. It's a stop-gap measure/solution.

https://learn.microsoft.com/en-us/nuget/api/search-query-service-resource#search-result

@nkolev92 nkolev92 transferred this issue from NuGet/Home Nov 15, 2024
@joelverhagen
Copy link
Member

Deprecated and vulnerable are available on the NuGet.org search service:

[JsonPropertyName("deprecation")]
public V3SearchDeprecation Deprecation { get; set; }
[JsonPropertyName("vulnerabilities")]
public List<V3SearchVulnerability> Vulnerabilities { get; set; }

Strangely, this was never documented! I believe we were waiting for client to integrate with it before documenting it (to catch integration issues) but that's done... for a long time....

This one shows deprecated:
https://azuresearch-usnc.nuget.org/query?q=packageid:windowsazure.storage

This one shows deprecated + vulnerable:
https://azuresearch-usnc.nuget.org/query?q=packageid:BouncyCastle

@KirillOsenkov / @khalidabuhakmeh would it be fair to say this issue about deprecation specifically? Or is there other metadata in mind?

@khalidabuhakmeh
Copy link
Contributor

Deprecation was the main use case I was thinking about but perhaps information like "prerelease" as well.

Although, those two elements you point to are a great addition. Thank you.

@joelverhagen
Copy link
Member

I will update this issue to be "document deprecation and vulnerabilities properties in V3 search API", since I believe that is what is missing here.

Filling the tags property with deprecation or vulnerable info is not an ideal solution because the data model of tags is not rich enough to give the full story (e.g. alternate ID for deprecation or vulnerability severity), with some custom string encoding. Please let me know if you disagree.

@joelverhagen joelverhagen changed the title More metadata in package tags on the search endpoint Document deprecation and vulnerabilities on V3 search API docs Nov 19, 2024
@joelverhagen joelverhagen added this to the Sprint 2024-12 milestone Nov 19, 2024
@advay26 advay26 self-assigned this Nov 20, 2024
@advay26 advay26 modified the milestones: Sprint 2024-12, Backlog Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants