Skip to content
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

fix: resolve function recusion #3895

Merged

Conversation

pooja-bruno
Copy link
Collaborator

@pooja-bruno pooja-bruno commented Jan 28, 2025

Description

Addressing issue: #3663, #3631

Fixed OpenAPI collection import failure when handling circular references in the specification. Previously, the application would crash with a RangeError: Maximum call stack size exceeded error when trying to import OpenAPI collections containing circular references.

Changes Made

  • Improved resolveRefs function to properly handle circular references
  • Implemented caching mechanism using Map to store resolved references
  • Added proper handling of intermediate states during reference resolution
  • Prevented infinite recursion while maintaining the integrity of the imported collection

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

@helloanoop helloanoop merged commit 650cb47 into usebruno:main Feb 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants