kaoto icon indicating copy to clipboard operation
kaoto copied to clipboard

Validate expression

Open igarashitm opened this issue 1 year ago • 0 comments

Please describe the feature that you want to propose

Severap EIP steps like setBody, requires an expression to be specified, and if specified expression type specific validation is required, meaning dynamically determine the expression schema. Also note that expression has several dialects like:

- simple: ${body}
- simple:
    expression: ${body}
- expression:
    simple: ${body}
- expression:
    simple:
      expression: ${body}

so it needs to handle all of the above and see if there's one of them. Make the model validation https://github.com/KaotoIO/kaoto-next/blob/main/packages/ui/src/models/visualization/flows/support/model-validation.service.ts#L15 pluggable and add dataformat validation.

In addition to that, the step like aggregate has expression as a named parameter, and saga has expression as a value of the key-value map named parameter. See if it could be handled together, or file a separate issue.

igarashitm avatar Jan 23 '24 12:01 igarashitm