Requires unique operationId values for each operation.
| OAS | Compatibility |
|---|---|
| 2.0 | ✅ |
| 3.0 | ✅ |
| 3.1 | ✅ |
| 3.2 | ✅ |
The operationId is used by tooling to identify operations (which are otherwise done through scary looking JSON pointers).
The operationId should be unique (used only once in an OpenAPI description).
This rule is unopinionated.
| Option | Type | Description |
|---|---|---|
| severity | string | Possible values: off, warn, error. Default error (in recommended configuration). |
An example configuration:
rules:
operation-operationId-unique: errorGiven this configuration:
rules:
operation-operationId-unique: errorExample of incorrect operations:
paths:
/cars:
get:
operationId: Car
# ...
post:
operationId: Car
# ...Example of correct operations:
paths:
/cars:
get:
operationId: getCar
# ...
post:
operationId: postCar
# ...- Rule source
- Operation object docs
- Consider using configurable rules for more specific rules for
operationIds such as length, casing, and pattern enforcement.