KaotoIO / kaoto

The UI of the Kaoto project
https://kaoto.io
Apache License 2.0
35 stars 25 forks source link

Support custom DataFormats #1017

Open lordrip opened 5 months ago

lordrip commented 5 months ago

Please describe the feature that you want to propose

At the moment of writing, only DataFormats provided through the Camel Catalog are supported.

The goal for this ticket would be to add option to be able to select a custom DataFormat or to provide a reference to a DataFormat bean. Ideally, this should render a Bean configuration field that allows the user to pick an existing bean or to create one.

image

Related read: https://camel.apache.org/manual/dataformat-dsl.html

igarashitm commented 5 months ago

We already have custom dataformat in the form. The ref is supposed to be a BeanReferenceField, but it seems not ATM - it could be a bug. Screenshot from 2024-04-16 12-22-25

igarashitm commented 5 months ago

Here is the model catalog entry - https://github.com/apache/camel/blob/main/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/custom.json

lhein commented 5 months ago

yep, we should make it cross connect to the beans tab / enhancing the text field as a typeahead dropdown with a button for create

lhein commented 5 months ago

we should try to filter for beans that match the required type for that field if defined but also we should try to offer an option ("Show More") to select from an unfiltered list.

igarashitm commented 5 months ago

The tricky part for filtering beans is that it requires Java class hierarchy knowledge, for example we don't know org.postgresql.ds.PGConnectionPoolDataSource implements javax.sql.DataSource

We need either