-
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.
- Rails JSON - Implements a JSON protocol that communicates with Rails APIs.
Generated SDKs from smithy-ruby
supports the following public features:
-
Client - The Client class is the public interface used for interacting with the service. The Client has 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.
-
Config - The Config class is an immutable struct that contains the options that will be used by the Client. It can resolve default value chains and validates provided values against expected types. Config classes are 1:1 with a Smithy service shape.
-
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.
-
Errors - Errors are a collection of classes that represent generic service errors and modeled Smithy error shapes. Error have a 1:1 mapping to Smithy structure shapes modeled with the error trait.
-
Paginators - Paginators are classes that provide an abstraction for paginating operations. These classes provide enumerators that will automatically iterate the paginated responses and items. Paginators have a 1:1 mapping to Smithy operation shapes modeled with the pagination trait.
-
Waiters - Waiters are classes that provide an abstraction for polling operations until desired states are reached. Waiters have a 1:1 mapping to each waiter definition on the waitable trait across all Smithy operation shapes.
-
Interceptors - Interceptors provide lifecycle hooks into the SDK. Interceptors have the ability to modify the input, output, request, or response objects during operation execution.
-
Plugins - Plugins are distributable classes that modify Config to add custom behavior.
-
Retries - Retries are performed when the error is a modeled error marked with the retryable trait, a throttling error, a transient error, or a server error. Retry Strategies can customize when and how to perform a retry.
-
DNS -
-
Endpoints - Endpoints and EndpointProviders provide mechanisms for configuring and resolving Endpoints. Generated SDKs have a 1:1 mapping of EndpointProvider with Smithy service shapes.
These are listed just for reference.
-
Params - Params are modules that convert user provided input into rigid shapes used by middleware. Params have a 1:1 mapping to Smithy shapes.
-
Validators - Validators are classes that provide a method for validating Ruby input types against the Smithy model. Validators have a 1:1 mapping to Smithy input structure 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).
-
Stubs - Stubs are classes that build a network response from provided values instead of performing a real network call. They are used in tests to control output. Stubs have a 1:1 mapping to Smithy structure shapes.