Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various protocol test issues #855

Merged
merged 1 commit into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ use smithy.test#httpRequestTests
appliesTo: "client"
}
])
@readonly
@http(uri: "/HostWithPathOperation", method: "GET")
operation HostWithPathOperation {}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ operation AllQueryStringTypes {
}

apply AllQueryStringTypes @httpRequestTests([

{
id: "RestJsonAllQueryStringTypes",
documentation: "Serializes query string parameters with all supported types",
Expand Down Expand Up @@ -176,6 +175,7 @@ apply AllQueryStringTypes @httpRequestTests([
},
])

@suppress(["HttpQueryParamsTrait"])
structure AllQueryStringTypesInput {
@httpQuery("String")
queryString: String,
Expand Down Expand Up @@ -503,6 +503,7 @@ apply QueryPrecedence @httpRequestTests([
}
])

@suppress(["HttpQueryParamsTrait"])
structure QueryPrecedenceInput {
@httpQuery("bar")
foo: String,
Expand Down Expand Up @@ -561,6 +562,7 @@ apply QueryParamsAsStringListMap @httpRequestTests([
}
])

@suppress(["HttpQueryParamsTrait"])
structure QueryParamsAsStringListMapInput {
@httpQuery("corge")
qux: String,
Expand Down
3 changes: 3 additions & 0 deletions smithy-aws-protocol-tests/model/restXml/http-query.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ apply AllQueryStringTypes @httpRequestTests([
},
])

@suppress(["HttpQueryParamsTrait"])
structure AllQueryStringTypesInput {
@httpQuery("String")
queryString: String,
Expand Down Expand Up @@ -474,6 +475,7 @@ apply QueryPrecedence @httpRequestTests([
}
])

@suppress(["HttpQueryParamsTrait"])
structure QueryPrecedenceInput {
@httpQuery("bar")
foo: String,
Expand Down Expand Up @@ -532,6 +534,7 @@ apply QueryParamsAsStringListMap @httpRequestTests([
}
])

@suppress(["HttpQueryParamsTrait"])
structure QueryParamsAsStringListMapInput {
@httpQuery("corge")
qux: String,
Expand Down
21 changes: 14 additions & 7 deletions smithy-aws-protocol-tests/model/restXml/services/s3.smithy
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ service AmazonS3 {
version: "2006-03-01",
operations: [
ListObjectsV2,
GetBucketLocation,
],
}

Expand Down Expand Up @@ -284,9 +285,10 @@ operation ListObjectsV2 {
},
protocol: restXml
}])
@http(uri: "/GetBucketLocation", method: "GET")
@http(uri: "/{Bucket}?location", method: "GET")
@s3UnwrappedXmlOutput
operation GetBucketLocation {
input: GetBucketLocationRequest,
output: GetBucketLocationOutput,
}

Expand All @@ -295,6 +297,17 @@ structure CommonPrefix {
Prefix: Prefix,
}

structure GetBucketLocationRequest {
@httpLabel
@required
Bucket: BucketName,
}

@xmlName("LocationConstraint")
structure GetBucketLocationOutput {
LocationConstraint: BucketLocationConstraint,
}

structure ListObjectsV2Request {
@httpLabel
@required
Expand Down Expand Up @@ -480,9 +493,3 @@ string Token
{ value: "us-west-2", name: "us_west_2" }
])
string BucketLocationConstraint

@xmlName("LocationConstraint")
structure GetBucketLocationOutput {
LocationConstraint: BucketLocationConstraint,
}