Skip to content

Add inbound connector input variable suggestion support - #564

Merged
thuva9872 merged 3 commits into
wso2:stable/mifrom
thuva9872:inbound-variable
Jul 21, 2026
Merged

Add inbound connector input variable suggestion support#564
thuva9872 merged 3 commits into
wso2:stable/mifrom
thuva9872:inbound-variable

Conversation

@thuva9872

Copy link
Copy Markdown
Contributor

Purpose

$subject

Fixes: wso2/mi-vscode#1539

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

@thuva9872
thuva9872 requested a review from rosensilva as a code owner July 20, 2026 06:21
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 20136d72-281f-4dd5-92c1-40538a3cf11d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The change adds inbound connector input-schema persistence and conversion into Property trees. Connector loading and cleanup now manage both UI and input schema files. A shared schema utility handles nested properties and definitions. Inbound endpoint visiting loads the configured input variable into mediator tryout state, while tryout handling resolves and edits the correct inbound sequence source file.

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
Loading

Suggested reviewers: rosensilva

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning Most required template sections are left as placeholders, so the PR description is largely incomplete. Fill in the template sections with concrete details for goals, approach, user stories, release note, docs, tests, security, and related items.
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding inbound connector input variable suggestion support.
Linked Issues check ✅ Passed The changes add inbound input-schema loading, persist the variable, and surface it in the tryout flow as required by #1539.
Out of Scope Changes check ✅ Passed The modified files all support inbound input-variable suggestions or related schema handling, with no obvious unrelated additions.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9f9efcf and 13d0567.

📒 Files selected for processing (8)
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/AbstractConnectorLoader.java
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/NewProjectConnectorLoader.java
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/entity/ConnectorAction.java
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/connectors/entity/ConnectorVariableSchemaUtils.java
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/inbound/conector/InboundConnectorHolder.java
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/mediator/schema/generate/ServerLessTryoutHandler.java
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/mediator/schema/generate/visitor/InboundEndpointVisitor.java
  • org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/customservice/synapse/utils/Constant.java

@thuva9872

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thuva9872
thuva9872 merged commit c59ffe6 into wso2:stable/mi Jul 21, 2026
4 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants