This is an automated email from the ASF dual-hosted git repository.

igarashitm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 035f42a5a3b CAMEL-18607: camel-yaml-dsl - bannedDefinition partially 
fails to exclude expression definition (#8523)
035f42a5a3b is described below

commit 035f42a5a3be8735242957f3ffa60402be27bc02
Author: Tomohisa Igarashi <[email protected]>
AuthorDate: Wed Oct 12 06:51:38 2022 -0400

    CAMEL-18607: camel-yaml-dsl - bannedDefinition partially fails to exclude 
expression definition (#8523)
---
 .../org/apache/camel/maven/dsl/yaml/GenerateYamlSchemaMojo.java   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlSchemaMojo.java
 
b/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlSchemaMojo.java
index 9c141d24944..9ce20a6be9e 100644
--- 
a/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlSchemaMojo.java
+++ 
b/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlSchemaMojo.java
@@ -298,6 +298,14 @@ public class GenerateYamlSchemaMojo extends 
GenerateYamlSupportMojo {
                             return;
                         }
 
+
+                        if (propertyType.startsWith("object:")) {
+                            final DotName dn = 
DotName.createSimple(propertyType.substring(7));
+                            if (isBanned(view.getClassByName(dn))) {
+                                return;
+                            }
+                        }
+
                         if (propertyName.startsWith("__")) {
                             // reserved property, add it
                             annotations.add(property);

Reply via email to