-
Notifications
You must be signed in to change notification settings - Fork 25
Fix path serialization #113
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
| * shape. This may use native types or invoke complex type serializers to | ||
| * manipulate the dataSource into the proper input content. | ||
| */ | ||
| private static class HttpMemberSerVisitor extends ShapeVisitor.Default<String> { |
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.
I moved all of this to a visitor from the hodgepodge methods above. The move to the visitor was a single commit, and behavioral changes are in other commits.
| RFC3339 = "%Y-%m-%dT%H:%M:%SZ" | ||
| # Same as RFC3339, but with microsecond precision. | ||
| RFC3339_MICRO = "%Y-%m-%dT%H:%M:%S.%fZ" |
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.
These were pulled from botocore, but given more specific names.
24be60e to
6482d73
Compare
nateprewitt
left a comment
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.
One question, apologies I didn't catch it during the last review. Once that's answered though, the rest of this looks good to me.
| if context.transport_request.url.path: | ||
| endpoint.url.path += context.transport_request.url.path | ||
| endpoint.url.query = context.transport_request.url.query | ||
| endpoint.url.host = context.transport_request.url.host + endpoint.url.host |
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.
I'm not sure I understand what's happening here. Why are we concatenating two hosts and what's the expected outcome? Is context.transport_request.url.host a prefix in this case?
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.
Yeah, the hostLabel trait allows for setting an endpoint prefix, so this is just accounting for that.
f6e9618 to
485ae72
Compare
This updates the protocol tests to parse any timestamps inside the generator and output a constructor rather than delegating the parsing to python. This was already being done in the structure generator for default values, so this shares that effort.
This updates unix timestamp serialization to omit fractional seconds when that fraction is 0.
485ae72 to
f5f9d2d
Compare
|
@jonemo I had to rebase, but all the changes I've made in response to your comments are in the latest commit. |
This fixes a number of bugs uncovered by protocol tests in path serialization.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.