fix: rm redundant pullResponseExamples call from Endpoint::outputSchema#3345
fix: rm redundant pullResponseExamples call from Endpoint::outputSchema#3345
pullResponseExamples call from Endpoint::outputSchema#3345Conversation
…etter Performance regression since v24.4.0 - the outputSchema getter was calling the expensive pullResponseExamples() operation on every access, even though examples are only needed for OpenAPI documentation generation (getResponses). This fixes the issue where simply accessing the output schema for runtime validation was unnecessarily triggering example generation.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughRemoved eager population of output schema examples from the endpoint getter and documented this change in the changelog v27.2.4; example processing is now limited to documentation/OpenAPI generator workflows and specific control paths. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
488f554 to
536188e
Compare
…etter Performance regression since v24.0.0 - the outputSchema getter was calling the expensive pullResponseExamples() operation on every access, even though examples are only needed for OpenAPI documentation generation (getResponses). This fixes the issue where simply accessing the output schema for runtime validation was unnecessarily triggering example generation.
536188e to
77d16b5
Compare
|
Reviewed PR #3345 — approved with no issues. The removal of Task list (5/5 completed)
|
There was a problem hiding this comment.
Reviewed — no issues found.
The removal is correct: #ensureOutputExamples() is already called at the right place in getResponses("positive") (line 176), which is the only code path that needs examples (both Documentation and Integration generators access output schemas exclusively through getResponses, never the outputSchema getter). The outputSchema getter is @internal and only accessed externally by Diagnostics (at startup, non-production) and test code — neither of which need examples on the schema.
Task list (5/5 completed)
- Read the diff to understand the changes
- Investigate the removed code and its context in endpoint.ts
- Verify pullResponseExamples is still called where needed
- Check CHANGELOG entry
- Submit review
Claude Opus | 𝕏

Performance regression since v24.0.0 - the
outputSchemagetter was calling the expensivepullResponseExamples()operation on first access (R.once protected), even though examples are only needed for OpenAPI documentation generation (getResponses).This fixes the issue where simply accessing the output schema for runtime validation was unnecessarily triggering example generation.
first introduced by #2666
merged by #2546
found this during my work on #3344
Summary by CodeRabbit
Bug Fixes
Documentation