Skip to content

Commit

Permalink
CAMEL-20017: camel-yaml-dsl - ExchangeProperty language is duplicated…
Browse files Browse the repository at this point in the history
… in yaml schema (#11822)
  • Loading branch information
igarashitm authored Oct 24, 2023
1 parent 956ff5f commit 0ae2a4a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,17 @@ private void collectYamlProperties(List<AnnotationInstance> annotations, ClassIn
}
}

if (!kebabCase) {
final String camelCased = StringHelper.dashToCamelCase(propertyName);
if (annotations.stream().anyMatch(existing -> {
String existingName = annotationValue(existing, "name").map(AnnotationValue::asString).orElse("");
String existingCamelCased = StringHelper.dashToCamelCase(existingName);
return existingCamelCased.equals(camelCased);
})) {
return;
}
}

if (propertyName.startsWith("__")) {
// reserved property, add it
annotations.add(property);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -980,8 +978,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -1115,8 +1111,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -1351,8 +1345,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -1417,14 +1409,6 @@
"$ref" : "#/items/definitions/org.apache.camel.model.language.ExchangePropertyExpression"
}
}
}, {
"type" : "object",
"required" : [ "exchangeProperty" ],
"properties" : {
"exchangeProperty" : {
"$ref" : "#/items/definitions/org.apache.camel.model.language.ExchangePropertyExpression"
}
}
}, {
"type" : "object",
"required" : [ "groovy" ],
Expand Down Expand Up @@ -1711,8 +1695,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -1933,8 +1915,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -2440,8 +2420,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -3601,8 +3579,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -3841,8 +3817,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -4331,8 +4305,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -4995,8 +4967,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -5275,8 +5245,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -5394,8 +5362,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -5549,8 +5515,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -5674,8 +5638,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -5799,8 +5761,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -5923,8 +5883,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -6388,8 +6346,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -6726,8 +6682,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -7374,8 +7328,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -7515,8 +7467,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -7640,8 +7590,6 @@
"required" : [ "datasonnet" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "exchangeProperty" ]
}, {
"required" : [ "groovy" ]
}, {
Expand Down Expand Up @@ -12211,14 +12159,6 @@
"$ref" : "#/items/definitions/org.apache.camel.model.language.ExchangePropertyExpression"
}
}
}, {
"type" : "object",
"required" : [ "exchangeProperty" ],
"properties" : {
"exchangeProperty" : {
"$ref" : "#/items/definitions/org.apache.camel.model.language.ExchangePropertyExpression"
}
}
}, {
"type" : "object",
"required" : [ "groovy" ],
Expand Down

0 comments on commit 0ae2a4a

Please sign in to comment.