Skip to content

Option to force singular field naming (JS generator) #42

Closed
@4nte

Description

@4nte

What language does this apply to?
This is for proto3 Javascript code generation.

Describe the problem you are trying to solve.
A repeated field, when generated to javascript, will be appended with a List suffix. This behaviour introduces (forced) changes to the user-defined names which can sometimes be unwanted as we'd (generally) expect the field names to match the original proto file.

Describe the solution you'd like
Field annotation (a boolean) to force singular naming.

Describe alternatives you've considered

  1. Writing a custom mapper to rename the fields to their original proto name.
  2. Modifying generated JS code.

Additional context
https://stackoverflow.com/questions/51508553/why-does-the-protobuf-javascript-compiler-suffix-collections-with-list-map

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