Skip to content

Commit 0cbf755

Browse files
authored
Use ShapeID instead of string literal (#541)
1 parent fb0fbdb commit 0cbf755

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

codegen/aws/core/src/main/java/software/amazon/smithy/python/aws/codegen/AwsAuthIntegration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,13 @@ public void customize(GenerationContext context) {
100100
writer.addDependency(SmithyPythonDependency.SMITHY_HTTP);
101101
writer.addImport("smithy_core.interfaces.auth", "AuthOption", "AuthOptionProtocol");
102102
writer.addImports("smithy_core.auth", Set.of("AuthOption", "AuthParams"));
103+
writer.addImport("smithy_core.shapes", "ShapeID");
103104
writer.pushState();
104105

105106
writer.write("""
106107
def $1L(auth_params: AuthParams[Any, Any]) -> AuthOptionProtocol | None:
107108
return AuthOption(
108-
scheme_id=$2S,
109+
scheme_id=ShapeID($2S),
109110
identity_properties={}, # type: ignore
110111
signer_properties={} # type: ignore
111112
)

0 commit comments

Comments
 (0)