Skip to content

Add support for proto3 optional fields #153

@Rowansdabomb

Description

@Rowansdabomb

When using protoc-gen-typescript-aip (v0.4.1) via buf generate, any .proto file that uses proto3 optional fields triggers a warning:

WARN    plugin "protoc-gen-typescript-aip" does not support required features.
  Feature "proto3 optional" is required by 1 file(s):
    plantiga/payments/v1/payments.proto

Generation still succeeds (the companion protoc-gen-es plugin handles the optional fields correctly), but the warning is noisy and suggests the plugin may not be processing those files fully.

Expected behavior

The plugin should declare support for the proto3 optional feature to suppress the warning, and handle optional fields appropriately in its generated output.

Proto3 optional has been a stable language feature since protobuf v3.15 (Feb 2021).

Environment

  • protoc-gen-typescript-aip: v0.4.1
  • buf: v1.x
  • protoc-gen-es: v2.7.0 (declares support, no warning)

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