Selaa lähdekoodia

fix(goctl): kotlin code generation (#1632)

Signed-off-by: Ziyi Zhang <soasurs@gmail.com>
Ziyi Zhang 3 vuotta sitten
vanhempi
sitoutus
209ffb934b
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      tools/goctl/api/ktgen/gen.go

+ 1 - 1
tools/goctl/api/ktgen/gen.go

@@ -80,7 +80,7 @@ import com.google.gson.Gson
 object {{with .Info}}{{.Title}}{{end}}{
 	{{range .Types}}
 	data class {{.Name}}({{$length := (len .Members)}}{{range $i,$item := .Members}}
-		val {{with $item}}{{lowCamelCase .Name}}: {{parseType .Type}}{{end}}{{if ne $i (add $length -1)}},{{end}}{{end}}
+		val {{with $item}}{{lowCamelCase .Name}}: {{parseType .Type.Name}}{{end}}{{if ne $i (add $length -1)}},{{end}}{{end}}
 	){{end}}
 	{{with .Service}}
 	{{range .Routes}}suspend fun {{routeToFuncName .Method .Path}}({{with .RequestType}}{{if ne .Name ""}}