@goast/kotlin 0.4.12-beta1 → 0.4.12-beta2
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.
|
@@ -99,7 +99,7 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
99
99
|
getEndpointClientMethodBody(ctx, args) {
|
|
100
100
|
const { endpoint, parameters, responseSchema } = args;
|
|
101
101
|
return appendValueGroup([
|
|
102
|
-
s `val localVarResponse = ${kt.call([toCasing(endpoint.name + '_WithHttpInfo', ctx.config.functionNameCasing)], parameters.map((x) => x.name))}`,
|
|
102
|
+
s `val localVarResponse = ${kt.call([toCasing(endpoint.name + '_WithHttpInfo', ctx.config.functionNameCasing)], parameters.map((x) => toCasing(x.name, ctx.config.parameterNameCasing)))}`,
|
|
103
103
|
'',
|
|
104
104
|
s `return when (localVarResponse.responseType) {${s.indent `
|
|
105
105
|
${ctx.refs.responseType()}.Success -> ${responseSchema === undefined
|
|
@@ -159,7 +159,7 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
159
159
|
getEndpointClientHttpInfoMethodBody(ctx, args) {
|
|
160
160
|
const { endpoint, parameters, responseSchema } = args;
|
|
161
161
|
return appendValueGroup([
|
|
162
|
-
s `val localVariableConfig = ${kt.call([toCasing(endpoint.name, 'camel') + 'RequestConfig'], parameters.map((x) => x.name))}`,
|
|
162
|
+
s `val localVariableConfig = ${kt.call([toCasing(endpoint.name, 'camel') + 'RequestConfig'], parameters.map((x) => toCasing(x.name, ctx.config.parameterNameCasing)))}`,
|
|
163
163
|
s `return ${kt.call([
|
|
164
164
|
kt.reference('request', null, {
|
|
165
165
|
generics: [
|
package/package.json
CHANGED
|
@@ -103,7 +103,7 @@ class DefaultKotlinOkHttp3Generator extends file_generator_js_1.KotlinFileGenera
|
|
|
103
103
|
getEndpointClientMethodBody(ctx, args) {
|
|
104
104
|
const { endpoint, parameters, responseSchema } = args;
|
|
105
105
|
return (0, core_1.appendValueGroup)([
|
|
106
|
-
(0, core_1.builderTemplate) `val localVarResponse = ${index_js_1.kt.call([(0, core_1.toCasing)(endpoint.name + '_WithHttpInfo', ctx.config.functionNameCasing)], parameters.map((x) => x.name))}`,
|
|
106
|
+
(0, core_1.builderTemplate) `val localVarResponse = ${index_js_1.kt.call([(0, core_1.toCasing)(endpoint.name + '_WithHttpInfo', ctx.config.functionNameCasing)], parameters.map((x) => (0, core_1.toCasing)(x.name, ctx.config.parameterNameCasing)))}`,
|
|
107
107
|
'',
|
|
108
108
|
(0, core_1.builderTemplate) `return when (localVarResponse.responseType) {${core_1.builderTemplate.indent `
|
|
109
109
|
${ctx.refs.responseType()}.Success -> ${responseSchema === undefined
|
|
@@ -163,7 +163,7 @@ class DefaultKotlinOkHttp3Generator extends file_generator_js_1.KotlinFileGenera
|
|
|
163
163
|
getEndpointClientHttpInfoMethodBody(ctx, args) {
|
|
164
164
|
const { endpoint, parameters, responseSchema } = args;
|
|
165
165
|
return (0, core_1.appendValueGroup)([
|
|
166
|
-
(0, core_1.builderTemplate) `val localVariableConfig = ${index_js_1.kt.call([(0, core_1.toCasing)(endpoint.name, 'camel') + 'RequestConfig'], parameters.map((x) => x.name))}`,
|
|
166
|
+
(0, core_1.builderTemplate) `val localVariableConfig = ${index_js_1.kt.call([(0, core_1.toCasing)(endpoint.name, 'camel') + 'RequestConfig'], parameters.map((x) => (0, core_1.toCasing)(x.name, ctx.config.parameterNameCasing)))}`,
|
|
167
167
|
(0, core_1.builderTemplate) `return ${index_js_1.kt.call([
|
|
168
168
|
index_js_1.kt.reference('request', null, {
|
|
169
169
|
generics: [
|