@goast/kotlin 0.5.9-beta.1 → 0.5.9
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/assets/client/okhttp3/ApiAbstractions.kt +30 -30
- package/assets/client/okhttp3/ApiClient.kt +253 -253
- 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/ast/references/jackson.d.ts +5 -8
- package/esm/src/ast/references/jackson.d.ts.map +1 -1
- package/esm/src/ast/references/jackson.js +6 -14
- package/esm/src/config.d.ts +0 -10
- package/esm/src/config.d.ts.map +1 -1
- package/esm/src/config.js +0 -1
- 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 +32 -36
- package/esm/src/generators/services/okhttp3-clients/okhttp3-clients-generator.d.ts.map +1 -1
- package/esm/src/generators/services/okhttp3-clients/okhttp3-clients-generator.js +6 -22
- package/esm/src/generators/services/spring-controllers/spring-controller-generator.d.ts +11 -11
- 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 +19 -27
- 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 +1 -4
- package/package.json +2 -2
- package/script/src/ast/references/jackson.d.ts +5 -8
- package/script/src/ast/references/jackson.d.ts.map +1 -1
- package/script/src/ast/references/jackson.js +7 -20
- package/script/src/config.d.ts +0 -10
- package/script/src/config.d.ts.map +1 -1
- package/script/src/config.js +0 -1
- 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 +32 -36
- package/script/src/generators/services/okhttp3-clients/okhttp3-clients-generator.d.ts.map +1 -1
- package/script/src/generators/services/okhttp3-clients/okhttp3-clients-generator.js +6 -22
- package/script/src/generators/services/spring-controllers/spring-controller-generator.d.ts +11 -11
- 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 +19 -27
- 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 +1 -4
- package/src/mod.ts +8 -0
- package/src/src/assets.ts +9 -0
- package/src/src/ast/_index.ts +66 -0
- package/src/src/ast/common.ts +1 -0
- package/src/src/ast/index.ts +1 -0
- package/src/src/ast/node.ts +10 -0
- package/src/src/ast/nodes/annotation.ts +79 -0
- package/src/src/ast/nodes/argument.ts +62 -0
- package/src/src/ast/nodes/call.ts +75 -0
- package/src/src/ast/nodes/class.ts +178 -0
- package/src/src/ast/nodes/collection-literal.ts +49 -0
- package/src/src/ast/nodes/constructor.ts +126 -0
- package/src/src/ast/nodes/doc-tag.ts +138 -0
- package/src/src/ast/nodes/doc.ts +111 -0
- package/src/src/ast/nodes/enum-value.ts +100 -0
- package/src/src/ast/nodes/enum.ts +163 -0
- package/src/src/ast/nodes/function.ts +178 -0
- package/src/src/ast/nodes/generic-parameter.ts +54 -0
- package/src/src/ast/nodes/init-block.ts +38 -0
- package/src/src/ast/nodes/interface.ts +133 -0
- package/src/src/ast/nodes/lambda-type.ts +73 -0
- package/src/src/ast/nodes/lambda.ts +74 -0
- package/src/src/ast/nodes/object.ts +102 -0
- package/src/src/ast/nodes/parameter.ts +118 -0
- package/src/src/ast/nodes/property.ts +225 -0
- package/src/src/ast/nodes/reference.ts +178 -0
- package/src/src/ast/nodes/string.ts +114 -0
- package/src/src/ast/nodes/types.ts +23 -0
- package/src/src/ast/references/index.ts +10 -0
- package/src/src/ast/references/jackson.ts +44 -0
- package/src/src/ast/references/jakarta.ts +14 -0
- package/src/src/ast/references/java.ts +27 -0
- package/src/src/ast/references/kotlin.ts +41 -0
- package/src/src/ast/references/kotlinx.ts +14 -0
- package/src/src/ast/references/okhttp3.ts +5 -0
- package/src/src/ast/references/reactor.ts +5 -0
- package/src/src/ast/references/spring-reactive.ts +33 -0
- package/src/src/ast/references/spring.ts +86 -0
- package/src/src/ast/references/swagger.ts +23 -0
- package/src/src/ast/utils/get-kotlin-builder-options.ts +19 -0
- package/src/src/ast/utils/to-kt-node.ts +31 -0
- package/src/src/ast/utils/write-kt-annotations.ts +15 -0
- package/src/src/ast/utils/write-kt-arguments.ts +45 -0
- package/src/src/ast/utils/write-kt-enum-values.ts +27 -0
- package/src/src/ast/utils/write-kt-generic-parameters.ts +12 -0
- package/src/src/ast/utils/write-kt-members.ts +25 -0
- package/src/src/ast/utils/write-kt-node.ts +37 -0
- package/src/src/ast/utils/write-kt-parameters.ts +25 -0
- package/src/src/common-results.ts +4 -0
- package/src/src/config.ts +48 -0
- package/src/src/file-builder.ts +112 -0
- package/src/src/generators/file-generator.ts +29 -0
- package/src/src/generators/index.ts +5 -0
- package/src/src/generators/models/args.ts +136 -0
- package/src/src/generators/models/index.ts +4 -0
- package/src/src/generators/models/model-generator.ts +725 -0
- package/src/src/generators/models/models-generator.ts +65 -0
- package/src/src/generators/models/models.ts +95 -0
- package/src/src/generators/services/okhttp3-clients/args.ts +90 -0
- package/src/src/generators/services/okhttp3-clients/index.ts +4 -0
- package/src/src/generators/services/okhttp3-clients/models.ts +73 -0
- package/src/src/generators/services/okhttp3-clients/okhttp3-client-generator.ts +609 -0
- package/src/src/generators/services/okhttp3-clients/okhttp3-clients-generator.ts +169 -0
- package/src/src/generators/services/okhttp3-clients/refs.ts +59 -0
- package/src/src/generators/services/spring-controllers/args.ts +95 -0
- package/src/src/generators/services/spring-controllers/index.ts +4 -0
- package/src/src/generators/services/spring-controllers/models.ts +76 -0
- package/src/src/generators/services/spring-controllers/refs.ts +17 -0
- package/src/src/generators/services/spring-controllers/spring-controller-generator.ts +1099 -0
- package/src/src/generators/services/spring-controllers/spring-controllers-generator.ts +140 -0
- package/src/src/generators/services/spring-reactive-web-clients/args.ts +103 -0
- package/src/src/generators/services/spring-reactive-web-clients/index.ts +4 -0
- package/src/src/generators/services/spring-reactive-web-clients/models.ts +62 -0
- package/src/src/generators/services/spring-reactive-web-clients/refs.ts +11 -0
- package/src/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.ts +583 -0
- package/src/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.ts +125 -0
- package/src/src/import-collection.ts +98 -0
- package/src/src/types.ts +3 -0
- package/src/src/utils.ts +47 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AppendValueGroup, type BasicAppendValue, type MaybePromise, SourceBuilder } from '@goast/core';
|
|
1
|
+
import { type ApiEndpoint, type AppendValueGroup, type BasicAppendValue, type MaybePromise, SourceBuilder } from '@goast/core';
|
|
2
2
|
import { kt } from '../../../ast/index.js';
|
|
3
3
|
import type { KotlinImport } from '../../../common-results.js';
|
|
4
4
|
import { KotlinFileBuilder } from '../../../file-builder.js';
|
|
@@ -17,23 +17,23 @@ export declare class DefaultKotlinSpringControllerGenerator extends KotlinFileGe
|
|
|
17
17
|
protected generateApiInterfaceFile(ctx: Context, args: Args.GenerateApiInterfaceFile): KotlinImport;
|
|
18
18
|
protected getApiInterfaceFileContent(ctx: Context, args: Args.GetApiInterfaceFileContent): AppendValueGroup<Builder>;
|
|
19
19
|
protected getApiInterface(ctx: Context, args: Args.GetApiInterface): kt.Interface<Builder>;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
protected getApiInterfaceAnnotations(ctx: Context): kt.Annotation<Builder>[];
|
|
21
|
+
protected getApiInterfaceMembers(ctx: Context): kt.InterfaceMember<Builder>[];
|
|
22
22
|
protected getApiInterfaceEndpointMethod(ctx: Context, args: Args.GetApiInterfaceEndpointMethod): kt.Function<Builder>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
protected getApiInterfaceEndpointMethodAnnnotations(ctx: Context, endpoint: ApiEndpoint): kt.Annotation<Builder>[];
|
|
24
|
+
protected getApiInterfaceEndpointMethodParameter(ctx: Context, endpoint: ApiEndpoint, parameter: ApiParameterWithMultipartInfo): kt.Parameter<Builder>;
|
|
25
|
+
protected getApiInterfaceEndpointMethodBody(ctx: Context, endpoint: ApiEndpoint, parameters: ApiParameterWithMultipartInfo[]): AppendValueGroup<Builder>;
|
|
26
|
+
protected getApiResponseEntityClass(ctx: Context, args: Args.GetApiResponseEntityClass): kt.Class<Builder>;
|
|
27
27
|
protected generateApiControllerFile(ctx: Context, args: Args.GenerateApiControllerFile): KotlinImport;
|
|
28
28
|
protected getApiControllerFileContent(ctx: Context, args: Args.GetApiControllerFileContent): AppendValueGroup<Builder>;
|
|
29
29
|
protected getApiController(ctx: Context, args: Args.GetApiController): kt.Class<Builder>;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
protected getApiControllerAnnotations(ctx: Context): kt.Annotation<Builder>[];
|
|
31
|
+
protected getApiControllerMembers(ctx: Context): kt.ClassMember<Builder>[];
|
|
32
32
|
protected generateApiDelegateInterfaceFile(ctx: Context, args: Args.GenerateApiDelegateInterfaceFile): KotlinImport;
|
|
33
33
|
protected getApiDelegateInterfaceFileContent(ctx: Context, args: Args.GetApiDelegateInterfaceFileContent): AppendValueGroup<Builder>;
|
|
34
34
|
protected getApiDelegateInterface(ctx: Context, args: Args.GetApiDelegateInterface): kt.Interface<Builder>;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
protected getApiDelegateInterfaceAnnotations(ctx: Context): kt.Annotation<Builder>[];
|
|
36
|
+
protected getApiDelegateInterfaceMembers(ctx: Context): kt.InterfaceMember<Builder>[];
|
|
37
37
|
protected getApiDelegateInterfaceEndpointMethod(ctx: Context, args: Args.GetApiDelegateInterfaceEndpointMethod): kt.Function<Builder>;
|
|
38
38
|
protected getParameterType(ctx: Context, args: Args.GetParameterType): kt.Type<Builder>;
|
|
39
39
|
protected getResponseType(ctx: Context, args: Args.GetResponseType): kt.Type<Builder>;
|
|
@@ -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,
|
|
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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IAAI,CAAC,eAAe,GAAG,MAAM;IAK3E,SAAS,CAAC,gBAAgB,CACxB,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,IAAI,CAAC,gBAAgB,GAC1B,MAAM;IAKT,SAAS,CAAC,mBAAmB,CAC3B,GAAG,EAAE,OAAO,EACZ,IAAI,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"}
|
|
@@ -4,6 +4,7 @@ import { kt } from '../../../ast/index.js';
|
|
|
4
4
|
import { KotlinFileBuilder } from '../../../file-builder.js';
|
|
5
5
|
import { getSourceDocLine, modifyString } from '../../../utils.js';
|
|
6
6
|
import { KotlinFileGenerator } from '../../file-generator.js';
|
|
7
|
+
const strictResponseCustomProperty = 'strict-response';
|
|
7
8
|
export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator {
|
|
8
9
|
generate(ctx) {
|
|
9
10
|
const packageName = this.getPackageName(ctx, {});
|
|
@@ -81,9 +82,9 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
81
82
|
ctx.service.endpoints.forEach((endpoint) => {
|
|
82
83
|
members.push(this.getApiInterfaceEndpointMethod(ctx, { endpoint }));
|
|
83
84
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
members.push(...ctx.service.endpoints
|
|
86
|
+
.filter((endpoint) => { var _a; return (_a = endpoint.custom[strictResponseCustomProperty]) !== null && _a !== void 0 ? _a : ctx.config.strictResponseEntities; })
|
|
87
|
+
.map((endpoint) => this.getApiResponseEntityClass(ctx, { endpoint })));
|
|
87
88
|
return members;
|
|
88
89
|
}
|
|
89
90
|
getApiInterfaceEndpointMethod(ctx, args) {
|
|
@@ -256,28 +257,24 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
256
257
|
}
|
|
257
258
|
}
|
|
258
259
|
});
|
|
259
|
-
body.values.push(s `try {${s.indent `
|
|
260
|
+
body.values.push(s `try {${s.indent `
|
|
260
261
|
return ${kt.call([
|
|
261
262
|
kt.call(kt.reference('getDelegate'), []),
|
|
262
263
|
toCasing(endpoint.name, ctx.config.functionNameCasing),
|
|
263
|
-
], parameters.map((x) => toCasing(x.name, ctx.config.parameterNameCasing)))}`}
|
|
264
|
-
} catch (e: ${kt.refs.throwable()}) {${s.indent `
|
|
265
|
-
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`}
|
|
266
267
|
}`);
|
|
267
268
|
return body;
|
|
268
269
|
}
|
|
269
270
|
getApiResponseEntityClass(ctx, args) {
|
|
270
271
|
const { endpoint } = args;
|
|
271
272
|
const name = this.getApiResponseEntityName(ctx, { endpoint });
|
|
272
|
-
// Spring 7's `ResponseEntity<T>` carries an `Any` upper bound (JSpecify), so the subclass must bound `T`.
|
|
273
|
-
// The body parameter is then made nullable (`T?`) to keep null-body ("no response body") responses legal
|
|
274
|
-
// while staying wire-identical, since Spring's super constructor accepts a `@Nullable T body`.
|
|
275
|
-
const springBoot4 = ctx.config.springBootVersion === 4;
|
|
276
273
|
return kt.class(name, {
|
|
277
274
|
doc: kt.doc(`Response entity for ${endpoint.name}.`),
|
|
278
|
-
generics: [kt.genericParameter('T'
|
|
275
|
+
generics: [kt.genericParameter('T')],
|
|
279
276
|
primaryConstructor: kt.constructor([
|
|
280
|
-
kt.parameter.class('body', kt.reference('T'
|
|
277
|
+
kt.parameter.class('body', kt.reference('T')),
|
|
281
278
|
kt.parameter.class('rawStatus', kt.refs.int()),
|
|
282
279
|
kt.parameter.class('headers', kt.refs.spring.multiValueMap([kt.refs.string(), kt.refs.string()], {
|
|
283
280
|
nullable: true,
|
|
@@ -313,22 +310,18 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
313
310
|
body: kt.call([
|
|
314
311
|
kt.reference(this.getApiResponseEntityName(ctx, { endpoint }), null, {
|
|
315
312
|
generics: [
|
|
316
|
-
hasResponseBody
|
|
317
|
-
? responseType
|
|
318
|
-
// `Unit?` violates the `T : Any` bound under Spring Boot 4; the `null` body argument
|
|
319
|
-
// below stays (now legal because the subclass body parameter is nullable).
|
|
320
|
-
: (springBoot4 ? kt.refs.unit() : kt.refs.unit({ nullable: true })),
|
|
313
|
+
hasResponseBody ? responseType : kt.refs.unit({ nullable: true }),
|
|
321
314
|
],
|
|
322
315
|
}),
|
|
323
316
|
], [
|
|
324
317
|
hasResponseBody ? kt.argument('body') : kt.toNode(null),
|
|
325
318
|
kt.toNode(code),
|
|
326
319
|
contentType
|
|
327
|
-
? s `${kt.refs.spring.linkedMultiValueMap([kt.refs.string(), kt.refs.string()])}().also {
|
|
328
|
-
if (headers != null) {
|
|
329
|
-
it.putAll(headers)
|
|
330
|
-
}
|
|
331
|
-
it.addIfAbsent("Content-Type", ${kt.string(contentType)})
|
|
320
|
+
? s `${kt.refs.spring.linkedMultiValueMap([kt.refs.string(), kt.refs.string()])}().also {
|
|
321
|
+
if (headers != null) {
|
|
322
|
+
it.putAll(headers)
|
|
323
|
+
}
|
|
324
|
+
it.addIfAbsent("Content-Type", ${kt.string(contentType)})
|
|
332
325
|
}`
|
|
333
326
|
: kt.argument('headers'),
|
|
334
327
|
]),
|
|
@@ -467,6 +460,7 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
467
460
|
return members;
|
|
468
461
|
}
|
|
469
462
|
getApiDelegateInterfaceEndpointMethod(ctx, args) {
|
|
463
|
+
var _a;
|
|
470
464
|
const { endpoint } = args;
|
|
471
465
|
const parameters = this.getAllParameters(ctx, { endpoint });
|
|
472
466
|
const fn = kt.function(toCasing(endpoint.name, ctx.config.functionNameCasing), {
|
|
@@ -476,7 +470,7 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
476
470
|
return kt.parameter(toCasing(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, { endpoint, parameter }));
|
|
477
471
|
}),
|
|
478
472
|
});
|
|
479
|
-
if (ctx.config.strictResponseEntities) {
|
|
473
|
+
if ((_a = endpoint.custom[strictResponseCustomProperty]) !== null && _a !== void 0 ? _a : ctx.config.strictResponseEntities) {
|
|
480
474
|
const responseEntity = kt.reference.genericFactory(this.getApiResponseEntityName(ctx, { endpoint }), `${this.getPackageName(ctx, {})}.${this.getApiInterfaceName(ctx, {})}`);
|
|
481
475
|
fn.returnType = responseEntity(['*']);
|
|
482
476
|
fn.body = appendValueGroup([
|
|
@@ -532,9 +526,7 @@ export class DefaultKotlinSpringControllerGenerator extends KotlinFileGenerator
|
|
|
532
526
|
return kt.refs.unit();
|
|
533
527
|
}
|
|
534
528
|
else {
|
|
535
|
-
|
|
536
|
-
// so the ambiguous/unknown-body fallback must be non-null `Any` rather than `Any?`.
|
|
537
|
-
return ctx.config.springBootVersion === 4 ? kt.refs.any() : kt.refs.any({ nullable: true });
|
|
529
|
+
return kt.refs.any({ nullable: true });
|
|
538
530
|
}
|
|
539
531
|
}
|
|
540
532
|
getTypeUsage(ctx, args) {
|
|
@@ -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,CAAC,GAAG,EAAE,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC;IAoBnD,SAAS,CAAC,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,oBAAoB,GAAG,gBAAgB,CAAC,OAAO,CAAC;IAKxG,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;IAS3F,SAAS,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;IAYrG,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,uBAAuB,GAAG,MAAM;IAK3F,SAAS,CAAC,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;IAoBjG,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,uBAAuB,GAAG,gBAAgB,CAAC,OAAO,CAAC;IA6B9G,SAAS,CAAC,8BAA8B,CACtC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,IAAI,CAAC,8BAA8B,GACxC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;
|
|
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,EAA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G,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;IAMnE,SAAS,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,qBAAqB,GAAG,MAAM;IAIvF,OAAO,CAAC,kBAAkB;CAgB3B"}
|
|
@@ -83,10 +83,7 @@ export class DefaultKotlinSpringReactiveWebClientGenerator extends KotlinFileGen
|
|
|
83
83
|
return kt.function(functionName, {
|
|
84
84
|
doc: kt.doc(this.getEndpointDocDescription(ctx, { endpoint })),
|
|
85
85
|
suspend: true,
|
|
86
|
-
|
|
87
|
-
generics: [
|
|
88
|
-
kt.genericParameter('T', ctx.config.springBootVersion === 4 ? { constraint: kt.refs.any() } : undefined),
|
|
89
|
-
],
|
|
86
|
+
generics: [kt.genericParameter('T')],
|
|
90
87
|
receiverType: kt.refs.springReactive.webClient(),
|
|
91
88
|
parameters: [
|
|
92
89
|
...parameters.map((parameter) => kt.parameter(toCasing(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, { endpoint, parameter }), { default: this.getParameterDefaultValue(ctx, { endpoint, parameter }) })),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goast/kotlin",
|
|
3
|
-
"version": "0.5.9
|
|
3
|
+
"version": "0.5.9",
|
|
4
4
|
"description": "Provides gOAst generators for generating Kotlin code from OpenAPI specifications.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Marc Schmidt (MaSch0212)",
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
"@types/node": "^20.9.0"
|
|
32
32
|
},
|
|
33
33
|
"_generatedBy": "dnt@dev"
|
|
34
|
-
}
|
|
34
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { SpringBootVersion } from '../../config.js';
|
|
3
|
-
import { type KtReference, type KtReferenceFactory } from '../nodes/reference.js';
|
|
1
|
+
import { type KtReferenceFactory } from '../nodes/reference.js';
|
|
4
2
|
export declare const jsonTypeInfo: KtReferenceFactory;
|
|
5
3
|
export declare const jsonSubTypes: KtReferenceFactory;
|
|
6
4
|
export declare const jsonClassDescription: KtReferenceFactory;
|
|
@@ -10,9 +8,8 @@ export declare const jsonInclude: KtReferenceFactory;
|
|
|
10
8
|
export declare const jsonIgnore: KtReferenceFactory;
|
|
11
9
|
export declare const jsonAnySetter: KtReferenceFactory;
|
|
12
10
|
export declare const jsonAnyGetter: KtReferenceFactory;
|
|
13
|
-
export declare const objectMapper:
|
|
14
|
-
export declare const serializationFeature:
|
|
15
|
-
export declare const deserializationFeature:
|
|
16
|
-
export declare const jacksonObjectMapper:
|
|
17
|
-
export declare const jacksonMapperBuilder: <TBuilder extends SourceBuilder>(springBootVersion?: SpringBootVersion) => KtReference<TBuilder>;
|
|
11
|
+
export declare const objectMapper: KtReferenceFactory;
|
|
12
|
+
export declare const serializationFeature: KtReferenceFactory;
|
|
13
|
+
export declare const deserializationFeature: KtReferenceFactory;
|
|
14
|
+
export declare const jacksonObjectMapper: KtReferenceFactory;
|
|
18
15
|
//# sourceMappingURL=jackson.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jackson.d.ts","sourceRoot":"","sources":["../../../../src/src/ast/references/jackson.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"jackson.d.ts","sourceRoot":"","sources":["../../../../src/src/ast/references/jackson.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG7E,eAAO,MAAM,YAAY,EAAE,kBAA4F,CAAC;AACxH,eAAO,MAAM,YAAY,EAAE,kBAA4F,CAAC;AACxH,eAAO,MAAM,oBAAoB,EAAE,kBAGlC,CAAC;AACF,eAAO,MAAM,YAAY,EAAE,kBAA4F,CAAC;AACxH,eAAO,MAAM,uBAAuB,EAAE,kBAGrC,CAAC;AACF,eAAO,MAAM,WAAW,EAAE,kBAA2F,CAAC;AACtH,eAAO,MAAM,UAAU,EAAE,kBAA0F,CAAC;AACpH,eAAO,MAAM,aAAa,EAAE,kBAG3B,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,kBAG3B,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,kBAG1B,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE,kBAGlC,CAAC;AACF,eAAO,MAAM,sBAAsB,EAAE,kBAGpC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,kBAGjC,CAAC"}
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.jacksonObjectMapper = exports.deserializationFeature = exports.serializationFeature = exports.objectMapper = exports.jsonAnyGetter = exports.jsonAnySetter = exports.jsonIgnore = exports.jsonInclude = exports.jsonPropertyDescription = exports.jsonProperty = exports.jsonClassDescription = exports.jsonSubTypes = exports.jsonTypeInfo = void 0;
|
|
4
4
|
const reference_js_1 = require("../nodes/reference.js");
|
|
5
|
-
/**
|
|
6
|
-
* Resolves a Jackson package name for the targeted Spring Boot version.
|
|
7
|
-
*
|
|
8
|
-
* Jackson 3 (the default in Spring Boot 4) moved every package **except annotations** from
|
|
9
|
-
* `com.fasterxml.jackson.*` to `tools.jackson.*`. Annotations stay on `com.fasterxml.jackson.annotation`.
|
|
10
|
-
*/
|
|
11
|
-
const jacksonPackage = (subPackage, springBootVersion) => `${springBootVersion === 4 ? 'tools.jackson' : 'com.fasterxml.jackson'}.${subPackage}`;
|
|
12
5
|
// com.fasterxml.jackson.annotation
|
|
13
6
|
exports.jsonTypeInfo = reference_js_1.ktReference.factory('JsonTypeInfo', 'com.fasterxml.jackson.annotation');
|
|
14
7
|
exports.jsonSubTypes = reference_js_1.ktReference.factory('JsonSubTypes', 'com.fasterxml.jackson.annotation');
|
|
@@ -19,15 +12,9 @@ exports.jsonInclude = reference_js_1.ktReference.factory('JsonInclude', 'com.fas
|
|
|
19
12
|
exports.jsonIgnore = reference_js_1.ktReference.factory('JsonIgnore', 'com.fasterxml.jackson.annotation');
|
|
20
13
|
exports.jsonAnySetter = reference_js_1.ktReference.factory('JsonAnySetter', 'com.fasterxml.jackson.annotation');
|
|
21
14
|
exports.jsonAnyGetter = reference_js_1.ktReference.factory('JsonAnyGetter', 'com.fasterxml.jackson.annotation');
|
|
22
|
-
// com.fasterxml.jackson.databind
|
|
23
|
-
|
|
24
|
-
exports.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports.deserializationFeature = deserializationFeature;
|
|
29
|
-
// com.fasterxml.jackson.module.kotlin (Jackson 2) / tools.jackson.module.kotlin (Jackson 3, Spring Boot 4)
|
|
30
|
-
const jacksonObjectMapper = (springBootVersion = 3) => (0, reference_js_1.ktReference)('jacksonObjectMapper', jacksonPackage('module.kotlin', springBootVersion));
|
|
31
|
-
exports.jacksonObjectMapper = jacksonObjectMapper;
|
|
32
|
-
const jacksonMapperBuilder = (springBootVersion = 3) => (0, reference_js_1.ktReference)('jacksonMapperBuilder', jacksonPackage('module.kotlin', springBootVersion));
|
|
33
|
-
exports.jacksonMapperBuilder = jacksonMapperBuilder;
|
|
15
|
+
// com.fasterxml.jackson.databind
|
|
16
|
+
exports.objectMapper = reference_js_1.ktReference.factory('ObjectMapper', 'com.fasterxml.jackson.databind');
|
|
17
|
+
exports.serializationFeature = reference_js_1.ktReference.factory('SerializationFeature', 'com.fasterxml.jackson.databind');
|
|
18
|
+
exports.deserializationFeature = reference_js_1.ktReference.factory('DeserializationFeature', 'com.fasterxml.jackson.databind');
|
|
19
|
+
// com.fasterxml.jackson.module.kotlin
|
|
20
|
+
exports.jacksonObjectMapper = reference_js_1.ktReference.factory('jacksonObjectMapper', 'com.fasterxml.jackson.module.kotlin');
|
package/script/src/config.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { DefaultGenerationProviderConfig, OpenApiGeneratorConfig, StringCasing, StringCasingWithOptions } from '@goast/core';
|
|
2
|
-
/** The Spring Boot major version the Kotlin generators target. */
|
|
3
|
-
export type SpringBootVersion = 3 | 4;
|
|
4
2
|
export type KotlinGeneratorConfig = OpenApiGeneratorConfig & {
|
|
5
3
|
typeNameCasing: StringCasing | StringCasingWithOptions;
|
|
6
4
|
parameterNameCasing: StringCasing | StringCasingWithOptions;
|
|
@@ -14,14 +12,6 @@ export type KotlinGeneratorConfig = OpenApiGeneratorConfig & {
|
|
|
14
12
|
* @default false
|
|
15
13
|
*/
|
|
16
14
|
includeSourceInDocs: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* The targeted Spring Boot major version. Controls Jackson package names, Kotlin generic bounds, and
|
|
19
|
-
* `ResponseEntity` nullability so the generated code compiles against the matching framework generation.
|
|
20
|
-
* - `3`: Spring Boot 3 (Spring Framework 6 / Jackson 2). Produces output identical to previous versions.
|
|
21
|
-
* - `4`: Spring Boot 4 (Spring Framework 7 / Jackson 3 / JSpecify null-safety).
|
|
22
|
-
* @default 3
|
|
23
|
-
*/
|
|
24
|
-
springBootVersion: SpringBootVersion;
|
|
25
15
|
};
|
|
26
16
|
export declare const defaultKotlinGeneratorConfig: DefaultGenerationProviderConfig<KotlinGeneratorConfig>;
|
|
27
17
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,sBAAsB,EACtB,YAAY,EACZ,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAErB,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,sBAAsB,EACtB,YAAY,EACZ,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,GAAG;IAC3D,cAAc,EAAE,YAAY,GAAG,uBAAuB,CAAC;IACvD,mBAAmB,EAAE,YAAY,GAAG,uBAAuB,CAAC;IAC5D,kBAAkB,EAAE,YAAY,GAAG,uBAAuB,CAAC;IAC3D,kBAAkB,EAAE,YAAY,GAAG,uBAAuB,CAAC;IAC3D,mBAAmB,EAAE,YAAY,GAAG,uBAAuB,CAAC;IAC5D,kBAAkB,EAAE,YAAY,GAAG,uBAAuB,CAAC;IAE3D,aAAa,EAAE,MAAM,EAAE,CAAC;IAExB;;;OAGG;IACH,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,+BAA+B,CAAC,qBAAqB,CAuB/F,CAAC"}
|
package/script/src/config.js
CHANGED
|
@@ -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,gBAAgB,CAAC,OAAO,CAAC;IAIzG,SAAS,CAAC,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,cAAc,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,mBAAm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,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"}
|
|
@@ -33,18 +33,14 @@ class DefaultKotlinOkHttp3Generator extends file_generator_js_1.KotlinFileGenera
|
|
|
33
33
|
],
|
|
34
34
|
extends: ctx.refs.apiClient(),
|
|
35
35
|
primaryConstructor: index_js_1.kt.constructor([
|
|
36
|
-
serializerAsParameter
|
|
37
|
-
? index_js_1.kt.parameter('objectMapper', index_js_1.kt.refs.jackson.objectMapper(ctx.config.springBootVersion))
|
|
38
|
-
: null,
|
|
36
|
+
serializerAsParameter ? index_js_1.kt.parameter('objectMapper', index_js_1.kt.refs.jackson.objectMapper()) : null,
|
|
39
37
|
index_js_1.kt.parameter('basePath', index_js_1.kt.refs.string(), { default: 'defaultBasePath' }),
|
|
40
38
|
index_js_1.kt.parameter('client', index_js_1.kt.refs.okhttp3.okHttpClient(), {
|
|
41
39
|
default: 'defaultClient',
|
|
42
40
|
}),
|
|
43
|
-
serializerAsParameter
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
default: index_js_1.kt.call([ctx.refs.serializer(), 'jacksonObjectMapper']),
|
|
47
|
-
}),
|
|
41
|
+
serializerAsParameter ? null : index_js_1.kt.parameter('objectMapper', index_js_1.kt.refs.jackson.objectMapper(), {
|
|
42
|
+
default: index_js_1.kt.call([ctx.refs.serializer(), 'jacksonObjectMapper']),
|
|
43
|
+
}),
|
|
48
44
|
], null, {
|
|
49
45
|
delegateTarget: 'super',
|
|
50
46
|
delegateArguments: ['basePath', 'objectMapper', 'client'],
|
|
@@ -112,31 +108,31 @@ class DefaultKotlinOkHttp3Generator extends file_generator_js_1.KotlinFileGenera
|
|
|
112
108
|
return (0, core_1.appendValueGroup)([
|
|
113
109
|
(0, core_1.builderTemplate) `val localVarResponse = ${index_js_1.kt.call([(0, core_1.toCasing)(endpoint.name + '_WithHttpInfo', ctx.config.functionNameCasing)], parameters.map((x) => (0, core_1.toCasing)(x.name, ctx.config.parameterNameCasing)))}`,
|
|
114
110
|
'',
|
|
115
|
-
(0, core_1.builderTemplate) `return when (localVarResponse.responseType) {${core_1.builderTemplate.indent `
|
|
111
|
+
(0, core_1.builderTemplate) `return when (localVarResponse.responseType) {${core_1.builderTemplate.indent `
|
|
116
112
|
${ctx.refs.responseType()}.Success -> ${responseSchema === undefined
|
|
117
113
|
? index_js_1.kt.refs.unit()
|
|
118
114
|
: (0, core_1.builderTemplate) `(localVarResponse as ${ctx.refs.success(['*'])}).data as ${this.getTypeUsage(ctx, {
|
|
119
115
|
schema: responseSchema,
|
|
120
|
-
})}`}
|
|
121
|
-
${ctx.refs.responseType()}.Informational -> throw ${index_js_1.kt.refs.java.unsupportedOperationException()}("Client does not support Informational responses.")
|
|
122
|
-
${ctx.refs.responseType()}.Redirection -> throw ${index_js_1.kt.refs.java.unsupportedOperationException()}("Client does not support Redirection responses.")
|
|
123
|
-
${ctx.refs.responseType()}.ClientError -> {${core_1.builderTemplate.indent `
|
|
124
|
-
val localVarError = localVarResponse as ${ctx.refs.clientError(['*'])}
|
|
125
|
-
throw ${ctx.refs.clientException()}(${core_1.builderTemplate.indent `
|
|
126
|
-
"Client error : \${localVarError.statusCode} \${localVarError.message.orEmpty()}",
|
|
127
|
-
localVarError.statusCode,
|
|
128
|
-
localVarResponse`}
|
|
129
|
-
)`}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
${ctx.refs.responseType()}.ServerError -> {${core_1.builderTemplate.indent `
|
|
133
|
-
val localVarError = localVarResponse as ${ctx.refs.serverError(['*'])}
|
|
134
|
-
throw ${ctx.refs.serverException()}(${core_1.builderTemplate.indent `
|
|
135
|
-
"Server error : \${localVarError.statusCode} \${localVarError.message.orEmpty()}",
|
|
136
|
-
localVarError.statusCode,
|
|
137
|
-
localVarResponse`}
|
|
138
|
-
)`}
|
|
139
|
-
}`}
|
|
116
|
+
})}`}
|
|
117
|
+
${ctx.refs.responseType()}.Informational -> throw ${index_js_1.kt.refs.java.unsupportedOperationException()}("Client does not support Informational responses.")
|
|
118
|
+
${ctx.refs.responseType()}.Redirection -> throw ${index_js_1.kt.refs.java.unsupportedOperationException()}("Client does not support Redirection responses.")
|
|
119
|
+
${ctx.refs.responseType()}.ClientError -> {${core_1.builderTemplate.indent `
|
|
120
|
+
val localVarError = localVarResponse as ${ctx.refs.clientError(['*'])}
|
|
121
|
+
throw ${ctx.refs.clientException()}(${core_1.builderTemplate.indent `
|
|
122
|
+
"Client error : \${localVarError.statusCode} \${localVarError.message.orEmpty()}",
|
|
123
|
+
localVarError.statusCode,
|
|
124
|
+
localVarResponse`}
|
|
125
|
+
)`}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
${ctx.refs.responseType()}.ServerError -> {${core_1.builderTemplate.indent `
|
|
129
|
+
val localVarError = localVarResponse as ${ctx.refs.serverError(['*'])}
|
|
130
|
+
throw ${ctx.refs.serverException()}(${core_1.builderTemplate.indent `
|
|
131
|
+
"Server error : \${localVarError.statusCode} \${localVarError.message.orEmpty()}",
|
|
132
|
+
localVarError.statusCode,
|
|
133
|
+
localVarResponse`}
|
|
134
|
+
)`}
|
|
135
|
+
}`}
|
|
140
136
|
}`,
|
|
141
137
|
], '\n');
|
|
142
138
|
}
|
|
@@ -215,16 +211,16 @@ class DefaultKotlinOkHttp3Generator extends file_generator_js_1.KotlinFileGenera
|
|
|
215
211
|
result.values.push(`val localVariableBody = ${bodyParamName}`);
|
|
216
212
|
}
|
|
217
213
|
}
|
|
218
|
-
result.values.push((0, core_1.builderTemplate) `val localVariableQuery: ${ctx.refs.multiValueMap()} = ${index_js_1.kt.call([index_js_1.kt.refs.mutableMapOf([index_js_1.kt.refs.string(), index_js_1.kt.refs.list([index_js_1.kt.refs.string()])])], [])}${queryParameters.length === 0 ? '' : core_1.builderTemplate.indent `
|
|
219
|
-
.apply {${core_1.builderTemplate.indent `
|
|
214
|
+
result.values.push((0, core_1.builderTemplate) `val localVariableQuery: ${ctx.refs.multiValueMap()} = ${index_js_1.kt.call([index_js_1.kt.refs.mutableMapOf([index_js_1.kt.refs.string(), index_js_1.kt.refs.list([index_js_1.kt.refs.string()])])], [])}${queryParameters.length === 0 ? '' : core_1.builderTemplate.indent `
|
|
215
|
+
.apply {${core_1.builderTemplate.indent `
|
|
220
216
|
${(0, core_1.appendValueGroup)(queryParameters.map((param) => {
|
|
221
217
|
const paramName = (0, core_1.toCasing)(param.name, ctx.config.parameterNameCasing);
|
|
222
218
|
const toString = this.getParameterToString(ctx, { endpoint, parameter: param });
|
|
223
219
|
const put = (0, core_1.builderTemplate) `put(${index_js_1.kt.string(param.name)}, listOf(${paramName}${toString}))`;
|
|
224
|
-
return param.required ? put : (0, core_1.builderTemplate) `if (${paramName} != null) {${core_1.builderTemplate.indent `
|
|
225
|
-
${put}`}
|
|
220
|
+
return param.required ? put : (0, core_1.builderTemplate) `if (${paramName} != null) {${core_1.builderTemplate.indent `
|
|
221
|
+
${put}`}
|
|
226
222
|
}`;
|
|
227
|
-
}), '\n')}`}
|
|
223
|
+
}), '\n')}`}
|
|
228
224
|
}`}`);
|
|
229
225
|
result.values.push('val localVariableHeaders: MutableMap<String, String> = mutableMapOf()');
|
|
230
226
|
if (((_b = endpoint.requestBody) === null || _b === void 0 ? void 0 : _b.content[0]) !== undefined) {
|
|
@@ -233,8 +229,8 @@ class DefaultKotlinOkHttp3Generator extends file_generator_js_1.KotlinFileGenera
|
|
|
233
229
|
for (const header of headerParameters) {
|
|
234
230
|
const paramName = (0, core_1.toCasing)(header.name, ctx.config.parameterNameCasing);
|
|
235
231
|
const toString = this.getParameterToString(ctx, { endpoint, parameter: header });
|
|
236
|
-
result.values.push((0, core_1.builderTemplate) `if (${paramName} != null) {${core_1.builderTemplate.indent `
|
|
237
|
-
localVariableHeaders["${header.name}"] = ${paramName}${toString}`}
|
|
232
|
+
result.values.push((0, core_1.builderTemplate) `if (${paramName} != null) {${core_1.builderTemplate.indent `
|
|
233
|
+
localVariableHeaders["${header.name}"] = ${paramName}${toString}`}
|
|
238
234
|
}`);
|
|
239
235
|
}
|
|
240
236
|
result.values.push((0, core_1.builderTemplate) `return ${index_js_1.kt.call([ctx.refs.requestConfig.infer()], [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"okhttp3-clients-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/okhttp3-clients/okhttp3-clients-generator.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,UAAU,EAGf,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,qCAAqC,EAGtC,MAAM,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAEL,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,oCAAoC,EACzC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACzC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAiC,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG3G,KAAK,KAAK,GAAG,kCAAkC,CAAC;AAChD,KAAK,MAAM,GAAG,mCAAmC,CAAC;AAClD,KAAK,MAAM,GAAG,mCAAmC,CAAC;AAClD,KAAK,aAAa,GAAG,kCAAkC,CAAC;AACxD,KAAK,OAAO,GAAG,oCAAoC,CAAC;AAEpD,qBAAa,6BAA8B,SAAQ,qCAAqC,CACtF,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,OAAO,CACR;IACC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAsC;gBAEnE,uBAAuB,CAAC,EAAE,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC;cAKhD,uBAAuB,CAAC,GAAG,EAAE,oCAAoC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1G,SAAS,CAAC,UAAU,IAAI,MAAM;IAQ9B,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,YAAY,CAAC,aAAa,CAAC;IAQzF,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI;IAI1F,SAAS,CAAC,YAAY,CACpB,OAAO,EAAE,uBAAuB,CAAC,4BAA4B,CAAC,EAC9D,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,SAAS,GACnC,OAAO;IAUV,SAAS,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAc9D,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;YAKlC,uBAAuB;
|
|
1
|
+
{"version":3,"file":"okhttp3-clients-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/okhttp3-clients/okhttp3-clients-generator.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,UAAU,EAGf,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,qCAAqC,EAGtC,MAAM,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAEL,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,oCAAoC,EACzC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACzC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAiC,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG3G,KAAK,KAAK,GAAG,kCAAkC,CAAC;AAChD,KAAK,MAAM,GAAG,mCAAmC,CAAC;AAClD,KAAK,MAAM,GAAG,mCAAmC,CAAC;AAClD,KAAK,aAAa,GAAG,kCAAkC,CAAC;AACxD,KAAK,OAAO,GAAG,oCAAoC,CAAC;AAEpD,qBAAa,6BAA8B,SAAQ,qCAAqC,CACtF,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,OAAO,CACR;IACC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAsC;gBAEnE,uBAAuB,CAAC,EAAE,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC;cAKhD,uBAAuB,CAAC,GAAG,EAAE,oCAAoC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1G,SAAS,CAAC,UAAU,IAAI,MAAM;IAQ9B,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,YAAY,CAAC,aAAa,CAAC;IAQzF,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI;IAI1F,SAAS,CAAC,YAAY,CACpB,OAAO,EAAE,uBAAuB,CAAC,4BAA4B,CAAC,EAC9D,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,SAAS,GACnC,OAAO;IAUV,SAAS,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAc9D,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;YAKlC,uBAAuB;CA+DtC"}
|
|
@@ -88,41 +88,25 @@ class KotlinOkHttp3ClientsGenerator extends core_1.OpenApiServicesGenerationProv
|
|
|
88
88
|
? 'val baseUrl: String, val objectMapper: ObjectMapper, val client: Factory = defaultClient'
|
|
89
89
|
: 'val baseUrl: String, val client: Factory = defaultClient, val objectMapper: ObjectMapper = Serializer.jacksonObjectMapper');
|
|
90
90
|
}
|
|
91
|
-
if (ctx.config.springBootVersion === 4) {
|
|
92
|
-
// Jackson 3 (Spring Boot 4) moved every package except annotations from
|
|
93
|
-
// `com.fasterxml.jackson.*` to `tools.jackson.*`. Rewrite the imports in the copied assets to match.
|
|
94
|
-
fileContent = fileContent.replace(/\bcom\.fasterxml\.jackson\.(core|databind|module|datatype|dataformat)\b/g, 'tools.jackson.$1');
|
|
95
|
-
}
|
|
96
91
|
(0, core_1.writeGeneratedFile)(ctx.config, targetPath, fileContent);
|
|
97
92
|
}
|
|
98
93
|
if (ctx.config.serializer === 'static' ||
|
|
99
94
|
typeof ctx.config.serializer === 'object' && ctx.config.serializer.mode === 'static') {
|
|
100
95
|
const filePath = (0, node_path_1.resolve)(targetDir, 'Serializer.kt');
|
|
101
96
|
console.log(`Generating Serializer to ${filePath}...`);
|
|
102
|
-
const springBootVersion = ctx.config.springBootVersion;
|
|
103
|
-
const jsonIncludeMember = (0, core_1.toCasing)(ctx.config.serializerJsonInclude, 'snake');
|
|
104
|
-
const defaultFactory = springBootVersion === 4
|
|
105
|
-
// Jackson 3's ObjectMapper is immutable; configuration moved to the (Kotlin) mapper builder.
|
|
106
|
-
? (0, core_1.builderTemplate) `${index_js_1.kt.refs.jackson.jacksonMapperBuilder(springBootVersion)}()${core_1.builderTemplate.indent `
|
|
107
|
-
.findAndAddModules()
|
|
108
|
-
.changeDefaultPropertyInclusion { it.withValueInclusion(${index_js_1.kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember}).withContentInclusion(${index_js_1.kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember}) }
|
|
109
|
-
.configure(${index_js_1.kt.refs.jackson.serializationFeature(springBootVersion)}.WRITE_DATES_AS_TIMESTAMPS, false)
|
|
110
|
-
.configure(${index_js_1.kt.refs.jackson.deserializationFeature(springBootVersion)}.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
|
111
|
-
.build()`}`
|
|
112
|
-
: (0, core_1.builderTemplate) `${index_js_1.kt.refs.jackson.jacksonObjectMapper(springBootVersion)}()${core_1.builderTemplate.indent `
|
|
113
|
-
.findAndRegisterModules()
|
|
114
|
-
.setSerializationInclusion(${index_js_1.kt.refs.jackson.jsonInclude()}.Include.${jsonIncludeMember})
|
|
115
|
-
.configure(${index_js_1.kt.refs.jackson.serializationFeature(springBootVersion)}.WRITE_DATES_AS_TIMESTAMPS, false)
|
|
116
|
-
.configure(${index_js_1.kt.refs.jackson.deserializationFeature(springBootVersion)}.FAIL_ON_UNKNOWN_PROPERTIES, false)`}`;
|
|
117
97
|
const factory = typeof ctx.config.serializer === 'object'
|
|
118
98
|
? ctx.config.serializer.factory
|
|
119
|
-
:
|
|
99
|
+
: (0, core_1.builderTemplate) `${index_js_1.kt.refs.jackson.jacksonObjectMapper()}()${core_1.builderTemplate.indent `
|
|
100
|
+
.findAndRegisterModules()
|
|
101
|
+
.setSerializationInclusion(${index_js_1.kt.refs.jackson.jsonInclude()}.Include.${(0, core_1.toCasing)(ctx.config.serializerJsonInclude, 'snake')})
|
|
102
|
+
.configure(${index_js_1.kt.refs.jackson.serializationFeature()}.WRITE_DATES_AS_TIMESTAMPS, false)
|
|
103
|
+
.configure(${index_js_1.kt.refs.jackson.deserializationFeature()}.FAIL_ON_UNKNOWN_PROPERTIES, false)`}`;
|
|
120
104
|
const builder = new file_builder_js_1.KotlinFileBuilder(ctx.infrastructurePackageName, ctx.config);
|
|
121
105
|
builder.append(index_js_1.kt.object({
|
|
122
106
|
name: 'Serializer',
|
|
123
107
|
members: [
|
|
124
108
|
index_js_1.kt.property('jacksonObjectMapper', {
|
|
125
|
-
type: index_js_1.kt.refs.jackson.objectMapper(
|
|
109
|
+
type: index_js_1.kt.refs.jackson.objectMapper(),
|
|
126
110
|
mutable: false,
|
|
127
111
|
default: index_js_1.kt.call('run', [index_js_1.kt.lambda([], factory)]),
|
|
128
112
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AppendValueGroup, type BasicAppendValue, type MaybePromise, SourceBuilder } from '@goast/core';
|
|
1
|
+
import { type ApiEndpoint, type AppendValueGroup, type BasicAppendValue, type MaybePromise, SourceBuilder } from '@goast/core';
|
|
2
2
|
import { kt } from '../../../ast/index.js';
|
|
3
3
|
import type { KotlinImport } from '../../../common-results.js';
|
|
4
4
|
import { KotlinFileBuilder } from '../../../file-builder.js';
|
|
@@ -17,23 +17,23 @@ export declare class DefaultKotlinSpringControllerGenerator extends KotlinFileGe
|
|
|
17
17
|
protected generateApiInterfaceFile(ctx: Context, args: Args.GenerateApiInterfaceFile): KotlinImport;
|
|
18
18
|
protected getApiInterfaceFileContent(ctx: Context, args: Args.GetApiInterfaceFileContent): AppendValueGroup<Builder>;
|
|
19
19
|
protected getApiInterface(ctx: Context, args: Args.GetApiInterface): kt.Interface<Builder>;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
protected getApiInterfaceAnnotations(ctx: Context): kt.Annotation<Builder>[];
|
|
21
|
+
protected getApiInterfaceMembers(ctx: Context): kt.InterfaceMember<Builder>[];
|
|
22
22
|
protected getApiInterfaceEndpointMethod(ctx: Context, args: Args.GetApiInterfaceEndpointMethod): kt.Function<Builder>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
protected getApiInterfaceEndpointMethodAnnnotations(ctx: Context, endpoint: ApiEndpoint): kt.Annotation<Builder>[];
|
|
24
|
+
protected getApiInterfaceEndpointMethodParameter(ctx: Context, endpoint: ApiEndpoint, parameter: ApiParameterWithMultipartInfo): kt.Parameter<Builder>;
|
|
25
|
+
protected getApiInterfaceEndpointMethodBody(ctx: Context, endpoint: ApiEndpoint, parameters: ApiParameterWithMultipartInfo[]): AppendValueGroup<Builder>;
|
|
26
|
+
protected getApiResponseEntityClass(ctx: Context, args: Args.GetApiResponseEntityClass): kt.Class<Builder>;
|
|
27
27
|
protected generateApiControllerFile(ctx: Context, args: Args.GenerateApiControllerFile): KotlinImport;
|
|
28
28
|
protected getApiControllerFileContent(ctx: Context, args: Args.GetApiControllerFileContent): AppendValueGroup<Builder>;
|
|
29
29
|
protected getApiController(ctx: Context, args: Args.GetApiController): kt.Class<Builder>;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
protected getApiControllerAnnotations(ctx: Context): kt.Annotation<Builder>[];
|
|
31
|
+
protected getApiControllerMembers(ctx: Context): kt.ClassMember<Builder>[];
|
|
32
32
|
protected generateApiDelegateInterfaceFile(ctx: Context, args: Args.GenerateApiDelegateInterfaceFile): KotlinImport;
|
|
33
33
|
protected getApiDelegateInterfaceFileContent(ctx: Context, args: Args.GetApiDelegateInterfaceFileContent): AppendValueGroup<Builder>;
|
|
34
34
|
protected getApiDelegateInterface(ctx: Context, args: Args.GetApiDelegateInterface): kt.Interface<Builder>;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
protected getApiDelegateInterfaceAnnotations(ctx: Context): kt.Annotation<Builder>[];
|
|
36
|
+
protected getApiDelegateInterfaceMembers(ctx: Context): kt.InterfaceMember<Builder>[];
|
|
37
37
|
protected getApiDelegateInterfaceEndpointMethod(ctx: Context, args: Args.GetApiDelegateInterfaceEndpointMethod): kt.Function<Builder>;
|
|
38
38
|
protected getParameterType(ctx: Context, args: Args.GetParameterType): kt.Type<Builder>;
|
|
39
39
|
protected getResponseType(ctx: Context, args: Args.GetResponseType): kt.Type<Builder>;
|
package/script/src/generators/services/spring-controllers/spring-controller-generator.d.ts.map
CHANGED
|
@@ -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,
|
|
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,EAA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