Repository navigation
Fix unresolved OpenAPI references - #135
mikemikimike wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📜 Recent review details🔇 Additional comments (2)
📝 WalkthroughWalkthroughThe change adds a recursive Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
apps/agentprotocol.ai/scripts/resolveRef.mjsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. apps/agentprotocol.ai/scripts/resolveRef.test.mjsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/agentprotocol.ai/scripts/resolveRef.mjs`:
- Around line 7-14: Update resolveRef and its recursive property traversal to
track references in the active resolution path, preserving the original $ref
when a reference would create a cycle instead of recursing further. Keep
non-cyclic references fully expanded and retain deletion of unresolved
references, then add a regression test covering a self-referential schema such
as Node.properties.next -> Node.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f595930a-eed7-4c65-a8be-f89ace433906
📒 Files selected for processing (4)
apps/agentprotocol.ai/package.jsonapps/agentprotocol.ai/scripts/generateEndpoints.mjsapps/agentprotocol.ai/scripts/resolveRef.mjsapps/agentprotocol.ai/scripts/resolveRef.test.mjs
📜 Review details
🔇 Additional comments (4)
apps/agentprotocol.ai/scripts/resolveRef.mjs (1)
1-5: LGTM!apps/agentprotocol.ai/scripts/resolveRef.test.mjs (1)
1-26: LGTM!apps/agentprotocol.ai/scripts/generateEndpoints.mjs (1)
4-4: LGTM!Also applies to: 25-25, 44-44, 75-75
apps/agentprotocol.ai/package.json (1)
10-10: LGTM!
Validation
The recursive |
Fixes #133
The endpoint generator used Array.prototype.pop on temp.properties, which is a plain object, and used map for side effects. This caused unresolved references to crash generation instead of being removed.
This change extracts resolveRef into a testable helper, uses forEach and delete for unresolved properties, and adds a Node regression test.
Validation: