kaoto icon indicating copy to clipboard operation
kaoto copied to clipboard

Bean reference field is not activated for json dataformat schemaResolver parameter

Open igarashitm opened this issue 6 months ago • 2 comments

Describe the Bug

JSon dataformat has schemaResolver parameter which is supposed to have a bean reference. Currently it is just a textbox and bean reference field is not activated. Screenshot from 2024-01-29 16-51-12

This is because the schema from the catalog says this field is a String field as opposed to other fields those already have bean reference field activated. https://github.com/apache/camel/blob/2e7578c9426bb327e0ca8c43b4a93063d70b946e/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json#L10634-L10638

Even javaType in the catalog is java.lang.String https://github.com/apache/camel/blob/2e7578c9426bb327e0ca8c43b4a93063d70b946e/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/json.json#L32

It needs to look into further and see if we have to fix the catalog/schema in Camel upstream or not.

This kamelet demonstrates to reference a bean for schemaResolver https://github.com/apache/camel-kamelets/blob/main/kamelets/avro-deserialize-action.kamelet.yaml#L67

Steps to Reproduce the Bug or Issue

  1. Add marshal step
  2. Check schemaResolver field

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 0.30.0]

igarashitm avatar Jan 29 '24 22:01 igarashitm