wso2 / mi-vscode

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

Inbound Endpoint hidden attributes are missing in source XML #264

Closed SanojPunchihewa closed 3 months ago

SanojPunchihewa commented 3 months ago

Description:

We can add the property hidden to the UI schema to hide that parameter from the UI. But these parameters should be added to the source XML. Currently only the hidden attributes in the Generic attribute group which are added as XML attributes in Inbound source XML can be found. If we add hidden to any parameter in other attribute groups these, it won't be added to the source XML.

In the following UI schema, class can be found in source XML. However inbound.behavior won't get added as a parameter in source XML.

{
  "id": "org.wso2.carbon.inbound.iso8583.listening.ISO8583MessageConsumer",
  "name": "iso8583Inbound",
  "type": "inbound-connector",
  "title": "ISO8583 Inbound Connector",
  "help": "Configure the ISO8583 inbound connector for handling financial transactions.",
  "elements": [
    {
      "type": "attributeGroup",
      "value": {
        "groupName": "Generic",
        "elements": [
          {
            "type": "attribute",
            "value": {
              "name": "name",
              "displayName": "Inbound Endpoint Name",
              "inputType": "string",
              "required": "true",
              "helpTip": "Unique identifier for the ISO8583 inbound endpoint."
            }
          },
          {
            "type": "attribute",
            "value": {
              "name": "class",
              "displayName": "Class Name",
              "inputType": "string",
              "required": "true",
              "hidden": true,
              "defaultValue": "org.wso2.carbon.inbound.iso8583.listening.ISO8583MessageConsumer"
            }
          },
          {
            "type": "attribute",
            "value": {
              "name": "sequence",
              "displayName": "Injecting Sequence Name",
              "inputType": "string",
              "required": "true",
              "helpTip": "Sequence to inject the ISO8583 message"
            }
          },
          {
            "type": "attribute",
            "value": {
              "name": "onError",
              "displayName": "Error Sequence Name",
              "inputType": "string",
              "required": "true",
              "helpTip": "Error sequence to invoke on fault"
            }
          },
          {
            "type": "attribute",
            "value": {
              "name": "suspend",
              "displayName": "Suspend Inbound",
              "inputType": "boolean",
              "defaultValue": false,
              "hidden": true,
              "required": "false",
              "helpTip": "Suspend Inbound"
            }
          }
        ]
      }
    },
    {
      "type": "attributeGroup",
      "value": {
        "groupName": "Inbound Functional",
        "elements": [
          {
            "type": "attribute",
            "value": {
              "name": "inbound.behavior",
              "displayName": "Inbound behavior",
              "hidden": true,
              "inputType": "string",
              "defaultValue": "listening",
              "required": "true",
              "helpTip": "Inbound behavior"
            }
          },
          {
            "type": "attribute",
            "value": {
              "name": "port",
              "displayName": "Port",
              "inputType": "string",
              "required": "true",
              "helpTip": "Port number on which to listen for incoming messages."
            }
          }
        ]
      }
    }
  ]
}
SanojPunchihewa commented 3 months ago

This is fixed in latest VSCode plugin