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

[WIP] Support oneof fields in body #634

Closed
wants to merge 7 commits into from
Closed

[WIP] Support oneof fields in body #634

wants to merge 7 commits into from

Conversation

yugui
Copy link
Member

@yugui yugui commented Apr 30, 2018

@yugui yugui changed the title Support oneof fields in body [WIP] Support oneof fields in body Apr 30, 2018
@Tommy-42
Copy link

Tommy-42 commented Jun 6, 2018

hey, thanks for your work !

are there any news about this PR ?

@johanbrandhorst
Copy link
Collaborator

This seems like it's trying to accomplish the same thing as #570. @yugui are you interested in finishing this?

@Tommy-42
Copy link

Tommy-42 commented Sep 26, 2018

I've opened a PR to update this branch to master state, see : #759

edit: closed wrong branch used

@johanbrandhorst
Copy link
Collaborator

johanbrandhorst commented Oct 17, 2018

@Tommy-42 if you want to, you can take this branch and rebase on master again, we've fixed the CI generation problems.

@Tommy-42
Copy link

@johanbrandhorst thanks you, I'll try to do something today for it

@lopezator
Copy link

Is the project alive? Any plans to merge/fix this after more than a year? CC\ @yugui

@johanbrandhorst
Copy link
Collaborator

Is the project alive? Any plans to merge/fix this after more than a year? CC\ @yugui

Yes, this project is alive. No, this PR is unlikely to be merged by the original author. Would you be interested in picking up the work in a separate branch?

@lopezator
Copy link

lopezator commented Jun 19, 2019

@johanbrandhorst thanks! Do you know any workaround to be able to make use of one_of type fields in the meantime?

@johanbrandhorst
Copy link
Collaborator

What is the problem with oneof? It looks to me like we test oneof in body fields already.

@hesthub
Copy link

hesthub commented Mar 9, 2020

Hello, are there any plans to resurrect this PR?
Or is there a more idiomatic way of handling the stated situation nowadays?

@johanbrandhorst
Copy link
Collaborator

Hello, are there any plans to resurrect this PR?
Or is there a more idiomatic way of handling the stated situation nowadays?

Please raise a separate issue if you're having a problem with this. This PR is dead.

@johanbrandhorst johanbrandhorst deleted the feature/oneof branch April 18, 2020 22:55
@aesadde
Copy link
Contributor

aesadde commented Jun 1, 2022

Hi 👋 @johanbrandhorst would you accept new PRs for this feature?

It would be cool to be able to use oneof fields in request bodies. I'm facing a use case like the following:

message SimpleMessage {
  ...
  oneof ext {
    int64 en = 6;
    Embedded no = 7;
  }
}

service EchoService {
  rpc EchoBody(SimpleMessage) returns (SimpleMessage) {
    option (google.api.http) = {
      post: "/v1/example/echo_body"
      body: "*"
      additional_bindings {
          put: "/v1/example/echo_body/{id}"
          body: "no"
        }
    };
  }
}

I have a working solution and some tests for this (I'm not too familiar with the codebase but used this closed PR as guidance and #570)

Would be more than happy to submit the PR!

@johanbrandhorst
Copy link
Collaborator

Hi @aesadde. We certainly would be interested in that, please feel free to submit another PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

oneof fields are not supported as the "body"?
7 participants