-
-
Notifications
You must be signed in to change notification settings - Fork 272
Fix infinite recursion in @hey-api/transformers for self-referential schemas #2855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
🦋 Changeset detectedLatest commit: 81f91a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…hemas Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2855 +/- ##
=======================================
Coverage 30.59% 30.59%
=======================================
Files 488 488
Lines 39938 39938
Branches 2442 2442
=======================================
Hits 12219 12219
Misses 27685 27685
Partials 34 34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
The
@hey-api/transformersplugin crashes with "Maximum call stack size exceeded" when processing schemas with self-referential$refs(e.g., tree structures where nodes contain arrays of themselves).Root Cause
In
processSchemaType(), symbol registration happened after recursive schema processing:For self-referential schemas, subsequent encounters of the same
$refduring recursion couldn't find the symbol, causing re-entry.Fix
Register symbol before processing schema:
Changes
packages/openapi-ts/src/plugins/@hey-api/transformers/plugin.ts- Move symbol registration before recursive callFixes #2848
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.