swaggest / php-json-schema

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

Fix nullable fields #148

Closed bruceoutdoors closed 2 years ago

bruceoutdoors commented 2 years ago

Change in https://github.com/swaggest/php-json-schema/pull/147 causes nullable JSON fields not to be exported.

This change should fix that.

codecov[bot] commented 2 years ago

Codecov Report

Merging #148 (c5b2233) into master (a8f8fa6) will increase coverage by 0.23%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
+ Coverage   92.41%   92.64%   +0.23%     
==========================================
  Files          27       27              
  Lines        1688     1687       -1     
==========================================
+ Hits         1560     1563       +3     
+ Misses        128      124       -4     
Impacted Files Coverage Δ
src/Structure/ClassStructureTrait.php 95.89% <100.00%> (+5.34%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

vearutop commented 2 years ago

Could you rebase or merge latest master in your branch (this should fix CI)?

bruceoutdoors commented 2 years ago

Ok done

vearutop commented 1 year ago

I think you're right, though maybe the final behavior is somewhat similar (if not raising a notice). Removing line 110 seems reasonable.