Skip to content

extending existing enum #6104

Closed
Closed
@timestee

Description

@timestee

Is there any way to extend enum?
E.g.
I would have enum ErrorCode in the first file as for the underlying message ErrorResponse.

message ErrorResponse {
    ErrorCode code = 1;
    string message = 2;
}
enum ErrorCode {
    OK = 0;
    UNKNOWN = 1;
}

And also i want exted the enum in the second file like this:

enum ErrorCode {
    UserNotFound = 1001;
}

Is it possible at all?
Any workarounds?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions