Skip to content

Commit 70c5927

Browse files
committed
chore: use java text block
1 parent aaf0c59 commit 70c5927

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

smithy-typescript-codegen-test/model/weather/main.smithy

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,17 @@ apply GetCity @httpResponseTests([
167167
code: 200
168168
body: """
169169
{
170-
"name": "Seattle",
171-
"coordinates": {
172-
"latitude": 12.34,
173-
"longitude": -56.78
174-
},
175-
"city": {
176-
"cityId": "123",
177-
"name": "Seattle",
178-
"number": "One",
179-
"case": "Upper"
180-
}
170+
"name": "Seattle",
171+
"coordinates": {
172+
"latitude": 12.34,
173+
"longitude": -56.78
174+
},
175+
"city": {
176+
"cityId": "123",
177+
"name": "Seattle",
178+
"number": "One",
179+
"case": "Upper"
180+
}
181181
}"""
182182
bodyMediaType: "application/json"
183183
params: {
@@ -259,8 +259,8 @@ apply NoSuchResource @httpResponseTests([
259259
code: 404
260260
body: """
261261
{
262-
"resourceType": "City",
263-
"message": "Your custom message"
262+
"resourceType": "City",
263+
"message": "Your custom message"
264264
}"""
265265
bodyMediaType: "application/json"
266266
params: { resourceType: "City", message: "Your custom message" }

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServiceAggregatedClientGenerator.java

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,24 @@ public void run() {
100100
).orElse(true);
101101
if (inputOptional) {
102102
writer.addImport("OptionalParameter", null, TypeScriptDependency.SMITHY_TYPES);
103-
writer.write("""
104-
$L(): Promise<$T>;""", methodName, output);
103+
writer.write("$L(): Promise<$T>;", methodName, output);
105104
}
106105
writer.write("""
107-
$L(
108-
args: $T,
109-
options?: $T,
110-
): Promise<$T>;""", methodName, input, applicationProtocol.getOptionsType(), output);
111-
writer.write("""
112-
$L(
113-
args: $T,
114-
cb: (err: any, data?: $T) => void
115-
): void;""", methodName, input, output);
116-
writer.write("""
117-
$L(
118-
args: $T,
119-
options: $T,
120-
cb: (err: any, data?: $T) => void
121-
): void;""", methodName, input, applicationProtocol.getOptionsType(), output);
106+
$1L(
107+
args: $2T,
108+
options?: $3T,
109+
): Promise<$4T>;
110+
$1L(
111+
args: $2T,
112+
cb: (err: any, data?: $4T) => void
113+
): void;
114+
$1L(
115+
args: $2T,
116+
options: $3T,
117+
cb: (err: any, data?: $4T) => void
118+
): void;""",
119+
methodName, input, applicationProtocol.getOptionsType(), output
120+
);
122121
writer.write("");
123122
}
124123
});

0 commit comments

Comments
 (0)