Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing Artifacts and Repositories returns a swagger error #18

Open
alireza-mht opened this issue Jul 28, 2023 · 5 comments
Open

Listing Artifacts and Repositories returns a swagger error #18

alireza-mht opened this issue Jul 28, 2023 · 5 comments

Comments

@alireza-mht
Copy link

alireza-mht commented Jul 28, 2023

I'm using the below code to get the list of Repositories from harbor:

c := &harbor.ClientSetConfig{
               URL:      h.url,
		Password: h.password,
		Username: h.username,
		Insecure: true,
	}
cs, err := harbor.NewClientSet(c)
if err != nil {
	return "", err
}
v2Client := cs.V2()
_, err := v2Client.Repository.ListRepositories(context.TODO(), repository.NewListRepositoriesParams().WithProjectName(h.projectName))
if err != nil {
		fmt.Println(err)
}

And I get the below error:

&[] (*[]*models.Repository) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface

Expected result:
Should get the exact REST API error code

golang version: 1.20 linux/amd64

@shenshouer
Copy link

I met the same issue, How to do with it?

@Vad1mo
Copy link
Member

Vad1mo commented Jan 25, 2024

do you still see that issue?

@Piwriw
Copy link

Piwriw commented Mar 8, 2024

I met the same issue, How to do with it?

@Vad1mo
Copy link
Member

Vad1mo commented Mar 8, 2024

are you using the latest version of the library?

@Piwriw
Copy link

Piwriw commented Mar 8, 2024

are you using the latest version of the library?

yes,the version is v0.210.0, and Go version is 1.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants