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 ignores package path if it starts with vendor #1880

Open
syed-shah-zepto opened this issue Sep 3, 2024 · 1 comment
Open

Swag ignores package path if it starts with vendor #1880

syed-shah-zepto opened this issue Sep 3, 2024 · 1 comment

Comments

@syed-shah-zepto
Copy link

Describe the bug
I was running swag in my package -> vendor-service. But due to a vendor prefix check, all the files are being ignored and swagger docs are not generated.

To Reproduce
Steps to reproduce the behavior:

  1. Create a package with starts with "vendor"
  2. Add an API and swagger annotation to that API
  3. Run swag init
  4. Check docs/swagger.json does not have the swagger documentation data

Expected behavior
Swagger documentation should get generated similar to packages that don't start with "vendor"

Your swag version
v1.16.3

Your go version
1.21.6

@syed-shah-zepto
Copy link
Author

As info.PackagePath will always have the prefix of the package where swag was run, do we need this check?
If we do can we restrict it to vendor/ paths?

Would be happy to raise a PR to get this fixed.

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

1 participant