@goast/kotlin 0.2.3 → 0.2.5
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.
- package/cjs/lib/generators/services/okhttp3-clients/okhttp3-client-generator.js +1 -1
- package/cjs/lib/generators/services/spring-controllers/spring-controller-generator.js +1 -1
- package/esm/lib/generators/services/okhttp3-clients/okhttp3-client-generator.js +1 -1
- package/esm/lib/generators/services/spring-controllers/spring-controller-generator.js +1 -1
- package/package.json +1 -1
|
@@ -147,7 +147,7 @@ class DefaultKotlinOkHttp3Generator extends file_generator_1.KotlinFileGenerator
|
|
|
147
147
|
});
|
|
148
148
|
}),
|
|
149
149
|
returnType: ctx.refs.apiResponse([
|
|
150
|
-
this.getTypeUsage(ctx, { schema: responseSchema, fallback: ast_1.kt.refs.unit(), nullable: true }),
|
|
150
|
+
this.getTypeUsage(ctx, { schema: responseSchema, fallback: ast_1.kt.refs.unit({ nullable: true }), nullable: true }),
|
|
151
151
|
]),
|
|
152
152
|
body: this.getEndpointClientHttpInfoMethodBody(ctx, { endpoint, parameters, responseSchema }),
|
|
153
153
|
});
|
|
@@ -86,7 +86,7 @@ class DefaultKotlinSpringControllerGenerator extends file_generator_1.KotlinFile
|
|
|
86
86
|
var _a, _b;
|
|
87
87
|
return ast_1.kt.call(ast_1.kt.refs.swagger.apiResponse(), [
|
|
88
88
|
ast_1.kt.argument.named('responseCode', ast_1.kt.string((_a = response.statusCode) === null || _a === void 0 ? void 0 : _a.toString())),
|
|
89
|
-
ast_1.kt.argument.named('description', ast_1.kt.string((_b = response.description) === null || _b === void 0 ? void 0 : _b.trim())),
|
|
89
|
+
endpoint.description ? ast_1.kt.argument.named('description', ast_1.kt.string((_b = response.description) === null || _b === void 0 ? void 0 : _b.trim())) : null,
|
|
90
90
|
]);
|
|
91
91
|
}))),
|
|
92
92
|
]);
|
|
@@ -144,7 +144,7 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
144
144
|
});
|
|
145
145
|
}),
|
|
146
146
|
returnType: ctx.refs.apiResponse([
|
|
147
|
-
this.getTypeUsage(ctx, { schema: responseSchema, fallback: kt.refs.unit(), nullable: true }),
|
|
147
|
+
this.getTypeUsage(ctx, { schema: responseSchema, fallback: kt.refs.unit({ nullable: true }), nullable: true }),
|
|
148
148
|
]),
|
|
149
149
|
body: this.getEndpointClientHttpInfoMethodBody(ctx, { endpoint, parameters, responseSchema }),
|
|
150
150
|
});
|
|
@@ -83,7 +83,7 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
83
83
|
var _a, _b;
|
|
84
84
|
return kt.call(kt.refs.swagger.apiResponse(), [
|
|
85
85
|
kt.argument.named('responseCode', kt.string((_a = response.statusCode) === null || _a === void 0 ? void 0 : _a.toString())),
|
|
86
|
-
kt.argument.named('description', kt.string((_b = response.description) === null || _b === void 0 ? void 0 : _b.trim())),
|
|
86
|
+
endpoint.description ? kt.argument.named('description', kt.string((_b = response.description) === null || _b === void 0 ? void 0 : _b.trim())) : null,
|
|
87
87
|
]);
|
|
88
88
|
}))),
|
|
89
89
|
]);
|