-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a "dynamic" module to dynamically load services and schemas from…
… smithy models (#17) Adds a dynamic module to dynamically load existential `Service` and `Schema` instances from the json-representation of smithy models. The construct exposed for doing this is called `DynamicSchemaIndex` Because the `Service` and `Schema` interface do not make any constraint with regards to how datatypes are stored in memory, it is possible to reify Schemas that work against generic representations: * products are backed by Array[Any] * sums are backed by (Int, Any) tuples Because of this, we can load `Service` instances in an existential fashion, which allows to connect front-ends (service stubs) and back-ends (client stubs) from separate protocols without needing any code generation. An example use-case for it is the derivation of fully dynamic CLIs that read a spec file to expose the commands, and invoke http apis via the compiled clients. Another use-case could be dynamic http mocks that can be hot-reloaded. Co-authored-by: Olivier Mélois <baccata64@gmail.com> Co-authored-by: Jakub Kozłowski <kubukoz@gmail.com>
- Loading branch information
Showing
33 changed files
with
1,983 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.