Validating spec (bundle.oas3.yaml)
Errors:
-attribute paths.'/anPath'(get).parameters.There are duplicate parameter values
[error] Spec has 1 errors.
A wrong validation error when using external $ref
4.0.0-SNAPSHOT
openapi-generator-cli validate -i bundle.oas3.yaml
https://github.com/swagger-api/swagger-parser/issues/1063
I almost have sure that this issue is related to one that I've found in the swagger-parser.
As this team already is bundling an own parser jar then you could also try and apply the fix proposed.
unfortunately the PR at swagger-api/swagger-parser#1065 is not working when the parameters are in an external file. :(
We are facing the same issue.
@Emdee89 , it was fixed by swagger-parser team today.
Now we need to wait for the fix to be merged in the branch used by openapi-generator.
@cvgaviao Thanks for letting me know. Any rough pointer by when this will be released in a new version of the openapi-generator?
@Emdee89,
well, only the openapi-generator team can answer that :D
I've tested my generation with swagger-parser master branch, but they are using a version from their own branch.
@jmini , may I ask you to take a look on the recent swagger-parser PR that fixes this ?
I have prepared PR https://github.com/OpenAPITools/openapi-generator/pull/2775 to update Swagger-Parser
I have updated Swagger-Parser.
Can you check the latest 4.0.0-SNAPSHOT version of OpenAPI Generator?
I've confirmed that the validate function is no longer returning erroneous There are duplicate parameter values messages after https://github.com/OpenAPITools/openapi-generator/pull/2775. So https://github.com/swagger-api/swagger-parser/issues/1063 has now been fixed in openapi-generator. 馃帀 I think this issue can be closed. Thanks for your help @jmini!
Most helpful comment
I have prepared PR https://github.com/OpenAPITools/openapi-generator/pull/2775 to update Swagger-Parser