Skip to content

BUG: gRPC-message bytes field is ignored for OpenAPI and gateway #36

@WizMe-M

Description

@WizMe-M

Repro

  1. Define some message with bytes field_name_1 = 1; or use the Any message from google/protobuf package.
  2. Define service that uses this message in request/response
  3. Map REST endpoint to gRPC service's rpc in gateway config
  4. Create OpenAPI config and add that service
  5. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions