Skip to content

Commit 990fd40

Browse files
committed
Fix swift client escaping
1 parent c18e82f commit 990fd40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift/swift_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public struct {{ .Name }}: Codable, Hashable {
5757
{{- end }}
5858
init({{ range $index, $f := .Fields }}{{ .Name }}: {{ .Type }}{{ if .Optional }}? = nil{{ end }}{{ if (notLast $index $fieldsLen) }}, {{ end }}{{ end }}) {
5959
{{- range .Fields }}
60-
self.{{ .Name }} = {{ .Name }}
60+
self.{{ .Name }} = {{ if .NeedEscaping }}{{ .SafeName }}{{ else }}{{ .Name }}{{ end }}
6161
{{- end }}
6262
}
6363
}

0 commit comments

Comments
 (0)