Skip to content

fix: preserve skipped properties across allOf samples - #233

Merged
ivankropyvnytskyi merged 1 commit into
Redocly:mainfrom
fbirds5230:fix/140-allof-access-order
Nov 24, 2026
Merged

ivankropyvnytskyi merged 1 commit into
Redocly:mainfrom
fbirds5230:fix/140-allof-access-order

Conversation

@fbirds5230

Copy link
Copy Markdown
Contributor

What/Why/How?

skipReadOnly and skipWriteOnly can depend on the order of allOf members. When an earlier member marks a property to be skipped, a later member that supplies its value brings the property back into the sample.

Keep the skip marker when merging subsequent samples. The tests cover both annotations in either order, including a later false annotation, and XML output where the value comes from a $ref.

Reference

Related to #140. The original annotation-last case already has a regression test; this fixes the remaining case with the annotation first.

Testing

  • npm test: all 243 tests pass, including the lint step.
  • npm run build: passes.
  • Four regression cases fail before the fix and pass afterward.

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered

The change keeps properties excluded by the caller's options out of generated samples.

@fbirds5230
fbirds5230 requested a review from a team as a code owner November 23, 2026 20:48
@ivankropyvnytskyi
ivankropyvnytskyi merged commit 7a05dad into Redocly:main Nov 24, 2026
1 check passed
@ivankropyvnytskyi

Copy link
Copy Markdown
Contributor

Merged! Thanks for the fix, @fbirds5230. It'll ship in openapi-sampler 1.7.11

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.

2 participants