Skip to content

Commit ee7b512

Browse files
committed
cannot use same envelope for in and out
1 parent 3c8019a commit ee7b512

File tree

1 file changed

+1
-3
lines changed
  • powertools-validation/src/main/java/software/amazon/lambda/powertools/validation/internal

1 file changed

+1
-3
lines changed

powertools-validation/src/main/java/software/amazon/lambda/powertools/validation/internal/ValidationAspect.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ && placedOnRequestHandler(pjp)) {
122122
if (validationNeeded && !validation.outboundSchema().isEmpty()) {
123123
JsonSchema outboundJsonSchema = getJsonSchema(validation.outboundSchema(), true);
124124

125-
if (validation.envelope() != null && !validation.envelope().isEmpty()) {
126-
validate(result, outboundJsonSchema, validation.envelope());
127-
} else if (result instanceof APIGatewayProxyResponseEvent) {
125+
if (result instanceof APIGatewayProxyResponseEvent) {
128126
APIGatewayProxyResponseEvent response = (APIGatewayProxyResponseEvent) result;
129127
validate(response.getBody(), outboundJsonSchema);
130128
} else if (result instanceof APIGatewayV2HTTPResponse) {

0 commit comments

Comments
 (0)