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

need exclude some directories #640

Closed
LinkinStars opened this issue Mar 9, 2020 · 5 comments
Closed

need exclude some directories #640

LinkinStars opened this issue Mar 9, 2020 · 5 comments

Comments

@LinkinStars
Copy link

├── src
│   ├── a
│     └── api_a.go
│   ├── b
│     └── api_b.go

Sometimes I need exclude some dir when generate.
EX: swag init -exclude ./src/b
This can be very useful when I only want to export a part of apis. May be api_b.go is Internal API that can't expose to the third party.

@LinkinStars LinkinStars changed the title need exclude some dir need exclude some directories Mar 9, 2020
@sdghchj
Copy link
Member

sdghchj commented Mar 14, 2020

I have tried it.
"swag init --dir ./src/a" actually does work.

@comphilip
Copy link

@LinkinStars Are there models shared by both a and b outside a and b folder?

@LinkinStars
Copy link
Author

@comphilip a and b have their own models.

@LinkinStars
Copy link
Author

@sdghchj
If I have some directories c d f... I can't use "swag init --dir ./src/a ./src/c ./src/d" when I only need to exclude b directory. Usually, you know, all API is in the same level of directory.

@sdghchj
Copy link
Member

sdghchj commented Mar 16, 2020

@LinkinStars
我已经加了,还要等其他人review。如果急需,你可以去我fork的项目里拉下来编译。

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