Consistent field naming convention
Why it matters
Mixed casing in API response fields — userId alongside created_at in the same response object — forces every consumer to handle two naming conventions simultaneously. This is the classic sign of database column names leaking directly into the API layer without a serialization pass. It creates client-side bugs when consumers assume one convention and get the other, and it makes the API feel unfinished. iso-25010:2011 maintainability.modifiability is the direct impact: every client integration must special-case the inconsistency.
Severity rationale
High because mixed field naming forces every API consumer to write defensive handling code, and the inconsistency compounds across every new endpoint added.
Remediation
Pick one casing convention and enforce it with a serialization layer that transforms database field names before they leave the API. Add a transformer function in your handler files:
// Before -- mixed casing leaking from database:
{
userId: row.user_id,
created_at: row.created_at, // forgot to transform
firstName: row.first_name
}
// After -- consistent camelCase via transformer:
function toUserResponse(row) {
return {
userId: row.user_id,
createdAt: row.created_at,
firstName: row.first_name
}
}
For larger codebases, use camelcase-keys or a serialization framework that enforces the convention globally.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the API Design Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability.modifiability — Modifiability — consistent field naming reduces integration friction
Taxons
History
- 2026-04-18·v1.0.0·Initial import from api-design·automated