Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Documentation differs from Implementation for /packageManifests/{id} return codes (204 or 404)

Aperta
#170 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

Issue-Docs
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:

https://github.com/microsoft/winget-cli-restsource/blob/main/src/WinGet.RestSource/Helpers/RestSourceTriggerFunctions.cs#L63

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/winget-cli-restsource

Tutte le issue di microsoft/winget-cli-restsource

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.