goharbor / go-client

Client library with golang for accessing Harbor API.
Apache License 2.0
39 stars 18 forks source link

Vulnerability additions content type #11

Closed fnxpt closed 7 months ago

fnxpt commented 2 years ago

When call the vulnerabilities additions content type we receive a error message json: cannot unmarshal object into Go value of type string The api shows that the content type of this object is a string, but in fact it needs to be a structure.

ralgozino commented 2 years ago

Hi @fnxpt! Do you happen to know if there's any workaround to this issue while it gets fixed on harbor's side?

fnxpt commented 2 years ago

I don’t think it’s possible because swagger is saying that the output is a string and not a structure, this leads to a parsing error. The fix should come from the source of the swagger documentation

Sent from my iPhone

On 16 Dec 2021, at 22:56, Ramiro Algozino @.***> wrote:

 Hi @fnxpt! Do you happen to know if there's any workaround to this issue while it gets fixed on harbor's side?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

ralgozino commented 2 years ago

thank you for the quick answer @fnxpt 🙏

fnxpt commented 2 years ago

Added a PR to add the missing schema, already tested against a fork and it works correctly, we just need to regenerate the client as soon as we have the PR merged