Skip to content

Conversation

danielgtaylor
Copy link
Contributor

@danielgtaylor danielgtaylor commented Jan 21, 2023

Found a small issue while upgrading to the latest libopenapi. The new DynamicValue.N field is not copied over from the low-level model, so for example schema.ExclusiveMinimum.IsB() will always return false. This PR fixes it and adds a small test to assert the values get set. For the boolean case it is left alone as N will default to zero.

Note: this is important as the exclusive minimum can be zero, in which case it's currently not possible to determine whether a value was set or which one was set.

Sorry for the delay in upgrading BTW, I got side-tracked shipping https://rest.sh/#/bulk

@codecov-commenter
Copy link

Codecov Report

Base: 99.74% // Head: 99.74% // No change to project coverage 👍

Coverage data is based on head (fff2fc4) compared to base (1c53122).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #72   +/-   ##
=======================================
  Coverage   99.74%   99.74%           
=======================================
  Files         136      136           
  Lines        7934     7934           
=======================================
  Hits         7914     7914           
  Misses         20       20           
Flag Coverage Δ
unittests 99.74% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
datamodel/high/base/schema.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@daveshanley daveshanley merged commit de1a42c into pb33f:main Jan 21, 2023
@daveshanley
Copy link
Member

Thank you for fixing it and for your contribution!

@danielgtaylor danielgtaylor deleted the dynamic-high-is-fix branch January 21, 2023 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants