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

Swag init can't parse struct but no error message #657

Closed
fivemeepo opened this issue Mar 31, 2020 · 1 comment · Fixed by #655
Closed

Swag init can't parse struct but no error message #657

fivemeepo opened this issue Mar 31, 2020 · 1 comment · Fixed by #655

Comments

@fivemeepo
Copy link

Describe the bug

type Example struct {
   Status         uint32 `json:"status" example:"true"`
}

swag init can't parse this struct, but it prints success.

To Reproduce

  1. install swag 1.6.5
export GO111MODULE=off
go get -d -u github.com/swaggo/swag/cmd/swag
cd "$(go env GOPATH)"/src/github.com/swaggo/swag
make
cp swag "$(go env GOPATH)"/bin/
  1. swag init
  2. Check docs/docs.go

Expected behavior
I expect to see some error message when I run swag init

Screenshots

Your swag version
1.6.5

Your go version
1.13.4

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: chrome
  • Version: 10.14.3

Additional context
The reason is in my struct, the type of the field status is uint32, but I use a wrong example true which caused that issue.

@sdghchj
Copy link
Member

sdghchj commented Mar 31, 2020

will report error next PR

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

Successfully merging a pull request may close this issue.

2 participants