Skip to content
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

fix: non-204 successes with reference to response #136

Merged
merged 1 commit into from
Feb 11, 2020
Merged

Conversation

barrett-schonefeld
Copy link
Contributor

@barrett-schonefeld barrett-schonefeld commented Feb 11, 2020

Changes:

  • use the resolvedSpec (all $refs dereferenced) to check if a response has content
  • removed the isRef variable because the resolvedSpec should not contain references

Tests:

  • added a test that defines a spec with a reference to a response, preprocesses the spec and dereferences the response, then validates the response

Related issue: #135

@codecov
Copy link

codecov bot commented Feb 11, 2020

Codecov Report

Merging #136 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
- Coverage   92.79%   92.79%   -0.01%     
==========================================
  Files          56       56              
  Lines        2124     2123       -1     
==========================================
- Hits         1971     1970       -1     
  Misses        153      153
Impacted Files Coverage Δ
...s/validation/oas3/semantic-validators/responses.js 100% <100%> (ø) ⬆️

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 c29fd43...e9e8426. Read the comment docs.

- use the resolvedSpec (all $refs dereferenced) to check if a response has content
- removed the isRef variable because the resolvedSpec should not contain references
- added a test that defines a spec with a reference to a response, preprocesses the spec and dereferences the response, then validates the response
Copy link
Member

@dpopp07 dpopp07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

@dpopp07 dpopp07 merged commit b286c69 into master Feb 11, 2020
@dpopp07 dpopp07 deleted the issue-135 branch February 11, 2020 21:53
dpopp07 pushed a commit that referenced this pull request Feb 11, 2020
## [0.19.2](v0.19.1...v0.19.2) (2020-02-11)

### Bug Fixes

* resolve refs when checking for success response schemas ([#136](#136)) ([b286c69](b286c69))
@dpopp07
Copy link
Member

dpopp07 commented Feb 11, 2020

🎉 This PR is included in version 0.19.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants