[
https://issues.apache.org/jira/browse/CAMEL-24711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115857#comment-18115857
]
Claus Ibsen commented on CAMEL-24711:
-------------------------------------
Decisions before the implementation (Claus, 2026-09-16):
* --runtime covers main, spring-boot and quarkus, the way camel catalog and
camel doc do: for quarkus the Quarkus platform resolved from the Camel version
(or --quarkus-version) through QuarkusPlatformMixin, and the
camel-quarkus-catalog of that platform, so an endpoint whose component has no
Camel Quarkus extension is an error. The YAML schema comes from the
camel-yaml-dsl jar of the Camel version the platform pins.
* --canonical with a Camel version before 4.22 is an error: the canonical
schema (CAMEL-22987) only exists from 4.22, no silent fallback to the classic
schema.
* The shared camel_validate_source tool gets the schema of camelVersion the
same way; SourceValidator keys its YamlValidator cache by the loaded version of
the catalog it is given, so the 18 callers (CLI, MCP tools, TUI) stay unchanged.
Known limits to document, not to solve here: the Simple expression syntax is
parsed by the CLI's own Simple parser (the downloaded catalog supplies the
function list only), and the Java, XSLT and XML checks of camel validate source
use the CLI's classpath; the YAML and .properties checks are the version-aware
ones.
> camel-jbang - camel validate yaml/source --camel-version: catalog and YAML
> schema of that version (schema read from the camel-yaml-dsl jar)
> -------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24711
> URL: https://issues.apache.org/jira/browse/CAMEL-24711
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Reporter: Claus Ibsen
> Priority: Major
>
> camel validate yaml and camel validate source check a file against the
> built-in catalog and the built-in YAML schema, that is the CLI's own Camel
> version, whatever version the project runs. The other catalog-backed commands
> (camel doc, camel catalog, export) take --camel-version and --runtime and
> load the matching catalog through CatalogLoader, and the authoring MCP tools
> take a camelVersion argument.
> Make the validation version-aware the same way:
> * --camel-version and --runtime on camel validate yaml and camel validate
> source (default: the CLI's own version).
> * The catalog of that version from CatalogLoader, for the endpoint option,
> Simple and header checks.
> * The YAML schema of that version from the camel-yaml-dsl jar of that
> version: download org.apache.camel:camel-yaml-dsl:<version> with the Maven
> downloader (as CatalogLoader downloads the catalog jar) and read
> /schema/camelYamlDsl.json from it; YamlValidator gets a constructor that
> takes the schema document instead of its own classpath resource. Every
> released version ships that file, so no catalog change is needed.
> * The same for the shared authoring tool camel_validate_source when
> camelVersion is given (ToolContext already loads the catalog per version).
> Discussed while reviewing PR 26378 (CAMEL-24698): the catalog half alone
> would give a misleading --camel-version, since the schema check would still
> be the CLI's.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)