openapi-generator: [BUG] Validation error: "There are duplicate parameter values"
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What’s the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What’s the actual output vs expected output?
Validating spec (bundle.oas3.yaml)
Errors:
-attribute paths.'/anPath'(get).parameters.There are duplicate parameter values
[error] Spec has 1 errors.
Description
A wrong validation error when using external $ref
openapi-generator version
4.0.0-SNAPSHOT
OpenAPI declaration file content or url
Steps to reproduce
openapi-generator-cli validate -i bundle.oas3.yaml
Related issues/PRs
https://github.com/swagger-api/swagger-parser/issues/1063
Suggest a fix
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 5
- Comments: 15 (5 by maintainers)
I’m still seeing this issue.
I have the following snippet which is generated as a bundle:
Results in…
-attribute paths.'/deposits'(get).parameters.There are duplicate parameter valuesThis is using the latest stable (5.1.0)
I have prepared PR https://github.com/OpenAPITools/openapi-generator/pull/2775 to update Swagger-Parser
I’ve confirmed that the
validatefunction is no longer returning erroneousThere are duplicate parameter valuesmessages 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!I have updated Swagger-Parser. Can you check the latest
4.0.0-SNAPSHOTversion of OpenAPI Generator?