-
- Downloads
Add decorator to allow to make all operations fallible (#1190)
Force all operations in the model to be fallible.
When this decorator is applied, operations that do not have a Smithy error attatched, will return Result<OperationOutput, InternalServerError>.
To enable this decorator, create a file called META-INF/service/software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator containing codegen-server/src/main/resources/META-INF/services/software.amazon.smithy.rust.codegen.smithy.customize.RustCodegenDecorator.
Closes: #1150
Signed-off-by:
Bigo <1781140+crisidev@users.noreply.github.com>
Showing
- codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/FallibleOperationsDecorator.kt 54 additions, 0 deletions...rver/smithy/customizations/FallibleOperationsDecorator.kt
- codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/FallibleOperationsDecoratorTest.kt 64 additions, 0 deletions.../smithy/customizations/FallibleOperationsDecoratorTest.kt
- codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGeneratorTest.kt 2 additions, 2 deletions...ver/smithy/generators/ServerCombinedErrorGeneratorTest.kt
Loading
Please register or sign in to comment