Skip to content

Commit

Permalink
Add http trait to white label tests to fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Aug 5, 2024
1 parent 082be21 commit fc0e553
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,33 @@ apply WhiteLabel @httpCustomAuth(signerProperty: "signer", identityProperty: "id
apply WhiteLabel @auth([httpApiKeyAuth, httpBasicAuth, httpBearerAuth, httpDigestAuth, httpCustomAuth])

@auth([httpBasicAuth])
@http(method: "POST", uri: "/http_basic_auth")
operation HttpBasicAuth {}

@auth([httpDigestAuth])
@http(method: "POST", uri: "/http_digest_auth")
operation HttpDigestAuth {}

@auth([httpBearerAuth])
@http(method: "POST", uri: "/http_bearer_auth")
operation HttpBearerAuth {}

@auth([httpApiKeyAuth])
@http(method: "POST", uri: "/http_api_key_auth")
operation HttpApiKeyAuth {}

@optionalAuth
@http(method: "POST", uri: "/optional_auth")
operation OptionalAuth {}

@auth([])
@http(method: "POST", uri: "/no_auth")
operation NoAuth {}

@auth([httpBasicAuth, httpDigestAuth, httpBearerAuth, httpApiKeyAuth])
@http(method: "POST", uri: "/ordered_auth")
operation OrderedAuth {}

@auth([httpCustomAuth])
@http(method: "POST", uri: "/custom_auth")
operation CustomAuth {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace smithy.ruby.tests
@requestCompression(
encodings: ["gzip"]
)
@http(method: "POST", uri: "/request_compression")
operation RequestCompression {
input: RequestCompressionInput
}
Expand All @@ -14,6 +15,7 @@ operation RequestCompression {
@requestCompression(
encodings: ["gzip"]
)
@http(method: "POST", uri: "/request_compression_streaming")
operation RequestCompressionStreaming {
input: RequestCompressionStreamingInput
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$version: "2.0"
namespace smithy.ruby.tests

@http(method: "POST", uri: "/defaults_test")
operation DefaultsTest {
input:= {
defaults: Defaults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ use smithy.rules#contextParam
use smithy.rules#staticContextParams

@endpoint(hostPrefix: "foo.")
@http(method: "POST", uri: "/endpoint_operation")
operation EndpointOperation {}

@suppress(["UnstableTrait"])
@endpoint(hostPrefix: "foo.{labelMember}.")
@staticContextParams(Dataplane: {value: true})
@http(method: "POST", uri: "/endpoint_with_host_label_operation")
operation EndpointWithHostLabelOperation {
input: EndpointWithHostLabelOperationInput,
}
Expand All @@ -26,8 +28,10 @@ structure EndpointWithHostLabelOperationInput {

@suppress(["UnstableTrait"])
@staticContextParams(Dataplane: {value: true})
@http(method: "POST", uri: "/dataplane_endpoint")
operation DataplaneEndpoint {}

@http(method: "POST", uri: "/resource_endpoint")
operation ResourceEndpoint {
input: ResourceEndpointInput
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $version: "2.0"
namespace smithy.ruby.tests

@optionalAuth
@http(method: "POST", uri: "/start_event_stream")
operation StartEventStream {
input: StartEventStreamInputOutput
output: StartEventStreamInputOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ service WhiteLabel {
]
}

@http(method: "POST", uri: "/kitchen_sink")
operation KitchenSink {
input: KitchenSinkInputOutput,
output: KitchenSinkInputOutput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ $version: "2.0"

namespace smithy.ruby.tests

@http(method: "POST", uri: "/mixin_test")
operation MixinTest {
// The generated shape name is GetUserInput
input := {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ $version: "2.0"
namespace smithy.ruby.tests

@paginated(inputToken: "nextToken", outputToken: "nextToken")
@http(method: "POST", uri: "/paginators_test")
operation PaginatorsTest {
input: PaginatorsTestInput,
output: PaginatorsTestOutput
}

@paginated(inputToken: "nextToken", outputToken: "nextToken", items: "items")
@http(method: "POST", uri: "/paginators_test_with_items")
operation PaginatorsTestWithItems {
input: PaginatorsTestInput,
output: PaginatorsTestOutput
Expand All @@ -23,6 +25,7 @@ structure PaginatorsTestOutput {
}

@paginated(inputToken: "__nextToken", outputToken: "__wrapper.__123nextToken", items: "__items")
@http(method: "POST", uri: "/paginators_test_with_bad_names")
operation __PaginatorsTestWithBadNames {
input: __PaginatorsTestWithBadNamesInput,
output: __PaginatorsTestWithBadNamesOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ $version: "2.0"

namespace smithy.ruby.tests

@http(method: "POST", uri: "/relative_middleware")
operation RelativeMiddleware {}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$version: "2.0"
namespace smithy.ruby.tests

@http(method: "POST", uri: "/streaming")
operation Streaming {
input: StreamingInput,
output: StreamingOutput,
Expand All @@ -23,6 +24,7 @@ structure StreamingOutput {
@streaming
blob StreamingBlob

@http(method: "POST", uri: "/streaming_with_length")
operation StreamingWithLength {
input: StreamingWithLengthInput,
}
Expand Down

0 comments on commit fc0e553

Please sign in to comment.