diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayAuthorizerContext.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayAuthorizerContext.java index e8d95de02..9b937bb9a 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayAuthorizerContext.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayAuthorizerContext.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.HashMap; import java.util.Map; @@ -27,6 +28,7 @@ * * Cognito User Pool authorizers populate the claims object. */ +@JsonIgnoreProperties(ignoreUnknown = true) public class ApiGatewayAuthorizerContext { //------------------------------------------------------------- diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayRequestContext.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayRequestContext.java index b91305ac1..a3ce15286 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayRequestContext.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayRequestContext.java @@ -12,6 +12,10 @@ */ package com.amazonaws.serverless.proxy.internal.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + + /** * The API Gateway request context object. This is used by the default implementation of the AWS_PROXY integration type. * All of the values are part of the API Gateway $context variable so this object could be reused with custom request @@ -20,6 +24,7 @@ * @see AwsProxyRequest * @see com.amazonaws.serverless.proxy.internal.RequestReader */ +@JsonIgnoreProperties(ignoreUnknown = true) public class ApiGatewayRequestContext { //------------------------------------------------------------- diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayRequestIdentity.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayRequestIdentity.java index 206b94391..436cd6902 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayRequestIdentity.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/ApiGatewayRequestIdentity.java @@ -12,6 +12,10 @@ */ package com.amazonaws.serverless.proxy.internal.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + + /** * Identity model for the API Gateway request context. This is used in the default AwsProxyRequest object. Contains * all of the properties declared in the $context.identity API Gateway object so could be re-used for other implemnetations @@ -19,6 +23,7 @@ * @see AwsProxyRequest * @see com.amazonaws.serverless.proxy.internal.RequestReader */ +@JsonIgnoreProperties(ignoreUnknown = true) public class ApiGatewayRequestIdentity { //------------------------------------------------------------- diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/AwsProxyRequest.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/AwsProxyRequest.java index 39ae6c586..e9b141ec1 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/AwsProxyRequest.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/AwsProxyRequest.java @@ -13,12 +13,14 @@ package com.amazonaws.serverless.proxy.internal.model; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.Map; /** * Default implementation of the request object from an API Gateway AWS_PROXY integration */ +@JsonIgnoreProperties(ignoreUnknown = true) public class AwsProxyRequest { //------------------------------------------------------------- diff --git a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/CognitoAuthorizerClaims.java b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/CognitoAuthorizerClaims.java index 552644df6..697bce4e8 100644 --- a/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/CognitoAuthorizerClaims.java +++ b/aws-serverless-java-container-core/src/main/java/com/amazonaws/serverless/proxy/internal/model/CognitoAuthorizerClaims.java @@ -13,6 +13,7 @@ package com.amazonaws.serverless.proxy.internal.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.format.DateTimeFormatter; @@ -36,6 +37,7 @@ * } * */ +@JsonIgnoreProperties(ignoreUnknown = true) public class CognitoAuthorizerClaims { //-------------------------------------------------------------