-
- Downloads
Disallow ignoring a constrained shape in an event stream's closure (#2113)
The server SDK will otherwise produce Rust code that cannot be compiled, so it doesn't make sense to prompt users to disregard the warning and opt into `ignoreUnsupportedConstraints`. To continue synthesizing the model, the user must remove any constrained traits from the event stream's closure. This commit also tweaks formatting of errors yielded by `ValidateUnsupportedConstraints`. Prior to this commit, they were a bit off due to carelessness when interpolation occurs. For example: ``` [SEVERE] Operation com.amazonaws.constraints#ConstrainedShapesOperation takes in input that is constrained(https://awslabs.github.io/smithy/2.0/spec/constraint-traits.html), and as such can fail with a validationexception. You must model this behavior in the operation shape in your model file. ```
Showing
- codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ValidateUnsupportedConstraints.kt 21 additions, 13 deletions...t/codegen/server/smithy/ValidateUnsupportedConstraints.kt
- codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ValidateUnsupportedConstraintsAreNotUsedTest.kt 54 additions, 26 deletions...er/smithy/ValidateUnsupportedConstraintsAreNotUsedTest.kt
Loading
Please register or sign in to comment