@goast/kotlin 0.2.1 → 0.2.2

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.
@@ -105,7 +105,7 @@ class DefaultKotlinSpringControllerGenerator extends file_generator_1.KotlinFile
105
105
  const result = ast_1.kt.parameter((0, core_1.toCasing)(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, { endpoint, parameter }), {});
106
106
  if (ctx.config.addSwaggerAnnotations) {
107
107
  const annotation = ast_1.kt.annotation(ast_1.kt.refs.swagger.parameter(), [
108
- ast_1.kt.argument.named('description', ast_1.kt.string((_a = parameter.description) === null || _a === void 0 ? void 0 : _a.trim())),
108
+ parameter.description ? ast_1.kt.argument.named('description', ast_1.kt.string((_a = parameter.description) === null || _a === void 0 ? void 0 : _a.trim())) : null,
109
109
  ast_1.kt.argument.named('required', parameter.required),
110
110
  ]);
111
111
  if (((_b = parameter.schema) === null || _b === void 0 ? void 0 : _b.default) !== undefined) {
@@ -102,7 +102,7 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
102
102
  const result = kt.parameter(toCasing(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, { endpoint, parameter }), {});
103
103
  if (ctx.config.addSwaggerAnnotations) {
104
104
  const annotation = kt.annotation(kt.refs.swagger.parameter(), [
105
- kt.argument.named('description', kt.string((_a = parameter.description) === null || _a === void 0 ? void 0 : _a.trim())),
105
+ parameter.description ? kt.argument.named('description', kt.string((_a = parameter.description) === null || _a === void 0 ? void 0 : _a.trim())) : null,
106
106
  kt.argument.named('required', parameter.required),
107
107
  ]);
108
108
  if (((_b = parameter.schema) === null || _b === void 0 ? void 0 : _b.default) !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goast/kotlin",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "repository": "https://github.com/MaSch0212/goast.git",
5
5
  "author": {
6
6
  "name": "Marc Schmidt (MaSch0212)",