-
Notifications
You must be signed in to change notification settings - Fork 69
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
Allow payload serialization to be overridden #90
Conversation
This commit adds support for implementing protocols to override the serialization behavior of a member marked with @httpPayload. This is useful for protocols that work with intermediate objects that need to be altered at the service level. Adding a top level xmlns attribute, for example. This commit also fixes various bugs found in testing behavior developed on top of the main change.
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.
Exporting two new protected methods on top of the plethora of existing protected methods makes me nervous. Is there another way to achieve whatever it is you're going after without this requirement?
* <p>For example: | ||
* | ||
* <pre>{@code | ||
* if (input.body !== undefined) { |
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.
What is input
?
The only other clear way to handle the scope that this change allows would be to add a single protected method to allow for arbitrarily manipulating the value currently being set in to Its purpose would be a little less clear, but there's potentially less chance for a downstream consumer to miss-handle processing of Payloads. |
Ok. I'm still not thrilled about the API surface area, but LGTM for now. |
This commit adds support for implementing protocols to override the
serialization behavior of a member marked with @httpPayload. This is
useful for protocols that work with intermediate objects that need to
be altered at the service level. Adding a top level xmlns attribute,
for example.
This commit also fixes various bugs found in testing behavior developed
on top of the main change.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.