go-openapi / spec

openapi specification object model
Apache License 2.0
389 stars 98 forks source link

normalize cache key for root in ExpandSchema #58

Closed koron closed 6 years ago

koron commented 6 years ago

the cache is queried by normalized key. but in ExpandSchema(), root was stored with un-normalized key.

this causes trouble on Windows which have drive letter as upper case in absolute path. when normalize this absolute path, drive letter is converted to lower case. and it causes cache miss and ExpandSchema() failure.

codecov[bot] commented 6 years ago

Codecov Report

Merging #58 into master will decrease coverage by 0.11%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
- Coverage   37.49%   37.37%   -0.12%     
==========================================
  Files          18       18              
  Lines        1875     1881       +6     
==========================================
  Hits          703      703              
- Misses       1010     1016       +6     
  Partials      162      162
Impacted Files Coverage Ξ”
expander.go 54.31% <0%> (-0.65%) :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 81ece4e...ce2166c. Read the comment docs.

koron commented 6 years ago

thank you super fast merge! πŸ‘ πŸ™‡