Description
In OpenAPI 3.0 and Swagger 2.0, each (name, in) pair must be unique within a single parameters list. An operation may override the same parameter inherited from its path.
Potential impact
Duplicate entries can stop validation or SDK generation. Renaming a real input can break callers.
Remediation
Resolve references in each path and operation list. Remove duplicates within that list and keep intentional overrides. If you introduce a new input, update the server and its clients together.
Examples
These OpenAPI 3.0 excerpts show reusable definitions and omit their usage lists and info.
Before
{
"openapi": "3.0.0",
"components": {
"parameters": {
"limitParam": {
"name": "limit",
"in": "query",
"schema": {
"type": "integer"
}
},
"otherLimitParam": {
"name": "limit",
"in": "query",
"schema": {
"type": "integer"
}
}
}
}
}
After
{
"openapi": "3.0.0",
"components": {
"parameters": {
"limitParam": {
"name": "limit",
"in": "query",
"schema": {
"type": "integer"
}
},
"offsetParam": {
"name": "offset",
"in": "query",
"schema": {
"type": "integer"
}
}
}
}
}
Both components can describe the limit query parameter. Check whether one list uses both. The revised offsetParam makes sense only if the API also accepts offset.