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

Guillaume Nodet closed CAMEL-22987.
-----------------------------------
    Resolution: Fixed

> camel-yaml-dsl - yaml spec is overly complex and large due to implicits
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-22987
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22987
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-yaml-dsl
>            Reporter: Claus Ibsen
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 4.21.0
>
>
> Add a *canonical* variant of the Camel YAML DSL JSON Schema 
> (camelYamlDsl-canonical.json) that removes all oneOf/anyOf/not constructs and 
> implicit patterns. This results in a schema ~25% smaller that is 
> significantly easier for tooling (IDEs, code generators, AI assistants) to 
> process.
> The canonical form is a strict subset of the classic form: any YAML file that 
> validates against the canonical schema will also validate against the classic 
> schema and work with the Camel runtime.
> Changes:
> - Schema generator: new canonical parameter in GenerateYamlSchemaMojo
> - Canonical schema: generated at schema/camelYamlDsl-canonical.json
> - YamlValidator: supports both schemas via new YamlValidator(canonical) 
> constructor
> - JBang: camel validate yaml --canonical (validates against canonical schema)
> - JBang: camel validate normalize (rewrites YAML from shorthand to canonical 
> form)
> - Documentation: Schema Variants section with side-by-side examples, IDE 
> guide, command reference pages
> The classic schema remains the default everywhere. Whether to make canonical 
> the default is an open community discussion.
> PR: https://github.com/apache/camel/pull/22059



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to