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

cannot find type definition: multipart.FileHeader #802

Closed
lzw5399 opened this issue Oct 5, 2020 · 2 comments
Closed

cannot find type definition: multipart.FileHeader #802

lzw5399 opened this issue Oct 5, 2020 · 2 comments

Comments

@lzw5399
Copy link

lzw5399 commented Oct 5, 2020

Describe the bug
When I include the *multipart.FileHeader typed field in the custom struct and annotate the swag as the following screenshots, swag init will return the error msg

To Reproduce
Steps to reproduce the behavior:

  1. run go get github.com/swaggo/swag/cmd/swag@80b6894b047bd06e970efa3e6dee1c3818811f4d in order to support the object for formdata ref: Support objects for formData #300
  2. define custom struct as below screenshot
  3. define the swag annotations as below screenshot
  4. run swag init
  5. saw the error

Expected behavior
swag init should executed successfully

Screenshots

Your swag version
v1.6.8-0.20200921161410-33e4ac3219fa

Your go version
1.15.2

Desktop (please complete the following information):

  • OS: WIN 10
@lzw5399
Copy link
Author

lzw5399 commented Sep 1, 2021

Although it may be a bit late, but I will share my workaround(may not the best practice)

  • add swaggerignore tag for *multipart.FileHeader
  • add swag comment to request struct and *multipart.FileHeader separately

image

image

@jeefs
Copy link

jeefs commented Jul 13, 2022

thx,is't worked

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