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
Smithy allows the definition of operations without associated input or output structures. However, adding these structures is considered a backward-compatible change according to the specifications. When generating a Smithy client, the API call for the operation requires a parameter that represents the operation's input as defined in the model. Since adding an input to an operation is intended to be a backward-compatible change (Smtihy Specs), any modifications to the model would necessitate changes in the user code that invokes the generated code, if it previously did not require a structure. This is why the client always generates input/output structures, even if they are not defined in the model. The code generator names these by suffixing "Input" or "Output" to the name of the operation. To maintain consistency, for cases where the operation defines an input or output structure, it renames them to match the same naming convention: the input structure will be called OperationNameInput, and the output structure will be called OperationNameOutput.
On the server side, however, when such changes are implemented, the server must process the request differently, and the corresponding code must be updated. This requirement is nearly a mandatory aspect of the specification for servers. The server follows the same convention as the client in that it also renames input/output structures. However, this causes confusion for service authors. Additionally, when we implement a plugin that will allow users to generate Rust structures (Issue #:1370) only from a model without generating service code, we would need to allow them to name the structures whatever they want and not rename them.
This issue is to stop renaming these input/output structures on the server side.
Note: This will be a breaking change.
The text was updated successfully, but these errors were encountered:
Smithy allows the definition of operations without associated input or output structures. However, adding these structures is considered a backward-compatible change according to the specifications. When generating a Smithy client, the API call for the operation requires a parameter that represents the operation's input as defined in the model. Since adding an input to an operation is intended to be a backward-compatible change (Smtihy Specs), any modifications to the model would necessitate changes in the user code that invokes the generated code, if it previously did not require a structure. This is why the client always generates input/output structures, even if they are not defined in the model. The code generator names these by suffixing "Input" or "Output" to the name of the operation. To maintain consistency, for cases where the operation defines an input or output structure, it renames them to match the same naming convention: the input structure will be called OperationNameInput, and the output structure will be called OperationNameOutput.
On the server side, however, when such changes are implemented, the server must process the request differently, and the corresponding code must be updated. This requirement is nearly a mandatory aspect of the specification for servers. The server follows the same convention as the client in that it also renames input/output structures. However, this causes confusion for service authors. Additionally, when we implement a plugin that will allow users to generate Rust structures (Issue #:1370) only from a model without generating service code, we would need to allow them to name the structures whatever they want and not rename them.
This issue is to stop renaming these input/output structures on the server side.
Note: This will be a breaking change.
The text was updated successfully, but these errors were encountered: