You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.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 aCodegenException
inServerProtocolLoader
.The text was updated successfully, but these errors were encountered: