Skip to content

Commit

Permalink
Added JsonIgnore annotations for future proofing of request POJO
Browse files Browse the repository at this point in the history
This further addresses issue #39
  • Loading branch information
sapessi committed Jun 27, 2017
1 parent c29d283 commit dfa6689
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -27,6 +28,7 @@
*
* Cognito User Pool authorizers populate the <code>claims</code> object.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ApiGatewayAuthorizerContext {

//-------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,6 +24,7 @@
* @see AwsProxyRequest
* @see com.amazonaws.serverless.proxy.internal.RequestReader
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ApiGatewayRequestContext {

//-------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@
*/
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
*
* @see AwsProxyRequest
* @see com.amazonaws.serverless.proxy.internal.RequestReader
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ApiGatewayRequestIdentity {

//-------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

//-------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -36,6 +37,7 @@
* }
* </pre>
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class CognitoAuthorizerClaims {

//-------------------------------------------------------------
Expand Down

0 comments on commit dfa6689

Please sign in to comment.