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

Question how to specify []string type in formData. #276

Open
Zrealshadow opened this issue Jul 19, 2023 · 1 comment
Open

Question how to specify []string type in formData. #276

Zrealshadow opened this issue Jul 19, 2023 · 1 comment

Comments

@Zrealshadow
Copy link

I have this annotation

// @Param includeSections formData []string true "The ID of selected sections, empty for all sections"

and I execute swag init. It will raise error

2023/07/19 16:39:21 Generate swagger docs....
2023/07/19 16:39:21 Generate general API Info, search dir:./
2023/07/19 16:39:21 ParseComment error in file internal/routers/api/v1/ip_handler.go :string is not supported type for formData

If I move this param into query

// @Param includeSections query []string true "The ID of selected sections, empty for all sections"

It will be ok.

Can I have solution for it ?
I want to take it as a formData.

@sdghchj
Copy link
Member

sdghchj commented Aug 1, 2023

Try the latest swag.

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

2 participants