opiproject / opi-api

Open Programmable Infrastructure API and Behavioral Model
Apache License 2.0
31 stars 40 forks source link

code generator protoc-gen-grpc-gateway hasn't been updated to support optional fields in proto3 #332

Closed chujieyang closed 7 months ago

chujieyang commented 1 year ago

see https://github.com/grpc-ecosystem/grpc-gateway/issues/1278 see https://github.com/namely/docker-protoc/pull/361

An exception occurs when I use namely/protoc-all:1.51_2 with the parameter: --with-gateway to convert a proto file to a REST service:

... is a proto3 file that contains optional fields, but code generator protoc-gen-grpc-gateway hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.--grpc-gateway_out:
make: *** [Makefile:9: all] Error 1

Would like to update the protoc version in the namely/protoc-all mirror to support this.

glimchb commented 1 year ago

I tested with cdecoux/protoc-all:1.51_1 and it compiles fine now waiting on https://github.com/namely/docker-protoc/pull/361

glimchb commented 12 months ago

trying to enable grpc gw for inventory #359 draft PR https://github.com/opiproject/opi-smbios-bridge/pull/174

@chujieyang can you please take a look at 174 above ?