Skip to content

Conversation

@its-hammer-time
Copy link
Contributor

When calling NewDocument() (without explicit configuration), BuildV3Model() was creating a bare DocumentConfiguration struct literal as the fallback. This meant all bool fields defaulted to false (Go zero values), causing TransformSiblingRefs and MergeReferencedProperties to be silently disabled.

BuildV2Model() already correctly uses datamodel.NewDocumentConfiguration() as its fallback. This aligns BuildV3Model() to do the same, ensuring features like sibling $ref -> allOf transformation are enabled by default regardless of which NewDocument constructor is used.

Fixes: #90

When calling NewDocument() (without explicit configuration), BuildV3Model()
was creating a bare DocumentConfiguration struct literal as the fallback.
This meant all bool fields defaulted to false (Go zero values), causing
TransformSiblingRefs and MergeReferencedProperties to be silently disabled.

BuildV2Model() already correctly uses datamodel.NewDocumentConfiguration()
as its fallback. This aligns BuildV3Model() to do the same, ensuring
features like sibling $ref -> allOf transformation are enabled by default
regardless of which NewDocument constructor is used.

Fixes: pb33f#90
Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.56%. Comparing base (7015d9e) to head (eee6062).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #528      +/-   ##
==========================================
- Coverage   99.56%   99.56%   -0.01%     
==========================================
  Files         192      192              
  Lines       23878    23874       -4     
==========================================
- Hits        23775    23769       -6     
- Misses         62       64       +2     
  Partials       41       41              
Flag Coverage Δ
unittests 99.56% <100.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

@daveshanley
Copy link
Member

LGTM!

@daveshanley daveshanley merged commit 0ea58b9 into pb33f:main Feb 11, 2026
3 of 4 checks passed
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.

$ref handling incorrect when alongside other json schema attributes for OpenAPI 3.1 Spec

2 participants