go-openapi / validate

openapi toolkit validation helpers
Apache License 2.0
119 stars 53 forks source link

Add nullable #109

Closed sttts closed 5 years ago

sttts commented 5 years ago

Towards v3 support, we have to add nullable, as an alternative to the JSON-Schema inspired null type.

Note, that both are not 100% the same as type:"", nullable:true is a valid construct which cannot be faithfully represented with the null type only.

Counterpart PR to https://github.com/go-openapi/spec/pull/91.

sttts commented 5 years ago

Does this need a release of the spec repo first? I see go mod requiring v0.17.0.

codecov[bot] commented 5 years ago

Codecov Report

Merging #109 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
+ Coverage   96.81%   96.81%   +<.01%     
==========================================
  Files          19       19              
  Lines        2258     2261       +3     
==========================================
+ Hits         2186     2189       +3     
  Misses         64       64              
  Partials        8        8
Impacted Files Coverage Δ
validator.go 100% <100%> (ø) :arrow_up:
schema.go 100% <100%> (ø) :arrow_up:
type.go 98.07% <100%> (ø) :arrow_up:

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 3fd099a...505f35f. Read the comment docs.