uri-names
Disallows literal path segments whose first character is a digit.
| Attribute | Value |
|---|---|
| Category | Operations |
| Maturity | Gold |
| OpenAPI | Swagger 2.0; OpenAPI 3.0, 3.1, 3.2 |
| Starter | Off |
| Lenient–Complete | Error |
Intent
Letter-led resource names keep paths readable and distinguish fixed resources from identifier values.
Flags
A path when any nonempty literal segment starts with 0–9.
Does not flag
Path-parameter segments beginning with {, literal segments beginning with a nondigit, or empty segments. Despite the diagnostic wording, the implementation specifically tests for a leading digit.
See it fail
paths:
/123/payments:
get:
responses:
'200':
description: OK
Diagnostic: URI path segments should start with a letter.
Fix it
paths:
/v123/payments:
get:
responses:
'200':
description: OK
Configure
profiles:
default:
rules:
extends: [recommended]
override:
uri-names: warn
Nearby: paths-kebab-case, path-no-duplicate-slash.