| Q | A
| ----------------------------------- | -------
| Bug or feature request? | Bug
| Which Swagger/OpenAPI version? | 2.0
| Which Swagger-Editor version? | editor.swagger.io
| How did you install Swagger-Editor? | Using public version
| Which browser & version? | Chrome
| Which operating system? | Windows
Taken from default "pet store" example, modified as follows...
example problem yaml.txt
...
parameters:
testParameter:
name: mytest
in: query
required: true
type: string
paths:
/pet:
post:
tags:
- "pet"
summary: "Add a new pet to the store"
description: ""
operationId: "addPet"
consumes:
- "application/json"
- "application/xml"
produces:
- "application/xml"
- "application/json"
parameters:
- name: mytest
in: query
type: string
required: true
...
Should not have any error because technically the parameter name/key (combo of name and in are unique to the specific path entry (/pet | post). The "conflicting" parameter is in the global parameter object named testParameter, however it does not even have to be referenced in any of the path methods for this faulty error message to come up.
It complains about having duplicate parameter names for the mytest:in key with the error message:
Semantic error at paths./pet.post.parameters.0
Sibling parameters, whether inherited or direct, must have unique name + in values
It appears to have a global context for parameters and combines the parameter definitions from the global parameters field with the parameters field of individual path method definitions. This is in conflict with the specification that states:
Parameters
An object to hold parameters that can be used across operations. This property does not define global parameters for all operations.
It should only take into account parameters that are defined and/or referenced in each specific path/method definition.
This bug is relatively new as I have been using the public editor for nearly 12 months with my schema that has global parameters with the same names as locally defined parameters and have never had this error message before now.
Fixed!
Thanks for reporting this, @hsgreen. No idea what I was thinking when I implemented that validator...
Hi,
The Swagger Hub is still showing this error:
Sibling parameters, whether inherited or direct, must have unique name + in values

@intellisense, SwaggerHub probably hasn't picked up the latest version - please reach out to their support for more clarity on what's going on 馃槃
Hello!
I have the same error but with different levels of parameters, It happens when I have common parameters in the path-level and in the operation level (https://swagger.io/docs/specification/describing-parameters/#common).
Example:
https://api.jsonbin.io/b/5bfd856890a73066ac164a11
I tried with swagger 2.0 and openapi 3.0, but both throws the same error.
Reopening this - upon further review, this validator is still hitting too hard. See my notes below:

Thanks @G-Rath, your example opened my eyes to this problem.
:) came here to say the same thing about the bitbucket swagger file. +1
fixed, will ship on Friday!
thx @hsgreen @maiconmichelon @G-Rath @mminns for pointing out the flaw in this validator 馃 馃