You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
serde broke these in <serde-rs/serde#2980>
smithy depends on lambda-http 0.8 until the HTTP 1 migration can be
done, so this is needed.
Co-authored-by: Ariel Ben-Yehuda <[email protected]>
Copy file name to clipboardExpand all lines: lambda-http/src/deserializer.rs
+15-18Lines changed: 15 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,14 @@
1
1
usecrate::request::LambdaRequest;
2
+
#[cfg(feature = "alb")]
3
+
use aws_lambda_events::alb::AlbTargetGroupRequest;
4
+
#[cfg(feature = "apigw_rest")]
5
+
use aws_lambda_events::apigw::ApiGatewayProxyRequest;
6
+
#[cfg(feature = "apigw_http")]
7
+
use aws_lambda_events::apigw::ApiGatewayV2httpRequest;
8
+
#[cfg(feature = "apigw_websockets")]
9
+
use aws_lambda_events::apigw::ApiGatewayWebsocketProxyRequest;
2
10
use serde::{de::Error,Deserialize};
11
+
use serde_json::value::RawValue;
3
12
4
13
constERROR_CONTEXT:&str = "this function expects a JSON payload from Amazon API Gateway, Amazon Elastic Load Balancer, or AWS Lambda Function URLs, but the data doesn't match any of those services' events";
5
14
@@ -8,34 +17,22 @@ impl<'de> Deserialize<'de> for LambdaRequest {
8
17
where
9
18
D: serde::Deserializer<'de>,
10
19
{
11
-
let content = match serde::__private::de::Content::deserialize(deserializer){
12
-
Ok(content) => content,
13
-
Err(err) => returnErr(err),
14
-
};
20
+
let raw_value:Box<RawValue> = Box::deserialize(deserializer)?;
0 commit comments