Skip to content

Commit 167ab08

Browse files
committed
Increase severity for endpoint test NVV validation
This commit increases the validation event severity, from WARNING to DANGER, for cases where the input to an operationInputs endpoint test does not match the requirements of the input shape. There does not appear to be a use case for this behavior and it is believed that this was mistakenly lowered from ERROR to WARNING in a previous commit. It is increased only to DANGER to allow for a suppression in cases we do not foresee.
1 parent bed9664 commit 167ab08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/traits/EndpointTestsTraitValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public List<ValidationEvent> validate(Model model) {
6464
// so lower the severity before emitting.
6565
if (testCase.getExpect().getError().isPresent()) {
6666
for (ValidationEvent event : operationInputEvents) {
67-
events.add(event.toBuilder().severity(Severity.WARNING).build());
67+
events.add(event.toBuilder().severity(Severity.DANGER).build());
6868
}
6969
} else {
7070
events.addAll(operationInputEvents);
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[WARNING] smithy.example#InvalidService: This shape applies a trait that is unstable: smithy.rules#endpointTests | UnstableTrait
2-
[WARNING] smithy.example#InvalidService: The operationInput value for an endpoint test does not match the operation's input shape: Missing required structure member `fizz` for `smithy.example#GetThingInput` | EndpointTestsTrait
2+
[DANGER] smithy.example#InvalidService: The operationInput value for an endpoint test does not match the operation's input shape: Missing required structure member `fizz` for `smithy.example#GetThingInput` | EndpointTestsTrait

0 commit comments

Comments
 (0)