@goast/kotlin 0.4.21 → 0.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -213,7 +213,7 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
213
213
|
${appendValueGroup(queryParameters.map((param) => {
|
|
214
214
|
const paramName = toCasing(param.name, ctx.config.parameterNameCasing);
|
|
215
215
|
const toString = this.getParameterToString(ctx, { endpoint, parameter: param });
|
|
216
|
-
const put = s `put(${kt.string(
|
|
216
|
+
const put = s `put(${kt.string(param.name)}, listOf(${paramName}${toString}))`;
|
|
217
217
|
return param.required ? put : s `if (${paramName} != null) {${s.indent `
|
|
218
218
|
${put}`}
|
|
219
219
|
}`;
|
package/package.json
CHANGED
|
@@ -217,7 +217,7 @@ class DefaultKotlinOkHttp3Generator extends file_generator_js_1.KotlinFileGenera
|
|
|
217
217
|
${(0, core_1.appendValueGroup)(queryParameters.map((param) => {
|
|
218
218
|
const paramName = (0, core_1.toCasing)(param.name, ctx.config.parameterNameCasing);
|
|
219
219
|
const toString = this.getParameterToString(ctx, { endpoint, parameter: param });
|
|
220
|
-
const put = (0, core_1.builderTemplate) `put(${index_js_1.kt.string(
|
|
220
|
+
const put = (0, core_1.builderTemplate) `put(${index_js_1.kt.string(param.name)}, listOf(${paramName}${toString}))`;
|
|
221
221
|
return param.required ? put : (0, core_1.builderTemplate) `if (${paramName} != null) {${core_1.builderTemplate.indent `
|
|
222
222
|
${put}`}
|
|
223
223
|
}`;
|
|
@@ -349,7 +349,7 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator<Context,
|
|
|
349
349
|
queryParameters.map((param) => {
|
|
350
350
|
const paramName = toCasing(param.name, ctx.config.parameterNameCasing);
|
|
351
351
|
const toString = this.getParameterToString(ctx, { endpoint, parameter: param });
|
|
352
|
-
const put = s<Builder>`put(${kt.string(
|
|
352
|
+
const put = s<Builder>`put(${kt.string(param.name)}, listOf(${paramName}${toString}))`;
|
|
353
353
|
return param.required ? put : s<Builder>`if (${paramName} != null) {${s.indent`
|
|
354
354
|
${put}`}
|
|
355
355
|
}`;
|