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!
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 return200,404or 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
204here: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
404like the schema suggests when a packageIdentifier is not found or should it return204? I have noticed in testing that winget responds with a red error message when it gets a404(which I guess is fine / maybe intended?) but responds with a much more calm "no results found" message when it gets a204- 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!