Skip to content

handle case where additionalRef is a ref (fixes #345) #383

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

Merged
merged 2 commits into from
Nov 26, 2020

Conversation

atlefren
Copy link
Contributor

Fixes #345

As stated in the comment, the functionality in getAdditionalPropertiesType could perhaps be added in nodeType, but then I had to pass in the rawDefinition there, and risk messing up things.

This seems to work, added a new tests based on the inut in #345, both this and all old tests pass

@codecov
Copy link

codecov bot commented Nov 24, 2020

Codecov Report

Merging #383 (3d247c5) into main (e73e0d3) will increase coverage by 0.60%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
+ Coverage   92.91%   93.51%   +0.60%     
==========================================
  Files           5        5              
  Lines         268      262       -6     
  Branches       90       84       -6     
==========================================
- Hits          249      245       -4     
  Misses         13       13              
+ Partials        6        4       -2     
Impacted Files Coverage Δ
src/index.ts 81.81% <50.00%> (ø)
src/property-mapper.ts 84.21% <50.00%> (ø)
src/v2.ts 85.71% <90.90%> (+1.99%) ⬆️
src/v3.ts 96.85% <92.30%> (+0.58%) ⬆️
src/utils.ts 100.00% <100.00%> (ø)

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 135a93b...3d247c5. Read the comment docs.

@atlefren
Copy link
Contributor Author

Not completely sure how codecov calculates coverage on my patch and what I can do to improve it, as I cannot find an easy way to run codecov patch locally?

@drwpow
Copy link
Contributor

drwpow commented Nov 26, 2020

Not completely sure how codecov calculates coverage on my patch and what I can do to improve it, as I cannot find an easy way to run codecov patch locally?

Yeah I personally have never benefitted much from paying attention to the patch coverage; maybe it’s a project-level setting that I need to disable. Sorry about that! But I would just ignore that.

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.

This looks great, thank you!

@drwpow drwpow merged commit e6673c1 into openapi-ts:main Nov 26, 2020
@atlefren
Copy link
Contributor Author

Great, any plans for a release soon? This was kind of a deal-breaker for us, we're using a local copy based on this PR for now, but would like to get back to the original library as fast as possible.

@atlefren atlefren deleted the 345_additional_properties_ref branch November 27, 2020 09:27
@drwpow
Copy link
Contributor

drwpow commented Nov 27, 2020

Great, any plans for a release soon?

Yes actually 3.0.0-rc.0 is released due to #381. It’s probably not a huge breading change for people, but wanted to play it safe. Would love to know if that works well for you and everyone else, and if so we can cut a 3.0.0 release

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.

Cannot find name 'ref'
2 participants