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

error calling slice: list should be type of slice or array but string #3087

Open
lm-madhvi opened this issue Mar 13, 2024 · 5 comments
Open

Comments

@lm-madhvi
Copy link

While generating schema using swagger version [v0.30.5] it is giving the following error:
template execution failed for template schemata: template: schemata.gtpl:384:74: executing "schemata.gtpl" at <slice .GoType 3>: error calling slice: list should be type of slice or array but string.

It is working as expected with the lower versions. (v0.29.0)

@fredbi
Copy link
Contributor

fredbi commented Mar 14, 2024

@lm-madhvi hello. Thanks for reporting this.

Could you please add some details (like a swagger spec and command line that produced that problem)?
I'd like to be able to reproduce your issue.

@lm-madhvi
Copy link
Author

Hi @fredbi ,
I am getting this error while executing make command to build the terraform provider.

@fredbi
Copy link
Contributor

fredbi commented Mar 14, 2024

@lm-madhvi this doesn't help much: I am unaware of this.
We do not release any terraform provider.
Our repo doesn't contain any file named schemata.gtpl

@lm-madhvi
Copy link
Author

@fredbi we are using go-swagger to generate code from the swagger specification , and we are facing this error with the latest version of go-swagger , when we are downgrading version to v0.29.0 , It works.

@fredbi
Copy link
Contributor

fredbi commented Mar 14, 2024

@lm-madhvi ok I get the use case. Any issue with attaching your spec to this issue, so reproducing the behavior is straightforward?

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

No branches or pull requests

2 participants