ALL-ROUT0003 · inconsistent_route_path_style
Count route segments spelled against the convention the rest of the paths follow.
This is a deterministic rule for all languages. Read its implementation.
Definition
Section titled “Definition”Read every path segment this repository declares, decide which word separator the majority use,
and report a segment that uses the other one. A URL is an interface a caller types, and one
that answers at /user-profiles but not at /user_profiles fails in a way that looks like an
outage rather than a typo. The convention itself does not matter, and holding one does.
Evidence
Section titled “Evidence”Each finding names the path, the segment, and the separator the repository otherwise uses. The value is the number of segments spelled against it.
Exceptions
Section titled “Exceptions”A parameter segment is skipped, because it names a variable rather than a word a caller types. A repository with no separated segment at all has no convention to break and returns nothing. A path that has to match an external specification keeps that specification’s spelling, which is a reason to exclude the module rather than to change the path.
Examples
Section titled “Examples”Where /user-profiles and /order-items are declared, a /audit_log returns 1. Where every
path is one word, nothing is reported, because nothing has been decided yet.
References
Section titled “References”- Cites “Google API Design Guide”, resource naming. Open reference
- Cites “Microsoft REST API Guidelines”, URL structure. Open reference
- Cites “Architectural Styles and the Design of Network-based Software Architectures”