Giter Site home page Giter Site logo

Comments (2)

yugui avatar yugui commented on May 2, 2024

Thank you for letting me know that. But it looks to be an issue in protoc or googleapis.
Let me confirm to the upstream.

Although the extension google.api.http in MethodOptions is an optional field, protoc emits as if it is a repeated field for the syntax (2). I am not sure what is the expected behavior.

Some possibilities come to my mind.

  1. protoc should have combined those lines into one extension if the two variations of syntax mean the same thing?
  2. goprotobuf should have done it?
  3. google.api.http should have been repeated field and grpc-gateway should have combine the repeated values into one?

Here is the dump of the code generation request.

...
    name: "EchoBody"
    input_type: ".gengo.grpc.gateway.example.SimpleMessage"
    output_type: ".gengo.grpc.gateway.example.SimpleMessage"
    options: <
      /* 38 unknown bytes */
      72295728: "\"\x15/v1/example/echo_body"
      72295728: ":\x01*"
    >

from grpc-gateway.

sjincho avatar sjincho commented on May 2, 2024

Hi Yuki,

I found: protocolbuffers/protobuf#59

So seems more like a protoc issue, unfortunately.

2015-06-01 22:10 GMT+09:00 Yuki Yugui Sonoda [email protected]:

Thank you for letting me know that. But it looks to be an issue in protoc
or googleapis.
Let me confirm to the upstream.

Although the extension google.api.http in MethodOptions is an optional
field, protoc emits as if it is a repeated field for the syntax (2). I am
not sure what is the expected behavior.

Some possibilities come to my mind.

  1. protoc should have combined those lines into one extension if the
    two variations of syntax mean the same thing?
  2. goprotobuf should have done it?
  3. google.api.http should have been repeated field and grpc-gateway
    should have combine the repeated values into one?

Here is the dump of the code generation request.

...
name: "EchoBody"
input_type: ".gengo.grpc.gateway.example.SimpleMessage"
output_type: ".gengo.grpc.gateway.example.SimpleMessage"
options: <
/* 38 unknown bytes /
72295728: ""\x15/v1/example/echo_body"
72295728: ":\x01
"
>


Reply to this email directly or view it on GitHub
#16 (comment).

from grpc-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.