Skip to content

[@W-21368901] Fix deep allOf schema rendering (4+ levels)#896

Closed
alexpmule wants to merge 2 commits intomasterfrom
fix/W-21368901-deep-allof
Closed

[@W-21368901] Fix deep allOf schema rendering (4+ levels)#896
alexpmule wants to merge 2 commits intomasterfrom
fix/W-21368901-deep-allof

Conversation

@alexpmule
Copy link
Contributor

Summary

Fixes W-21368901 - API Console fails to render properties from deeply nested allOf schemas (4+ levels).

What Changed

  • ✅ Updated @api-components/api-example-generator to 4.4.36 (recursive property collection)
  • ✅ Updated @api-components/api-type-document to 4.2.42 (recursive property collection)
  • ✅ Added regression test for deep allOf (test/api-console-deep-allof.test.js)
  • ✅ Added product-order-minimal to demos (element, standalone, themed)
  • ✅ Added nullable spec for W-11650729 (old bug reference)

Root Cause

Single-pass iteration through allOf shapes didn't recursively expand nested shacl:and arrays beyond 3 levels.

Solution

Both updated components now use recursive property collection with:

  • Depth limiting (max 10 levels)
  • Circular reference detection (visited Set)
  • Backward compatibility (augments existing logic, doesn't replace)

Testing

  • ✅ api-example-generator: 714 tests passed (new deep-allof tests added)
  • ✅ api-type-document: 547 tests passed (new deep-allof tests added)
  • ✅ api-console: New regression test added (api-console-deep-allof.test.js)
  • ✅ Manual verification: date and timeSlot fields now display in PXCAppointmentRef

Demo

npm start
# Navigate to http://localhost:8000/demo/element/
# Select "W-21368901 - Deep allOf"
# Navigate to Types → PXCAppointmentRef
# Verify date and timeSlot fields are displayed

Customer Impact

- Sev 1, Signature account - Critical fields missing in Product Order API documentation
- Now displays all properties from 4+ level allOf chains

Related

- W-21367647 (original investigation)
- api-example-generator: v4.4.36 (published)
- api-type-document: v4.2.42 (published)

- Update @api-components/api-example-generator to 4.4.36
- Update @api-components/api-type-document to 4.2.42
- Add regression test for deep allOf (4+ levels)
- Add product-order-minimal to demos
- Add nullable spec for W-11650729
@alexpmule alexpmule closed this Mar 3, 2026
@alexpmule alexpmule deleted the fix/W-21368901-deep-allof branch March 3, 2026 22:14
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