paths-kebab-case
Requires literal path segments to contain only lowercase letters, digits, hyphens, and dots.
| Attribute | Value |
|---|---|
| Category | Operations |
| Maturity | Gold |
| OpenAPI | Swagger 2.0; OpenAPI 3.0, 3.1, 3.2 |
| Starter | Off |
| Lenient–Complete | Error |
Intent
A lowercase, hyphenated path style produces predictable URLs without case-sensitive surprises.
Flags
A path when any nonempty literal segment contains a character outside [a-z0-9-.].
Does not flag
Path-template segments or literal segments using only the accepted characters. The rule permits dots and does not check repeated, leading, or trailing hyphens.
See it fail
paths:
/paymentMethods:
get:
responses:
'200': {description: OK}
The uppercase M is not allowed.
Fix it
paths:
/payment-methods:
get:
responses:
'200': {description: OK}
Changing a published path is an API compatibility change; coordinate routing and consumer migration.
Configure
profiles:
default:
rules:
extends: [recommended]
override:
paths-kebab-case: warn
Nearby: path-segment-plural, no-path-trailing-slash.