-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Labels
good first issueGood for newcomersGood for newcomershigh-priorityHigh priority issueHigh priority issueserverRust server SDKRust server SDK
Description
Until server-side multi-protocol support lands (see #2979), we should abort code generation when we encounter a model where the service
shape is annotated with multiple protocol traits.
$version: "2"
namespace smithy.example
use aws.protocols#restJson1
use aws.protocols#awsJson1_1
@restJson1
@awsJson1_1
service MyService {
version: "2023-09-12"
}
We currently pick the first protocol and ignore the rest. This can lead to user confusion, as they might reasonably expect that if code generation succeeds, the server SDK can honor what they modeled.
One possibility to implement this could be to add a software.amazon.smithy.model.validation.Validator
that only gets loaded when generating servers (see #2752 for an example), which I think is preferable, as the error will surface in Smithy's consistent report format. Another is to simply throw a CodegenException
in ServerProtocolLoader
.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershigh-priorityHigh priority issueHigh priority issueserverRust server SDKRust server SDK