Skip to content

Commit afb36c8

Browse files
authored
fix: model test utils serviceName bug (#878)
1 parent dcdb817 commit afb36c8

File tree

1 file changed

+3
-3
lines changed
  • codegen/smithy-kotlin-codegen-testutils/src/main/kotlin/software/amazon/smithy/kotlin/codegen/test

1 file changed

+3
-3
lines changed

codegen/smithy-kotlin-codegen-testutils/src/main/kotlin/software/amazon/smithy/kotlin/codegen/test/ModelTestUtils.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import software.amazon.smithy.build.MockManifest
88
import software.amazon.smithy.codegen.core.SymbolProvider
99
import software.amazon.smithy.kotlin.codegen.KotlinCodegenPlugin
1010
import software.amazon.smithy.kotlin.codegen.KotlinSettings
11-
import software.amazon.smithy.kotlin.codegen.core.*
11+
import software.amazon.smithy.kotlin.codegen.core.KotlinDelegator
1212
import software.amazon.smithy.kotlin.codegen.inferService
1313
import software.amazon.smithy.kotlin.codegen.integration.KotlinIntegration
1414
import software.amazon.smithy.kotlin.codegen.model.OperationNormalizer
@@ -205,7 +205,7 @@ fun String.generateTestModel(
205205
use aws.protocols#$protocol
206206
207207
@$protocol
208-
service $serviceName {
208+
service ${serviceName.filter { !it.isWhitespace() }} {
209209
version: "${TestModelDefault.MODEL_VERSION}",
210210
operations: [
211211
${operations.joinToString(separator = ", ")}
@@ -252,7 +252,7 @@ fun String.prependNamespaceAndService(
252252
$importExpr
253253
$modelProtocol
254254
@service(sdkId: "$serviceName")
255-
service $serviceName {
255+
service ${serviceName.filter { !it.isWhitespace() }} {
256256
version: "${TestModelDefault.MODEL_VERSION}",
257257
operations: $operations
258258
}

0 commit comments

Comments
 (0)