-
Notifications
You must be signed in to change notification settings - Fork 55
fix: ignore __type when deserializing union for AWS Json protocols #1054
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
Conversation
| import software.amazon.smithy.model.shapes.MemberShape | ||
| import software.amazon.smithy.model.shapes.Shape | ||
|
|
||
| class AwsJsonProtocolParserGenerator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix Missing documentation.
Should we rename this (and AwsJsonProtocolSerdeDescriptorGenerator) since these aren't specific to the "aws json" protocols? It's a bit confusing but I also don't know that I have a better suggestion at the moment. At the very least we should document that this isn't specific to awsJson protocols.
| import software.amazon.smithy.model.shapes.MemberShape | ||
| import software.amazon.smithy.model.shapes.Shape | ||
|
|
||
| class AwsJsonProtocolSerdeDescriptorGenerator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docs
| { | ||
| "id": "ac672b00-f8bb-4235-8db4-aad0ae2f157d", | ||
| "type": "bugfix", | ||
| "description": "ignore __type when deserializing union for AWS Json protocols", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also applies for RestJSON, so I wouldn't say just "AWS Json protocols"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: consider wrapping __type in backticks: __type
|
|
||
| /** | ||
| * Adds a trait to ignore `__type` in union shapes for `AWS Json 1.0`, `AWS Json 1.1`, `RestJson 1.0` protocols | ||
| * Sometimes the unnecessary trait `__type` is added and needs to be ignored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "Sometimes the unnecessary field `__type` is added and needs to be ignored"
|
SonarCloud Quality Gate failed.
|










Issue #
closes #1044
Description of changes
-Added
IgnoreKeywith key__typeto descriptors when deserializing a union shape for AWS Json protocols(AWS Json 1.0, AWS Json 1.1, RestJson 1.0)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.