You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Rename modelWithEmptyStruct to inputUnionWithEmptyStructure
- Remove output parameter and TestOutput structure
- Focus tests on input serialization only
Copy file name to clipboardExpand all lines: codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQueryTest.kt
+3-8Lines changed: 3 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ class AwsQueryTest {
34
34
}
35
35
""".asSmithyModel()
36
36
37
-
privatevalmodelWithEmptyStruct=
37
+
privatevalinputUnionWithEmptyStructure=
38
38
"""
39
39
namespace test
40
40
use aws.protocols#awsQuery
@@ -47,18 +47,13 @@ class AwsQueryTest {
47
47
}
48
48
49
49
operation TestOp {
50
-
input: TestInput,
51
-
output: TestOutput
50
+
input: TestInput
52
51
}
53
52
54
53
structure TestInput {
55
54
testUnion: TestUnion
56
55
}
57
56
58
-
structure TestOutput {
59
-
testUnion: TestUnion
60
-
}
61
-
62
57
union TestUnion {
63
58
// Empty struct - should generate _inner to avoid unused variable warning
64
59
emptyStruct: EmptyStruct,
@@ -83,6 +78,6 @@ class AwsQueryTest {
83
78
fun`union with empty struct generates warning-free code`() {
84
79
// This test will fail with unused variable warnings if the fix is not applied
85
80
// clientIntegrationTest enforces -D warnings via codegenIntegrationTest
Copy file name to clipboardExpand all lines: codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJsonTest.kt
0 commit comments