syndesisio / syndesis-integration-runtime

Apache License 2.0
1 stars 6 forks source link

filter relies on passing JSON through the route #11

Open rhuss opened 6 years ago

rhuss commented 6 years ago

The current runtime assumes (a) that the filter is given as jsonpath and (b) that the message body is in json (in various formats).

However, in Syndesis different types can flow through a route and we assume simple as the expression language for a filter.

This implies that we have to detect the outputShape of the endpoint before the filter and whether this is a JSON document or plain object and then decide on the fly which filter to use.

Alternatively, and this will be the first approach which I'll try, is to check during runtime for the message, and when its a String then use the jsonpath filter (which also knows how to use "simple" for an expression), if its another object, we are using the simple filter.