diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 4f6d377e31..3e1b71dce8 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -46,3 +46,9 @@ message = "Added support for SSO bearer token authentication. The aws-sdk-codeca references = ["aws-sdk-rust#703", "smithy-rs#3453"] meta = { "breaking" = false, "bug" = false, "tada" = true } author = "jdisanti" + +[[smithy-rs]] +message = "Upgrade Smithy to 1.45." +references = ["smithy-rs#3470"] +meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "all" } +authors = ["jdisanti"] diff --git a/codegen-client-test/model/rest-xml-extras.smithy b/codegen-client-test/model/rest-xml-extras.smithy index 2c18a35e92..b518ad09c6 100644 --- a/codegen-client-test/model/rest-xml-extras.smithy +++ b/codegen-client-test/model/rest-xml-extras.smithy @@ -21,8 +21,6 @@ service RestXmlExtras { StringHeader, CreateFoo, RequiredMember, - // TODO(https://github.com/smithy-lang/smithy-rs/issues/3315) - ZeroAndFalseQueryParams, ] } @@ -256,32 +254,3 @@ structure RequiredMemberInputOutput { @required requiredString: String } - -@httpRequestTests([ - { - id: "RestXmlZeroAndFalseQueryParamsAreSerialized" - protocol: restXml - code: 200 - method: "GET" - uri: "/ZeroAndFalseQueryParams" - body: "" - queryParams: [ - "Zero=0", - "False=false" - ] - params: { - zeroValue: 0 - falseValue: false - } - } -]) -@http(uri: "/ZeroAndFalseQueryParams", method: "GET") -operation ZeroAndFalseQueryParams { - input := { - @httpQuery("Zero") - zeroValue: Integer - - @httpQuery("False") - falseValue: Boolean - } -} diff --git a/codegen-core/common-test-models/rest-json-extras.smithy b/codegen-core/common-test-models/rest-json-extras.smithy index 2667cad6c4..ad49300167 100644 --- a/codegen-core/common-test-models/rest-json-extras.smithy +++ b/codegen-core/common-test-models/rest-json-extras.smithy @@ -8,7 +8,7 @@ use smithy.test#httpRequestTests use smithy.test#httpResponseTests use smithy.framework#ValidationException -// TODO(https://github.com/smithy-lang/smithy/pull/2132): Remove this test once it's fixed in Smithy +// TODO(https://github.com/smithy-lang/smithy/pull/2167): Remove this test once it's fixed in Smithy apply AllQueryStringTypes @httpRequestTests([ { id: "RestJsonZeroAndFalseQueryValuesFixed" @@ -25,8 +25,8 @@ apply AllQueryStringTypes @httpRequestTests([ queryInteger: 0 queryBoolean: false queryParamsMapOfStringList: { - queryInteger: ["0"] - queryBoolean: ["false"] + Integer: ["0"] + Boolean: ["false"] } } } @@ -89,11 +89,9 @@ service RestJsonExtras { NullInNonSparse, CaseInsensitiveErrorOperation, EmptyStructWithContentOnWireOp, - // TODO(https://github.com/smithy-lang/smithy-rs/issues/2968): Remove the following once these tests are included in Smithy - // They're being added in https://github.com/smithy-lang/smithy/pull/1908 - HttpPayloadWithUnion, - // TODO(https://github.com/smithy-lang/smithy-rs/issues/3315) - ZeroAndFalseQueryParams, + QueryPrecedence, + // TODO(https://github.com/smithy-lang/smithy/pull/2167): Remove this test once it's fixed in Smithy + AllQueryStringTypes, ], errors: [ExtraError] } @@ -377,33 +375,3 @@ structure EmptyStructWithContentOnWireOpOutput { operation EmptyStructWithContentOnWireOp { output: EmptyStructWithContentOnWireOpOutput, } -@http(uri: "/zero-and-false-query-params", method: "GET") -@httpRequestTests([ - { - id: "RestJsonZeroAndFalseQueryParamsAreSerialized", - protocol: restJson1, - code: 200, - method: "GET", - uri: "/zero-and-false-query-params", - body: "", - queryParams: [ - "Zero=0", - "False=false" - ], - params: { - zeroValue: 0, - falseValue: false - } - } -]) -operation ZeroAndFalseQueryParams { - input: ZeroAndFalseQueryParamsInput -} - -structure ZeroAndFalseQueryParamsInput { - @httpQuery("Zero") - zeroValue: Integer - - @httpQuery("False") - falseValue: Boolean -} diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt index e72ff691dd..b5678277c8 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt @@ -805,6 +805,7 @@ class ServerProtocolTestGenerator( private const val AwsJson11 = "aws.protocoltests.json#JsonProtocol" private const val AwsJson10 = "aws.protocoltests.json10#JsonRpc10" private const val RestJson = "aws.protocoltests.restjson#RestJson" + private const val RestJsonExtras = "aws.protocoltests.restjson#RestJsonExtras" private const val RestJsonValidation = "aws.protocoltests.restjson.validation#RestJsonValidation" private val ExpectFail: Set = setOf( @@ -812,8 +813,10 @@ class ServerProtocolTestGenerator( FailingTest(RestJson, "RestJsonEndpointTrait", TestType.Request), FailingTest(RestJson, "RestJsonEndpointTraitWithHostLabel", TestType.Request), FailingTest(RestJson, "RestJsonOmitsEmptyListQueryValues", TestType.Request), - // TODO(https://github.com/smithy-lang/smithy/pull/2132): Remove this failing test once it's fixed in Smithy + // TODO(https://github.com/smithy-lang/smithy/pull/2167): BEGIN Remove this failing test once it's fixed in Smithy FailingTest(RestJson, "RestJsonZeroAndFalseQueryValues", TestType.Request), + FailingTest(RestJsonExtras, "RestJsonZeroAndFalseQueryValues", TestType.Request), + // TODO(https://github.com/smithy-lang/smithy/pull/2167): END Remove this failing test once it's fixed in Smithy // Tests involving `@range` on floats. // Pending resolution from the Smithy team, see https://github.com/smithy-lang/smithy-rs/issues/2007. FailingTest(RestJsonValidation, "RestJsonMalformedRangeFloat_case0", TestType.MalformedRequest), diff --git a/gradle.properties b/gradle.properties index 9ab85ef4ee..d5e5184bdb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,7 @@ kotlin.code.style=official # codegen smithyGradlePluginVersion=0.9.0 -smithyVersion=1.44.0 +smithyVersion=1.45.0 # kotlin kotlinVersion=1.9.20 diff --git a/rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs b/rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs index 680c5df235..f8bbc2c05c 100644 --- a/rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs +++ b/rust-runtime/aws-smithy-runtime/src/client/orchestrator.rs @@ -3,9 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -// TODO(msrvUpgrade): This can be removed once we upgrade the MSRV to Rust 1.69 -#![allow(unknown_lints)] - use self::auth::orchestrate_auth; use crate::client::interceptors::Interceptors; use crate::client::orchestrator::endpoints::orchestrate_endpoint;