Skip to content

Textual Schema Design: Allow external message and struct definitions for unions #373

@sealor

Description

@sealor

Is your feature request related to a problem? Please describe.
I'm always frustrated when I want to design unions because currently
only inline messages and structs are allowed in the textual schema.

see: https://docs.bebop.sh/reference/union/

Describe the solution you'd like
I would like to define a format which contains multiple unions using the same message.
The wire format and binary schema already supports this approach.

see: https://docs.bebop.sh/reference/binary-schema/#union

Describe alternatives you've considered
I considered to define all messages in unions multiple times to get my use-case working.
So, I end up with much duplicated code and the same message with different names.

Additional context
Idea:

union Request {
  1 -> Meta meta;
}

message Meta {
  1 -> uint32 size;
  2 -> string name;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions