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
Global type override in .swaggo file not working #1131
Comments
Hi, this is a quite new feature and for sure it's not perfect. This is also an open-source project and everything was realized with the community contribution. |
It works in |
@bmpotter how did it work for you? I get
when I have |
Describe the bug
First, thank you for this excellent swaggo project! It is a great productivity enhancement.
The
replace
statement in.swaggo
does not seem to be honored for an external type. I can successfully useswaggertype
for every use of that external type in all of my structs, but i want to be able to define the alternate type once in the.swaggo
file instead.To Reproduce
Use this
main.go
file:And use this
.swaggo
file:Then run
$GOPATH/bin/swag init
and you'll get this output:Expected behavior
It should run without error, and in the generated
docs/swagger.*
files it should define thelabels
field as a string array.Your swag version
The same problem occurs in both:
v1.7.8
v1.7.9-p1
Your go version
1.17.5
Desktop:
MacOS Big Sur 11.6
The text was updated successfully, but these errors were encountered: