flashman
← All posts

API naming wars: snake_case vs camelCase at the boundary

Convert field names when Python backends meet TypeScript frontends.

2026-06-07 · 4 min read · Rahul Chitturi

  • api
  • naming

The backend returns user_id. The frontend expects userId. Manual renaming across fifty fields invites bugs. Automated case conversion at the boundary keeps each layer idiomatic.

Pick one canonical form

Document JSON casing in OpenAPI. Transform at the client SDK or API gateway—not ad hoc in every component.

Try these tools