-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add omitempty
to HTTPMethod
in APIGatewayProxyRequest
#350
Conversation
This can be empty for websocket events, see calavera/aws-lambda-events#33
Codecov Report
@@ Coverage Diff @@
## master #350 +/- ##
=======================================
Coverage 72.22% 72.22%
=======================================
Files 19 19
Lines 738 738
=======================================
Hits 533 533
Misses 138 138
Partials 67 67 Continue to review full report at Codecov.
|
I'm just curious: why do you want this? Are you marshalling this struct to JSON? Why? |
I generate rust code from the go code: calavera/aws-lambda-events#33 |
did you mean to modify APIGatewayWebsocketProxyRequest instead? Since it's unused, I think we could deprecate the field, and remove the json tag. Would that play well with your code generator? |
I'm pretty sure I modified the correct struct. If you look at the corresponding C# class (https://github.com/aws/aws-lambda-dotnet/blob/master/Libraries/src/Amazon.Lambda.APIGatewayEvents/APIGatewayProxyRequest.cs) they point out that different fields can be null for this event depending on if the source is http or websockets. I just look at the structs, so if there is additional marshalling logic elsewhere that chooses between the two structs please let me know and I'll see what I can do on my side. |
There's no marshaling logic, it's up the the author of the function to select the correct struct for the event source. The java events project also has a separate type for web socket events |
superseded by #355 |
This can be empty for websocket events, see calavera/aws-lambda-events#33
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.