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

swaggerignore:"true" not work #652

Closed
Xiaocge opened this issue Mar 27, 2020 · 7 comments
Closed

swaggerignore:"true" not work #652

Xiaocge opened this issue Mar 27, 2020 · 7 comments

Comments

@Xiaocge
Copy link

Xiaocge commented Mar 27, 2020

Describe the bug
add swaggerignore true to sruct field, not work

To Reproduce
Steps to reproduce the behavior:
my code

type Shop struct {
	app.Entity `bson:",inline"`
    // this is name
	Name string `bson:"name" json:"name,omitempty" swaggerignore:"true" form:"name" validate:"required,min=6,max=20"`
	// this is mobile
	Mobile  string `bson:"mobile" json:"mobile,omitempty" form:"mobile" validate:"required,min=6"`
}

swag init

Expected behavior
I expect the name not to show
Screenshots
image

Your swag version
swag version v1.6.5 and master

Your go version
go version go1.14 windows/amd64

Additional context
#632

Hope to help me

@sdghchj
Copy link
Member

sdghchj commented Mar 27, 2020

Master is ok.
You can pull and debug it.

@Hades300
Copy link

Hades300 commented Mar 28, 2020

I came across the same problem.When I struggle with the latest release I found #632 ,Then I tried
go get -u github.com/swaggo/swag@master But the issue was still threre .
6D9566F2-99D6-47F5-A956-4D44ED313836
using eample in the README
Snipaste_2020-03-27_19-55-39
annotation for a handler
2DF94914-9071-4C14-90B5-D4DAEF1F26C0
And the output
D5E8E74E-6B82-4BBE-AA3A-4F89AB466BFB
go version go1.13.3 darwin/amd64 here

@sdghchj
Copy link
Member

sdghchj commented Mar 28, 2020

@Hades300 I think you have to read usage in README.md.
Use the pre-built binary to run "swag init" to reproduce docs.

@Hades300
Copy link

@sdghchj Works perfectly , thank you 🐳

@Xiaocge
Copy link
Author

Xiaocge commented Mar 28, 2020

@sdghchj When will it be release?

@sdghchj
Copy link
Member

sdghchj commented Mar 28, 2020

@im-zhangxi Wait until #651 fixed.

@Xiaocge
Copy link
Author

Xiaocge commented Mar 28, 2020

Looking forward to it. Thank you.

@Xiaocge Xiaocge closed this as completed Mar 28, 2020
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

3 participants