mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 12:47:48 +00:00
1.4 KiB
1.4 KiB
slug
| slug |
|---|
| /docs/cli/rules/path-parameters-defined |
path-parameters-defined
Requires all path template variables are defined as path parameters.
| OAS | Compatibility |
|---|---|
| 2.0 | ✅ |
| 3.0 | ✅ |
| 3.1 | ✅ |
API design principles
You declared them? Now define them. This rule verifies the path parameters are defined.
Configuration
| Option | Type | Description |
|---|---|---|
| severity | string | Possible values: off, warn, error. Default error (in recommended configuration). |
An example configuration:
rules:
path-parameters-defined: error
Examples
Given this configuration:
rules:
path-parameters-defined: error
Example of an incorrect path:
paths:
/customers/{id}:
post:
parameters:
- name: filter
in: query
Example of a correct path:
paths:
/customers/{id}:
post:
parameters:
- name: id
in: path
required: true
description: The customer's ID.