Requires definition of all path template variables.
| OAS | Compatibility |
|---|---|
| 2.0 | ✅ |
| 3.0 | ✅ |
| 3.1 | ✅ |
The path template variables must have a string. This rule is for spec correctness. This rule is not opinionated.
| Option | Type | Description |
|---|---|---|
| severity | string | Possible values: off, warn, error. Default error (in recommended configuration). |
An example configuration:
rules:
path-declaration-must-exist: errorGiven this configuration:
rules:
path-declaration-must-exist: errorExample of an incorrect path:
paths:
/customers/{}:
post:Example of a correct path:
paths:
/customers/{id}:
post:
parameters:
- name: id
in: path
required: true
description: The customer's ID.