aws / aws/aws-lambda-dotnet

Lambda annotations: able to use your own JsonSerializerOptions when parsing request and generating response

Offen
#1,446 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature-request module/lambda-client-lib p2 queued
Vorherrschende Sprache
C#
Sterne
1.7k
Forks
503
Ø Merge
1 T. 18 Std.
Gemergte PRs (30 T.)
21

Beschreibung

### Describe the feature

A way to control what serializing options to use when parsing a request or generating a response using `HttpResults`

### Use Case

1. When parsing a request as of now and you're expecting for example camelCase. You would have to decorate your model props with `JsonPropertyName` that follows camelCase for it to be able to parse. Same when generating a response using `HttpResults` and you want it to return camelCase.

### Proposed Solution

It would be nice to be able to set it in `Startup` for all lambdas. For `HttpResults` it would be enough to be able to inject it in somehow.

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS .NET SDK and/or Package version used

Amazon.Lambda.Annotations 0.12.0

### Targeted .NET Platform

.NET 6

### Operating System and version

Windows 10

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie damit, den im Issue beschriebenen Lambda Annotations-Ablauf zur Request-Analyse und die Einstiegspunkte zur Response-Generierung von HttpResults zu lesen. Überprüfen Sie anschließend, wie die Startup-Konfiguration derzeit bereitgestellt wird. Als abgeschlossen gilt die Aufgabe, wenn benutzerdefinierte JsonSerializerOptions sowohl die Request-Analyse als auch die generierten Responses steuern können und der Konfigurationsbereich sowie der Injektionsmechanismus definiert sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, csharp
Bereich
api, cloud
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.