@goast/kotlin 0.2.2 → 0.2.3
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.
|
@@ -79,9 +79,9 @@ class DefaultKotlinSpringControllerGenerator extends file_generator_1.KotlinFile
|
|
|
79
79
|
getApiInterfaceEndpointMethodAnnnotations(ctx, endpoint) {
|
|
80
80
|
var _a, _b, _c;
|
|
81
81
|
const operation = ast_1.kt.annotation(ast_1.kt.refs.swagger.operation(), [
|
|
82
|
-
ast_1.kt.argument.named('summary', ast_1.kt.string((_a = endpoint.summary) === null || _a === void 0 ? void 0 : _a.trim())),
|
|
82
|
+
endpoint.summary ? ast_1.kt.argument.named('summary', ast_1.kt.string((_a = endpoint.summary) === null || _a === void 0 ? void 0 : _a.trim())) : null,
|
|
83
83
|
ast_1.kt.argument.named('operationId', ast_1.kt.string(endpoint.name)),
|
|
84
|
-
ast_1.kt.argument.named('description', ast_1.kt.string((_b = endpoint.description) === null || _b === void 0 ? void 0 : _b.trim())),
|
|
84
|
+
endpoint.description ? ast_1.kt.argument.named('description', ast_1.kt.string((_b = endpoint.description) === null || _b === void 0 ? void 0 : _b.trim())) : null,
|
|
85
85
|
ast_1.kt.argument.named('responses', ast_1.kt.collectionLiteral(endpoint.responses.map((response) => {
|
|
86
86
|
var _a, _b;
|
|
87
87
|
return ast_1.kt.call(ast_1.kt.refs.swagger.apiResponse(), [
|
|
@@ -76,9 +76,9 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
76
76
|
getApiInterfaceEndpointMethodAnnnotations(ctx, endpoint) {
|
|
77
77
|
var _a, _b, _c;
|
|
78
78
|
const operation = kt.annotation(kt.refs.swagger.operation(), [
|
|
79
|
-
kt.argument.named('summary', kt.string((_a = endpoint.summary) === null || _a === void 0 ? void 0 : _a.trim())),
|
|
79
|
+
endpoint.summary ? kt.argument.named('summary', kt.string((_a = endpoint.summary) === null || _a === void 0 ? void 0 : _a.trim())) : null,
|
|
80
80
|
kt.argument.named('operationId', kt.string(endpoint.name)),
|
|
81
|
-
kt.argument.named('description', kt.string((_b = endpoint.description) === null || _b === void 0 ? void 0 : _b.trim())),
|
|
81
|
+
endpoint.description ? kt.argument.named('description', kt.string((_b = endpoint.description) === null || _b === void 0 ? void 0 : _b.trim())) : null,
|
|
82
82
|
kt.argument.named('responses', kt.collectionLiteral(endpoint.responses.map((response) => {
|
|
83
83
|
var _a, _b;
|
|
84
84
|
return kt.call(kt.refs.swagger.apiResponse(), [
|