|
|
|
|
|
by mtdowling
1863 days ago
|
|
Smithy is very focused on codegen, so the model is highly normalized. So for example, defining a list of something needs to be done using a `list` shape. This kind of list is something you'd see directly serialized and sent over the wire. For example: list Messages {
member: Messages
} Then you can reference Messages from other places in the model, like from a structure: structure Something {
messages: Messages
} In contrast, the `[City]` syntax is used in other places in the IDL to define a relationship to a shape. This isn't something that gets sent over the wire, it's just used to form essentially a relationship in the service graph from a service to resources, a resource to operations, an operation to errors, etc. For example: service Weather {
resources: [City, Sensors]
} |
|