-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
v1.8.10 : Operations parsing in dependencies #1451
Comments
I have the same problem here, as all my operations are defined in another modules that are inside my project monorepo |
@sdghchj we really appreciate your work, swaggo has done a great job for our swagger specs. Is there any chance to |
Hi,everyone,sorry to have made this trouble to you。But it may not be a breakup,just to change you swag cmd to fix, as swag has a cmd line flag -d to set multiple directories separated by comma. |
it is suggested that if you want to parse apis in some external packges,just explicitly include them with flag -d |
The problem here is that it seems like a major breaking change to stop including operations in dependencies, and this was included in a revision release. Very confusing for anyone just casually updating their dependencies. |
Seems like with the change here the --pd is not working anymore, assume it would if you vendor the dependencies and include the vendor path in the -d but not if you are not vendoring. |
Yes, tried here with new version and still have this same behavior, deleting all my swagger docs, but it works on version |
Is there any progress on this? Due to this behaviour I stuck on v1.8.9. |
Also stuck on v1.8.9. Very curious for the real reason this feature was removed. Especially since this was done in a patch release. Also it kinda seems like the maintiners are against adding it back? |
Describe the bug
With update 1.8.19 #1432, our swag generation goes empty, since all our operations are defined in sub-packages.
To Reproduce
cmd/api
with filesmain.go
(with gin router init and run) andswag.go
(withgo:generate
and swag comments`pkg/api/user
,pkg/api/todolist
, with gin handlers and swaggo comments.go generate ./...
Expected behavior
Generated docs should contains oeprations, but it does not.
Your swag version
v1.8.10
Your go version
go1.19.5 linux/amd64
Additional context
A solution proposal : add a cli flag that allows to revert #1432 behavior (keeps #1432 behavior by default).
The text was updated successfully, but these errors were encountered: