Skip to content

Commit 534081e

Browse files
committed
Fix SerializerContext for lambda
1 parent 1911b88 commit 534081e

File tree

1 file changed

+5
-2
lines changed
  • src/api/Elastic.Documentation.Api.Lambda

1 file changed

+5
-2
lines changed

src/api/Elastic.Documentation.Api.Lambda/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5+
using System.Text.Json;
56
using System.Text.Json.Serialization;
67
using Amazon.Lambda.APIGatewayEvents;
78
using Amazon.Lambda.Serialization.SystemTextJson;
9+
using Elastic.Documentation.Api.Core.AskAi;
810
using Elastic.Documentation.Api.Infrastructure;
911

1012
var builder = WebApplication.CreateSlimBuilder(args);
@@ -19,6 +21,7 @@
1921

2022
app.Run();
2123

22-
[JsonSerializable(typeof(APIGatewayHttpApiV2ProxyRequest), GenerationMode = JsonSourceGenerationMode.Metadata)]
23-
[JsonSerializable(typeof(APIGatewayHttpApiV2ProxyResponse), GenerationMode = JsonSourceGenerationMode.Default)]
24+
[JsonSerializable(typeof(APIGatewayProxyRequest))]
25+
[JsonSerializable(typeof(APIGatewayProxyResponse))]
26+
[JsonSerializable(typeof(AskAiRequest))]
2427
internal sealed partial class LambdaJsonSerializerContext : JsonSerializerContext;

0 commit comments

Comments
 (0)