Daniel15 / simple-nuget-server

A very simple PHP NuGet server
MIT License
116 stars 43 forks source link

Make it compatible with Chocolatey #42

Open KoltesDigital opened 3 years ago

KoltesDigital commented 3 years ago

I've tried to use this project for hosting Chocolatey packages. It's almost good, but some requests were failing due to complex filters that are not handled yet. Specifically, choco info package-name leads to the following request:

GET /Packages()?$filter=(tolower(Id) eq 'package-name') and IsLatestVersion

Although this filter could have been parsed with a regex, I preferred to generate a parser, so that it could easily be enhanced later if needed. The generator is to be found here (PR adds mention in the README).

With this PR, the above request is successfully parsed and the response is as expected.