fix: inconsistent snake case conversion in contract

What does this merge request do and why?

Fix inconsistent snake case conversion in contract

Autogenerated JS classes from protobuff contract automatically convert from snake_case into camelCase. This works great when data is transmitted via gRPC which uses binary protocl and identifies fields by their numerical ids. Unforunately, when the same protobuff is used to convert data into JSON format filed names are being retained as is, which then causes mismatch between autogenerated classes and received data, that result in data being lost in en/decoding process. This change annotates snale_case filed names with explicit json_names, in additon, a flag has been added to proto complier to disable automatic converstion to camleCase

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/578048#note_2914583698

How to set up and validate locally

Follow gitlab-org/editor-extensions/gitlab-lsp!2617 (closed)

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
  • If this change requires executor implementation: verified that issues/MRs exist for both Go executor and Node executor or confirmed that changes are backward-compatible and don't break existing executor functionality.
Edited by Mikołaj Wawrzyniak

Merge request reports

Loading