Investigate issue 379: Duplicate Parameters - #462
Closed
califlower wants to merge 3 commits into
Closed
Conversation
Resolves issue where parameters with same name but different 'in' types were counted inconsistently based on their order in the specification. The bug caused duplicate parameter entries when checking existing parameters. - Extract duplicate detection logic to hasDuplicateInType helper function - Fix loop logic that was adding parameters multiple times - Add test case to verify consistent parameter counting regardless of order
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #462 +/- ##
=======================================
Coverage 99.67% 99.67%
=======================================
Files 169 169
Lines 24604 24606 +2
=======================================
+ Hits 24525 24527 +2
Misses 74 74
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
This has been fully implemented in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Theoretically fixes #379
I think the expectation in that issue is wrong
The openapi 3.0.3 Spec says
The example posted in my mind should return 2 in both scenarios not 3, while logging the error as you do for some of the other operations. But up for debate. I'm not really 100% sure which direction to go. A case could be made that a dupe param should hard fail, since we wouldn't know which one to pick