File tree Expand file tree Collapse file tree 3 files changed +48
-4
lines changed
modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-ktor
kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/apis
kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/apis Expand file tree Collapse file tree 3 files changed +48
-4
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,58 @@ import com.fasterxml.jackson.databind.ObjectMapper
51
51
{ {#isMultipart} }
52
52
formData {
53
53
{{#formParams} }
54
+ { {#isFile} }
54
55
{ {{paramName} }}?.apply { append(" {{{baseName}}}" , {{{paramName} }}) }
56
+ { {/isFile} }
57
+ { {^isFile} }
58
+ { {^isArray} }
59
+ { {^isString} }
60
+ { {^isNumber} }
61
+ { {{paramName} }}?.apply { append(" {{{baseName}}}" , {{{paramName} }}.toString()) }
62
+ { {/isNumber} }
63
+ { {#isNumber} }
64
+ { {{paramName} }}?.apply { append(" {{{baseName}}}" , {{{paramName} }}) }
65
+ { {/isNumber} }
66
+ { {/isString} }
67
+ { {#isString} }
68
+ { {{paramName} }}?.apply { append(" {{{baseName}}}" , {{{paramName} }}) }
69
+ { {/isString} }
70
+ { {/isArray} }
71
+ { {#isArray} }
72
+ for (int i=0; i < { {paramName} }.size(); i++) {
73
+ {{{paramName} }}?.apply { append(" {{{baseName}}}" , {{{paramName} }}.get(i).toString()) }
74
+ }
75
+ { {/isArray} }
76
+ { {/isFile} }
55
77
{ {/formParams} }
56
78
}
57
79
{ {/isMultipart} }
58
80
{ {^isMultipart} }
59
81
ParametersBuilder().also {
60
82
{{#formParams} }
83
+ { {#isFile} }
84
+ { {{paramName} }}?.apply { it.append(" {{{baseName}}}" , {{{paramName} }}) }
85
+ { {/isFile} }
86
+ { {^isFile} }
87
+ { {^isArray} }
88
+ { {^isString} }
89
+ { {^isNumber} }
61
90
{ {{paramName} }}?.apply { it.append(" {{{baseName}}}" , {{{paramName} }}.toString()) }
91
+ { {/isNumber} }
92
+ { {#isNumber} }
93
+ { {{paramName} }}?.apply { it.append(" {{{baseName}}}" , {{{paramName} }}) }
94
+ { {/isNumber} }
95
+ { {/isString} }
96
+ { {#isString} }
97
+ { {{paramName} }}?.apply { it.append(" {{{baseName}}}" , {{{paramName} }}) }
98
+ { {/isString} }
99
+ { {/isArray} }
100
+ { {#isArray} }
101
+ for (int i=0; i < { {paramName} }.size(); i++) {
102
+ {{{paramName} }}?.apply { it.append(" {{{baseName}}}" , {{{paramName} }}.get(i).toString()) }
103
+ }
104
+ { {/isArray} }
105
+ { {/isFile} }
62
106
{ {/formParams} }
63
107
}.build()
64
108
{ {/isMultipart} }
Original file line number Diff line number Diff line change @@ -245,8 +245,8 @@ import java.text.DateFormat
245
245
246
246
val localVariableBody =
247
247
ParametersBuilder ().also {
248
- name?.apply { it.append(" name" , name.toString() ) }
249
- status?.apply { it.append(" status" , status.toString() ) }
248
+ name?.apply { it.append(" name" , name) }
249
+ status?.apply { it.append(" status" , status) }
250
250
}.build()
251
251
252
252
val localVariableQuery = mutableMapOf<String , List <String >>()
Original file line number Diff line number Diff line change @@ -243,8 +243,8 @@ import com.fasterxml.jackson.databind.ObjectMapper
243
243
244
244
val localVariableBody =
245
245
ParametersBuilder ().also {
246
- name?.apply { it.append(" name" , name.toString() ) }
247
- status?.apply { it.append(" status" , status.toString() ) }
246
+ name?.apply { it.append(" name" , name) }
247
+ status?.apply { it.append(" status" , status) }
248
248
}.build()
249
249
250
250
val localVariableQuery = mutableMapOf<String , List <String >>()
You can’t perform that action at this time.
0 commit comments