fix(overlay): stop dropping members on multi-target actions - #128
Merged
Conversation
When a single overlay action updated more than one target, every match after the first lost the updated members. In YAML output they were serialized as an explicit key with no value (? null); in JSON output they became null values, which is quieter but harder to spot. A copy action whose source node sat later in the file lost its own properties the same way. Two upstream defects combined to cause this. apidom-overlay merged the same update element instance into every matched target, and the style-preserving serializers treated a shared element instance as if it were a cycle, dropping every occurrence after the first. Fixed by updating the apidom dependency family: @speclynx/apidom-core ^5.0.1 -> ^5.1.1 @speclynx/apidom-ls ^2.11.6 -> ^2.11.7 @speclynx/apidom-overlay ^5.0.1 -> ^5.1.1 @speclynx/apidom-reference ^5.0.1 -> ^5.1.1 Refs speclynx/apidom#459 Refs speclynx/apidom#460 Closes #127
char0n
force-pushed
the
fix/127-update-apidom-packages
branch
from
August 19, 2026 13:08
2663261 to
f96b0c4
Compare
char0n
pushed a commit
that referenced
this pull request
Aug 19, 2026
## [1.4.1](v1.4.0...v1.4.1) (2026-08-19) ### Bug Fixes * **overlay:** stop dropping members on multi-target actions ([#128](#128)) ([b7c3825](b7c3825)), closes [speclynx/apidom#459](speclynx/apidom#459) [speclynx/apidom#460](speclynx/apidom#460) [#127](#127)
Member
Author
|
🎉 This PR is included in version 1.4.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the apidom dependency family to the latest releases.
@speclynx/apidom-core^5.0.1^5.1.1@speclynx/apidom-ls^2.11.6^2.11.7@speclynx/apidom-overlay^5.0.1^5.1.1@speclynx/apidom-reference^5.0.1^5.1.1Why
apidom 5.1.1 carries the fixes for speclynx/apidom#459 (style-preserving serializers drop shared element instances) and speclynx/apidom#460 (
applyUpdateActionmerges the same update element into every matched target). Together they resolve #127.Verification
Reproductions were run against a sandbox pinned to the entire apidom family at 5.1.0 — the versions that would have resolved when #127 was filed — and compared against this branch.
Minimal case —
$.components.schemas['ActorType', 'CardinalityFilterType']with a singleupdate:. On 5.1.0 the second match serializes as? nullexplicit keys; on 5.1.1 both matches are correct. The JSON output path (which produced quietnullvalues rather than an obvious syntax oddity) and thecopy:case where the source node sits later in the file are both clean as well.Real FDX spec — FDX 6.4.0 shared components (OpenAPI 3.1.0, with genuine
x-fdx-csdf-*extensions), with a reconstructed CSDF filter action:? nullmembersx-fdx-csdf-technical: true23 pre-existing in source + 17 matched = 40. On 5.1.0 only the first match survived and 16 were lost. Output validates cleanly (9 warnings, all pre-existing
exampledeprecations).On the open question in #127
The reporter's output showed both
ActorTypeandCardinalityFilterTypecorrupted, while our reduction only ever corrupted the second-and-later match. That is now accounted for and needs no further fix.The cause was a single
WeakSetintoYAMLNodethat was added to on entry and never unwound on exit, making it visit-once-ever rather than cycle detection. Eight variations were swept (union of 3, reversed union order, unmatched earlier schema, duplicate prior action, wildcard-then-union, nested update values) and the first match survived in every one — so no variation of the minimal example can corrupt both.What does reproduce their exact output is an action that also matches a schema sitting earlier in the file than
ActorType: the surviving copy lands on that earlier schema, leaving both pasted schemas as? null. Their overlay's other CSDF actions would do exactly this, and the first match simply wasn't in the excerpt they pasted. This is confirmed on the real FDX spec above, whereActorTypeitself comes out as? nullpre-fix.Their five real overlay files remain unobtainable — nothing was ever attached to the issue — but the mechanism is fully reproduced on real FDX data, so they are no longer needed to validate the fix.
Testing
tsc --noEmitclean;npm test82 passing.Closes #127