Documentation differs from Implementation for /packageManifests/{id} return codes (204 or 404)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- csharp
- Ambito
- api, documentation
Direzione di ricerca
Leggi documentation/WinGet-1.1.0.yaml e documentation/WinGet-1.4.0.yaml nella route packageManifests, quindi confrontali con la gestione di 204 in src/WinGet.RestSource/Helpers/RestSourceTriggerFunctions.cs. Conferma quale codice di stato è previsto per un pacchetto mancante e allinea lo schema e l’implementazione di riferimento in modo che il loro comportamento e la loro documentazione siano coerenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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!
- Lingua principale
- C#
- Stelle
- 317
- Fork
- 79
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/winget-cli-restsource
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Issue-Feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Font Support ApertaIssue-Feature
microsoft/winget-cli-restsource#310 · 1 commento · 1 assegnatario ·
-
Issue Deploying in GCC-H ApertaIssue-Bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
microsoft/winget-cli-restsource#309 · 2 commenti ·
Tutte le issue di microsoft/winget-cli-restsource
Issue simili
-
core dependencies
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
-
bug frontend good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Down / Waiting for removal
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100