Skip to content

Commit e265294

Browse files
committed
Fix integration tests
1 parent 05c07eb commit e265294

File tree

3 files changed

+45
-18
lines changed

3 files changed

+45
-18
lines changed

codegen-core/common-test-models/constraints.smithy

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,10 @@ structure ConstrainedHttpBoundShapesOperationInputOutput {
154154
// @httpHeader("X-Length-MediaType")
155155
// lengthStringHeaderWithMediaType: MediaTypeLengthString,
156156

157-
@httpHeader("X-Length-Set")
158-
lengthStringSetHeader: SetOfLengthString,
157+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401): a `set` shape is
158+
// just a `list` shape with `uniqueItems`, which hasn't been implemented yet.
159+
// @httpHeader("X-Length-Set")
160+
// lengthStringSetHeader: SetOfLengthString,
159161

160162
@httpHeader("X-Length-List")
161163
lengthStringListHeader: ListOfLengthString,
@@ -176,8 +178,10 @@ structure ConstrainedHttpBoundShapesOperationInputOutput {
176178
@httpQuery("lengthStringList")
177179
lengthStringListQuery: ListOfLengthString,
178180

179-
@httpQuery("lengthStringSet")
180-
lengthStringSetQuery: SetOfLengthString,
181+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401): a `set` shape is
182+
// just a `list` shape with `uniqueItems`, which hasn't been implemented yet.
183+
// @httpQuery("lengthStringSet")
184+
// lengthStringSetQuery: SetOfLengthString,
181185

182186
@httpQuery("enumStringList")
183187
enumStringListQuery: ListOfEnumString,
@@ -277,7 +281,9 @@ structure ConA {
277281
conBList: ConBList,
278282
conBList2: ConBList2,
279283

280-
conBSet: ConBSet,
284+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401): a `set` shape is
285+
// just a `list` shape with `uniqueItems`, which hasn't been implemented yet.
286+
// conBSet: ConBSet,
281287

282288
conBMap: ConBMap,
283289

@@ -287,7 +293,9 @@ structure ConA {
287293
enumString: EnumString,
288294

289295
listOfLengthString: ListOfLengthString,
290-
setOfLengthString: SetOfLengthString,
296+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401): a `set` shape is
297+
// just a `list` shape with `uniqueItems`, which hasn't been implemented yet.
298+
// setOfLengthString: SetOfLengthString,
291299
mapOfLengthString: MapOfLengthString,
292300

293301
nonStreamingBlob: NonStreamingBlob
@@ -315,7 +323,10 @@ map MapOfListOfEnumString {
315323

316324
map MapOfSetOfLengthString {
317325
key: LengthString,
318-
value: SetOfLengthString,
326+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401): a `set` shape is
327+
// just a `list` shape with `uniqueItems`, which hasn't been implemented yet.
328+
// value: SetOfLengthString,
329+
value: ListOfLengthString
319330
}
320331

321332
@length(min: 2, max: 8)
@@ -346,7 +357,9 @@ union ConstrainedUnion {
346357

347358
constrainedStructure: ConB,
348359
conBList: ConBList,
349-
conBSet: ConBSet,
360+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401): a `set` shape is
361+
// just a `list` shape with `uniqueItems`, which hasn't been implemented yet.
362+
// conBSet: ConBSet,
350363
conBMap: ConBMap,
351364
}
352365

@@ -420,13 +433,15 @@ list NestedList {
420433
member: ConB
421434
}
422435

423-
set ConBSet {
424-
member: NestedSet
425-
}
426-
427-
set NestedSet {
428-
member: String
429-
}
436+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401): a `set` shape is
437+
// just a `list` shape with `uniqueItems`, which hasn't been implemented yet.
438+
// set ConBSet {
439+
// member: NestedSet
440+
// }
441+
//
442+
// set NestedSet {
443+
// member: String
444+
// }
430445

431446
@length(min: 1, max: 69)
432447
map ConBMap {

codegen-core/common-test-models/misc.smithy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ list HeaderList {
255255
member: String
256256
}
257257

258-
set HeaderSet {
258+
@uniqueItems
259+
list HeaderSet {
259260
member: String
260261
}

codegen-server-test/build.gradle.kts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ val allCodegenTests = "../codegen-core/common-test-models".let { commonModels ->
5454
"constraints",
5555
imports = listOf("$commonModels/constraints.smithy"),
5656
),
57-
CodegenTest("aws.protocoltests.restjson#RestJson", "rest_json"),
57+
CodegenTest(
58+
"aws.protocoltests.restjson#RestJson",
59+
"rest_json",
60+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401) `@uniqueItems` is used.
61+
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
62+
),
5863
CodegenTest(
5964
"aws.protocoltests.restjson#RestJsonExtras",
6065
"rest_json_extras",
@@ -70,7 +75,13 @@ val allCodegenTests = "../codegen-core/common-test-models".let { commonModels ->
7075
"json_rpc11",
7176
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
7277
),
73-
CodegenTest("aws.protocoltests.misc#MiscService", "misc", imports = listOf("$commonModels/misc.smithy")),
78+
CodegenTest(
79+
"aws.protocoltests.misc#MiscService",
80+
"misc",
81+
imports = listOf("$commonModels/misc.smithy"),
82+
// TODO(https://github.com/awslabs/smithy-rs/issues/1401) `@uniqueItems` is used.
83+
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
84+
),
7485
CodegenTest(
7586
"com.amazonaws.ebs#Ebs", "ebs",
7687
imports = listOf("$commonModels/ebs.json"),

0 commit comments

Comments
 (0)