@@ -273,7 +273,7 @@ private void generateOperationMux(GenerationContext context, OperationShape oper
273
273
274
274
writer .openBlock ("const mux = new httpbinding.HttpBindingMux<$S, $S>([" , "]);" ,
275
275
context .getService ().getId ().getName (),
276
- operation . getId ( ).getName (),
276
+ context . getSymbolProvider (). toSymbol ( operation ).getName (),
277
277
() -> {
278
278
HttpTrait httpTrait = operation .expectTrait (HttpTrait .class );
279
279
generateUriSpec (context , operation , httpTrait );
@@ -287,10 +287,11 @@ private void generateUriSpec(GenerationContext context,
287
287
TypeScriptWriter writer = context .getWriter ();
288
288
289
289
String serviceName = context .getService ().getId ().getName ();
290
+ String operationName = context .getSymbolProvider ().toSymbol (operation ).getName ();
290
291
291
292
writer .openBlock ("new httpbinding.UriSpec<$S, $S>(" , ")," ,
292
293
serviceName ,
293
- operation . getId (). getName () ,
294
+ operationName ,
294
295
() -> {
295
296
writer .write ("'$L'," , httpTrait .getMethod ());
296
297
writer .openBlock ("[" , "]," , () -> {
@@ -323,8 +324,7 @@ private void generateUriSpec(GenerationContext context,
323
324
}
324
325
});
325
326
});
326
- writer .writeInline ("{ service: $S, operation: $S }" ,
327
- serviceName , operation .getId ().getName ());
327
+ writer .writeInline ("{ service: $S, operation: $S }" , serviceName , operationName );
328
328
});
329
329
}
330
330
@@ -404,7 +404,7 @@ public void generateOperationHandlerFactory(GenerationContext context, Operation
404
404
writer .write ("export const get$L = <Context>(operation: __Operation<$T, $T, Context>, "
405
405
+ "customizer: __ValidationCustomizer<$S>): "
406
406
+ "__ServiceHandler<Context, __HttpRequest, __HttpResponse> => {" ,
407
- operationHandlerSymbol .getName (), inputType , outputType , operation . getId () .getName ());
407
+ operationHandlerSymbol .getName (), inputType , outputType , operationSymbol .getName ());
408
408
} else {
409
409
writer .write ("export const get$L = <Context>(operation: __Operation<$T, $T, Context>): "
410
410
+ "__ServiceHandler<Context, __HttpRequest, __HttpResponse> => {" ,
@@ -418,7 +418,7 @@ public void generateOperationHandlerFactory(GenerationContext context, Operation
418
418
writer .addImport ("generateValidationSummary" , "__generateValidationSummary" , "@aws-smithy/server-common" );
419
419
writer .addImport ("generateValidationMessage" , "__generateValidationMessage" , "@aws-smithy/server-common" );
420
420
writer .openBlock ("const customizer: __ValidationCustomizer<$S> = (ctx, failures) => {" , "};" ,
421
- operation . getId () .getName (),
421
+ operationSymbol .getName (),
422
422
() -> {
423
423
writeDefaultValidationCustomizer (writer );
424
424
}
@@ -451,8 +451,9 @@ private Consumer<OperationShape> writeOperationCase(
451
451
SymbolProvider symbolProvider
452
452
) {
453
453
return operation -> {
454
- Symbol symbol = symbolProvider .toSymbol (operation ).expectProperty ("serializerType" , Symbol .class );
455
- writer .write ("case $S: return new $T();" , operation .getId ().getName (), symbol );
454
+ Symbol operationSymbol = symbolProvider .toSymbol (operation );
455
+ Symbol symbol = operationSymbol .expectProperty ("serializerType" , Symbol .class );
456
+ writer .write ("case $S: return new $T();" , operationSymbol .getName (), symbol );
456
457
};
457
458
}
458
459
0 commit comments