[ 
https://issues.apache.org/jira/browse/CAMEL-24711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-24711:
--------------------------------
    Fix Version/s: 4.23.0

> 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
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.23.0
>
>
> 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)

Reply via email to