Skip to content
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

WebActions: add a synthetic json binding for proto web actions #1299

Merged
merged 1 commit into from Dec 3, 2019

Conversation

@acostama
Copy link
Collaborator

acostama commented Nov 29, 2019

For web actions that receive and/or respond with proto, add a second binding over json.

@acostama acostama requested review from swankjesse and adrw Nov 29, 2019
}
}

class PostHello @Inject constructor() : WebAction {

This comment has been minimized.

Copy link
@swankjesse

swankjesse Nov 29, 2019

Collaborator

Rename?

if (action.acceptedMediaRanges == protobufMediaRanges) {
jsonVariant = jsonVariant.copy(acceptedMediaRanges = jsonMediaRanges)
}
if (action.responseContentType == protobufMediaType) {

This comment has been minimized.

Copy link
@wesleyk

wesleyk Nov 29, 2019

Collaborator

what if only one of these is hit? Do we still want the json variant? I think yes, because the goal is to have a purely json request/response flavor

Copy link
Collaborator

wesleyk left a comment

super cool!

@wesleyk

This comment has been minimized.

Copy link
Collaborator

wesleyk commented Nov 29, 2019

cc @zcross who was interested in this

@adrw
adrw approved these changes Dec 2, 2019
Copy link
Collaborator

adrw left a comment

Very excited to always have JSON flavours of proto endpoints to hit from Web Actions tab! Thanks for adding this!

For web actions that receive and/or respond with proto, add a second binding over json.
@acostama acostama force-pushed the maacosta.jwilson.synthetic-json-binding branch from b932a1d to ef7fb69 Dec 2, 2019
@acostama acostama merged commit 6b4e8e1 into master Dec 3, 2019
3 checks passed
3 checks passed
ci/circleci: docs Your tests passed on CircleCI!
Details
ci/circleci: java Your tests passed on CircleCI!
Details
ci/circleci: node Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.