Skip to content

fix(what-changed): keep the direction of schemas in exclusive unions - #727

Open
frederikprijck wants to merge 11 commits into
pb33f:mainfrom
frederikprijck:fix/what-changed-oneof-response-usage
Open

frederikprijck wants to merge 11 commits into
pb33f:mainfrom
frederikprijck:fix/what-changed-oneof-response-usage

Conversation

@frederikprijck

@frederikprijck frederikprijck commented Nov 23, 2026 •

Copy link
Copy Markdown

Fixes #726.

Problem

Since #725, a required entry added to an open schema that only responses use is not reported as breaking. That does not apply inside a oneOf: the usage walk marks every branch as used by both requests and responses (schema_usage.go#L266-L267), while allOf and anyOf keep the direction of the enclosing schema.

Being careful with oneOf makes sense in general. A oneOf rejects an instance that matches more than one branch, so changing one branch can change what the union accepts: widening a branch can make an instance match a second one, and narrowing it can leave an instance that matched two branches with only one. That cannot happen when no instance can match two branches. Then oneOf is equivalent to anyOf.

Change

A oneOf keeps the direction of the enclosing schema when no instance can match two of its branches:

  • there is a single branch, or
  • the branches accept different types.

The type check follows chains of $ref and stops at a reference it has already followed. OpenAPI 3.0 ignores the siblings of $ref, so there only the referenced schema counts. In 3.1 they apply as well, so a type next to a $ref narrows the branch. That only happens when the version is known to be 3.1 or later and TransformSiblingRefs is on (the default), because without TransformSiblingRefs the schema model does not read the siblings either. It also only happens next to the $ref of the branch itself, written in place, because that is the only place the model reads it: when the model reaches a schema through a $ref it follows the $ref of that schema and drops the type next to it, and it does the same for a branch that is a YAML alias. Otherwise only the referenced schema counts. A $ref to true narrows nothing, like {}.

It reads type and nullable the way the schema model does: a single type only from a YAML string, a type list by its items, and nullable from any YAML boolean. nullable only adds null in OpenAPI 3.0, or when the version is unknown. It only accepts the JSON Schema type names and treats integer and number as overlapping.

The schema model itself read an alias in a type list as its anchor name (type: [*object] became object). It now reads the value the alias points to, as it already did for a single type, so Schema.Type, its hash and the rendered output change for such lists.

Everything else stays shared as before: branches with overlapping types, branches without a type, a type name it does not know, an empty list of types, boolean branches, a $ref to false, a type next to a $ref that has nothing in common with the referenced schema, and a branch whose $ref value is a YAML alias, which the model does not resolve. A reference that cannot be resolved makes the usage of the whole document unknown, as before.

The check only runs when the enclosing direction is not already shared, because it cannot change a shared one.

Because the direction is kept, this applies to requests as well: a required entry removed from a schema in an exclusive union that only requests use is not reported as breaking either.

Keywords the model drops next to a $ref

The walk follows the keywords next to a $ref, as it does on main, but the model does not always read them. It drops them without TransformSiblingRefs, when it reaches a schema through a $ref, for an alias in a list, and always next to the $ref of a response, request body, parameter, header or path item. It also does not resolve a $ref whose value is an alias. The walk can therefore give a schema a direction that the model does not have. On main that did not matter inside a oneOf, because every branch was shared, but an exclusive union could make it matter.

The walk now records whether it reached a schema through something the model does not read, and whether it kept the direction of a oneOf. When both happen, the document is walked again with every oneOf shared, which gives the same usage as main. Documents without such keywords keep the direction of their exclusive unions. In OpenAPI 3.0 the model still reads the keywords next to a $ref where the schema is written, so treating them as dropped there only shares more unions.

Tests

  • New schema_usage_oneof_test.go covers:
    • exclusive unions that are relaxed, in responses and requests: single branch, distinct types, type lists, references and chains of them, nullable in 3.0 and 3.1, and a narrower type next to a $ref in 3.1;
    • unions that must stay breaking: overlapping or missing types, unknown type names, a boolean branch or a $ref to false, $ref siblings the model does not read (3.0, TransformSiblingRefs off, along a chain, in an alias), and nullable branches in 3.0 in any YAML spelling;
    • keywords the model drops next to a $ref, which share every union again;
    • the alias and true cases after rendering and reparsing.
  • TestSchema_Build_TypeListWithAlias in datamodel/low/base.
  • TestRequiredConservativeSchemaContexts: oneOf with a single branch now expects "not breaking".
  • go test ./... passes, and the reproduction from what-changed: required property added to a response-only schema is reported as breaking when used inside oneOf #726 reports 0 breaking for 03-oneof, with the other two cases unchanged.

Performance

  • The usage maps for the OpenAPI 3 fixtures in test_specs/ (including Stripe, DocuSign and Asana) are identical to main.
  • On its own, the usage walk takes about 10–25% longer on those documents, with the same allocations.
  • BenchmarkPipeline_Compare_Stripe shows no measurable difference (about 280 ms on both).

Commits

The second commit fixes the $ref and type name handling, which a review found after the first commit, and adds the request and OpenAPI 3.0 tests.

The commits after it address the review on this PR, one comment each:

  • skipping the check for a shared direction,
  • reading nullable as the model does,
  • reading type as the model does,
  • stopping at a repeated reference instead of after eight,
  • narrowing by the type next to a $ref in 3.1,
  • reading an alias in a type list in the model,
  • a $ref to true.

The last two commits fix places where the check or the walk relied on things the schema model does not read:

  • only narrowing a branch by the type next to its own $ref, written in place,
  • walking the document again with every oneOf shared when the walk follows keywords the model drops.

Not covered

Branches of the same type that are told apart by const or enum, as in many discriminated unions, stay shared. Proving those branches exclusive would need a different analysis.

In OpenAPI 3.0 a type next to a $ref never narrows a branch. With TransformSiblingRefs on, the model does read it where the schema is written, so the check is more conservative than the model there. OpenAPI 3.0 says those siblings are ignored, so a tool that follows the spec sees {$ref: Untyped, type: string} as accepting anything.

A discriminator anywhere in a document makes the usage of the whole document unknown (#728). Such documents get neither this relaxation nor the one from #725 until that is fixed.

Note

#729 changes the same part of schemaField and walkReached, and adds fields to usageWalker and functions in the same place, so whichever of the two is merged second has conflicts in schema_usage.go. Each one is resolved by keeping both changes. When the first one is merged, I will resolve it in the second one with a merge commit. #729 reads the keywords next to a $ref whenever TransformSiblingRefs is on, while this PR only narrows by them in 3.1 or later, so the two need to agree on that before both are merged.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b9309bc) to head (5ad6dfb).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #727   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          316       316           
  Lines        40280     40351   +71     
=========================================
+ Hits         40280     40351   +71     
Flag Coverage Δ
unittests 100.00% <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.

@frederikprijck
frederikprijck force-pushed the fix/what-changed-oneof-response-usage branch from 275207e to 87b154d Compare November 23, 2026 10:18
@frederikprijck frederikprijck changed the title fix(what-changed): keep the response use of schemas in exclusive unions fix(what-changed): keep the direction of schemas in exclusive unions Nov 23, 2026
frederikprijck and others added 2 commits November 23, 2026 15:14
A oneOf accepts an instance only when exactly one branch matches, so the usage
walk treated every branch as used by both requests and responses. A required
entry added to a schema that only responses use stayed breaking whenever the
schema sat in a oneOf.

Branches that cannot match the same instance, because their types are disjoint
or because there is a single branch, cannot interfere with each other, so they
now keep the direction of the oneOf, as anyOf does. Branches that overlap, that
do not state a type, or that mix integer and number keep the shared result.

Co-Authored-By: Claude <noreply@anthropic.com>
OpenAPI 3.0 ignores the siblings of $ref, so a branch such as
{$ref: Other, type: string} accepts what Other accepts. The exclusivity check read
the sibling type first, so it could treat overlapping branches as exclusive and
relax a change that can break a client. The check now follows the reference
first, which is an upper bound in 3.0 and in 3.1.

It also only accepts the JSON Schema type names, so an unknown name such as
Object no longer counts as a distinct type, and duplicate types inside one branch
no longer count as an overlap.

Exclusive branches keep the direction in requests as well, so a required entry
removed from a request-only union is not breaking either. Tests now cover that,
OpenAPI 3.0 documents, and the cases above.

Co-Authored-By: Claude <noreply@anthropic.com>
@frederikprijck
frederikprijck force-pushed the fix/what-changed-oneof-response-usage branch from 2acbdc9 to 8969ccb Compare November 23, 2026 14:15

@daveshanley daveshanley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing #726. I verified that the original array/object example now reports zero breaking changes, and the full Go suite passed. I’d fix the YAML type and nullable handling before merging.

Comment thread what-changed/model/schema_usage.go Outdated
case v3.RefLabel:
ref = utils.NodeAlias(value).Value
case v3.NullableLabel:
nullable = utils.NodeAlias(value).Value == "true"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 3.0 model decodes true and True to the same boolean. In an object/string oneOf with both branches nullable, changing that spelling alone took the breaking count from one to zero. Could we decode the tagged boolean as the model builder does and use ResolveDocumentVersion to apply nullable for 3.0? In 3.1+, nullable has no effect on the accepted types.

@frederikprijck frederikprijck Nov 26, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I have fixed that in f231831. Can you take a look? I also ensured to cover it with a test, verified broken behavior before patching it.

Comment thread what-changed/model/schema_usage.go Outdated
var names []string
switch declared.Kind {
case yaml.ScalarNode:
names = []string{declared.Value}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unquoted type: null leaves the schema model’s Type unset, but this reads the scalar text as the type name "null" and reports zero breaking changes. Could we require a YAML string for each type name and a nonempty, valid declaration before adding nullable? Tests for type: 'null', type: null, and type: [] with nullable: true would cover the distinction. JSON Schema type

@frederikprijck frederikprijck Nov 26, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it in e9ab33b, note that I did not apply the YAML string requirement to the items of a type list, so type: [null] still reads as 'null', because of:

Reading (low model): datamodel/low/base/schema_build.go#L129-L151

  • A single type is only read when it is a YAML string (utils.IsNodeStringValue, L131).
  • For a list, each item's text is taken as is, with no tag check (typeValue.Content[r].Value, L140-L145). An unquoted null inside [null] therefore becomes the string "null".
  • The high model carries that into Type: ["null"] (datamodel/high/base/schema.go#L281-L285) and renders it as type: "null".

Same as with the rest, I covered this in tests, confirmed the broken behavior, and fixed it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explaining [null]. I confirmed it renders as "null". One type-list case still changes the diff after a round trip. With x-type: &object string and Other: {type: [*object]} beside an object Widget in a response oneOf, requiring Widget.id gives 0 breaking changes. Rendering and reparsing both documents gives 1. The walker reads string, while the low model stores the anchor name object. Please use the same alias-aware decoding in both paths and test that both comparisons report 0.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Fixed in 8482b7f

Comment thread what-changed/model/schema_usage.go Outdated
if node = w.localTarget(ref); node == nil {
return nil, false
}
continue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 3.1, type: string beside a $ref to {type: [string, object]} narrows that branch to strings. Beside an object branch, I got one breaking change with the reference and zero with the equivalent inline string schema. Could we intersect the sibling and referenced type constraints in 3.1+, and keep the current reference-only behavior in 3.0? JSON Schema reference semantics

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1f3e494

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original 3.1 narrowing case now passes. One equivalent schema still gives a different answer. In the response oneOf, keep the object branch and give the other branch a $ref with sibling type: string. Requiring a property on the object reports 0 if the referenced schema is {}, and 1 if it is true. Both targets accept every instance. Please retain the sibling’s type constraint when the referenced schema is true and test both forms together. JSON Schema boolean semantics

@frederikprijck frederikprijck Nov 27, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 10165a4.

Comment thread what-changed/model/schema_usage.go Outdated
// It reports false when it cannot tell: a schema without a type, a type name that is not a JSON type, a boolean
// schema, a reference that cannot be resolved, or a chain of references longer than maxReferenceDepth.
func (w *usageWalker) instanceTypes(node *yaml.Node) (map[string]bool, bool) {
const maxReferenceDepth = 8

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With an object branch and a string behind seven local $refs, a required-field addition reported zero breaking changes. Adding an eighth alias to the same string changed the count to one. Could we detect repeated nodes along the reference chain so cycles still fall back and an extra alias preserves the result?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 92729f4 with tests, let me know if this works.

Comment thread what-changed/model/schema_usage.go Outdated
// union accepts in the opposite direction: widening a branch can make an instance match a second one, and
// narrowing it can leave an instance that matched two branches with only one. Branches that no instance can
// match at the same time cannot interfere with each other, so they keep the direction, as with anyOf.
if w.exclusiveBranches(value) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When sameInstance is already sharedSchema, both paths pass the same direction. On a webhook fixture with 128 unions, the usage walk went from 37 to 805 allocations. I tried sameInstance != sharedSchema && w.exclusiveBranches(value) here. It brought the count back to 37 and the focused tests passed.

@frederikprijck frederikprijck Nov 26, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 080afa4. I reproduced it on my own test with 128 webhook unions: 72 allocations on main, 840 before the change and 72 after. That's the same increase of 768 (6 per union) that you saw from 37 to 805.

frederikprijck and others added 5 commits November 26, 2026 09:16
… already shared

When the enclosing direction is already shared, the branches get the same
direction whether they are exclusive or not, so checking them only costs
allocations. Webhooks and callbacks are always shared, and with 128 webhook
unions the usage walk went from 72 allocations to 840. The check now only runs
when its result can change the direction, which brings it back to 72.

Co-Authored-By: Claude <noreply@anthropic.com>
…n OpenAPI 3.0

The exclusivity check compared the text of nullable with "true", while the
schema model accepts any YAML boolean and parses it with strconv.ParseBool. A
branch with nullable: True or TRUE was not seen as accepting null, so two
nullable branches could look exclusive and a breaking change was not reported.
A quoted 'true' went the other way: the model ignores it, the check did not.

OpenAPI 3.1 removed nullable, so it no longer adds null there. When the
version cannot be resolved, nullable still adds null, which can only make the
result less precise and never hides a breaking change.

Co-Authored-By: Claude <noreply@anthropic.com>
…ore nullable on an empty type list

The schema model only reads a single type from a YAML string, so an unquoted
type: null declares no type and the branch accepts any instance. The
exclusivity check read the scalar text as the type name "null", so the branch
looked exclusive with an object branch and a breaking change was not reported.

An empty list of types already meant that the types cannot be compared, but
nullable turned it into "only null". It now stays unknown with or without
nullable.

Items of a type list are still read by their text, as the schema model reads
them: type: [null] is "null" there as well.

Co-Authored-By: Claude <noreply@anthropic.com>
The exclusivity check gave up after following eight references, so a branch
behind seven references was compared by type and the same branch behind eight
was not, which changed the result. It now records the nodes it follows and
stops at one it has seen before, so the length of a chain no longer matters
and a cycle still falls back. The record has room for eight nodes and does
not escape, so common chains do not allocate.

Co-Authored-By: Claude <noreply@anthropic.com>
… in OpenAPI 3.1

In OpenAPI 3.1 the keywords next to $ref apply as well, so a type next to a
reference narrows what the branch accepts. The exclusivity check only read
the referenced schema, so {$ref: X, type: string} with X accepting strings and
objects overlapped with an object branch, while the same branch written inline
did not. The types along the reference chain are now intersected, which also
gives a type to a reference whose target declares none.

This only applies when the version is known to be 3.1 or later and
TransformSiblingRefs is on, because that is the only configuration in which the
schema model reads the siblings too. Without it, the model reads only the
reference, and so does the check. OpenAPI 3.0 ignores the siblings, so nothing
changes there.

Types along the references that have nothing in common, such as a reference to
an object next to type: string, accept no instance at all. That is more likely
a mistake than a schema, so the branch stays unknown instead of being treated
as exclusive. A type next to a reference that cannot be read makes the branch
unknown as well.

Co-Authored-By: Claude <noreply@anthropic.com>
@frederikprijck

frederikprijck commented Nov 26, 2026 •

Copy link
Copy Markdown
Author

Thanks for the review.

I applied the fixes in separate commits (1 per comment, so we can more easily iterate or revert if needed), I also updated the PR description to reflect the changes we made.

I will leave the resolution of the comments to you so you can confirm the fix before we resolve the comment.

@daveshanley daveshanley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes in 1f3e4942. The #726 example now reports zero breaking changes. I also verified the nullable spellings, the longer reference chains, and the return to 37 allocations on the 128-union webhook fixture.

I’m requesting changes before merge. Rendering and reparsing the same documents can still change the breaking count. Please make type-list aliases consistent across the walker and model, and preserve the sibling type when a 3.1 reference points to true. Alias round trip · Boolean reference target

frederikprijck and others added 2 commits November 27, 2026 14:54
An alias node keeps the name of its anchor as its value, and the schema model
read each item of a type list from that value. With x-type: &object string,
type: [*object] was read as object instead of string, so the schema hashed
differently from type: [string] and rendered as type: [object].

The exclusivity check of a oneOf already followed the alias, so a branch read
as string there while the model stored object. Requiring a property of an
object branch next to it was not breaking, but became breaking once both
documents were rendered and read back. The model now follows the alias as
well, as it already does for a single type and for an alias to a whole list.

Co-Authored-By: Claude <noreply@anthropic.com>
…e type next to it

The boolean schema true accepts every instance, as {} does. In OpenAPI 3.1 a
reference to {} next to type: string was read as a string branch, but a
reference to true made the branch unknown, because the check gave up on any
target that is not a mapping. Requiring a property of an object branch next
to it was therefore breaking with true and not with {}.

A reference to true now narrows nothing, like {}. The boolean schema false
accepts nothing, which is more likely a mistake than a branch that no instance
matches, so it still makes the branch unknown, as types that have nothing in
common do.

Co-Authored-By: Claude <noreply@anthropic.com>
@frederikprijck

Copy link
Copy Markdown
Author

Marking as draft, found a few things I want to look at first.

@frederikprijck
frederikprijck marked this pull request as draft November 27, 2026 15:19
frederikprijck and others added 2 commits November 27, 2026 17:28
…ds next to its $ref

In OpenAPI 3.1 with TransformSiblingRefs, the check read the type next to every
$ref along the chain of references of a branch, and next to the $ref of a
branch that is an alias. The schema model reads neither. When it reaches a
schema through a $ref, it follows the $ref of that schema and drops the type
next to it. The sibling transform skips an alias in a list, so an aliased
branch is read the same way. It does not resolve a $ref whose value is an
alias at all.

With Narrowed: {$ref: StringOrObject, type: string}, the model reads a branch
{$ref: Narrowed}, or an alias of Narrowed, as [string, object], which overlaps
an object branch. The check read it as string, so requiring a property of the
object branch was not breaking. It is breaking on main, where every oneOf
branch is shared.

The type next to a $ref now only narrows the branch itself, written in place.
A branch whose $ref value is an alias cannot be told apart from the others. A
type along the chain that has nothing in common with the referenced schema no
longer makes the branch unknown either, because the model does not read it.

The test for a type next to a reference along the chain now expects a breaking
change. New tests cover a type along the chain that has nothing in common with
the referenced schema, a branch that is an alias, and a branch whose $ref value
is an alias.

Co-Authored-By: Claude <noreply@anthropic.com>
…odel does not read

The walk follows the keywords next to a $ref, as it does on main. The schema
model drops them without TransformSiblingRefs, when it reaches a schema through
a $ref, for an alias in a list, and always next to the $ref of a response,
request body, parameter, header or path item. It also does not resolve a $ref
whose value is an alias, which the walk follows. The walk can therefore give a
schema a direction that the model does not have. On main that did not matter
inside a oneOf, because every branch was shared.

With this PR, an exclusive union could make it matter, for example:

- a oneOf next to the $ref of Holder: {$ref: Other, oneOf: [...]} reached
  through a $ref, or in the keywords next to it,
- an exclusive branch that leads to such keywords,
- a union in the content next to the $ref of a response,
- Holder reached in the response direction outside a union before the walk
  reaches it in an exclusive branch, so that the branch skips it.

Requiring a property of a schema that only those keywords reach was then not
breaking, while it is breaking on main.

The walk now records whether it reached a schema through what the model does
not read, and whether it kept the direction of a oneOf. When both happen, the
document is walked again with every oneOf shared, which gives the same usage
as on main, whatever the order. Documents without such keywords keep the
direction of their exclusive unions. In OpenAPI 3.0 the model still reads the
keywords next to a $ref where the schema is written, so treating them as
dropped there only shares more unions.

Tests cover a oneOf written next to a $ref, next to a $ref reached through a
$ref, in the keywords next to it, in an alias, and such keywords in an
exclusive branch, with the transform on and off. Others cover a reference to
Holder before and after the union, a union next to the $ref of a response and
of a path item, and a $ref whose value is an alias elsewhere, each with a
document without such keywords that keeps the direction.

Co-Authored-By: Claude <noreply@anthropic.com>
@frederikprijck

frederikprijck commented Nov 27, 2026 •

Copy link
Copy Markdown
Author

Since your last review I found that the check could rely on things the schema model does not read. I fixed that in two commits:

  • c3e2e9c: a type next to a $ref now only narrows a branch where the model reads it, which is next to the branch's own $ref, written in place. A type further along a chain of references, on a branch that is a YAML alias, or behind a $ref whose value is an alias no longer narrows the branch.
  • 5ad6dfb: the walk still follows keywords next to a $ref that the model drops, and $ref values that are aliases, as on main. The model drops those keywords without TransformSiblingRefs, for a schema reached through a $ref, for an alias in a list, and next to the $ref of a response or path item. If the walk follows such keywords anywhere and has also made a oneOf exclusive, the document is walked again with every oneOf shared, which gives the same result as main. Documents without such keywords keep their exclusive unions.

Open question: in OpenAPI 3.0 the check ignores a type next to a $ref, as you asked. With TransformSiblingRefs on, the model does read it in 3.0 where the schema is written, so in 3.0 the check is more conservative than the model. Should it follow the model there? This also affects #729, which reads those keywords whenever TransformSiblingRefs is on, so the two PRs need to agree before both are merged.

@frederikprijck
frederikprijck marked this pull request as ready for review November 27, 2026 16:52
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.

what-changed: required property added to a response-only schema is reported as breaking when used inside oneOf

2 participants