Skip to content

Default-value fields missing on server #34

Description

@dawadam

Hello,

We noticed an issue with ProtoOANewOrderReq messages:

Fields like orderType and tradeSide have valid values on the client side.

Encoding via ts-proto correctly follows Proto2: fields set to their default values are not sent.

Decoding locally shows all expected values, including defaults.

Problem:
The server does not receive fields whose value matches the default and rejects the request. It seems the server does not handle Proto2 default values properly.

Steps to reproduce:

Create ProtoOANewOrderReq with orderType = MARKET and tradeSide = BUY.

Encode with ts-proto.

Send to the server.

Observe that orderType and tradeSide are missing server-side.

Expected:
Server should accept messages even when some fields are set to their default values, as per Proto2 specification.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions