Add inbound connector input variable suggestion support - #564
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe change adds inbound connector input-schema persistence and conversion into Sequence Diagram(s)sequenceDiagram
participant ServerLessTryoutHandler
participant InboundEndpointVisitor
participant InboundConnectorHolder
participant ConnectorVariableSchemaUtils
ServerLessTryoutHandler->>InboundEndpointVisitor: visit inbound endpoint
InboundEndpointVisitor->>InboundEndpointVisitor: read inboundVariableName
InboundEndpointVisitor->>InboundConnectorHolder: load input schema by connector id
InboundConnectorHolder->>ConnectorVariableSchemaUtils: build Property tree
ConnectorVariableSchemaUtils-->>InboundConnectorHolder: return schema
InboundConnectorHolder-->>InboundEndpointVisitor: return Property schema
InboundEndpointVisitor->>InboundEndpointVisitor: register tryout output variable
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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
`@org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/entity/ConnectorVariableSchemaUtils.java`:
- Around line 78-104: Update the reference tracking in the property extraction
logic around the definition-handling block so processedRefs remains path-scoped
rather than being mutated across sibling properties. Use a copied set for each
definition traversal, while preserving the nested extractProperties call’s cycle
prevention and allowing separate sibling properties to reuse the same
definition.
In
`@org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/mediator/schema/generate/visitor/InboundEndpointVisitor.java`:
- Around line 51-75: Update loadInboundVariable in InboundEndpointVisitor to
handle IllegalStateException from InboundConnectorHolder.getInstance() when the
holder is uninitialized, preserving graceful return behavior. Replace the
ineffective null-only guard with appropriate exception handling around holder
retrieval, while leaving the existing variable-loading flow unchanged for
initialized holders.
🪄 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
Run ID: 60fdbd5b-c404-4eb8-8c78-82a10a117886
📒 Files selected for processing (8)
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/AbstractConnectorLoader.javaorg.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/NewProjectConnectorLoader.javaorg.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/entity/ConnectorAction.javaorg.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/entity/ConnectorVariableSchemaUtils.javaorg.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/inbound/conector/InboundConnectorHolder.javaorg.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/mediator/schema/generate/ServerLessTryoutHandler.javaorg.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/mediator/schema/generate/visitor/InboundEndpointVisitor.javaorg.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/utils/Constant.java
|
@coderabbitai review |
✅ Action performedReview finished.
|
Purpose
$subject
Fixes: wso2/mi-vscode#1539
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning