-
-
Notifications
You must be signed in to change notification settings - Fork 576
Handle parameters on paths as well as methods #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Factors out generating the parameters block into a `parseParameters` function. Calls it both on operations, and also on the parameters block at the path level if one was given. Prevents the parameters block being parsed as a method. Fixes openapi-ts#346
Codecov Report
@@ Coverage Diff @@
## main #347 +/- ##
=======================================
Coverage ? 92.36%
=======================================
Files ? 5
Lines ? 249
Branches ? 86
=======================================
Hits ? 230
Misses ? 13
Partials ? 6 Continue to review full report at Codecov.
|
This is great! Thank you. I’m in favor of merging, but is there a simple test we can add for #346? I want to make sure there isn‘t a regression in the future. And as you can see, none of our current tests were testing for this. If you don’t have time to add one, I’m happy to merge this and add one in a followup. |
Adds a test of specifying parameters on the path instead of each method.
Good point, I should've written one to start with really! How's 604a846? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test looks great! Thank you. Will publish a new version in just a little bit
@allcontributors please add @samdbmg for code, bug, test |
I've put up a pull request to add @samdbmg! 🎉 |
@samdbmg |
Factors out generating the parameters block into a
parseParameters
function.Calls it both on operations, and also on the parameters block at the path level if one was given.
Prevents the parameters block being parsed as a method.
Fixes #346