Request any package metadata from the upstream mirror through BaGetter
Expected behavior
The implementation should be able to pass both variations
PR
If you want I can contribute a fix PR for this with something like https://stackoverflow.com/a/59430729/2444047
Edit: i see you already have exactly this converter, just tested and adding the converter attribute fixes it
Describe the bug
BaGetter fails to parse an upstream
RegistrationsBaseUrl
request.According to the documentation NugetV3 allows for the
tags
ofPackageMetadata
/CatalogEntry to be either astring
orstring[]
:https://learn.microsoft.com/en-us/nuget/api/registration-base-url-resource#catalog-entry
And it seems like Github Packages is one of the few implementations that uses this possibility since when requesting i get:
(details anonymized and shortened)
Since the current implementation only handles
string[]
https://github.com/bagetter/BaGetter/blob/f2447c4901355867df7f23c778f36db97f5c736f/src/BaGetter.Protocol/Models/PackageMetadata.cs#L116-L120BaGetter will fail with
To Reproduce
Steps to reproduce the behavior:
f2447c4
httpClient.DefaultRequestHeaders.Authorization = new("Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes($"Username:PAT")));
Expected behavior
The implementation should be able to pass both variations
PR
If you want I can contribute a fix PR for this with something like https://stackoverflow.com/a/59430729/2444047Edit: i see you already have exactly this converter, just tested and adding the converter attribute fixes it