-
Notifications
You must be signed in to change notification settings - Fork 12
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
"json" protocol v1.0 #29
base: master
Are you sure you want to change the base?
Conversation
Note that there are more failed (and thus omitted) rest-json namespaces, this is due to throwing when we can't find endpoints
Fantastic work Milton! @dupuchba do you have time to review it since there’s overlap with your current work? |
@cgrand thanks, I love where this project is going! |
@milt Thanks a lot for your work !!! I won't be able to review it today but I'll take some time tomorrow ! |
This PR begins to address #4 by adding support for "json" protocol apis, version 1.0 only.
Confirmed working with DynamoDB and DDBStreams.
Other notable changes:
portkey.awsgen/gen-api
dispatches on protocol, then versionportkey.awsgen/gen-operation
is a multimethod, dispatch fn looks at protocol and version if present.portkey.awsgen/gen-api
reports on unsupported versions.portkey.awsgen/generate-files!
now looks for endpoints with both the munged and unmunged name, and does not attempt to generate if they are absent, preventing a runtime NPE.portkey.aws/*endpoint-override*
is a dynamic var that can be used to override the endpoint uri for local testing, etc.portkey.aws/params-toquerystring
no longer puts a?
on URIs if there are no query params.portkey.aws/-json-call
provides request processing for json v1.0 apis with the "X-AMZ-Target" header.portkey.aws/-json-call
finds exceptions that only exist in the body of the response:type
key contains the spec keyword of the exception, and thebody
key contains the exception map (with message) itself.Smells:
portkey.awsgen/gen-operation
for json protocol, and the-json-call
request fn. This should be refactored away as we add more protocols.