You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generator confused by duplicated path parameter #1574
Hey, just closing the loop on this one - as mentioned in pb33f/libopenapi#278 this is actually an issue with the spec and it's recommended you either work with the upstream to modify the spec to correct it, or fix it locally prior to generation. Appreciate you raising it, that was a TIL for me too!
Activity
jamietanna commentedon Apr 24, 2024
Hey, that's an interesting one!
I can see - when validating the spec with https://github.com/daveshanley/vacuum - that also reports this as an issue, but https://editor.swagger.io/ does not.
Looks like a reasonable repeat of a parameter, and should be a straightforward fix with https://github.com/deepmap/oapi-codegen/blob/472f1cad620115973323d97e90b1ee3800691e7c/pkg/codegen/utils.go#L562-L580.
I'll also raise with Vacuum
jamietanna commentedon May 3, 2024
Hey, just closing the loop on this one - as mentioned in pb33f/libopenapi#278 this is actually an issue with the spec and it's recommended you either work with the upstream to modify the spec to correct it, or fix it locally prior to generation. Appreciate you raising it, that was a TIL for me too!
evankanderson commentedon May 4, 2024
FWIW, it sounds like vacuum, as a linter, is flagging this as against best practices, but the construction is actually allowed by the spec.
Would you be open to a PR to enable generation in this case, even though vacuum complains with a (silenceable) warning?
fix: handle duplicate path parameters in OpenAPI specs
fix: handle duplicate path parameters in OpenAPI specs (#2220)