@goast/kotlin 0.5.14 → 0.6.0-beta.1
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/LICENSE +21 -21
- package/README.md +45 -45
- package/assets/client/okhttp3/ApiAbstractions.kt +30 -30
- package/assets/client/okhttp3/ApiClient.kt +252 -252
- package/assets/client/okhttp3/ApiResponse.kt +43 -43
- package/assets/client/okhttp3/Errors.kt +21 -21
- package/assets/client/okhttp3/PartConfig.kt +11 -11
- package/assets/client/okhttp3/RequestConfig.kt +18 -18
- package/assets/client/okhttp3/RequestMethod.kt +8 -8
- package/assets/client/okhttp3/ResponseExtensions.kt +24 -24
- package/assets/client/spring-reactive-web-clients/ApiRequestFile.kt +33 -33
- package/esm/src/generators/models/model-generator.d.ts.map +1 -1
- package/esm/src/generators/models/model-generator.js +5 -14
- package/esm/src/generators/services/okhttp3-clients/okhttp3-client-generator.d.ts.map +1 -1
- package/esm/src/generators/services/okhttp3-clients/okhttp3-client-generator.js +40 -47
- package/esm/src/generators/services/okhttp3-clients/okhttp3-clients-generator.js +9 -9
- package/esm/src/generators/services/spring-controllers/spring-controller-generator.d.ts.map +1 -1
- package/esm/src/generators/services/spring-controllers/spring-controller-generator.js +32 -42
- package/esm/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.d.ts.map +1 -1
- package/esm/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.js +16 -25
- package/esm/src/utils.d.ts +1 -3
- package/esm/src/utils.d.ts.map +1 -1
- package/esm/src/utils.js +0 -7
- package/package.json +2 -2
- package/script/src/generators/models/model-generator.d.ts.map +1 -1
- package/script/src/generators/models/model-generator.js +4 -13
- package/script/src/generators/services/okhttp3-clients/okhttp3-client-generator.d.ts.map +1 -1
- package/script/src/generators/services/okhttp3-clients/okhttp3-client-generator.js +39 -46
- package/script/src/generators/services/okhttp3-clients/okhttp3-clients-generator.js +9 -9
- package/script/src/generators/services/spring-controllers/spring-controller-generator.d.ts.map +1 -1
- package/script/src/generators/services/spring-controllers/spring-controller-generator.js +31 -41
- package/script/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.d.ts.map +1 -1
- package/script/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.js +15 -24
- package/script/src/utils.d.ts +1 -3
- package/script/src/utils.d.ts.map +1 -1
- package/script/src/utils.js +0 -9
- package/src/mod.ts +0 -8
- package/src/src/assets.ts +0 -9
- package/src/src/ast/_index.ts +0 -66
- package/src/src/ast/common.ts +0 -1
- package/src/src/ast/index.ts +0 -1
- package/src/src/ast/node.ts +0 -10
- package/src/src/ast/nodes/annotation.ts +0 -79
- package/src/src/ast/nodes/argument.ts +0 -62
- package/src/src/ast/nodes/call.ts +0 -75
- package/src/src/ast/nodes/class.ts +0 -178
- package/src/src/ast/nodes/collection-literal.ts +0 -49
- package/src/src/ast/nodes/constructor.ts +0 -126
- package/src/src/ast/nodes/doc-tag.ts +0 -138
- package/src/src/ast/nodes/doc.ts +0 -111
- package/src/src/ast/nodes/enum-value.ts +0 -100
- package/src/src/ast/nodes/enum.ts +0 -163
- package/src/src/ast/nodes/function.ts +0 -178
- package/src/src/ast/nodes/generic-parameter.ts +0 -54
- package/src/src/ast/nodes/init-block.ts +0 -38
- package/src/src/ast/nodes/interface.ts +0 -133
- package/src/src/ast/nodes/lambda-type.ts +0 -73
- package/src/src/ast/nodes/lambda.ts +0 -74
- package/src/src/ast/nodes/object.ts +0 -102
- package/src/src/ast/nodes/parameter.ts +0 -118
- package/src/src/ast/nodes/property.ts +0 -225
- package/src/src/ast/nodes/reference.ts +0 -178
- package/src/src/ast/nodes/string.ts +0 -114
- package/src/src/ast/nodes/types.ts +0 -23
- package/src/src/ast/references/index.ts +0 -10
- package/src/src/ast/references/jackson.ts +0 -59
- package/src/src/ast/references/jakarta.ts +0 -14
- package/src/src/ast/references/java.ts +0 -27
- package/src/src/ast/references/kotlin.ts +0 -41
- package/src/src/ast/references/kotlinx.ts +0 -14
- package/src/src/ast/references/okhttp3.ts +0 -5
- package/src/src/ast/references/reactor.ts +0 -5
- package/src/src/ast/references/spring-reactive.ts +0 -37
- package/src/src/ast/references/spring.ts +0 -86
- package/src/src/ast/references/swagger.ts +0 -23
- package/src/src/ast/utils/get-kotlin-builder-options.ts +0 -19
- package/src/src/ast/utils/to-kt-node.ts +0 -31
- package/src/src/ast/utils/write-kt-annotations.ts +0 -15
- package/src/src/ast/utils/write-kt-arguments.ts +0 -45
- package/src/src/ast/utils/write-kt-enum-values.ts +0 -27
- package/src/src/ast/utils/write-kt-generic-parameters.ts +0 -12
- package/src/src/ast/utils/write-kt-members.ts +0 -25
- package/src/src/ast/utils/write-kt-node.ts +0 -37
- package/src/src/ast/utils/write-kt-parameters.ts +0 -25
- package/src/src/common-results.ts +0 -4
- package/src/src/config.ts +0 -61
- package/src/src/file-builder.ts +0 -112
- package/src/src/generators/file-generator.ts +0 -29
- package/src/src/generators/index.ts +0 -5
- package/src/src/generators/models/args.ts +0 -136
- package/src/src/generators/models/index.ts +0 -4
- package/src/src/generators/models/model-generator.ts +0 -736
- package/src/src/generators/models/models-generator.ts +0 -65
- package/src/src/generators/models/models.ts +0 -95
- package/src/src/generators/services/okhttp3-clients/args.ts +0 -90
- package/src/src/generators/services/okhttp3-clients/index.ts +0 -4
- package/src/src/generators/services/okhttp3-clients/models.ts +0 -73
- package/src/src/generators/services/okhttp3-clients/okhttp3-client-generator.ts +0 -627
- package/src/src/generators/services/okhttp3-clients/okhttp3-clients-generator.ts +0 -188
- package/src/src/generators/services/okhttp3-clients/refs.ts +0 -59
- package/src/src/generators/services/spring-controllers/args.ts +0 -95
- package/src/src/generators/services/spring-controllers/index.ts +0 -4
- package/src/src/generators/services/spring-controllers/models.ts +0 -76
- package/src/src/generators/services/spring-controllers/refs.ts +0 -17
- package/src/src/generators/services/spring-controllers/spring-controller-generator.ts +0 -1122
- package/src/src/generators/services/spring-controllers/spring-controllers-generator.ts +0 -140
- package/src/src/generators/services/spring-reactive-web-clients/args.ts +0 -112
- package/src/src/generators/services/spring-reactive-web-clients/index.ts +0 -4
- package/src/src/generators/services/spring-reactive-web-clients/models.ts +0 -78
- package/src/src/generators/services/spring-reactive-web-clients/refs.ts +0 -11
- package/src/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.ts +0 -641
- package/src/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.ts +0 -125
- package/src/src/import-collection.ts +0 -98
- package/src/src/types.ts +0 -3
- package/src/src/utils.ts +0 -55
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
package @PACKAGE_NAME@
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Defines a config object for a given request.
|
|
5
|
-
* NOTE: This object doesn't include 'body' because it
|
|
6
|
-
* allows for caching of the constructed object
|
|
7
|
-
* for many request definitions.
|
|
8
|
-
* NOTE: Headers is a Map<String,String> because rfc2616 defines
|
|
9
|
-
* multi-valued headers as csv-only.
|
|
10
|
-
*/
|
|
11
|
-
data class RequestConfig<T>(
|
|
12
|
-
val method: RequestMethod,
|
|
13
|
-
val path: String,
|
|
14
|
-
val headers: MutableMap<String, String> = mutableMapOf(),
|
|
15
|
-
val query: MutableMap<String, List<String>> = mutableMapOf(),
|
|
16
|
-
val requiresAuthentication: Boolean,
|
|
17
|
-
val body: T? = null
|
|
18
|
-
)
|
|
1
|
+
package @PACKAGE_NAME@
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Defines a config object for a given request.
|
|
5
|
+
* NOTE: This object doesn't include 'body' because it
|
|
6
|
+
* allows for caching of the constructed object
|
|
7
|
+
* for many request definitions.
|
|
8
|
+
* NOTE: Headers is a Map<String,String> because rfc2616 defines
|
|
9
|
+
* multi-valued headers as csv-only.
|
|
10
|
+
*/
|
|
11
|
+
data class RequestConfig<T>(
|
|
12
|
+
val method: RequestMethod,
|
|
13
|
+
val path: String,
|
|
14
|
+
val headers: MutableMap<String, String> = mutableMapOf(),
|
|
15
|
+
val query: MutableMap<String, List<String>> = mutableMapOf(),
|
|
16
|
+
val requiresAuthentication: Boolean,
|
|
17
|
+
val body: T? = null
|
|
18
|
+
)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
package @PACKAGE_NAME@
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Provides enumerated HTTP verbs
|
|
5
|
-
*/
|
|
6
|
-
enum class RequestMethod {
|
|
7
|
-
GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT
|
|
8
|
-
}
|
|
1
|
+
package @PACKAGE_NAME@
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Provides enumerated HTTP verbs
|
|
5
|
+
*/
|
|
6
|
+
enum class RequestMethod {
|
|
7
|
+
GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT
|
|
8
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
package @PACKAGE_NAME@
|
|
2
|
-
|
|
3
|
-
import okhttp3.Response
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Provides an extension to evaluation whether the response is a 1xx code
|
|
7
|
-
*/
|
|
8
|
-
val Response.isInformational: Boolean get() = this.code in 100..199
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Provides an extension to evaluation whether the response is a 3xx code
|
|
12
|
-
*/
|
|
13
|
-
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
|
|
14
|
-
val Response.isRedirect: Boolean get() = this.code in 300..399
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Provides an extension to evaluation whether the response is a 4xx code
|
|
18
|
-
*/
|
|
19
|
-
val Response.isClientError: Boolean get() = this.code in 400..499
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code
|
|
23
|
-
*/
|
|
24
|
-
val Response.isServerError: Boolean get() = this.code in 500..999
|
|
1
|
+
package @PACKAGE_NAME@
|
|
2
|
+
|
|
3
|
+
import okhttp3.Response
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Provides an extension to evaluation whether the response is a 1xx code
|
|
7
|
+
*/
|
|
8
|
+
val Response.isInformational: Boolean get() = this.code in 100..199
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Provides an extension to evaluation whether the response is a 3xx code
|
|
12
|
+
*/
|
|
13
|
+
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
|
|
14
|
+
val Response.isRedirect: Boolean get() = this.code in 300..399
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Provides an extension to evaluation whether the response is a 4xx code
|
|
18
|
+
*/
|
|
19
|
+
val Response.isClientError: Boolean get() = this.code in 400..499
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Provides an extension to evaluation whether the response is a 5xx (Standard) through 999 (non-standard) code
|
|
23
|
+
*/
|
|
24
|
+
val Response.isServerError: Boolean get() = this.code in 500..999
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
package @PACKAGE_NAME@
|
|
2
|
-
|
|
3
|
-
import org.springframework.core.io.buffer.DataBuffer
|
|
4
|
-
import org.springframework.http.MediaType
|
|
5
|
-
import org.springframework.http.client.MultipartBodyBuilder
|
|
6
|
-
import org.springframework.http.codec.multipart.FilePart
|
|
7
|
-
import java.io.File
|
|
8
|
-
|
|
9
|
-
interface ApiRequestFile {
|
|
10
|
-
companion object {
|
|
11
|
-
fun from(file: File): ApiRequestFile =
|
|
12
|
-
object : ApiRequestFile {
|
|
13
|
-
override fun addToBuilder(builder: MultipartBodyBuilder) {
|
|
14
|
-
builder
|
|
15
|
-
.part("file", file)
|
|
16
|
-
.filename(file.name)
|
|
17
|
-
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
fun from(filePart: FilePart): ApiRequestFile =
|
|
22
|
-
object : ApiRequestFile {
|
|
23
|
-
override fun addToBuilder(builder: MultipartBodyBuilder) {
|
|
24
|
-
builder
|
|
25
|
-
.asyncPart("file", filePart.content(), DataBuffer::class.java)
|
|
26
|
-
.filename(filePart.filename())
|
|
27
|
-
.contentType(filePart.headers().contentType ?: MediaType.APPLICATION_OCTET_STREAM)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
fun addToBuilder(builder: MultipartBodyBuilder)
|
|
33
|
-
}
|
|
1
|
+
package @PACKAGE_NAME@
|
|
2
|
+
|
|
3
|
+
import org.springframework.core.io.buffer.DataBuffer
|
|
4
|
+
import org.springframework.http.MediaType
|
|
5
|
+
import org.springframework.http.client.MultipartBodyBuilder
|
|
6
|
+
import org.springframework.http.codec.multipart.FilePart
|
|
7
|
+
import java.io.File
|
|
8
|
+
|
|
9
|
+
interface ApiRequestFile {
|
|
10
|
+
companion object {
|
|
11
|
+
fun from(file: File): ApiRequestFile =
|
|
12
|
+
object : ApiRequestFile {
|
|
13
|
+
override fun addToBuilder(builder: MultipartBodyBuilder) {
|
|
14
|
+
builder
|
|
15
|
+
.part("file", file)
|
|
16
|
+
.filename(file.name)
|
|
17
|
+
.contentType(MediaType.APPLICATION_OCTET_STREAM)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
fun from(filePart: FilePart): ApiRequestFile =
|
|
22
|
+
object : ApiRequestFile {
|
|
23
|
+
override fun addToBuilder(builder: MultipartBodyBuilder) {
|
|
24
|
+
builder
|
|
25
|
+
.asyncPart("file", filePart.content(), DataBuffer::class.java)
|
|
26
|
+
.filename(filePart.filename())
|
|
27
|
+
.contentType(filePart.headers().contentType ?: MediaType.APPLICATION_OCTET_STREAM)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
fun addToBuilder(builder: MultipartBodyBuilder)
|
|
33
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-generator.d.ts","sourceRoot":"","sources":["../../../../src/src/generators/models/model-gener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modifyEach, notNullish, resolveAnyOfAndAllOf, toCasing, } from '@goast/core';
|
|
2
2
|
import { kt } from '../../ast/index.js';
|
|
3
3
|
import { KotlinFileBuilder } from '../../file-builder.js';
|
|
4
|
-
import { getSourceDocLine
|
|
4
|
+
import { getSourceDocLine } from '../../utils.js';
|
|
5
5
|
import { KotlinFileGenerator } from '../file-generator.js';
|
|
6
6
|
export class DefaultKotlinModelGenerator extends KotlinFileGenerator {
|
|
7
7
|
generate(ctx) {
|
|
@@ -102,8 +102,8 @@ export class DefaultKotlinModelGenerator extends KotlinFileGenerator {
|
|
|
102
102
|
singleExpression: true,
|
|
103
103
|
body: !((_c = schema.enum) === null || _c === void 0 ? void 0 : _c.length) ? 'null' : s `\nwhen(value) {${s.indent `${appendValueGroup([
|
|
104
104
|
schema.enum.map((x) => s `\n${kt.string(String(x))} -> ${toCasing(String(x), ctx.config.enumValueNameCasing)}`),
|
|
105
|
-
])}
|
|
106
|
-
else -> null`}
|
|
105
|
+
])}
|
|
106
|
+
else -> null`}
|
|
107
107
|
}`,
|
|
108
108
|
}),
|
|
109
109
|
],
|
|
@@ -212,17 +212,8 @@ export class DefaultKotlinModelGenerator extends KotlinFileGenerator {
|
|
|
212
212
|
return schema.enum && schema.enum.length > 0
|
|
213
213
|
? kt.call([this.getType(ctx, { schema }), toCasing(String(schema.default), ctx.config.enumValueNameCasing)])
|
|
214
214
|
: kt.string(String(schema.default));
|
|
215
|
-
case 'array':
|
|
216
|
-
|
|
217
|
-
return kt.call(kt.refs.listOf.infer(), Array.isArray(schema.default)
|
|
218
|
-
? schema.default.map((x) => itemEnumSchema
|
|
219
|
-
? kt.call([
|
|
220
|
-
this.getType(ctx, { schema: itemEnumSchema }),
|
|
221
|
-
toCasing(String(x), ctx.config.enumValueNameCasing),
|
|
222
|
-
])
|
|
223
|
-
: kt.toNode(x))
|
|
224
|
-
: []);
|
|
225
|
-
}
|
|
215
|
+
case 'array':
|
|
216
|
+
return kt.call(kt.refs.listOf.infer(), Array.isArray(schema.default) ? schema.default.map((x) => kt.toNode(x)) : []);
|
|
226
217
|
default:
|
|
227
218
|
return 'null';
|
|
228
219
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"okhttp3-client-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/okhttp3-clients/okhttp3-client-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAIrB,KAAK,YAAY,EAGjB,aAAa,EAEd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iCAAiC,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,mCAAmC,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AAE3G,KAAK,OAAO,GAAG,mCAAmC,CAAC;AACnD,KAAK,MAAM,GAAG,kCAAkC,CAAC;AACjD,KAAK,OAAO,GAAG,iBAAiB,CAAC;AAEjC,MAAM,WAAW,sBAAsB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IACrE,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,qBAAa,6BAA8B,SAAQ,mBAAmB,CAAC,OAAO,EAAE,MAAM,CACpF,YAAW,sBAAsB;IAC1B,QAAQ,CAAC,GAAG,EAAE,mCAAmC,GAAG,YAAY,CAAC,MAAM,CAAC;IAkB/E,SAAS,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,oBAAoB,GAAG,gBA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CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"okhttp3-client-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/okhttp3-clients/okhttp3-client-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAIrB,KAAK,YAAY,EAGjB,aAAa,EAEd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iCAAiC,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,mCAAmC,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AAE3G,KAAK,OAAO,GAAG,mCAAmC,CAAC;AACnD,KAAK,MAAM,GAAG,kCAAkC,CAAC;AACjD,KAAK,OAAO,GAAG,iBAAiB,CAAC;AAEjC,MAAM,WAAW,sBAAsB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IACrE,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,qBAAa,6BAA8B,SAAQ,mBAAmB,CAAC,OAAO,EAAE,MAAM,CACpF,YAAW,sBAAsB;IAC1B,QAAQ,CAAC,GAAG,EAAE,mCAAmC,GAAG,YAAY,CAAC,MAAM,CAAC;IAkB/E,SAAS,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,oBAAoB,GAAG,gBAAgB,CA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GAAG,SAAS;IAKxG,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,gBAAgB,GAAG,6BAA6B,EAAE;IAmDtG,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,uBAAuB,GAAG,MAAM;IAU3F,SAAS,CAAC,yBAAyB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,yBAAyB,GAAG,gBAAgB,CAAC,OAAO,CAAC;IAUlH,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM;IAQpE,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,eAAe,GAAG,MAAM;IAK3E,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,GAAG,MAAM;IAKnE,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,gBAAgB,GAAG,MAAM;IAI9E,OAAO,CAAC,kBAAkB;CAgB3B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { appendValueGroup, builderTemplate as s, createOverwriteProxy, getSourceDisplayName, notNullish, resolveAnyOfAndAllOf, SourceBuilder, toCasing, } from '@goast/core';
|
|
2
2
|
import { kt } from '../../../ast/index.js';
|
|
3
3
|
import { KotlinFileBuilder } from '../../../file-builder.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getSourceDocLine, modifyString } from '../../../utils.js';
|
|
5
5
|
import { KotlinFileGenerator } from '../../file-generator.js';
|
|
6
6
|
export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
7
7
|
generate(ctx) {
|
|
@@ -109,31 +109,31 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
109
109
|
return appendValueGroup([
|
|
110
110
|
s `val localVarResponse = ${kt.call([toCasing(endpoint.name + '_WithHttpInfo', ctx.config.functionNameCasing)], parameters.map((x) => toCasing(x.name, ctx.config.parameterNameCasing)))}`,
|
|
111
111
|
'',
|
|
112
|
-
s `return when (localVarResponse.responseType) {${s.indent `
|
|
112
|
+
s `return when (localVarResponse.responseType) {${s.indent `
|
|
113
113
|
${ctx.refs.responseType()}.Success -> ${responseSchema === undefined
|
|
114
114
|
? kt.refs.unit()
|
|
115
115
|
: s `(localVarResponse as ${ctx.refs.success(['*'])}).data as ${this.getTypeUsage(ctx, {
|
|
116
116
|
schema: responseSchema,
|
|
117
|
-
})}`}
|
|
118
|
-
${ctx.refs.responseType()}.Informational -> throw ${kt.refs.java.unsupportedOperationException()}("Client does not support Informational responses.")
|
|
119
|
-
${ctx.refs.responseType()}.Redirection -> throw ${kt.refs.java.unsupportedOperationException()}("Client does not support Redirection responses.")
|
|
120
|
-
${ctx.refs.responseType()}.ClientError -> {${s.indent `
|
|
121
|
-
val localVarError = localVarResponse as ${ctx.refs.clientError(['*'])}
|
|
122
|
-
throw ${ctx.refs.clientException()}(${s.indent `
|
|
123
|
-
"Client error : \${localVarError.statusCode} \${localVarError.message.orEmpty()}",
|
|
124
|
-
localVarError.statusCode,
|
|
125
|
-
localVarResponse`}
|
|
126
|
-
)`}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
${ctx.refs.responseType()}.ServerError -> {${s.indent `
|
|
130
|
-
val localVarError = localVarResponse as ${ctx.refs.serverError(['*'])}
|
|
131
|
-
throw ${ctx.refs.serverException()}(${s.indent `
|
|
132
|
-
"Server error : \${localVarError.statusCode} \${localVarError.message.orEmpty()}",
|
|
133
|
-
localVarError.statusCode,
|
|
134
|
-
localVarResponse`}
|
|
135
|
-
)`}
|
|
136
|
-
}`}
|
|
117
|
+
})}`}
|
|
118
|
+
${ctx.refs.responseType()}.Informational -> throw ${kt.refs.java.unsupportedOperationException()}("Client does not support Informational responses.")
|
|
119
|
+
${ctx.refs.responseType()}.Redirection -> throw ${kt.refs.java.unsupportedOperationException()}("Client does not support Redirection responses.")
|
|
120
|
+
${ctx.refs.responseType()}.ClientError -> {${s.indent `
|
|
121
|
+
val localVarError = localVarResponse as ${ctx.refs.clientError(['*'])}
|
|
122
|
+
throw ${ctx.refs.clientException()}(${s.indent `
|
|
123
|
+
"Client error : \${localVarError.statusCode} \${localVarError.message.orEmpty()}",
|
|
124
|
+
localVarError.statusCode,
|
|
125
|
+
localVarResponse`}
|
|
126
|
+
)`}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
${ctx.refs.responseType()}.ServerError -> {${s.indent `
|
|
130
|
+
val localVarError = localVarResponse as ${ctx.refs.serverError(['*'])}
|
|
131
|
+
throw ${ctx.refs.serverException()}(${s.indent `
|
|
132
|
+
"Server error : \${localVarError.statusCode} \${localVarError.message.orEmpty()}",
|
|
133
|
+
localVarError.statusCode,
|
|
134
|
+
localVarResponse`}
|
|
135
|
+
)`}
|
|
136
|
+
}`}
|
|
137
137
|
}`,
|
|
138
138
|
], '\n');
|
|
139
139
|
}
|
|
@@ -212,16 +212,16 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
212
212
|
result.values.push(`val localVariableBody = ${bodyParamName}`);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
result.values.push(s `val localVariableQuery: ${ctx.refs.multiValueMap()} = ${kt.call([kt.refs.mutableMapOf([kt.refs.string(), kt.refs.list([kt.refs.string()])])], [])}${queryParameters.length === 0 ? '' : s.indent `
|
|
216
|
-
.apply {${s.indent `
|
|
215
|
+
result.values.push(s `val localVariableQuery: ${ctx.refs.multiValueMap()} = ${kt.call([kt.refs.mutableMapOf([kt.refs.string(), kt.refs.list([kt.refs.string()])])], [])}${queryParameters.length === 0 ? '' : s.indent `
|
|
216
|
+
.apply {${s.indent `
|
|
217
217
|
${appendValueGroup(queryParameters.map((param) => {
|
|
218
218
|
const paramName = toCasing(param.name, ctx.config.parameterNameCasing);
|
|
219
219
|
const toString = this.getParameterToString(ctx, { endpoint, parameter: param });
|
|
220
220
|
const put = s `put(${kt.string(param.name)}, listOf(${paramName}${toString}))`;
|
|
221
|
-
return param.required ? put : s `if (${paramName} != null) {${s.indent `
|
|
222
|
-
${put}`}
|
|
221
|
+
return param.required ? put : s `if (${paramName} != null) {${s.indent `
|
|
222
|
+
${put}`}
|
|
223
223
|
}`;
|
|
224
|
-
}), '\n')}`}
|
|
224
|
+
}), '\n')}`}
|
|
225
225
|
}`}`);
|
|
226
226
|
result.values.push('val localVariableHeaders: MutableMap<String, String> = mutableMapOf()');
|
|
227
227
|
if (((_b = endpoint.requestBody) === null || _b === void 0 ? void 0 : _b.content[0]) !== undefined) {
|
|
@@ -230,8 +230,8 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
230
230
|
for (const header of headerParameters) {
|
|
231
231
|
const paramName = toCasing(header.name, ctx.config.parameterNameCasing);
|
|
232
232
|
const toString = this.getParameterToString(ctx, { endpoint, parameter: header });
|
|
233
|
-
result.values.push(s `if (${paramName} != null) {${s.indent `
|
|
234
|
-
localVariableHeaders["${header.name}"] = ${paramName}${toString}`}
|
|
233
|
+
result.values.push(s `if (${paramName} != null) {${s.indent `
|
|
234
|
+
localVariableHeaders["${header.name}"] = ${paramName}${toString}`}
|
|
235
235
|
}`);
|
|
236
236
|
}
|
|
237
237
|
result.values.push(s `return ${kt.call([ctx.refs.requestConfig.infer()], [
|
|
@@ -245,14 +245,13 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
245
245
|
return result;
|
|
246
246
|
}
|
|
247
247
|
getParameterToString(ctx, args) {
|
|
248
|
-
var _a;
|
|
248
|
+
var _a, _b, _c;
|
|
249
249
|
const { parameter } = args;
|
|
250
250
|
if (((_a = parameter.schema) === null || _a === void 0 ? void 0 : _a.kind) === 'array') {
|
|
251
|
-
|
|
252
|
-
const itemEnumType = itemEnumSchema && this.getSchemaType(ctx, { schema: itemEnumSchema });
|
|
253
|
-
return itemEnumType ? s `.joinToString(",", transform = ${itemEnumType}::value)` : '.joinToString(",")';
|
|
251
|
+
return '.joinToString()';
|
|
254
252
|
}
|
|
255
|
-
else if (
|
|
253
|
+
else if (((_b = parameter.schema) === null || _b === void 0 ? void 0 : _b.kind) === 'string' && ((_c = parameter.schema.enum) === null || _c === void 0 ? void 0 : _c.length) &&
|
|
254
|
+
this.getSchemaType(ctx, { schema: parameter.schema })) {
|
|
256
255
|
return '.value';
|
|
257
256
|
}
|
|
258
257
|
else {
|
|
@@ -290,19 +289,13 @@ export class DefaultKotlinOkHttp3Generator extends KotlinFileGenerator {
|
|
|
290
289
|
: this.getTypeUsage(ctx, { schema: content === null || content === void 0 ? void 0 : content.schema, fallback: kt.refs.unit() });
|
|
291
290
|
}
|
|
292
291
|
getParameterDefaultValue(ctx, args) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
const itemEnumSchema = getArrayItemStringEnumSchema(schema);
|
|
301
|
-
if (itemEnumSchema && Array.isArray(schema === null || schema === void 0 ? void 0 : schema.default)) {
|
|
302
|
-
const itemType = this.getTypeUsage(ctx, { schema: itemEnumSchema, nullable: false });
|
|
303
|
-
return kt.call(kt.refs.listOf.infer(), schema.default.map((x) => s `${itemType}.${toCasing(String(x), ctx.config.enumValueNameCasing)}`));
|
|
304
|
-
}
|
|
305
|
-
return kt.toNode(schema === null || schema === void 0 ? void 0 : schema.default);
|
|
292
|
+
var _a, _b;
|
|
293
|
+
const { parameter } = args;
|
|
294
|
+
return !parameter.required
|
|
295
|
+
? ((_a = parameter.schema) === null || _a === void 0 ? void 0 : _a.kind) === 'string' && parameter.schema.enum && parameter.schema.default
|
|
296
|
+
? s `${this.getTypeUsage(ctx, { schema: parameter.schema, nullable: false })}.${toCasing(String(parameter.schema.default), ctx.config.enumValueNameCasing)}`
|
|
297
|
+
: kt.toNode((_b = parameter.schema) === null || _b === void 0 ? void 0 : _b.default)
|
|
298
|
+
: null;
|
|
306
299
|
}
|
|
307
300
|
getTypeUsage(ctx, args) {
|
|
308
301
|
const { schema, nullable, fallback } = args;
|
|
@@ -100,16 +100,16 @@ export class KotlinOkHttp3ClientsGenerator extends OpenApiServicesGenerationProv
|
|
|
100
100
|
const jsonIncludeMember = toCasing(ctx.config.serializerJsonInclude, 'snake');
|
|
101
101
|
const defaultFactory = springBootVersion === 4
|
|
102
102
|
// Jackson 3's ObjectMapper is immutable; configuration moved to the (Kotlin) mapper builder.
|
|
103
|
-
? s `${kt.refs.jackson.jacksonMapperBuilder(springBootVersion)}()${s.indent `
|
|
104
|
-
.findAndAddModules()
|
|
105
|
-
.changeDefaultPropertyInclusion { it.withValueInclusion(${kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember}).withContentInclusion(${kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember}) }
|
|
106
|
-
.configure(${kt.refs.jackson.serializationFeature(springBootVersion)}.WRITE_DATES_AS_TIMESTAMPS, false)
|
|
107
|
-
.configure(${kt.refs.jackson.deserializationFeature(springBootVersion)}.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
|
103
|
+
? s `${kt.refs.jackson.jacksonMapperBuilder(springBootVersion)}()${s.indent `
|
|
104
|
+
.findAndAddModules()
|
|
105
|
+
.changeDefaultPropertyInclusion { it.withValueInclusion(${kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember}).withContentInclusion(${kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember}) }
|
|
106
|
+
.configure(${kt.refs.jackson.serializationFeature(springBootVersion)}.WRITE_DATES_AS_TIMESTAMPS, false)
|
|
107
|
+
.configure(${kt.refs.jackson.deserializationFeature(springBootVersion)}.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
|
108
108
|
.build()`}`
|
|
109
|
-
: s `${kt.refs.jackson.jacksonObjectMapper(springBootVersion)}()${s.indent `
|
|
110
|
-
.findAndRegisterModules()
|
|
111
|
-
.setSerializationInclusion(${kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember})
|
|
112
|
-
.configure(${kt.refs.jackson.serializationFeature(springBootVersion)}.WRITE_DATES_AS_TIMESTAMPS, false)
|
|
109
|
+
: s `${kt.refs.jackson.jacksonObjectMapper(springBootVersion)}()${s.indent `
|
|
110
|
+
.findAndRegisterModules()
|
|
111
|
+
.setSerializationInclusion(${kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember})
|
|
112
|
+
.configure(${kt.refs.jackson.serializationFeature(springBootVersion)}.WRITE_DATES_AS_TIMESTAMPS, false)
|
|
113
113
|
.configure(${kt.refs.jackson.deserializationFeature(springBootVersion)}.FAIL_ON_UNKNOWN_PROPERTIES, false)`}`;
|
|
114
114
|
const factory = typeof ctx.config.serializer === 'object'
|
|
115
115
|
? ctx.config.serializer.factory
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spring-controller-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/spring-controllers/spring-controller-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAIrB,KAAK,YAAY,EAGjB,aAAa,EAEd,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,0CAA0C,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,KAAK,EAAE,6BAA6B,EAAE,4BAA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C,UAAU,CAAC,OAAO,CAAC,EAAE;IA0H3B,SAAS,CAAC,sCAAsC,CAC9C,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,WAAW,EACrB,SAAS,EAAE,6BAA6B,GACvC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"spring-controller-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/spring-controllers/spring-controller-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAIrB,KAAK,YAAY,EAGjB,aAAa,EAEd,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,0CAA0C,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,KAAK,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE/F,KAAK,OAAO,GAAG,6BAA6B,CAAC;AAC7C,KAAK,MAAM,GAAG,4BAA4B,CAAC;AAC3C,KAAK,OAAO,GAAG,iBAAiB,CAAC;AAIjC,MAAM,WAAW,+BAA+B,CAC9C,OAAO,SAAS,MAAM,GAAG,MAAM;IAE/B,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,qBAAa,sCAAuC,SAAQ,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAC7F,YAAW,+BAA+B;IACnC,QAAQ,CACb,GAAG,EAAE,6BAA6B,GACjC,Y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EAAE,IAAI,CAAC,mBAAmB,GAC7B,MAAM;IAKT,SAAS,CAAC,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,GAAG,MAAM;IAO1E,SAAS,CAAC,wBAAwB,CAChC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,IAAI,CAAC,wBAAwB,GAClC,MAAM;IAQT,SAAS,CAAC,mBAAmB,CAC3B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,IAAI,CAAC,mBAAmB,GAC9B,MAAM;IAIT,SAAS,CAAC,oBAAoB,CAC5B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,IAAI,CAAC,oBAAoB,GAC/B,MAAM;IAOT,SAAS,CAAC,2BAA2B,CACnC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,IAAI,CAAC,2BAA2B,GACtC,MAAM;IAOT,SAAS,CAAC,gBAAgB,CACxB,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,IAAI,CAAC,gBAAgB,GAC1B,6BAA6B,EAAE;IA2DlC,OAAO,CAAC,kBAAkB;CAkB3B;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAQ1D"}
|
|
@@ -2,7 +2,7 @@ import { appendValueGroup, builderTemplate as s, createOverwriteProxy, getSource
|
|
|
2
2
|
import { getReasonPhrase } from 'http-status-codes';
|
|
3
3
|
import { kt } from '../../../ast/index.js';
|
|
4
4
|
import { KotlinFileBuilder } from '../../../file-builder.js';
|
|
5
|
-
import {
|
|
5
|
+
import { getSourceDocLine, modifyString } from '../../../utils.js';
|
|
6
6
|
import { KotlinFileGenerator } from '../../file-generator.js';
|
|
7
7
|
const strictResponseCustomProperty = 'strict-response';
|
|
8
8
|
export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator {
|
|
@@ -170,42 +170,37 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
170
170
|
return annotations;
|
|
171
171
|
}
|
|
172
172
|
getApiInterfaceEndpointMethodParameter(ctx, endpoint, parameter) {
|
|
173
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
174
|
+
const isEnumSchema = ((_a = parameter.schema) === null || _a === void 0 ? void 0 : _a.kind) === 'string' &&
|
|
175
|
+
((_b = parameter.schema.enum) === null || _b === void 0 ? void 0 : _b.length) &&
|
|
176
|
+
this.getSchemaType(ctx, { schema: parameter.schema }) &&
|
|
177
|
+
!parameter.multipart;
|
|
177
178
|
const actualType = this.getSchemaType(ctx, { schema: parameter.schema });
|
|
178
|
-
const
|
|
179
|
-
!!this.getSchemaType(ctx, { schema: enumValueSchema });
|
|
180
|
-
const schemaType = !isEnumSchema
|
|
181
|
-
? actualType
|
|
182
|
-
: enumItemSchema
|
|
183
|
-
? kt.refs.list([kt.refs.string()], { nullable: actualType === null || actualType === void 0 ? void 0 : actualType.nullable })
|
|
184
|
-
: kt.refs.string({ nullable: actualType === null || actualType === void 0 ? void 0 : actualType.nullable });
|
|
179
|
+
const schemaType = isEnumSchema ? kt.refs.string({ nullable: actualType === null || actualType === void 0 ? void 0 : actualType.nullable }) : actualType;
|
|
185
180
|
const result = kt.parameter(toCasing(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, {
|
|
186
181
|
endpoint,
|
|
187
182
|
parameter,
|
|
188
183
|
type: isEnumSchema ? schemaType : undefined,
|
|
189
184
|
}), {
|
|
190
|
-
default: parameter.multipart && ((
|
|
191
|
-
? kt.toNode((
|
|
185
|
+
default: parameter.multipart && ((_c = parameter.schema) === null || _c === void 0 ? void 0 : _c.default) !== undefined
|
|
186
|
+
? kt.toNode((_d = parameter.schema) === null || _d === void 0 ? void 0 : _d.default)
|
|
192
187
|
: null,
|
|
193
188
|
});
|
|
194
189
|
if (ctx.config.addSwaggerAnnotations) {
|
|
195
190
|
const annotation = kt.annotation(kt.refs.swagger.parameter(), [
|
|
196
191
|
parameter.multipart ? kt.argument.named('name', kt.string(parameter.multipart.name)) : null,
|
|
197
192
|
parameter.description
|
|
198
|
-
? kt.argument.named('description', kt.string((
|
|
193
|
+
? kt.argument.named('description', kt.string((_e = parameter.description) === null || _e === void 0 ? void 0 : _e.trim()))
|
|
199
194
|
: null,
|
|
200
195
|
kt.argument.named('required', parameter.required),
|
|
201
196
|
parameter.target === 'header' ? kt.argument.named('hidden', kt.toNode(true)) : null,
|
|
202
197
|
]);
|
|
203
198
|
const schemaArgs = [];
|
|
204
|
-
if (((
|
|
205
|
-
schemaArgs.push(kt.argument.named('defaultValue', kt.string(String((
|
|
199
|
+
if (((_f = parameter.schema) === null || _f === void 0 ? void 0 : _f.default) !== undefined) {
|
|
200
|
+
schemaArgs.push(kt.argument.named('defaultValue', kt.string(String((_g = parameter.schema) === null || _g === void 0 ? void 0 : _g.default))));
|
|
206
201
|
}
|
|
207
202
|
if (isEnumSchema) {
|
|
208
|
-
schemaArgs.push(kt.argument.named('allowableValues', kt.collectionLiteral((
|
|
203
|
+
schemaArgs.push(kt.argument.named('allowableValues', kt.collectionLiteral((_j = (_h = parameter.schema) === null || _h === void 0 ? void 0 : _h.enum) === null || _j === void 0 ? void 0 : _j.map((x) => kt.string(x === null || x === void 0 ? void 0 : x.toString())))));
|
|
209
204
|
}
|
|
210
205
|
if (schemaArgs.length) {
|
|
211
206
|
annotation.arguments.push(kt.argument.named('schema', kt.call([kt.refs.swagger.schema()], schemaArgs)));
|
|
@@ -218,17 +213,15 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
218
213
|
result.annotations.push(kt.annotation(kt.refs.jakarta.valid()));
|
|
219
214
|
}
|
|
220
215
|
if (parameter.target === 'body' && !parameter.multipart) {
|
|
221
|
-
|
|
222
|
-
// annotation too - the nullable parameter type alone still answers 400 when the body is missing.
|
|
223
|
-
result.annotations.push(kt.annotation(kt.refs.spring.requestBody(), parameter.required ? [] : [kt.argument.named('required', parameter.required)]));
|
|
216
|
+
result.annotations.push(kt.annotation(kt.refs.spring.requestBody()));
|
|
224
217
|
}
|
|
225
218
|
if (parameter.target === 'query') {
|
|
226
219
|
const annotation = kt.annotation(kt.refs.spring.requestParam(), [
|
|
227
220
|
kt.argument.named('value', kt.string(parameter.name)),
|
|
228
221
|
kt.argument.named('required', parameter.required),
|
|
229
222
|
]);
|
|
230
|
-
if (((
|
|
231
|
-
annotation.arguments.push(kt.argument.named('defaultValue', kt.string(String((
|
|
223
|
+
if (((_k = parameter.schema) === null || _k === void 0 ? void 0 : _k.default) !== undefined) {
|
|
224
|
+
annotation.arguments.push(kt.argument.named('defaultValue', kt.string(String((_l = parameter.schema) === null || _l === void 0 ? void 0 : _l.default))));
|
|
232
225
|
}
|
|
233
226
|
result.annotations.push(annotation);
|
|
234
227
|
}
|
|
@@ -255,25 +248,22 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
255
248
|
parameters.forEach((x) => {
|
|
256
249
|
var _a, _b;
|
|
257
250
|
const paramName = toCasing(x.name, ctx.config.parameterNameCasing);
|
|
258
|
-
if (x.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
const enumType = this.getSchemaType(ctx, { schema: enumValueSchema });
|
|
266
|
-
if (schemaType && enumType) {
|
|
267
|
-
body.values.push(s `val ${paramName} = ${paramName}${schemaType.nullable || (!x.required && !((_b = x.schema) === null || _b === void 0 ? void 0 : _b.default)) ? '?' : ''}.${enumItemSchema ? 'map' : 'let'} { ${enumType}.fromValue(it) ?: return ${kt.refs.spring.responseEntity.infer()}.status(${kt.refs.spring.httpStatus()}.BAD_REQUEST).body(${kt.string(`Invalid value for parameter ${x.name}`)}) }`);
|
|
251
|
+
if (((_a = x.schema) === null || _a === void 0 ? void 0 : _a.kind) === 'string' &&
|
|
252
|
+
((_b = x.schema.enum) === null || _b === void 0 ? void 0 : _b.length) &&
|
|
253
|
+
!x.multipart) {
|
|
254
|
+
const type = this.getSchemaType(ctx, { schema: x.schema });
|
|
255
|
+
if (type) {
|
|
256
|
+
body.values.push(s `val ${paramName} = ${paramName}${type.nullable || (!x.required && !x.schema.default) ? '?' : ''}.let { ${type}.fromValue(it) ?: return ${kt.refs.spring.responseEntity.infer()}.status(${kt.refs.spring.httpStatus()}.BAD_REQUEST).body(${kt.string(`Invalid value for parameter ${x.name}`)}) }`);
|
|
257
|
+
}
|
|
268
258
|
}
|
|
269
259
|
});
|
|
270
|
-
body.values.push(s `try {${s.indent `
|
|
260
|
+
body.values.push(s `try {${s.indent `
|
|
271
261
|
return ${kt.call([
|
|
272
262
|
kt.call(kt.reference('getDelegate'), []),
|
|
273
263
|
toCasing(endpoint.name, ctx.config.functionNameCasing),
|
|
274
|
-
], parameters.map((x) => toCasing(x.name, ctx.config.parameterNameCasing)))}`}
|
|
275
|
-
} catch (e: ${kt.refs.throwable()}) {${s.indent `
|
|
276
|
-
return getExceptionHandler()?.handleApiException(e) ?: throw e`}
|
|
264
|
+
], parameters.map((x) => toCasing(x.name, ctx.config.parameterNameCasing)))}`}
|
|
265
|
+
} catch (e: ${kt.refs.throwable()}) {${s.indent `
|
|
266
|
+
return getExceptionHandler()?.handleApiException(e) ?: throw e`}
|
|
277
267
|
}`);
|
|
278
268
|
return body;
|
|
279
269
|
}
|
|
@@ -335,11 +325,11 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
335
325
|
hasResponseBody ? kt.argument('body') : kt.toNode(null),
|
|
336
326
|
kt.toNode(code),
|
|
337
327
|
contentType
|
|
338
|
-
? s `${kt.refs.spring.linkedMultiValueMap([kt.refs.string(), kt.refs.string()])}().also {
|
|
339
|
-
if (headers != null) {
|
|
340
|
-
it.putAll(headers)
|
|
341
|
-
}
|
|
342
|
-
it.addIfAbsent("Content-Type", ${kt.string(contentType)})
|
|
328
|
+
? s `${kt.refs.spring.linkedMultiValueMap([kt.refs.string(), kt.refs.string()])}().also {
|
|
329
|
+
if (headers != null) {
|
|
330
|
+
it.putAll(headers)
|
|
331
|
+
}
|
|
332
|
+
it.addIfAbsent("Content-Type", ${kt.string(contentType)})
|
|
343
333
|
}`
|
|
344
334
|
: kt.argument('headers'),
|
|
345
335
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spring-reactive-web-client-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAIrB,KAAK,YAAY,EAGjB,aAAa,EAEd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iDAAiD,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC;AAC5F,OAAO,KAAK,EACV,6CAA6C,EAC7C,4CAA4C,EAC7C,MAAM,aAAa,CAAC;AAErB,KAAK,OAAO,GAAG,6CAA6C,CAAC;AAC7D,KAAK,MAAM,GAAG,4CAA4C,CAAC;AAC3D,KAAK,OAAO,GAAG,iBAAiB,CAAC;AAEjC,MAAM,WAAW,sCAAsC,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IACrF,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;CAC/C;AAED,qBAAa,6CAA8C,SAAQ,mBAAmB,CAAC,OAAO,EAAE,MAAM,CACpG,YAAW,sCAAsC;IAC1C,QAAQ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,IAAI,EAAE,IAAI,CAAC,0BAA0B,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;IAmB/G,SAAS,CAAC,8BAA8B,CACtC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,IAAI,CAAC,8BAA8B,GACxC,gBAAgB,CAAC,OAAO,CAAC;IA8G5B;;;;OAIG;IACH,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;IAoC5F,SAAS,CAAC,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,wBAAwB,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI;IAe/G,SAAS,CAAC,yBAAyB,CACjC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,IAAI,CAAC,yBAAyB,GACnC,gBAAgB,CAAC,OAAO,CAAC,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"spring-reactive-web-client-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,gBAAgB,EAErB,KAAK,gBAAgB,EAIrB,KAAK,YAAY,EAGjB,aAAa,EAEd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iDAAiD,IAAI,IAAI,EAAE,MAAM,YAAY,CAAC;AAC5F,OAAO,KAAK,EACV,6CAA6C,EAC7C,4CAA4C,EAC7C,MA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