davsclaus commented on code in PR #26489:
URL: https://github.com/apache/camel/pull/26489#discussion_r4024139366
##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/SourceValidator.java:
##########
@@ -147,30 +150,51 @@ public static List<String> validateCamelYaml(String
content, CamelCatalog catalo
if (content == null || content.isBlank()) {
return msgs;
}
+ if (validateYamlSchema(content, catalog, schemaValidator, msgs)) {
+ msgs.addAll(validateYamlCatalog(content, catalog));
+ }
+ return msgs;
+ }
+
+ /**
+ * The schema half of {@link #validateCamelYaml(String, CamelCatalog)}:
the YAML DSL schema of the catalog's Camel
+ * version, without the catalog checks. For a sample that is right for its
version but uses what the catalog cannot
+ * know (a custom step, a header a component sets at runtime).
+ */
+ public static List<String> validateYamlSchema(String content, CamelCatalog
catalog) {
+ List<String> msgs = new ArrayList<>();
Review Comment:
Done in 534c3f22d0a9: `validateYamlSchema` requires the catalog like
`validate`.
_Claude Code on behalf of davsclaus_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]