Skip to content

Fix tests breaking with libopenapi v0.38.0 lazy getters#286

Open
siretart wants to merge 2 commits into
pb33f:mainfrom
siretart:fix-libopenapi-v0.38.0
Open

Fix tests breaking with libopenapi v0.38.0 lazy getters#286
siretart wants to merge 2 commits into
pb33f:mainfrom
siretart:fix-libopenapi-v0.38.0

Conversation

@siretart

Copy link
Copy Markdown

libopenapi v0.38.0 introduced lazy GetSpecJSON getters which broke validation tests that relied on manually corrupting the struct fields.\n\nSince ValidateOpenAPIDocument falls back to evaluating the lazy getters, those tests fail because the manual corruption gets overwritten by the lazy JSON parser. Pre-warming the lazy parser before mutating the fields ensures the fallback path triggers as expected.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.63%. Comparing base (14f2269) to head (1ccb290).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #286   +/-   ##
=======================================
  Coverage   97.63%   97.63%           
=======================================
  Files          64       64           
  Lines        6991     6991           
=======================================
  Hits         6826     6826           
  Misses        132      132           
  Partials       33       33           
Flag Coverage Δ
unittests 97.63% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant