-
Notifications
You must be signed in to change notification settings - Fork 268
Description
Description
Description
Default values specified for init method parameters (such as string serviceUrl = "https://api.openai.com/v1") should be extracted from the Ballerina source code and included in the generated UI schema. This allows users to see and use the default values in the Micro Integrator connector configuration UI.
Current Behavior
When an init method has parameters with default values, these default values are not captured in the generated UI schema. The UI shows empty default values and marks all parameters as required, even when they have default values in the source code.
Example:
public isolated function init(ConnectionConfig config, string serviceUrl = "https://api.openai.com/v1") returns error? {
// ...
}In this case, serviceUrl has a default value "https://api.openai.com/v1", but the generated UI schema shows:
defaultValue: ""required: "true"
Expected Behavior
Default values from init method parameters should be extracted and included in the generated UI schema with the correct values.
Example Output:
{
"name": "serviceUrl",
"displayName": "serviceUrl",
"inputType": "stringOrExpression",
"defaultValue": "https://api.openai.com/v1",
"required": "false",
"helpTip": "",
"validateType": ""
}Version
No response