@arrirpc/codegen-kotlin 0.69.2 → 0.71.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs +3 -4
- package/dist/index.mjs +3 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
@@ -103,8 +103,7 @@ function isNullable(schema, context) {
|
|
103
103
|
return schema.nullable === true || context.isOptional === true;
|
104
104
|
}
|
105
105
|
function getCodeComment(metadata, prefix, valueField) {
|
106
|
-
if (!metadata?.description && !metadata?.isDeprecated)
|
107
|
-
return "";
|
106
|
+
if (!metadata?.description && !metadata?.isDeprecated) return "";
|
108
107
|
const descriptionPart = metadata.description?.split("\n").map((line) => `${prefix ?? ""}* ${line}`).join("\n");
|
109
108
|
const finalDescription = metadata.description ? `${prefix ?? ""}/**
|
110
109
|
${descriptionPart}${prefix ?? ""}
|
@@ -1129,8 +1128,8 @@ function kotlinProcedureFromSchema(schema, context) {
|
|
1129
1128
|
}
|
1130
1129
|
function kotlinHttpRpcFromSchema(schema, context) {
|
1131
1130
|
const name = getProcedureName(context);
|
1132
|
-
const params = schema.params ? kotlinClassName(`${context.typePrefix}_${schema.params}`) :
|
1133
|
-
const response = schema.response ? kotlinClassName(`${context.typePrefix}_${schema.response}`) :
|
1131
|
+
const params = schema.params ? kotlinClassName(`${context.typePrefix}_${schema.params}`) : undefined;
|
1132
|
+
const response = schema.response ? kotlinClassName(`${context.typePrefix}_${schema.response}`) : undefined;
|
1134
1133
|
const codeComment = getCodeComment(
|
1135
1134
|
{
|
1136
1135
|
description: schema.description,
|
package/dist/index.mjs
CHANGED
@@ -97,8 +97,7 @@ function isNullable(schema, context) {
|
|
97
97
|
return schema.nullable === true || context.isOptional === true;
|
98
98
|
}
|
99
99
|
function getCodeComment(metadata, prefix, valueField) {
|
100
|
-
if (!metadata?.description && !metadata?.isDeprecated)
|
101
|
-
return "";
|
100
|
+
if (!metadata?.description && !metadata?.isDeprecated) return "";
|
102
101
|
const descriptionPart = metadata.description?.split("\n").map((line) => `${prefix ?? ""}* ${line}`).join("\n");
|
103
102
|
const finalDescription = metadata.description ? `${prefix ?? ""}/**
|
104
103
|
${descriptionPart}${prefix ?? ""}
|
@@ -1123,8 +1122,8 @@ function kotlinProcedureFromSchema(schema, context) {
|
|
1123
1122
|
}
|
1124
1123
|
function kotlinHttpRpcFromSchema(schema, context) {
|
1125
1124
|
const name = getProcedureName(context);
|
1126
|
-
const params = schema.params ? kotlinClassName(`${context.typePrefix}_${schema.params}`) :
|
1127
|
-
const response = schema.response ? kotlinClassName(`${context.typePrefix}_${schema.response}`) :
|
1125
|
+
const params = schema.params ? kotlinClassName(`${context.typePrefix}_${schema.params}`) : undefined;
|
1126
|
+
const response = schema.response ? kotlinClassName(`${context.typePrefix}_${schema.response}`) : undefined;
|
1128
1127
|
const codeComment = getCodeComment(
|
1129
1128
|
{
|
1130
1129
|
description: schema.description,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arrirpc/codegen-kotlin",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.71.0",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": {
|
@@ -22,6 +22,6 @@
|
|
22
22
|
"dist"
|
23
23
|
],
|
24
24
|
"dependencies": {
|
25
|
-
"@arrirpc/codegen-utils": "0.
|
25
|
+
"@arrirpc/codegen-utils": "0.71.0"
|
26
26
|
}
|
27
27
|
}
|