Upgrade Smithy to 1.45 (#3470)

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
This commit is contained in:
John DiSanti 2024-03-08 13:16:02 -08:00 committed by GitHub
parent 1a26cf53be
commit a413b9ba28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 74 deletions

View File

@ -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"]

View File

@ -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
}
}

View File

@ -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
}

View File

@ -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<FailingTest> =
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),

View File

@ -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

View File

@ -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;