You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Tomohisa Igarashi (Jira)" <ji...@apache.org> on 2023/05/25 21:49:00 UTC

[jira] [Created] (CAMEL-19392) Correct template bean definition schema

Tomohisa Igarashi created CAMEL-19392:
-----------------------------------------

             Summary: Correct template bean definition schema
                 Key: CAMEL-19392
                 URL: https://issues.apache.org/jira/browse/CAMEL-19392
             Project: Camel
          Issue Type: Task
          Components: camel-yaml-dsl
    Affects Versions: 3.x
            Reporter: Tomohisa Igarashi
            Assignee: Tomohisa Igarashi


The template bean, which is used by Kamelet, is out of sync between schema and actually used deserializer/definition
https://github.com/apache/camel/blob/camel-3.x/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/main/java/org/apache/camel/dsl/yaml/deserializers/RouteTemplateDefinitionDeserializer.java#L48
https://github.com/apache/camel/blob/camel-3.x/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/main/java/org/apache/camel/dsl/yaml/deserializers/RouteTemplateDefinitionDeserializer.java#L88

NamedBeanDefinition supports
{noformat}
properties:
  propName: propValue
  objProp:
    objPropProp: objPropPropVal
{noformat}

But the template bean actually supports following
{noformat}
property:
  - key: propName
    value: propValue
{noformat}
and
{noformat}
properties:
  propName: propValue
{noformat}

In order to reflect the actual behavior in YAML DSL JSON schema, we need to change from `NamedBeanDefinition` to `RouteTemplateBeanDefinition` and `TemplatedRouteBeanDefinition` in the annotation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)