Repro
- Define some message with
bytes field_name_1 = 1; or use the Any message from google/protobuf package.
- Define service that uses this message in request/response
- Map REST endpoint to gRPC service's
rpc in gateway config
- Create OpenAPI config and add that service
- Generate
See that bytes field was cut out:
components:
schemas:
Any:
type: object
description: Any contains an arbitrary schema along with a URL to help identify the type of the schema.
properties:
'@type':
type: string
description: A URL/resource name that uniquely identifies the type of the schema.
Expected
- gRPC
bytes field is converted into Base64 JSON-string by default (?) or OpenAPI config has option how to manage this.
Question
How to persist this field in message? How to specify what conversion should be used for this concrete bytes field?
Where is this conversion config should be managed: in OpenAPI/gateway config(s) or in grpc-gw implementation?
Repro
bytes field_name_1 = 1;or use theAnymessage fromgoogle/protobufpackage.rpcin gateway configSee that
bytesfield was cut out:Expected
bytesfield is converted intoBase64JSON-string by default (?) or OpenAPI config has option how to manage this.Question
How to persist this field in message? How to specify what conversion should be used for this concrete
bytesfield?Where is this conversion config should be managed: in OpenAPI/gateway config(s) or in grpc-gw implementation?