We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
--instanceName
Describe the bug A clear and concise description of what the bug is.
When swag init is executed with --instanceName, it generates invalid variable and compile error is raised
swag init
To Reproduce
Steps to reproduce the behavior:
swag init --instanceName foo
example/basic/
Expected behavior
swag generates variable SwaggerInfo_foo .
SwaggerInfo_foo
Screenshots If applicable, add screenshots to help explain your problem.
Complie error is raised because SwaggerInfo variable is split into 2 tokens as below
// SwaggerInfo_foo holds exported Swagger Info so clients can modify it var SwaggerInfo _foo = &swag.Spec{ Version: "1.0", Host: "petstore.swagger.io", BasePath: "/v2", Schemes: []string{}, Title: "Swagger Example API", Description: "This is a sample server Petstore server.", InfoInstanceName: "foo", SwaggerTemplate: docTemplate_foo, }
Your swag version e.g. v1.7.9-p1
Your go version e.g. 1.17.6
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
fix: swaggerinfo template for instanceNames (swaggo#1133)
c354d8b
9b56776
fix: swaggerinfo template for instanceNames (#1133) (#1134)
1a0a57a
I believe this can be closed since it was released with v1.8.0.
Sorry, something went wrong.
I tried swag init --instanceName foo in v1.8.0 and it generates a valid variable var SwaggerInfofoo. Thank you so much!
var SwaggerInfofoo
No branches or pull requests
Describe the bug
A clear and concise description of what the bug is.
When
swag init
is executed with--instanceName
, it generates invalid variable and compile error is raisedTo Reproduce
Steps to reproduce the behavior:
swag init --instanceName foo
in sample projectexample/basic/
Expected behavior
swag generates variable
SwaggerInfo_foo
.Screenshots
If applicable, add screenshots to help explain your problem.
Complie error is raised because SwaggerInfo variable is split into 2 tokens as below
Your swag version
e.g. v1.7.9-p1
Your go version
e.g. 1.17.6
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: