Skip to content

Fix duplicate camelCase and underscore fields - #20

Merged
chtitux merged 1 commit into
mainfrom
claude/fix-gtfs-rt-field-casing-011CUtUU6sWwSByhNtf21pvY
Nov 7, 2025
Merged

chtitux merged 1 commit into
mainfrom
claude/fix-gtfs-rt-field-casing-011CUtUU6sWwSByhNtf21pvY

Conversation

@chtitux

@chtitux chtitux commented Nov 7, 2025

Copy link
Copy Markdown
Contributor
  • Remove duplicate snake_case field definitions from TypeScript interfaces
  • Keep only camelCase fields which match protobufjs toObject() output
  • Remove unnecessary fallback checks for snake_case variants
  • Simplify code by using direct camelCase property access

The protobuf specification uses snake_case, but protobufjs automatically converts these to camelCase when decoding messages with toObject(). Having both versions in the interfaces was redundant and confusing.

- Remove duplicate snake_case field definitions from TypeScript interfaces
- Keep only camelCase fields which match protobufjs toObject() output
- Remove unnecessary fallback checks for snake_case variants
- Simplify code by using direct camelCase property access

The protobuf specification uses snake_case, but protobufjs automatically
converts these to camelCase when decoding messages with toObject().
Having both versions in the interfaces was redundant and confusing.
@chtitux
chtitux merged commit 4202461 into main Nov 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants