@goast/kotlin 0.4.18 → 0.4.20
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/assets/client/okhttp3/Serializer.kt +2 -0
- package/assets/client/spring-reactive-web-clients/ApiRequestFile.kt +33 -0
- package/esm/src/ast/nodes/call.d.ts.map +1 -1
- package/esm/src/ast/nodes/call.js +11 -1
- package/esm/src/ast/nodes/lambda-type.d.ts +2 -0
- package/esm/src/ast/nodes/lambda-type.d.ts.map +1 -1
- package/esm/src/ast/nodes/lambda-type.js +11 -4
- package/esm/src/ast/nodes/lambda.d.ts.map +1 -1
- package/esm/src/ast/nodes/lambda.js +10 -5
- package/esm/src/ast/references/index.d.ts +2 -0
- package/esm/src/ast/references/index.d.ts.map +1 -1
- package/esm/src/ast/references/index.js +2 -0
- package/esm/src/ast/references/java.d.ts +1 -0
- package/esm/src/ast/references/java.d.ts.map +1 -1
- package/esm/src/ast/references/java.js +1 -0
- package/esm/src/ast/references/kotlinx.d.ts +5 -0
- package/esm/src/ast/references/kotlinx.d.ts.map +1 -0
- package/esm/src/ast/references/kotlinx.js +6 -0
- package/esm/src/ast/references/spring-reactive.d.ts +9 -0
- package/esm/src/ast/references/spring-reactive.d.ts.map +1 -0
- package/esm/src/ast/references/spring-reactive.js +10 -0
- package/esm/src/ast/references/spring.d.ts +4 -0
- package/esm/src/ast/references/spring.d.ts.map +1 -1
- package/esm/src/ast/references/spring.js +6 -0
- package/esm/src/generators/index.d.ts +1 -0
- package/esm/src/generators/index.d.ts.map +1 -1
- package/esm/src/generators/index.js +1 -0
- package/esm/src/generators/services/okhttp3-clients/okhttp3-client-generator.d.ts +1 -2
- package/esm/src/generators/services/okhttp3-clients/okhttp3-client-generator.d.ts.map +1 -1
- package/esm/src/generators/services/spring-reactive-web-clients/args.d.ts +99 -0
- package/esm/src/generators/services/spring-reactive-web-clients/args.d.ts.map +1 -0
- package/esm/src/generators/services/spring-reactive-web-clients/args.js +1 -0
- package/esm/src/generators/services/spring-reactive-web-clients/index.d.ts +5 -0
- package/esm/src/generators/services/spring-reactive-web-clients/index.d.ts.map +1 -0
- package/esm/src/generators/services/spring-reactive-web-clients/index.js +4 -0
- package/esm/src/generators/services/spring-reactive-web-clients/models.d.ts +34 -0
- package/esm/src/generators/services/spring-reactive-web-clients/models.d.ts.map +1 -0
- package/esm/src/generators/services/spring-reactive-web-clients/models.js +8 -0
- package/esm/src/generators/services/spring-reactive-web-clients/refs.d.ts +5 -0
- package/esm/src/generators/services/spring-reactive-web-clients/refs.d.ts.map +1 -0
- package/esm/src/generators/services/spring-reactive-web-clients/refs.js +8 -0
- package/esm/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.d.ts +46 -0
- package/esm/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.d.ts.map +1 -0
- package/esm/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.js +383 -0
- package/esm/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.d.ts +23 -0
- package/esm/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.d.ts.map +1 -0
- package/esm/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.js +79 -0
- package/package.json +2 -2
- package/script/src/ast/nodes/call.d.ts.map +1 -1
- package/script/src/ast/nodes/call.js +11 -1
- package/script/src/ast/nodes/lambda-type.d.ts +2 -0
- package/script/src/ast/nodes/lambda-type.d.ts.map +1 -1
- package/script/src/ast/nodes/lambda-type.js +11 -4
- package/script/src/ast/nodes/lambda.d.ts.map +1 -1
- package/script/src/ast/nodes/lambda.js +10 -5
- package/script/src/ast/references/index.d.ts +2 -0
- package/script/src/ast/references/index.d.ts.map +1 -1
- package/script/src/ast/references/index.js +3 -1
- package/script/src/ast/references/java.d.ts +1 -0
- package/script/src/ast/references/java.d.ts.map +1 -1
- package/script/src/ast/references/java.js +2 -1
- package/script/src/ast/references/kotlinx.d.ts +5 -0
- package/script/src/ast/references/kotlinx.d.ts.map +1 -0
- package/script/src/ast/references/kotlinx.js +9 -0
- package/script/src/ast/references/spring-reactive.d.ts +9 -0
- package/script/src/ast/references/spring-reactive.d.ts.map +1 -0
- package/script/src/ast/references/spring-reactive.js +13 -0
- package/script/src/ast/references/spring.d.ts +4 -0
- package/script/src/ast/references/spring.d.ts.map +1 -1
- package/script/src/ast/references/spring.js +7 -1
- package/script/src/generators/index.d.ts +1 -0
- package/script/src/generators/index.d.ts.map +1 -1
- package/script/src/generators/index.js +1 -0
- package/script/src/generators/services/okhttp3-clients/okhttp3-client-generator.d.ts +1 -2
- package/script/src/generators/services/okhttp3-clients/okhttp3-client-generator.d.ts.map +1 -1
- package/script/src/generators/services/spring-reactive-web-clients/args.d.ts +99 -0
- package/script/src/generators/services/spring-reactive-web-clients/args.d.ts.map +1 -0
- package/script/src/generators/services/spring-reactive-web-clients/args.js +2 -0
- package/script/src/generators/services/spring-reactive-web-clients/index.d.ts +5 -0
- package/script/src/generators/services/spring-reactive-web-clients/index.d.ts.map +1 -0
- package/script/src/generators/services/spring-reactive-web-clients/index.js +8 -0
- package/script/src/generators/services/spring-reactive-web-clients/models.d.ts +34 -0
- package/script/src/generators/services/spring-reactive-web-clients/models.d.ts.map +1 -0
- package/script/src/generators/services/spring-reactive-web-clients/models.js +11 -0
- package/script/src/generators/services/spring-reactive-web-clients/refs.d.ts +5 -0
- package/script/src/generators/services/spring-reactive-web-clients/refs.d.ts.map +1 -0
- package/script/src/generators/services/spring-reactive-web-clients/refs.js +11 -0
- package/script/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.d.ts +46 -0
- package/script/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.d.ts.map +1 -0
- package/script/src/generators/services/spring-reactive-web-clients/spring-reactive-web-client-generator.js +388 -0
- package/script/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.d.ts +23 -0
- package/script/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.d.ts.map +1 -0
- package/script/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.js +84 -0
- package/src/src/ast/nodes/call.ts +10 -1
- package/src/src/ast/nodes/lambda-type.ts +7 -2
- package/src/src/ast/nodes/lambda.ts +10 -4
- package/src/src/ast/references/index.ts +2 -0
- package/src/src/ast/references/java.ts +1 -0
- package/src/src/ast/references/kotlinx.ts +14 -0
- package/src/src/ast/references/spring-reactive.ts +33 -0
- package/src/src/ast/references/spring.ts +14 -0
- package/src/src/generators/index.ts +1 -0
- package/src/src/generators/services/okhttp3-clients/okhttp3-client-generator.ts +1 -2
- package/src/src/generators/services/spring-reactive-web-clients/args.ts +101 -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 +572 -0
- package/src/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.ts +128 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ApiSchema, type AppendValueGroup, type MaybePromise, SourceBuilder } from '@goast/core';
|
|
2
|
+
import { kt } from '../../../ast/index.js';
|
|
3
|
+
import { KotlinFileBuilder } from '../../../file-builder.js';
|
|
4
|
+
import type { ApiParameterWithMultipartInfo } from '../../../types.js';
|
|
5
|
+
import { KotlinFileGenerator } from '../../file-generator.js';
|
|
6
|
+
import type { DefaultKotlinSpringReactiveWebClientGeneratorArgs as Args } from './index.js';
|
|
7
|
+
import type { KotlinSpringReactiveWebClientGeneratorContext, KotlinSpringReactiveWebClientGeneratorOutput } from './models.js';
|
|
8
|
+
type Context = KotlinSpringReactiveWebClientGeneratorContext;
|
|
9
|
+
type Output = KotlinSpringReactiveWebClientGeneratorOutput;
|
|
10
|
+
type Builder = KotlinFileBuilder;
|
|
11
|
+
export interface KotlinSpringReactiveWebClientGenerator<TOutput extends Output = Output> {
|
|
12
|
+
generate(ctx: Context): MaybePromise<TOutput>;
|
|
13
|
+
}
|
|
14
|
+
export declare class DefaultKotlinSpringReactiveWebClientGenerator extends KotlinFileGenerator<Context, Output> implements KotlinSpringReactiveWebClientGenerator {
|
|
15
|
+
generate(ctx: Context): MaybePromise<Output>;
|
|
16
|
+
protected getClientFileContent(ctx: Context, args: Args.GetClientFileContent): AppendValueGroup<Builder>;
|
|
17
|
+
protected getRequestsObject(ctx: Context, args: Args.GetRequestsObject): kt.Object<Builder>;
|
|
18
|
+
protected getEndpointMembers(ctx: Context, args: Args.GetEndpointMembers): kt.ObjectMember<Builder>[];
|
|
19
|
+
protected getEndpointFunctionName(ctx: Context, args: Args.GetEndpointFunctionName): string;
|
|
20
|
+
protected getEndpointFunction(ctx: Context, args: Args.GetEndpointFunction): kt.Function<Builder>;
|
|
21
|
+
protected getEndpointFunctionBody(ctx: Context, args: Args.GetEndpointFunctionBody): AppendValueGroup<Builder>;
|
|
22
|
+
protected getEndpointFunctionWithHandler(ctx: Context, args: Args.GetEndpointFunctionWithHandler): kt.Function<Builder>;
|
|
23
|
+
protected getEndpointFunctionWithHandlerBody(ctx: Context, args: Args.GetEndpointFunctionWithHandlerBody): AppendValueGroup<Builder>;
|
|
24
|
+
protected getEndpointRequestFunctionName(ctx: Context, args: Args.GetEndpointRequestFunctionName): string;
|
|
25
|
+
protected getEndpointRequestFunction(ctx: Context, args: Args.GetEndpointRequestFunction): kt.Function<Builder>;
|
|
26
|
+
protected getEndpointRequestFunctionBody(ctx: Context, args: Args.GetEndpointRequestFunctionBody): AppendValueGroup<Builder>;
|
|
27
|
+
protected getEndpointUriFunctionName(ctx: Context, args: Args.GetEndpointUriFunctionName): string;
|
|
28
|
+
protected getEndpointUriFunction(ctx: Context, args: Args.GetEndpointUriFunction): kt.Function<Builder>;
|
|
29
|
+
protected getEndpointUriFunctionBody(ctx: Context, args: Args.GetEndpointUriFunctionBody): AppendValueGroup<Builder>;
|
|
30
|
+
protected getParameterToString(ctx: Context, args: Args.GetParameterToString): kt.Value<Builder>;
|
|
31
|
+
protected getParameterType(ctx: Context, args: Args.GetParameterType): kt.Type<Builder>;
|
|
32
|
+
protected getParameterDefaultValue(ctx: Context, args: Args.GetParameterDefaultValue): kt.Value<Builder> | null;
|
|
33
|
+
protected getTypeUsage(ctx: Context, args: Args.GetTypeUsage<Builder>): kt.Type<Builder>;
|
|
34
|
+
protected getPackageName(ctx: Context, args: Args.GetPackageName): string;
|
|
35
|
+
protected getResponseSchema(_ctx: Context, args: Args.GetResponseSchema): ApiSchema | undefined;
|
|
36
|
+
protected getSchemaType(ctx: Context, args: Args.GetSchemaType): kt.Reference<SourceBuilder> | undefined;
|
|
37
|
+
protected getAllParameters(ctx: Context, args: Args.GetAllParameters): ApiParameterWithMultipartInfo[];
|
|
38
|
+
protected getRequestBodyParamName(ctx: Context, args: Args.GetRequestBodyParamName): string;
|
|
39
|
+
protected getBasePath(ctx: Context, _args: Args.GetBasePath): string;
|
|
40
|
+
protected getEndpointPath(ctx: Context, args: Args.GetEndpointPath): string;
|
|
41
|
+
protected getFilePath(ctx: Context, args: Args.GetFilePath): string;
|
|
42
|
+
protected getRequestsObjectName(ctx: Context, args: Args.GetRequestsObjectName): string;
|
|
43
|
+
private createApiParameter;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=spring-reactive-web-client-generator.d.ts.map
|
|
@@ -0,0 +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":"AAKA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,gBAAgB,EAIrB,KAAK,YAAY,EAEjB,aAAa,EAEd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,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AAG,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"}
|
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { dirname } from 'node:path';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
import { appendValueGroup, builderTemplate as s, createOverwriteProxy, resolveAnyOfAndAllOf, SourceBuilder, toCasing, } from '@goast/core';
|
|
4
|
+
import { kt } from '../../../ast/index.js';
|
|
5
|
+
import { KotlinFileBuilder } from '../../../file-builder.js';
|
|
6
|
+
import { modifyString } from '../../../utils.js';
|
|
7
|
+
import { KotlinFileGenerator } from '../../file-generator.js';
|
|
8
|
+
export class DefaultKotlinSpringReactiveWebClientGenerator extends KotlinFileGenerator {
|
|
9
|
+
generate(ctx) {
|
|
10
|
+
const typeName = this.getRequestsObjectName(ctx, {});
|
|
11
|
+
const packageName = this.getPackageName(ctx, {});
|
|
12
|
+
const filePath = this.getFilePath(ctx, { packageName });
|
|
13
|
+
fs.ensureDirSync(dirname(filePath));
|
|
14
|
+
console.log(`Generating client for service ${ctx.service.name} to ${filePath}...`);
|
|
15
|
+
const builder = new KotlinFileBuilder(packageName, ctx.config);
|
|
16
|
+
builder.append(this.getClientFileContent(ctx, {}));
|
|
17
|
+
fs.writeFileSync(filePath, builder.toString());
|
|
18
|
+
return { typeName, packageName };
|
|
19
|
+
}
|
|
20
|
+
// deno-lint-ignore no-unused-vars
|
|
21
|
+
getClientFileContent(ctx, args) {
|
|
22
|
+
return appendValueGroup([this.getRequestsObject(ctx, {})], '\n\n');
|
|
23
|
+
}
|
|
24
|
+
// deno-lint-ignore no-unused-vars
|
|
25
|
+
getRequestsObject(ctx, args) {
|
|
26
|
+
return kt.object({
|
|
27
|
+
name: this.getRequestsObjectName(ctx, {}),
|
|
28
|
+
members: ctx.service.endpoints.flatMap((endpoint) => this.getEndpointMembers(ctx, { endpoint, parameters: this.getAllParameters(ctx, { endpoint }) })),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
getEndpointMembers(ctx, args) {
|
|
32
|
+
const { endpoint, parameters } = args;
|
|
33
|
+
const responseSchema = this.getResponseSchema(ctx, { endpoint });
|
|
34
|
+
return [
|
|
35
|
+
this.getEndpointFunction(ctx, { endpoint, parameters, responseSchema }),
|
|
36
|
+
this.getEndpointFunctionWithHandler(ctx, { endpoint, parameters, responseSchema }),
|
|
37
|
+
this.getEndpointUriFunction(ctx, { endpoint, parameters }),
|
|
38
|
+
this.getEndpointRequestFunction(ctx, { endpoint, parameters, responseSchema }),
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
getEndpointFunctionName(ctx, args) {
|
|
42
|
+
const { endpoint } = args;
|
|
43
|
+
return toCasing(endpoint.name, ctx.config.functionNameCasing);
|
|
44
|
+
}
|
|
45
|
+
getEndpointFunction(ctx, args) {
|
|
46
|
+
const { endpoint, parameters, responseSchema } = args;
|
|
47
|
+
const functionName = this.getEndpointFunctionName(ctx, { endpoint });
|
|
48
|
+
return kt.function(functionName, {
|
|
49
|
+
doc: kt.doc(endpoint.description),
|
|
50
|
+
suspend: true,
|
|
51
|
+
receiverType: kt.refs.springReactive.webClient(),
|
|
52
|
+
parameters: parameters.map((parameter) => kt.parameter(toCasing(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, { endpoint, parameter }), { default: this.getParameterDefaultValue(ctx, { endpoint, parameter }) })),
|
|
53
|
+
returnType: this.getTypeUsage(ctx, { schema: responseSchema, fallback: kt.refs.unit() }),
|
|
54
|
+
body: this.getEndpointFunctionBody(ctx, { endpoint, parameters, responseSchema }),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
getEndpointFunctionBody(ctx, args) {
|
|
58
|
+
const { endpoint, parameters, responseSchema } = args;
|
|
59
|
+
const result = appendValueGroup([], '\n');
|
|
60
|
+
const requestFunctionName = this.getEndpointRequestFunctionName(ctx, { endpoint });
|
|
61
|
+
const parameterNames = parameters.map((p) => toCasing(p.name, ctx.config.parameterNameCasing));
|
|
62
|
+
const call = kt.call([
|
|
63
|
+
'this',
|
|
64
|
+
kt.call(requestFunctionName, parameterNames),
|
|
65
|
+
kt.call('retrieve', []),
|
|
66
|
+
responseSchema
|
|
67
|
+
? kt.call(kt.refs.springReactive.awaitBody([
|
|
68
|
+
this.getTypeUsage(ctx, { schema: responseSchema, fallback: kt.refs.unit() }),
|
|
69
|
+
]), [])
|
|
70
|
+
: kt.call(kt.refs.springReactive.awaitBodilessEntity(), []),
|
|
71
|
+
]);
|
|
72
|
+
if (responseSchema) {
|
|
73
|
+
result.values.push(s `return ${call}`);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
result.values.push(call);
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
getEndpointFunctionWithHandler(ctx, args) {
|
|
81
|
+
const { endpoint, parameters, responseSchema } = args;
|
|
82
|
+
const functionName = this.getEndpointFunctionName(ctx, { endpoint });
|
|
83
|
+
return kt.function(functionName, {
|
|
84
|
+
doc: kt.doc(endpoint.description),
|
|
85
|
+
suspend: true,
|
|
86
|
+
generics: [kt.genericParameter('T')],
|
|
87
|
+
receiverType: kt.refs.springReactive.webClient(),
|
|
88
|
+
parameters: [
|
|
89
|
+
...parameters.map((parameter) => kt.parameter(toCasing(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, { endpoint, parameter }), { default: this.getParameterDefaultValue(ctx, { endpoint, parameter }) })),
|
|
90
|
+
kt.parameter('responseHandler', kt.lambdaType([kt.refs.springReactive.clientResponse()], 'T', { suspend: true })),
|
|
91
|
+
],
|
|
92
|
+
returnType: 'T',
|
|
93
|
+
body: this.getEndpointFunctionWithHandlerBody(ctx, { endpoint, parameters, responseSchema }),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
getEndpointFunctionWithHandlerBody(ctx, args) {
|
|
97
|
+
const { endpoint, parameters } = args;
|
|
98
|
+
const result = appendValueGroup([], '\n');
|
|
99
|
+
const requestFunctionName = this.getEndpointRequestFunctionName(ctx, { endpoint });
|
|
100
|
+
const parameterNames = parameters.map((p) => toCasing(p.name, ctx.config.parameterNameCasing));
|
|
101
|
+
result.values.push(s `return ${kt.call([
|
|
102
|
+
kt.call(['this', requestFunctionName], parameterNames),
|
|
103
|
+
kt.call(['exchangeToMono'], [
|
|
104
|
+
kt.lambda([], kt.call(kt.refs.kotlinx.mono.infer(), [kt.lambda([], 'responseHandler(it)', { singleline: true })]), { singleline: true }),
|
|
105
|
+
]),
|
|
106
|
+
kt.call([kt.refs.kotlinx.awaitFirstOrNull.infer()], []),
|
|
107
|
+
])} as T`);
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
getEndpointRequestFunctionName(ctx, args) {
|
|
111
|
+
const { endpoint } = args;
|
|
112
|
+
return toCasing(`${this.getEndpointFunctionName(ctx, { endpoint })}_request`, ctx.config.functionNameCasing);
|
|
113
|
+
}
|
|
114
|
+
getEndpointRequestFunction(ctx, args) {
|
|
115
|
+
const { endpoint, parameters, responseSchema } = args;
|
|
116
|
+
const functionName = this.getEndpointRequestFunctionName(ctx, { endpoint });
|
|
117
|
+
return kt.function(functionName, {
|
|
118
|
+
doc: kt.doc(endpoint.description),
|
|
119
|
+
receiverType: kt.refs.springReactive.webClient(),
|
|
120
|
+
parameters: parameters.map((parameter) => kt.parameter(toCasing(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, { endpoint, parameter }), { default: this.getParameterDefaultValue(ctx, { endpoint, parameter }) })),
|
|
121
|
+
returnType: kt.refs.springReactive.requestHeadersSpec(['*']),
|
|
122
|
+
body: this.getEndpointRequestFunctionBody(ctx, { endpoint, parameters, responseSchema }),
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
getEndpointRequestFunctionBody(ctx, args) {
|
|
126
|
+
var _a, _b;
|
|
127
|
+
const { endpoint, parameters, responseSchema } = args;
|
|
128
|
+
const result = appendValueGroup([], '\n');
|
|
129
|
+
const callChain = [];
|
|
130
|
+
callChain.push(s `return this.method(${kt.refs.spring.httpMethod()}.${endpoint.method.toUpperCase()})`, kt.call('uri', [kt.call([this.getEndpointUriFunctionName(ctx, { endpoint })], parameters.filter((p) => p.target === 'path' || p.target === 'query').map((p) => toCasing(p.name, ctx.config.parameterNameCasing)))]));
|
|
131
|
+
if (responseSchema) {
|
|
132
|
+
callChain.push(s `accept(${kt.refs.spring.mediaType()}.APPLICATION_JSON)`);
|
|
133
|
+
}
|
|
134
|
+
if (((_a = endpoint.requestBody) === null || _a === void 0 ? void 0 : _a.content[0]) !== undefined) {
|
|
135
|
+
callChain.push(s `contentType(${kt.refs.spring.mediaType()}.parseMediaType(${kt.string(endpoint.requestBody.content[0].type)}))`);
|
|
136
|
+
}
|
|
137
|
+
if ((_b = endpoint.requestBody) === null || _b === void 0 ? void 0 : _b.content[0]) {
|
|
138
|
+
if (endpoint.requestBody.content[0].type === 'multipart/form-data') {
|
|
139
|
+
callChain.push(kt.call('body', [
|
|
140
|
+
kt.call([kt.refs.springReactive.bodyInserters(), 'fromMultipartData'], [
|
|
141
|
+
kt.call([
|
|
142
|
+
kt.call(kt.refs.spring.multipartBodyBuilder(), []),
|
|
143
|
+
kt.call('apply', [
|
|
144
|
+
kt.lambda([], appendValueGroup(parameters.filter((x) => x.multipart).map((p) => {
|
|
145
|
+
var _a, _b, _c;
|
|
146
|
+
const parameterName = toCasing(p.name, ctx.config.parameterNameCasing);
|
|
147
|
+
if ((_a = p.multipart) === null || _a === void 0 ? void 0 : _a.isFile) {
|
|
148
|
+
return kt.call([
|
|
149
|
+
p.required && !((_b = p.schema) === null || _b === void 0 ? void 0 : _b.nullable) ? parameterName : `${parameterName}?`,
|
|
150
|
+
'addToBuilder',
|
|
151
|
+
], ['this']);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
const call = kt.call([
|
|
155
|
+
kt.call('part', [kt.string(p.multipart.name), parameterName]),
|
|
156
|
+
kt.call('contentType', [
|
|
157
|
+
kt.call([
|
|
158
|
+
kt.refs.spring.mediaType(),
|
|
159
|
+
'APPLICATION_JSON',
|
|
160
|
+
]),
|
|
161
|
+
]),
|
|
162
|
+
]);
|
|
163
|
+
return p.required && !((_c = p.schema) === null || _c === void 0 ? void 0 : _c.nullable) ? call : kt.call([`${parameterName}?`, 'also'], [
|
|
164
|
+
kt.lambda([parameterName], call, { singleline: true }),
|
|
165
|
+
]);
|
|
166
|
+
}
|
|
167
|
+
}), '\n')),
|
|
168
|
+
]),
|
|
169
|
+
'build',
|
|
170
|
+
], []),
|
|
171
|
+
]),
|
|
172
|
+
]));
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
const bodySchema = endpoint.requestBody.content[0].schema;
|
|
176
|
+
const parameterName = this.getRequestBodyParamName(ctx, { endpoint });
|
|
177
|
+
const call = kt.call('bodyValue', [
|
|
178
|
+
toCasing(parameterName, ctx.config.parameterNameCasing),
|
|
179
|
+
]);
|
|
180
|
+
callChain.push(endpoint.requestBody.required && !(bodySchema === null || bodySchema === void 0 ? void 0 : bodySchema.nullable) ? call : kt.call('apply', [
|
|
181
|
+
kt.lambda([], kt.call([`${parameterName}?`, 'also'], [kt.lambda([parameterName], call, { singleline: true })]), { singleline: true }),
|
|
182
|
+
]));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (parameters.some((x) => x.target === 'header')) {
|
|
186
|
+
callChain.push(kt.call('headers', [
|
|
187
|
+
kt.lambda(['headers'], appendValueGroup(parameters.filter((x) => x.target === 'header').map((p) => {
|
|
188
|
+
var _a;
|
|
189
|
+
const parameterName = toCasing(p.name, ctx.config.parameterNameCasing);
|
|
190
|
+
const toString = this.getParameterToString(ctx, { endpoint, parameter: p });
|
|
191
|
+
return p.required && !((_a = p.schema) === null || _a === void 0 ? void 0 : _a.nullable)
|
|
192
|
+
? kt.call(['headers', 'add'], [kt.string(p.name), parameterName + toString])
|
|
193
|
+
: kt.call([`${parameterName}?`, 'also'], [
|
|
194
|
+
kt.lambda([], kt.call(['headers', 'add'], [kt.string(p.name), 'it' + toString]), {
|
|
195
|
+
singleline: true,
|
|
196
|
+
}),
|
|
197
|
+
]);
|
|
198
|
+
}), '\n')),
|
|
199
|
+
]));
|
|
200
|
+
}
|
|
201
|
+
result.values.push(kt.call(callChain));
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
getEndpointUriFunctionName(ctx, args) {
|
|
205
|
+
const { endpoint } = args;
|
|
206
|
+
return toCasing(`${this.getEndpointFunctionName(ctx, { endpoint })}_uri`, ctx.config.functionNameCasing);
|
|
207
|
+
}
|
|
208
|
+
getEndpointUriFunction(ctx, args) {
|
|
209
|
+
const { endpoint, parameters } = args;
|
|
210
|
+
const functionName = this.getEndpointUriFunctionName(ctx, { endpoint });
|
|
211
|
+
return kt.function(functionName, {
|
|
212
|
+
parameters: parameters.filter((p) => p.target === 'path' || p.target === 'query').map((parameter) => kt.parameter(toCasing(parameter.name, ctx.config.parameterNameCasing), this.getParameterType(ctx, { endpoint, parameter }), { default: this.getParameterDefaultValue(ctx, { endpoint, parameter }) })),
|
|
213
|
+
returnType: kt.refs.string(),
|
|
214
|
+
body: this.getEndpointUriFunctionBody(ctx, { endpoint, parameters }),
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
getEndpointUriFunctionBody(ctx, args) {
|
|
218
|
+
const { endpoint } = args;
|
|
219
|
+
const result = appendValueGroup([], '\n');
|
|
220
|
+
const callChain = [];
|
|
221
|
+
callChain.push(s `${kt.refs.spring.uriComponentsBuilder()}.fromPath(${kt.string(this.getEndpointPath(ctx, { endpoint }))})`);
|
|
222
|
+
if (endpoint.parameters.some((x) => x.target === 'query')) {
|
|
223
|
+
callChain.push(kt.call('apply', [kt.lambda([], appendValueGroup(endpoint.parameters.filter((x) => x.target === 'query').map((p) => {
|
|
224
|
+
var _a;
|
|
225
|
+
const parameterName = toCasing(p.name, ctx.config.parameterNameCasing);
|
|
226
|
+
const toString = this.getParameterToString(ctx, { endpoint, parameter: p });
|
|
227
|
+
return p.required && !((_a = p.schema) === null || _a === void 0 ? void 0 : _a.nullable)
|
|
228
|
+
? kt.call('queryParam', [kt.string(p.name), parameterName + toString])
|
|
229
|
+
: kt.call([`${parameterName}?`, 'also'], [
|
|
230
|
+
kt.lambda([], kt.call('queryParam', [kt.string(p.name), 'it' + toString]), { singleline: true }),
|
|
231
|
+
]);
|
|
232
|
+
}), '\n'))]));
|
|
233
|
+
}
|
|
234
|
+
if (endpoint.parameters.some((x) => x.target === 'path')) {
|
|
235
|
+
callChain.push(kt.call('buildAndExpand', [
|
|
236
|
+
kt.call([kt.refs.mapOf.infer()], endpoint.parameters.filter((p) => p.target === 'path').map((p) => s `${kt.string(p.name)} to ${toCasing(p.name, ctx.config.parameterNameCasing)}${this.getParameterToString(ctx, { endpoint, parameter: p })}`)),
|
|
237
|
+
]));
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
callChain.push(kt.call('build', []));
|
|
241
|
+
}
|
|
242
|
+
callChain.push('toUriString');
|
|
243
|
+
result.values.push(s `return ${kt.call(callChain, [])}`);
|
|
244
|
+
return result;
|
|
245
|
+
}
|
|
246
|
+
getParameterToString(ctx, args) {
|
|
247
|
+
var _a, _b, _c;
|
|
248
|
+
const { parameter } = args;
|
|
249
|
+
if (((_a = parameter.schema) === null || _a === void 0 ? void 0 : _a.kind) === 'array') {
|
|
250
|
+
return '.joinToString()';
|
|
251
|
+
}
|
|
252
|
+
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) &&
|
|
253
|
+
this.getSchemaType(ctx, { schema: parameter.schema })) {
|
|
254
|
+
return '.value';
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
return '.toString()';
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
getParameterType(ctx, args) {
|
|
261
|
+
var _a;
|
|
262
|
+
const { parameter } = args;
|
|
263
|
+
if ((_a = parameter.multipart) === null || _a === void 0 ? void 0 : _a.isFile) {
|
|
264
|
+
return ctx.refs.apiRequestFile();
|
|
265
|
+
}
|
|
266
|
+
return this.getTypeUsage(ctx, {
|
|
267
|
+
schema: parameter.schema,
|
|
268
|
+
nullable: !parameter.required,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
getParameterDefaultValue(ctx, args) {
|
|
272
|
+
var _a, _b;
|
|
273
|
+
const { parameter } = args;
|
|
274
|
+
return !parameter.required
|
|
275
|
+
? ((_a = parameter.schema) === null || _a === void 0 ? void 0 : _a.kind) === 'string' && parameter.schema.enum && parameter.schema.default
|
|
276
|
+
? s `${this.getTypeUsage(ctx, { schema: parameter.schema, nullable: false })}.${toCasing(String(parameter.schema.default), ctx.config.enumValueNameCasing)}`
|
|
277
|
+
: kt.toNode((_b = parameter.schema) === null || _b === void 0 ? void 0 : _b.default)
|
|
278
|
+
: null;
|
|
279
|
+
}
|
|
280
|
+
getTypeUsage(ctx, args) {
|
|
281
|
+
const { schema, nullable, fallback } = args;
|
|
282
|
+
const type = this.getSchemaType(ctx, { schema });
|
|
283
|
+
return type
|
|
284
|
+
? createOverwriteProxy(type, { nullable: nullable !== null && nullable !== void 0 ? nullable : type.nullable })
|
|
285
|
+
: (fallback !== null && fallback !== void 0 ? fallback : kt.refs.any({ nullable }));
|
|
286
|
+
}
|
|
287
|
+
// deno-lint-ignore no-unused-vars
|
|
288
|
+
getPackageName(ctx, args) {
|
|
289
|
+
const packageSuffix = typeof ctx.config.packageSuffix === 'string'
|
|
290
|
+
? ctx.config.packageSuffix
|
|
291
|
+
: ctx.config.packageSuffix(ctx.service);
|
|
292
|
+
return ctx.config.packageName + packageSuffix;
|
|
293
|
+
}
|
|
294
|
+
getResponseSchema(_ctx, args) {
|
|
295
|
+
var _a, _b;
|
|
296
|
+
const { endpoint } = args;
|
|
297
|
+
return (_b = (_a = endpoint.responses.find((x) => !x.statusCode || (x.statusCode >= 200 && x.statusCode < 300))) === null || _a === void 0 ? void 0 : _a.contentOptions[0]) === null || _b === void 0 ? void 0 : _b.schema;
|
|
298
|
+
}
|
|
299
|
+
getSchemaType(ctx, args) {
|
|
300
|
+
const { schema } = args;
|
|
301
|
+
return schema && ctx.input.kotlin.models[schema.id].type;
|
|
302
|
+
}
|
|
303
|
+
getAllParameters(ctx, args) {
|
|
304
|
+
var _a, _b;
|
|
305
|
+
const { endpoint } = args;
|
|
306
|
+
const parameters = endpoint.parameters.filter((parameter) => parameter.target === 'query' || parameter.target === 'path' || parameter.target === 'header');
|
|
307
|
+
if (endpoint.requestBody) {
|
|
308
|
+
const content = endpoint.requestBody.content[0];
|
|
309
|
+
let schema = content.schema;
|
|
310
|
+
if (content.type === 'multipart/form-data') {
|
|
311
|
+
if (schema && schema.kind === 'object') {
|
|
312
|
+
schema = (_a = resolveAnyOfAndAllOf(schema, true)) !== null && _a !== void 0 ? _a : schema;
|
|
313
|
+
const properties = (_b = schema.properties) !== null && _b !== void 0 ? _b : {};
|
|
314
|
+
for (const [name, property] of properties.entries()) {
|
|
315
|
+
parameters.push(Object.assign(this.createApiParameter({
|
|
316
|
+
id: `multipart-${name}`,
|
|
317
|
+
name,
|
|
318
|
+
target: 'body',
|
|
319
|
+
schema: property.schema,
|
|
320
|
+
required: schema.required.has(name),
|
|
321
|
+
description: property.schema.description,
|
|
322
|
+
}), {
|
|
323
|
+
multipart: {
|
|
324
|
+
name,
|
|
325
|
+
isFile: property.schema.kind === 'string' && property.schema.format === 'binary',
|
|
326
|
+
},
|
|
327
|
+
}));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
parameters.push(this.createApiParameter({
|
|
333
|
+
id: 'body',
|
|
334
|
+
name: this.getRequestBodyParamName(ctx, { endpoint }),
|
|
335
|
+
target: 'body',
|
|
336
|
+
schema,
|
|
337
|
+
required: endpoint.requestBody.required,
|
|
338
|
+
description: endpoint.requestBody.description,
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return parameters.sort((a, b) => (a.required === b.required ? 0 : a.required ? -1 : 1));
|
|
343
|
+
}
|
|
344
|
+
getRequestBodyParamName(ctx, args) {
|
|
345
|
+
var _a;
|
|
346
|
+
const { endpoint } = args;
|
|
347
|
+
const schema = (_a = endpoint.requestBody) === null || _a === void 0 ? void 0 : _a.content[0].schema;
|
|
348
|
+
const schemaInfo = this.getSchemaType(ctx, { schema });
|
|
349
|
+
return toCasing(schemaInfo && schemaInfo.name !== 'Any' ? SourceBuilder.build((b) => kt.reference.write(b, schemaInfo)) : 'body', ctx.config.parameterNameCasing);
|
|
350
|
+
}
|
|
351
|
+
getBasePath(ctx, _args) {
|
|
352
|
+
var _a, _b, _c, _d, _e, _f;
|
|
353
|
+
return modifyString((_f = (_e = (_d = (_c = ((_a = ctx.service.$src) !== null && _a !== void 0 ? _a : (_b = ctx.service.endpoints[0]) === null || _b === void 0 ? void 0 : _b.$src)) === null || _c === void 0 ? void 0 : _c.document.servers) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.url) !== null && _f !== void 0 ? _f : '/', ctx.config.basePath, ctx.service);
|
|
354
|
+
}
|
|
355
|
+
getEndpointPath(ctx, args) {
|
|
356
|
+
const { endpoint } = args;
|
|
357
|
+
return modifyString(endpoint.path.replace(/^\/*/, ''), ctx.config.pathModifier, endpoint);
|
|
358
|
+
}
|
|
359
|
+
getFilePath(ctx, args) {
|
|
360
|
+
const { packageName } = args;
|
|
361
|
+
return `${ctx.config.outputDir}/${packageName.replace(/\./g, '/')}/${this.getRequestsObjectName(ctx, {})}.kt`;
|
|
362
|
+
}
|
|
363
|
+
// deno-lint-ignore no-unused-vars
|
|
364
|
+
getRequestsObjectName(ctx, args) {
|
|
365
|
+
return toCasing(`${ctx.service.name}_Requests`, ctx.config.typeNameCasing);
|
|
366
|
+
}
|
|
367
|
+
createApiParameter(data) {
|
|
368
|
+
return {
|
|
369
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
370
|
+
$src: undefined,
|
|
371
|
+
$ref: undefined,
|
|
372
|
+
schema: undefined,
|
|
373
|
+
required: false,
|
|
374
|
+
description: undefined,
|
|
375
|
+
allowEmptyValue: undefined,
|
|
376
|
+
allowReserved: undefined,
|
|
377
|
+
deprecated: false,
|
|
378
|
+
explode: undefined,
|
|
379
|
+
style: undefined,
|
|
380
|
+
...data,
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ApiService, Factory, type MaybePromise, type OpenApiGeneratorContext, OpenApiServicesGenerationProviderBase } from '@goast/core';
|
|
2
|
+
import type { KotlinServicesGeneratorInput } from '../spring-controllers/index.js';
|
|
3
|
+
import { type KotlinSpringReactiveWebClientGeneratorOutput, type KotlinSpringReactiveWebClientsGeneratorConfig, type KotlinSpringReactiveWebClientsGeneratorContext, type KotlinSpringReactiveWebClientsGeneratorInput, type KotlinSpringReactiveWebClientsGeneratorOutput } from './models.js';
|
|
4
|
+
import { type KotlinSpringReactiveWebClientGenerator } from './spring-reactive-web-client-generator.js';
|
|
5
|
+
type Input = KotlinSpringReactiveWebClientsGeneratorInput;
|
|
6
|
+
type Output = KotlinSpringReactiveWebClientsGeneratorOutput;
|
|
7
|
+
type Config = KotlinSpringReactiveWebClientsGeneratorConfig;
|
|
8
|
+
type ServiceOutput = KotlinSpringReactiveWebClientGeneratorOutput;
|
|
9
|
+
type Context = KotlinSpringReactiveWebClientsGeneratorContext;
|
|
10
|
+
export declare class KotlinSpringReactiveWebClientsGenerator extends OpenApiServicesGenerationProviderBase<Input, Output, Config, ServiceOutput, Context> {
|
|
11
|
+
private readonly _serviceGeneratorFactory;
|
|
12
|
+
constructor(serviceGeneratorFactory?: Factory<KotlinSpringReactiveWebClientGenerator, []>);
|
|
13
|
+
protected generateAdditionalFiles(ctx: Context): Promise<void>;
|
|
14
|
+
protected initResult(): Output;
|
|
15
|
+
protected generateService(ctx: Context, service: ApiService): MaybePromise<ServiceOutput>;
|
|
16
|
+
protected addServiceResult(ctx: Context, service: ApiService, result: ServiceOutput): void;
|
|
17
|
+
protected buildContext(context: OpenApiGeneratorContext<KotlinServicesGeneratorInput>, config?: Partial<Config> | undefined): Context;
|
|
18
|
+
protected getInfrastructurePackageName(config: Config): string;
|
|
19
|
+
protected getPackageName(config: Config): string;
|
|
20
|
+
private copyInfrastructureFiles;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=spring-reactive-web-clients-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spring-reactive-web-clients-generator.d.ts","sourceRoot":"","sources":["../../../../../src/src/generators/services/spring-reactive-web-clients/spring-reactive-web-clients-generator.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,UAAU,EACf,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,qCAAqC,EACtC,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAEL,KAAK,4CAA4C,EACjD,KAAK,6CAA6C,EAClD,KAAK,8CAA8C,EACnD,KAAK,4CAA4C,EACjD,KAAK,6CAA6C,EACnD,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,sCAAsC,EAC5C,MAAM,2CAA2C,CAAC;AAEnD,KAAK,KAAK,GAAG,4CAA4C,CAAC;AAC1D,KAAK,MAAM,GAAG,6CAA6C,CAAC;AAC5D,KAAK,MAAM,GAAG,6CAA6C,CAAC;AAC5D,KAAK,aAAa,GAAG,4CAA4C,CAAC;AAClE,KAAK,OAAO,GAAG,8CAA8C,CAAC;AAE9D,qBAAa,uCAAwC,SAAQ,qCAAqC,CAChG,KAAK,EACL,MAAM,EACN,MAAM,EACN,aAAa,EACb,OAAO,CACR;IACC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAsD;gBAEnF,uBAAuB,CAAC,EAAE,OAAO,CAAC,sCAAsC,EAAE,EAAE,CAAC;cAMhE,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7E,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;IAcV,SAAS,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAc9D,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;YAKlC,uBAAuB;CAiBtC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import fs from 'fs-extra';
|
|
3
|
+
import { Factory, OpenApiServicesGenerationProviderBase, } from '@goast/core';
|
|
4
|
+
import { getAssetFileContent } from '../../../assets.js';
|
|
5
|
+
import { defaultKotlinSpringReactiveWebClientsGeneratorConfig, } from './models.js';
|
|
6
|
+
import { getReferenceFactories } from './refs.js';
|
|
7
|
+
import { DefaultKotlinSpringReactiveWebClientGenerator, } from './spring-reactive-web-client-generator.js';
|
|
8
|
+
export class KotlinSpringReactiveWebClientsGenerator extends OpenApiServicesGenerationProviderBase {
|
|
9
|
+
constructor(serviceGeneratorFactory) {
|
|
10
|
+
super();
|
|
11
|
+
Object.defineProperty(this, "_serviceGeneratorFactory", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: void 0
|
|
16
|
+
});
|
|
17
|
+
this._serviceGeneratorFactory = serviceGeneratorFactory !== null && serviceGeneratorFactory !== void 0 ? serviceGeneratorFactory : Factory.fromValue(new DefaultKotlinSpringReactiveWebClientGenerator());
|
|
18
|
+
}
|
|
19
|
+
async generateAdditionalFiles(ctx) {
|
|
20
|
+
await this.copyInfrastructureFiles(ctx);
|
|
21
|
+
}
|
|
22
|
+
initResult() {
|
|
23
|
+
return {
|
|
24
|
+
kotlin: {
|
|
25
|
+
clients: {},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
generateService(ctx, service) {
|
|
30
|
+
const serviceGenerator = this._serviceGeneratorFactory.create();
|
|
31
|
+
return serviceGenerator.generate({
|
|
32
|
+
...ctx,
|
|
33
|
+
service,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
addServiceResult(ctx, service, result) {
|
|
37
|
+
ctx.output.kotlin.clients[service.id] = result;
|
|
38
|
+
}
|
|
39
|
+
buildContext(context, config) {
|
|
40
|
+
context.data.services = context.data.services.filter((x) => x.name !== 'exclude-from-generation');
|
|
41
|
+
const providerContext = this.getProviderContext(context, config, defaultKotlinSpringReactiveWebClientsGeneratorConfig);
|
|
42
|
+
const infrastructurePackageName = this.getInfrastructurePackageName(providerContext.config);
|
|
43
|
+
return Object.assign(providerContext, {
|
|
44
|
+
infrastructurePackageName,
|
|
45
|
+
refs: getReferenceFactories(infrastructurePackageName),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
getInfrastructurePackageName(config) {
|
|
49
|
+
if (typeof config.infrastructurePackageName === 'string') {
|
|
50
|
+
return config.infrastructurePackageName;
|
|
51
|
+
}
|
|
52
|
+
if (config.infrastructurePackageName.mode === 'append-package-name') {
|
|
53
|
+
return config.packageName + config.infrastructurePackageName.value;
|
|
54
|
+
}
|
|
55
|
+
if (config.infrastructurePackageName.mode === 'append-full-package-name') {
|
|
56
|
+
return this.getPackageName(config) + config.infrastructurePackageName.value;
|
|
57
|
+
}
|
|
58
|
+
return config.infrastructurePackageName.value;
|
|
59
|
+
}
|
|
60
|
+
getPackageName(config) {
|
|
61
|
+
const packageSuffix = typeof config.packageSuffix === 'string' ? config.packageSuffix : config.packageSuffix();
|
|
62
|
+
return config.packageName + packageSuffix;
|
|
63
|
+
}
|
|
64
|
+
async copyInfrastructureFiles(ctx) {
|
|
65
|
+
const targetDir = resolve(ctx.config.outputDir, ctx.infrastructurePackageName.replace(/\./g, '/'));
|
|
66
|
+
await fs.ensureDir(targetDir);
|
|
67
|
+
const files = [
|
|
68
|
+
'ApiRequestFile.kt',
|
|
69
|
+
];
|
|
70
|
+
for (const file of files) {
|
|
71
|
+
const sourcePath = `client/spring-reactive-web-clients/${file}`;
|
|
72
|
+
const targetPath = resolve(targetDir, file);
|
|
73
|
+
console.log(`Copying asset file "${sourcePath}" to "${targetPath}"`);
|
|
74
|
+
const fileContent = (await getAssetFileContent(sourcePath))
|
|
75
|
+
.replace(/@PACKAGE_NAME@/g, ctx.infrastructurePackageName);
|
|
76
|
+
fs.writeFileSync(targetPath, fileContent);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goast/kotlin",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.20",
|
|
4
4
|
"description": "Provides gOAst generators for generating Kotlin code from OpenAPI specifications.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Marc Schmidt (MaSch0212)",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"tslib": "^2.6.2",
|
|
27
27
|
"fs-extra": "^11.2.0",
|
|
28
28
|
"http-status-codes": "^2.3.0",
|
|
29
|
-
"@goast/core": "0.4.
|
|
29
|
+
"@goast/core": "0.4.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^20.9.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call.d.ts","sourceRoot":"","sources":["../../../../src/src/ast/nodes/call.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,aAAa,EACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAe,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAElD,KAAK,OAAO,GAAG,KAAK,CAAC;AAErB,KAAK,OAAO,CAAC,QAAQ,SAAS,aAAa,EAAE,QAAQ,SAAS,MAAM,GAAG,KAAK,IAAI,cAAc,CAC5F,OAAO,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,EAC3C;IACE,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IACvD,SAAS,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3E,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CACF,CAAC;AAEF,qBAAa,MAAM,CAAC,QAAQ,SAAS,aAAa,EAAE,QAAQ,SAAS,MAAM,GAAG,KAAK,CAAE,SAAQ,MAAM,CACjG,QAAQ,EACR,QAAQ,GAAG,OAAO,CACnB;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CAAC,EAAE,OAAO,CAAC;CACjB,CACF,CAAC;AAEF,qBAAa,MAAM,CAAC,QAAQ,SAAS,aAAa,EAAE,QAAQ,SAAS,MAAM,GAAG,KAAK,CAAE,SAAQ,MAAM,CACjG,QAAQ,EACR,QAAQ,GAAG,OAAO,CACnB;IACQ,IAAI,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IAC/C,SAAS,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC;IAC/D,KAAK,EAAE,OAAO,CAAC;gBAEV,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC;cAO7B,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI;CAwBpD;AAED,QAAA,MAAM,UAAU,GAAI,QAAQ,SAAS,aAAa,QAC1C,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,SAC/D,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,YAC3B,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,KAChE,MAAM,CAAC,QAAQ,CAAqG,CAAC;AAExH,eAAO,MAAM,MAAM,EAAE,OAAO,UAAU,GAAG;IAAE,KAAK,EAAE,OAAO,YAAY,CAAA;CAEnE,CAAC"}
|
|
@@ -41,7 +41,17 @@ class KtCall extends node_js_1.KtNode {
|
|
|
41
41
|
(0, write_kt_node_js_1.writeKtNode)(builder, this.arguments[0]);
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
|
|
44
|
+
if (this.path.length > 2) {
|
|
45
|
+
(0, write_kt_node_js_1.writeKtNode)(builder, this.path[0]);
|
|
46
|
+
builder.ensureCurrentLineEmpty();
|
|
47
|
+
builder.indent((builder) => {
|
|
48
|
+
builder.append('.');
|
|
49
|
+
(0, write_kt_node_js_1.writeKtNodes)(builder, this.path.slice(1), { separator: '\n.' });
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
(0, write_kt_node_js_1.writeKtNodes)(builder, this.path, { separator: '.' });
|
|
54
|
+
}
|
|
45
55
|
if (this.arguments) {
|
|
46
56
|
argument_js_1.ktArgument.write(builder, this.arguments);
|
|
47
57
|
}
|
|
@@ -7,11 +7,13 @@ type Options<TBuilder extends SourceBuilder, TInjects extends string = never> =
|
|
|
7
7
|
extensionFor?: Nullable<KtType<TBuilder>>;
|
|
8
8
|
parameters?: Nullable<Nullable<KtType<TBuilder>>[]>;
|
|
9
9
|
returnType: KtType<TBuilder>;
|
|
10
|
+
suspend?: boolean;
|
|
10
11
|
}>;
|
|
11
12
|
export declare class KtLambdaType<TBuilder extends SourceBuilder, TInjects extends string = never> extends KtNode<TBuilder, TInjects | Injects> {
|
|
12
13
|
extensionFor: KtType<TBuilder> | null;
|
|
13
14
|
parameters: KtType<TBuilder>[];
|
|
14
15
|
returnType: KtType<TBuilder>;
|
|
16
|
+
suspend: boolean;
|
|
15
17
|
constructor(options: Options<TBuilder, TInjects>);
|
|
16
18
|
protected onWrite(builder: TBuilder): void;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lambda-type.d.ts","sourceRoot":"","sources":["../../../../src/src/ast/nodes/lambda-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAc,KAAK,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjG,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAe,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,KAA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