Thank you very much for this tool!
Here is a small easy to fix issue
v1.12.4 and master
result into code
c.Set(JWTScopes, []string{""})
instead of
c.Set(JWTScopes, []string{})
The fix is trivial
diff --git a/pkg/codegen/template_helpers.go b/pkg/codegen/template_helpers.go
index 7585a26..16671fb 100644
--- a/pkg/codegen/template_helpers.go
+++ b/pkg/codegen/template_helpers.go
@@ -263,7 +263,11 @@ func getConditionOfResponseName(statusCodeVar, responseName string) string {
// This outputs a string array
func toStringArray(sarr []string) string {
- return `[]string{"` + strings.Join(sarr, `","`) + `"}`
+ s := strings.Join(sarr, `","`)
+ if len(s) > 0 {
+ s = `"` + s + `"`
+ }
+ return `[]string{` + s + `}`
}
func stripNewLines(s string) string {
Thank you very much for this tool!
Here is a small easy to fix issue
v1.12.4 and master
result into code
instead of
The fix is trivial