You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In mac, when I execute swag init, it generates docs/docs.go as it should.
I can also define in the runtime the host as described in the guideline
For example: docs.SwaggerInfo.Host = "petstore.swagger.io"
However, when I tried it in windows 10, it generates a different variable name, which is SwaggerInfo_swagger in docs/docs.go.
As a consequence, I have to update my runtime code to something like docs.SwaggerInfo_swagger.Host = "petstore.swagger.io"
To Reproduce
Steps to reproduce the behavior:
Use Windows 10 OS
Go to your Golang project that has Swaggo installed
Execute swag init
Try to set the host during run time (docs.SwaggerInfo.Host="petstore.swagger.io")
It will complain that it cannot find SwaggerInfo, where in Mac environment, it works just fine.
Then, you have to fix the one in windows by changing it to SwaggerInfo_swagger
Expected behavior
When generating in Windows 10, the variable name should be SwaggerInfo instead of SwaggerInfo_swagger.
This difference makes working in a team where we have different PCs (Windows and Mac) a bit more tricky since every time one of us generates the spec, we have to also update the runtime code.
Screenshots
In Mac, where it works perfect
In Windows 10, where it somehow adds this _swagger
Your swag version
v1.7.9
Your go version
1.17
Desktop (please complete the following information):
OS: Windows 10
Browser: irrelevant
Version: irrelevant
The text was updated successfully, but these errors were encountered:
Describe the bug
In mac, when I execute
swag init
, it generates docs/docs.go as it should.I can also define in the runtime the host as described in the guideline
For example:
docs.SwaggerInfo.Host = "petstore.swagger.io"
However, when I tried it in windows 10, it generates a different variable name, which is
SwaggerInfo_swagger
in docs/docs.go.As a consequence, I have to update my runtime code to something like
docs.SwaggerInfo_swagger.Host = "petstore.swagger.io"
To Reproduce
Steps to reproduce the behavior:
swag init
docs.SwaggerInfo.Host="petstore.swagger.io"
)SwaggerInfo
, where in Mac environment, it works just fine.SwaggerInfo_swagger
Expected behavior
When generating in Windows 10, the variable name should be
SwaggerInfo
instead ofSwaggerInfo_swagger
.This difference makes working in a team where we have different PCs (Windows and Mac) a bit more tricky since every time one of us generates the spec, we have to also update the runtime code.
Screenshots
In Mac, where it works perfect
In Windows 10, where it somehow adds this
_swagger
Your swag version
v1.7.9
Your go version
1.17
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: