Documentation differs from Implementation for /packageManifests/{id} return codes (204 or 404)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- api, documentation
Research direction
Read documentation/WinGet-1.1.0.yaml and documentation/WinGet-1.4.0.yaml at the packageManifests route, then compare them with the 204 handling in src/WinGet.RestSource/Helpers/RestSourceTriggerFunctions.cs. Confirm which status code is intended for a missing package and align the schema and reference implementation so their behavior and documentation agree.
Written by the indexing model from the issue text.
Description
Brief description of your issue
Hi,
according to both the 1.1.0 and 1.4.0 REST API schema, the /packageManifests/{PackageIdentifier} route is only supposed to return 200, 404 or another error:
https://github.com/microsoft/winget-cli-restsource/blob/main/documentation/WinGet-1.1.0.yaml#L506-L522
https://github.com/microsoft/winget-cli-restsource/blob/main/documentation/WinGet-1.4.0.yaml#L506-L522
However, the reference implementation also explicitly tests for the undocumented 204 here:
which raises the question - should a REST source return 404 like the schema suggests when a packageIdentifier is not found or should it return 204? I have noticed in testing that winget responds with a red error message when it gets a 404 (which I guess is fine / maybe intended?) but responds with a much more calm "no results found" message when it gets a 204 - so the client seems to handle the undocumented 204 more gracefully, further hinting that that's maybe the intended return code and the schema docs are wrong?
Thanks!
- Dominant language
- C#
- Stars
- 317
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/winget-cli-restsource
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Issue-Feature
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Font Support OpenIssue-Feature
microsoft/winget-cli-restsource#310 · 1 comment · 1 assignee ·
-
Issue-Bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoft/winget-cli-restsource#309 · 2 comments ·
All issues in microsoft/winget-cli-restsource
Similar issues
-
core dependencies
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
bug frontend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Down / Waiting for removal
Difficulty 2/5 1-3 hours Newbie friendliness 70/100