BaGet icon indicating copy to clipboard operation
BaGet copied to clipboard

[WIP] Added support for acting like a Chocolatey server.

Open alexanderfast opened this issue 6 years ago • 3 comments

What does this PR do?

Support for Chocolatey. This includes rudimentary support for api v2 and OData. Lifted a lot of the core logic from https://github.com/ai-traders/BaGet. Created Legacy namespace and tried to keep everything contained, would prefer if Choco added nuget api v3 support.

Closes Issue(s)

#43

At least partially, OData queries can be very expressive, I dont know to what extent old nuget clients use it.

Motivation

Need it, and want to reuse the same server software between nuget and choco.

Additional Notes

Would like some help in structuring this in a better way, support for api v2 got added but code became more complex. Not sure if its worth the cost. But the lack of support turned out to be a deal breaker for us.

alexanderfast avatar Dec 13 '18 16:12 alexanderfast

Should have looked more before I started, this is the class I should have mimicked:

https://github.com/NuGet/NuGet.Server/blob/master/src/NuGet.Server.V2/Controllers/NuGetODataController.cs

While porting it to dotnet core is probably non-trivial, it should at least show proper mapping of the urls.

alexanderfast avatar Dec 13 '18 21:12 alexanderfast

@loic-sharma Is there anything holding you back from merging this in it's current state? Just like @Mizipzor I want to use BaGet for Chocolatey as well (besides being our actual NuGet package source) and I think it would be easier to expose V2 api in BaGet than waiting for Chocolatey V3 support.

I'd also love to hear if you're not looking forward to adding V2 support at all. Then it would perhaps be better to create a separate (as in, not tied to BaGet in any way) V2 proxy just to enable Chocolatey access to BaGet.

mycroes avatar Jul 12 '19 06:07 mycroes

Hi @loic-sharma, Is there anything prevent you merge this feature?

VOM7HC avatar Aug 20 '19 07:08 VOM7HC