Skip to content

Commit

Permalink
Remove ignoreUnsupportedConstraintTraits from integration test mode…
Browse files Browse the repository at this point in the history
…ls (#2516)

* Remove `ignoreUnsupportedConstraintTraits` from integration test models

Now that constraint traits are supported in server SDKs (with some
corner case caveats, see
#1401), we can remove
`ignoreUnsupportedConstraintTraits` from the codegen config of the
integration test models.

* Bring back ignoreUnsupportedConstraintTraits in RestJsonValidation model
  • Loading branch information
david-perez authored and rcoh committed Apr 24, 2023
1 parent 2c9e887 commit 5a51038
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
23 changes: 5 additions & 18 deletions codegen-server-test/build.gradle.kts
Expand Up @@ -61,12 +61,7 @@ val allCodegenTests = "../codegen-core/common-test-models".let { commonModels ->
"constraints",
imports = listOf("$commonModels/constraints.smithy"),
),
CodegenTest(
"aws.protocoltests.restjson#RestJson",
"rest_json",
// TODO(https://github.com/awslabs/smithy-rs/issues/1401) `@uniqueItems` is used.
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
),
CodegenTest("aws.protocoltests.restjson#RestJson", "rest_json"),
CodegenTest(
"aws.protocoltests.restjson#RestJsonExtras",
"rest_json_extras",
Expand All @@ -75,26 +70,18 @@ val allCodegenTests = "../codegen-core/common-test-models".let { commonModels ->
CodegenTest(
"aws.protocoltests.restjson.validation#RestJsonValidation",
"rest_json_validation",
// `@range` trait is used on floating point shapes, which we deliberately don't want to support.
// See https://github.com/awslabs/smithy-rs/issues/1401.
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
),
CodegenTest("aws.protocoltests.json10#JsonRpc10", "json_rpc10"),
CodegenTest(
"aws.protocoltests.json#JsonProtocol",
"json_rpc11",
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
),
CodegenTest("aws.protocoltests.json#JsonProtocol", "json_rpc11"),
CodegenTest(
"aws.protocoltests.misc#MiscService",
"misc",
imports = listOf("$commonModels/misc.smithy"),
// TODO(https://github.com/awslabs/smithy-rs/issues/1401) `@uniqueItems` is used.
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
),
CodegenTest(
"com.amazonaws.ebs#Ebs", "ebs",
imports = listOf("$commonModels/ebs.json"),
extraConfig = """, "codegen": { "ignoreUnsupportedConstraints": true } """,
),
CodegenTest("com.amazonaws.ebs#Ebs", "ebs", imports = listOf("$commonModels/ebs.json")),
CodegenTest("com.amazonaws.s3#AmazonS3", "s3"),
CodegenTest(
"com.aws.example.rust#PokemonService",
Expand Down
Expand Up @@ -262,7 +262,7 @@ fun validateUnsupportedConstraints(
.map { (shape, rangeTrait) -> UnsupportedRangeTraitOnShape(shape, rangeTrait as RangeTrait) }
.toSet()

// 5. `@uniqueItems` cannot reach a map shape.
// 4. `@uniqueItems` cannot reach a map shape.
// See https://github.com/awslabs/smithy/issues/1567.
val mapShapeReachableFromUniqueItemsListShapeSet = walker
.walkShapes(service)
Expand Down

0 comments on commit 5a51038

Please sign in to comment.