File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Aws/Lambda/Runtime/APIGateway Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import Data.Aeson
26
26
eitherDecodeStrict ,
27
27
object ,
28
28
(.:) ,
29
+ (.:?)
29
30
)
30
31
import Data.Aeson.Types (Parser )
31
32
import qualified Data.Aeson.Types as T
@@ -110,7 +111,7 @@ data ApiGatewayRequestContext = ApiGatewayRequestContext
110
111
apiGatewayRequestContextDomainName :: ! Text ,
111
112
apiGatewayRequestContextApiId :: ! Text ,
112
113
apiGatewayRequestContextIdentity :: ! ApiGatewayRequestContextIdentity ,
113
- apiGatewayRequestContextAuthorizer :: ! Value
114
+ apiGatewayRequestContextAuthorizer :: ! ( Maybe Value )
114
115
}
115
116
deriving (Show )
116
117
@@ -131,7 +132,7 @@ instance FromJSON ApiGatewayRequestContext where
131
132
<*> v .: " domainName"
132
133
<*> v .: " apiId"
133
134
<*> v .: " identity"
134
- <*> v .: " authorizer"
135
+ <*> v .:? " authorizer"
135
136
parseJSON _ = fail " Expected ApiGatewayRequestContext to be an object."
136
137
137
138
data ApiGatewayRequestContextIdentity = ApiGatewayRequestContextIdentity
You can’t perform that action at this time.
0 commit comments