When used over H/2, sending an empty data frame for a GET can trigger some problematic behavior in Hyper. Hyper should probably handle this, but this ensures that we will
not hit this behavior.
When sending data to API Gateway services, we are getting GOAWAY because this causes to send duplicate empty data frames.
* Add as_xyz and is_xyz helper methods on Smithy Unions
Issue #298
* Fix Unions generation and add unit test
Co-authored-by: Victor Barbu <vicbarbu@amazon.com>
* Rename generated crates to aws-sdk-*
* Don't use module name as service name for metadata
* Add module authors to protocol test builds
* Couple more fixes
* Fix module authors field
* Update dependency
* add secrets manager hello world example
* Apply suggestions from code review
Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com>
Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com>
Co-authored-by: Russell Cohen <russell.r.cohen@gmail.com>
* Make Generated Builders Vec-Aware
This updates the generated builders & fluent client to be vec-aware. The builder method with the same name as the field will append the field to the list, creating it if it doesn't exist. A `set_xyz` method is added which retains the original behavior.
* Fix test usages of builders
* Add Map builder
* Fix unit tests
* Add impl Into clause for builder helpers
* Update another test
* One more spot that needed to be updated
* Delete dead code
* This is weird
* impl Error for Top Level Errors
* Disable 1.51 clippy lints. Not sure why they are showing up in this PR that hasn't bumped the rustc version
* clean impl display, top level errors send/sync
* Assert errors are send+sync
* Make futures Send
* restJson1 Header Deserialization Support
This adds support for the `@httpHeader` trait during request deserialization. This is facilitated via a `Read` abstraction which allows parsers to consume part of an input and return the remaining input. We use this to enable things like `HttpDates` which actually include commas to be parsed in a comma delimited fashion.
The internal libraries may eventually be refactored to reduce the amount of generics if it proves to be a compiler bottleneck.
* Add support for parsing request bodies
* Add response code parsing
* Lots of refactorings to restJson response parsing
* Fix some clippy lints
* Add document deserialization support and delete the failing tests
* Add new error handling (all RestJson protocol tests passing!)
* Add prefix headers parsing support
* Fix Rust Runtime clippy warnings
* Cleanup some more dead code / clippy fixes
* Update external functions to take HeaderMap instead of the value iterator
* Hard error on unreconized binding location
* Refactor parse function generation to be on-demand
* One more round of refactoring
* Few more cleanups
A bug was introduced which caused unmodeled response codes to be lost during error handling. This caused the unmodeled errors to always be marked as "unretryable" because their code wasn't exposed to the retry policy. This diff adds a fix and integration test for this behavior.
* restJson1 Header Deserialization Support
This adds support for the `@httpHeader` trait during request deserialization. This is facilitated via a `Read` abstraction which allows parsers to consume part of an input and return the remaining input. We use this to enable things like `HttpDates` which actually include commas to be parsed in a comma delimited fashion.
The internal libraries may eventually be refactored to reduce the amount of generics if it proves to be a compiler bottleneck.
* Add support for parsing request bodies
* Add response code parsing
* Lots of refactorings to restJson response parsing
* Fix some clippy lints
* Add document deserialization support and delete the failing tests
* Http Prefix Header Support
The impetus of this diff is adding support for HttpPrefix headers. This ended up leading to a bunch of other changes:
1. operation.build() now always returns a result to account for inability to construct HTTP requests from certain inputs
2. HeaderName/HeaderValue is now created eagerly to give a better error message
3. httpPrefixHeaders are supported
4. The Dynamo movies example now uses the fluent client.
* Disable clippy lint of extra wrap
* Fix example
* Delete some dead code
* Fully qualify types from models
For a long time, we've been fully qualifying depdency types but not model types. This produces code that's fine, but it's always been a confusing inconsistency and it posed problems trying to render Opaque types that specified namespaces (because the namespace was ignored).
This removes that inconsistency.
* A few more small refactorings
* Fix test failures
* Wip fluent API
* Fluent builders working!
* fix handle visibility
* Delete unused imports
* Lots of refactorings & making the fluent client an optional feature
* Cleanup module handling & add support for Cargo features
* Fix AWS tests
* Remove unused modules customization
* Set optional in the Cargo toml
* .execute() -> .send()
* Fix issues from refactoring out cargo features implementation
* Refactor errors to expose a kind & meta field separately
* More simplification of errors
* Simplify the retryable_error_kind implementation
* Error generator cleanups
* Fix aws-hyper feature issue
* Small test-util refactoring to improve debug output
* Fully qualify types from models
For a long time, we've been fully qualifying depdency types but not model types. This produces code that's fine, but it's always been a confusing inconsistency and it posed problems trying to render Opaque types that specified namespaces (because the namespace was ignored).
This removes that inconsistency.
* A few more small refactorings
* Fix test failures
* CR feedback
* Enum Conn POC
* Make alias public
* Add docs, Debug impl, format
* Add comment delete dead code
* A couple of missing cargo-formats
* Cleanup, address CR feedback
* Derive clone instead of implementing it manually
* wip
* Generate Cargo.toml after lib rs, cleanup deps
* Move RecordingConnection into an extras crate
* Move generation code into extras crate
* Delete unused conn method
* Add todo about storing req/resps externally
* Add note about credential expiry
* Fix clippy lint
* Replace creds with fake creds
* Delete note about real credentials
* Give cargo fmt a hand
* EndpointResolver should be pub(crate)
* Switch internals of Region to be Cow
* Rename ProvideIdempotencyToken to MakeIdempotenyToken
* Make the config module public and rename ConfigBuilder to Builder
* Rename credentials to
* Fix missed use of Endpoint
* Add support for the Sensitive Trait
* Add kms integration test for sensitive trait
* Add additional test
* Always generate a custom debug impl
This actually causes a reduction in llvm-lines & apparently can improve compile performance. It also simplifies the code.