Commit Graph

365 Commits

Author SHA1 Message Date
Russell Cohen 9707c0347a
Increase scope of Protocol test generation (#18)
* 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
2020-11-04 22:20:50 -05:00
Russell Cohen 86dc5db504
Add pre-commit hooks (#17)
* Setup pre-commit

* Run precommit hook across all files

* Update README.md
2020-11-04 22:09:00 -05:00
Russell Cohen 1d30ad06ca
Add initial protocol test generation (#16)
* 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
2020-11-04 11:17:19 -05:00
Russell Cohen 44720f4dc0
Productionize Integration Test Machinery (#15)
* 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
2020-11-03 18:44:38 -05:00
Russell Cohen 787d317850
Fix RustWrite.withModule bug (#13)
* withModule needs to set the parent dependencies

* Fix ktlin style
2020-11-02 15:37:29 -05:00
Russell Cohen 9983057a4b
Add inital CI workflow (#12)
* 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
2020-11-02 15:30:04 -05:00
Russell Cohen 6e772b9d60
Generate Builders for Structures (#3)
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.
2020-11-02 14:03:40 -05:00
Russell Cohen 4557f6a6bb
Add protocol test helpers (#11)
* Add protocol test helpers

* expand tests
2020-11-02 14:03:21 -05:00
Russell Cohen 972d833c28
Add base64::decode & property testing (#4)
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.
2020-11-02 12:27:35 -05:00
Russell Cohen 2d71e48957
Add support for unnamed enumerations (#2)
* 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()
2020-10-30 14:06:22 -04:00
Russell Cohen ddac680d53
Partial HTTP protocol implementation (#1)
* 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
2020-10-29 15:49:22 -04:00
Russell Cohen 4874168a9b Add Rust runtime code 2020-10-28 11:08:23 -04:00
Russell Cohen 5c77e437be Add gradle files 2020-10-28 11:01:13 -04:00
Russell Cohen 3ba6fe37e7 Add Kotlin codegen 2020-10-28 11:00:49 -04:00
Amazon GitHub Automation 2f8227c6bf Initial commit 2020-10-28 06:37:45 -07:00