wso2 / mi-vscode

Micro Integrator extension for Visual Studio Code
Apache License 2.0
2 stars 3 forks source link

UI schema for an inbound endpoint cause unexpected behavior when using `enableCondition` #378

Closed chathuranga-jayanath-99 closed 2 months ago

chathuranga-jayanath-99 commented 2 months ago

Description: Consider the below attributes are available in the UI schema json file. The attribute database.server.id has an enableCondition based on the value provided for connector.class. After the UI is rendered, if the entire default value for connector.class is selected and deleted, the default value will reappear.

...
{
  "type": "attribute",
  "value": {
    "name": "connector.class",
    "displayName": "Connector Class",
    "inputType": "string",
    "required": "false",
    "defaultValue": "MySqlConnector",
    "helpTip": "The name of the Java class for the connector."
  }
},
{
  "type": "attribute",
  "value": {
    "name": "database.server.id",
    "displayName": "Database Server ID",
    "inputType": "string",
    "required": "false",
    "helpTip": "A unique numeric ID for this database client across all active database processes in the cluster.",
    "enableCondition": [{"connector.class": "io.debezium.connector.mysql.MySqlConnector"}]
  }
},
...

Steps to reproduce:

Affected Versions:

OS, DB, other environment details and versions:

Related Issues (optional):

Suggested Labels (optional):

Suggested Assignees (optional):

chathuranga-jayanath-99 commented 2 months ago

It is fixed in the version 1.0.5