swaggest / php-json-schema

High definition PHP structures with JSON-schema based validation
MIT License
451 stars 51 forks source link

Do not fail validation of dereferenced value if original data is valid #80

Closed vearutop closed 5 years ago

vearutop commented 5 years ago

This PR fixes validation error in case of one of reference and value, the issue is that validation was running against both value and reference making sometimes both items of oneOf pass.

codecov[bot] commented 5 years ago

Codecov Report

Merging #80 into master will decrease coverage by 0.31%. The diff coverage is 77.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #80      +/-   ##
==========================================
- Coverage   90.33%   90.01%   -0.32%     
==========================================
  Files          27       27              
  Lines        1583     1603      +20     
==========================================
+ Hits         1430     1443      +13     
- Misses        153      160       +7
Impacted Files Coverage Δ
src/Structure/ObjectItemTrait.php 76.19% <50%> (-3.81%) :arrow_down:
src/Schema.php 94.71% <92.85%> (-0.38%) :arrow_down:

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 914d076...d310a1f. Read the comment docs.