Skip to content

Conversation

samdbmg
Copy link
Contributor

@samdbmg samdbmg commented Oct 29, 2020

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

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
Copy link

codecov bot commented Oct 29, 2020

Codecov Report

❗ No coverage uploaded for pull request base (main@5f4824a). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f4824a...604a846. Read the comment docs.

@drwpow
Copy link
Contributor

drwpow commented Nov 4, 2020

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.
@samdbmg
Copy link
Contributor Author

samdbmg commented Nov 5, 2020

Good point, I should've written one to start with really! How's 604a846?

Copy link
Contributor

@drwpow drwpow left a 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

@drwpow drwpow merged commit 6fe3ac8 into openapi-ts:main Nov 5, 2020
@drwpow
Copy link
Contributor

drwpow commented Nov 5, 2020

@allcontributors please add @samdbmg for code, bug, test

@allcontributors
Copy link
Contributor

@drwpow

I've put up a pull request to add @samdbmg! 🎉

@drwpow
Copy link
Contributor

drwpow commented Nov 5, 2020

@samdbmg 2.3.2 was just released! Thanks again

@samdbmg samdbmg deleted the pr/fix-shared-parameters branch November 5, 2020 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameters not supported on PathItem objects
2 participants