diff --git a/codegen-core/common-test-models/rest-json-extras.smithy b/codegen-core/common-test-models/rest-json-extras.smithy index 9377e6089f1..01f095756ab 100644 --- a/codegen-core/common-test-models/rest-json-extras.smithy +++ b/codegen-core/common-test-models/rest-json-extras.smithy @@ -66,7 +66,6 @@ service RestJsonExtras { CaseInsensitiveErrorOperation, EmptyStructWithContentOnWireOp, QueryPrecedence, - HttpQueryParamsOnlyOperation, ], errors: [ExtraError] } @@ -351,46 +350,3 @@ structure EmptyStructWithContentOnWireOpOutput { operation EmptyStructWithContentOnWireOp { output: EmptyStructWithContentOnWireOpOutput, } - -@http(uri: "/http-query-params-only", method: "GET") -@httpRequestTests([ - { - id: "HttpQueryParamsOnlyRequest", - documentation: "Test that httpQueryParams are included in request when no other query parameters exist", - protocol: "aws.protocols#restJson1", - method: "GET", - uri: "/http-query-params-only", - queryParams: ["shouldExpandRoles=true", "shouldShowOnlyAuthForThisDocument=false"], - params: { - queryMap: { - "shouldExpandRoles": "true", - "shouldShowOnlyAuthForThisDocument": "false" - } - }, - appliesTo: "client", - }, - { - id: "HttpQueryParamsOnlyEmptyRequest", - documentation: "Test that empty httpQueryParams map results in no query parameters", - protocol: "aws.protocols#restJson1", - method: "GET", - uri: "/http-query-params-only", - params: { - queryMap: {} - }, - appliesTo: "client", - } -]) -operation HttpQueryParamsOnlyOperation { - input: HttpQueryParamsOnlyInput, -} - -structure HttpQueryParamsOnlyInput { - @httpQueryParams - queryMap: QueryMap, -} - -map QueryMap { - key: String, - value: String, -} diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/TestHelpers.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/TestHelpers.kt index 42997a80127..8bcc1b9afa0 100644 --- a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/TestHelpers.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/testutil/TestHelpers.kt @@ -150,6 +150,7 @@ fun String.asSmithyModel( sourceLocation: String? = null, smithyVersion: String = SMITHY_VERSION, disableValidation: Boolean = false, + additionalDeniedModels: Array = emptyArray(), ): Model { val processed = letIf(!this.trimStart().startsWith("\$version")) { "\$version: ${smithyVersion.dq()}\n$it" } val denyModelsContaining = @@ -157,7 +158,7 @@ fun String.asSmithyModel( // If Smithy protocol test models are in our classpath, don't load them, since they are fairly large and we // almost never need them. "smithy-protocol-tests", - ) + ) + additionalDeniedModels val urls = ModelDiscovery.findModels().filter { modelUrl -> denyModelsContaining.none { diff --git a/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customizations/SmithyTypesPubUseExtraTest.kt b/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customizations/SmithyTypesPubUseExtraTest.kt index a3ae1ae50b6..4f3d3eca111 100644 --- a/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customizations/SmithyTypesPubUseExtraTest.kt +++ b/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/smithy/customizations/SmithyTypesPubUseExtraTest.kt @@ -47,7 +47,11 @@ class SmithyTypesPubUseExtraTest { input: SomeInput, output: SomeOutput } - """.asSmithyModel() + """.asSmithyModel( + // Filters out models containing `smithy.test#EventHeaderValue` to avoid pulling in + // blob and timestamp types, which would defeat the purpose of this test. + additionalDeniedModels = arrayOf("smithy-protocol-test-traits"), + ) } private fun initialize(model: Model): Pair { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bfa514e4f81..7d6881b35a5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ kotlin-version = "2.1.0" ktlint-version = "1.0.1" # codegen -smithy-version = "1.62.0" +smithy-version = "1.64.0" smithy-gradle-plugin-version = "1.3.0" # publishing