-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Welcome to the smithy-ruby wiki!
This wiki covers the component design of a generated Ruby SDK and how Smithy traits influence generated code.
When provided a Smithy model, smithy-ruby
will generate the following
components:
-
Client - The client class is the public interface used for interacting with the service. The client will have methods for each operation defined by the API. Clients are 1:1 with a Smithy service shape and its public methods are 1:1 with Smithy operation shapes.
-
Types - Types are light-weight classes that contain shape data. Types are built from params on input and populated by service responses on output. Types have a 1:1 mapping to Smithy structure shapes.
-
Params - Params are modules that convert user provided input into rigid shapes used by middleware. Params have a 1:1 mapping to Smithy shapes.
-
Builders and Parsers - Builders and parsers are protocol specific classes that build a request using operation input and parse a response into an output object. Builders and parsers have a 1:1 mapping to Smithy complex shapes (Structure, List, Map, Operation).
-
Errors and Error Parsers - Errors are a collection of classes that represent generic service errors and modeled Smithy error shapes. Modeled errors have a 1:1 mapping to Smithy structure shapes decorated with the
@error
trait. -
Validators - Validators are classes that provide a method for validating Ruby input types against the Smithy model. Validators will have a 1:1 mapping to Smithy input structure shapes.
-
Stubs - Stubs are classes that build a response object from provided values instead of performing a real network call. They are used in tests to control output. Stubs will have a 1:1 mapping to Smithy structure shapes.
-
Paginators - Paginators are classes that provide an abstraction for paginated operations. These classes provide enumerators that will automatically iterate the paginated responses. Paginators have a 1:1 mapping to paginated Smithy operations.
-
Waiters - Waiters are classes that provide an abstraction for polling resources until desired states are reached. Waiters have a 1:1 mapping to each waiter definition on the waiter traits across all operations.