go-openapi / validate

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

Add parameter type and validation match check #116

Closed ilyakaznacheev closed 5 years ago

ilyakaznacheev commented 5 years ago

According to 2069 of go-swagger, this adds a validation if parameter type matches its validation keywords.

ilyakaznacheev commented 5 years ago

Should I really make string and integer constants as GolangCI wants?

codecov[bot] commented 5 years ago

Codecov Report

Merging #116 into master will increase coverage by 0.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #116      +/-   ##
==========================================
+ Coverage   96.81%   96.83%   +0.01%     
==========================================
  Files          19       19              
  Lines        2261     2272      +11     
==========================================
+ Hits         2189     2200      +11     
  Misses         64       64              
  Partials        8        8
Impacted Files Coverage Δ
helpers.go 95.72% <ø> (ø) :arrow_up:
spec.go 98.76% <100%> (+0.02%) :arrow_up:
object_validator.go 98.13% <100%> (ø) :arrow_up:
validator.go 100% <100%> (ø) :arrow_up:
values.go 99.06% <100%> (ø) :arrow_up:
type.go 98.07% <100%> (ø) :arrow_up:
spec_messages.go 98.07% <100%> (+0.03%) :arrow_up:
schema.go 100% <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 d8e712d...89bade2. Read the comment docs.

ilyakaznacheev commented 5 years ago

Looks that GolangCI will not be happy until I refactor almost any literal :) Let's merge this and I will do some refactoring with a new PR.

fredbi commented 5 years ago

Looks good to me. Thanks @ilyakaznacheev