* Add combined error generator
* Deterministic operation generation
* Test generator refactoring
* Fix test failure in inlineable
* Back out needless changes to Rust.kt and merge error types
* Add some docs
* Add non_exhaustive to structs, unions, and enums
During a refactoring, `non_exhaustive` was accidentally removed from generated structurs. This commit re-adds it and validates its present with tests.
* Remove print
* Delete empty test
* Generate documentation for structures
The first of many commits to generate docs. This is a first pass for structures, we still need to document enums & unions. Some serious design also needs to occur to figure out the best practice for turning the Smithy documentation into nice Rust documentation.
* Bump Java version to 9
* Remove exclusion of `target`
* Don't build docs for deps
* Update to use getMemberTrait
* Support the remaining fields on request protocol tests
Add support for remaining requirements and & make some small changes to support them.
* Satisfy rustfmt
Upgrade Smithy to 1.4.0. This enables us to re-enable the invalid protocol tests for 1.3.0. Along the way, `Instantiator` was refactored to cleanup its handling of `Optional` shapes.
* Refactor SymbolMetadataProvider into an abstract class
* Refactor meta to expectMeta
* Refactor SymbolMetadataProvider into an abstract class
* Refactor meta to expectMeta
* Add support for inline dependencies
* Implement Json Serializers!
* CR fixes
HashSet does not offer a deterministic iteration order which made serialization non-deterministic. The change to BTreeSet is otherwise transparent but provides deterministic sort order for members.
Every 6 weeks, a new version of Rust and Clippy comes out—we were upgrading implicitly which meant that our clippy (lint) checks started failing if they added new lints. This makes the Rust version explicit so we can upgrade and fix lints on our schedule.
* Add document types & other bug fixes to support AwsJson11
* Expand protocol tests for RestJson1.1 and AwsRestJson
This diff adds RestJson1 and AwsJson1.1 to the integration test suite. It uncovered a number of bugs, some of which I fixed inline and some I filed issues for and disabled the tests.
* Add another disabled test & cleaup
* Fix tests broken by changing URL encoding to encode ':'
* Copy-paste Aarons comment
* Fixup Rustfmt
* Run all tests in the same cargo workspace
Running all the tests in the same cargo workspace allows test runners to avoid recompiling dependencies every time. This allows us to drop parallel tests which seemed to be causing OOMs.
* Doc cleanups and improvements
* Add support for public and private modules
* Generate Synthetic Body structs for serialization
To enable serialization & deserialization, we generate synthetic structs representing the request body. Currently, the serialization method returns a stub, however, in a subsequent PR, serde will be used to generate actual request bodies.
* Fix doc typo
* CR feedback
* Run all tests in the same cargo workspace
Running all the tests in the same cargo workspace allows test runners to avoid recompiling dependencies every time. This allows us to drop parallel tests which seemed to be causing OOMs.
* Doc cleanups and improvements
* Refactor generation to use unified Meta
A `Meta` object is introduced that is attached during Symbol generation. This configures the visibility and attributes that the generators should use when generating structs/unions/etc. This is a refactoring to setup the next set of PRs which will generate serializers for models via the same mechanism.
* Cleanup SymbolVisitor cruft
Mostly mechanical refactoring to remove operation specific fields from ProtocolConfig—this allows protocol config to be used for an entire service rather than being recreated for each operation.
* Setup pre-commit
* Run precommit hook across all files
* Increase scope of Protocol test generaton
Added support for the following fields in protocol tests:
- forbidQueryParams
- requireQueryParams
- headers
* Implement Instantiator
* Add support for dev-dependencies
* Pass the protocol in Protocol config
* Add initial protocol test generator
This commit adds an initial and very limited implementation of protocol test generation. Specifically,
it only asserts that the query string contains certain required parameters. We will update protocol test generation in concert with updates to the code generation features.
* Fixes from integration tests
* Add test of recursive maps, fix implementation of empty maps
* Add protocol test generator, pre-commit hooks
* Fix test
* Fix formatting
* Productionize Integration Test Machinery
smithy-build.json is now dynamically generated along with a Cargo.toml to facilitate easy adding of new integration tests.
* We don't need REPO_ROOT anymore
* Add inital CI workflow
* Run unit tests
* Run integration tests & ktlint
* Split job, set REPO_ROOT
* Update to satisfy new cargo clippy
* Upload an artifact
* Run runtime tests in CI
* Add missing test.sh
* Make script path indepdendent
* Run clippy on Rust runtime
* move artifact upload to the correct job
* Don't upload target
* Fix Rust code formatting
* Fix kotlin codestyle
* Fix merge issue
A builder object is generated for Structure shapes. The builder will be fallible (return `Result<T, String>`) if the structure has required members without defaults.
If the structure has no required members, the `build()` method directly returns the constructed object. This required a number of refinements to our module handling as the builders are namespaced to 1-module-per-shape.
To support protocol tests, this commit adds `decode` to our base64 implementation. The implementation is validated against the base64 crate and stress-tested with proptest for correctness and crash-free-ness.
* Add support for unnamed enumerations
Unnamed enumerations are supported by creating a "newtype" that wraps the string. The newtype provides the valid values as a list for convenience.
* Take intellij's suggestion to simplify
* Rename function to values()
* Add new models to run integration tests against
* Add initial support for HTTP protocols
* Refactor protocol generation arguments
* Add more method comments
* Remove some dead code
* CR feedback