davsclaus commented on code in PR #30566:
URL: https://github.com/apache/camel/pull/30566#discussion_r4657181893
##########
design/upgrade-guides-as-data.adoc:
##########
@@ -0,0 +1,435 @@
+---
+title: Upgrade guides as data in the Camel catalog
+authors:
+ - "@davsclaus"
+reviewers: []
+approvers: []
+creation-date: 2026-11-21
+last-updated: 2026-11-21
+status: proposed
+see-also:
+ - "CAMEL-27352"
+ - "CAMEL-27351"
+replaces: []
+superseded-by: []
+---
+
+== Summary
+
+The upgrade guides
(`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_*.adoc`) are
written for people
+who read them on the website, one page per minor release. A tool that helps
with an upgrade needs the same content
+as data: the entries that apply between the version in use and the target, the
components each entry is about,
+whether it is a removal or a deprecation, and a link to the entry on the
website.
+
+This proposal adds a build step that turns the guides into JSON, one entry per
change, and ships the JSON in
+`camel-catalog`, as the catalog already ships the Camel releases and the
security advisories:
+
+[source,json]
+----
+{
+ "id": "camel-ftp-sftp-uses-remote-file-and-directory-names-as-given",
+ "guide": "4.22",
+ "from": "4.22.2",
+ "to": "4.22.3",
+ "title": "camel-ftp - sftp uses remote file and directory names as given",
+ "components": ["camel-ftp"],
+ "kind": "change",
+ "breaking": false,
+ "summary": "The sftp component now uses a remote file or directory name
exactly as given, also when it contains * or ?.",
+ "text": "...the entry, as Markdown...",
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html#_camel_ftp_sftp_uses_remote_file_and_directory_names_as_given"
+}
+----
+
+The AsciiDoc stays the source. Guide authors write it as they do today. Checks
in the build find the mistakes of the
+guides, which are fixed in the guides, so the JSON is as accurate as the
guides can be made. The document also defines the rule for
+choosing the entries of an upgrade from one version to another, so every tool
lists the same entries.
+
+The point is that the format is shared. The Camel CLI, the MCP server, an IDE
plugin, Camel Kit or a tool nobody has
+written yet can each build their own upgrade help on the same data. None of
them has to parse AsciiDoc.
+
+== Motivation
+
+Today a tool that wants the guides parses the AsciiDoc itself:
+
+- The MCP server (`camel-jbang-mcp`) copies the guide files into its JAR at
build time (`copy-migration-guides` in
+ its `pom.xml`). `MigrationData` splits them into sections at the `==` and
`===` headings, and searches them with
+ BM25 for `camel_migration_guide_search`. It does not know which component an
entry is about, or whether an entry
+ of a patch release is already in the version in use.
+- The upgrade view planned in CAMEL-27352 (the Camel CLI `camel update check`
and a screen of the Camel TUI) needs the
+ entries between two versions, per component, so it can show only the entries
that touch the components the
+ integration uses. The guides are not in the CLI, so it would have to parse
them again.
+- The https://github.com/apache/camel-upgrade-recipes/[Camel Upgrade Recipes]
automate part of a migration. They
+ would gain from knowing which guide entries a recipe covers, so a tool can
say "this entry is done for you, these
+ you do by hand".
+- An IDE plugin, Karavan or Camel Kit would each write a third, fourth and
fifth parser.
+
+Each parser has its own idea of where an entry starts and ends, which version
it belongs to, and which component it is
+about. The guides have more structure than a quick parser sees:
+
+- A guide has a `==` section per release: the minor release (`== Upgrading
Camel 4.21 to 4.22`) and the patch
+ releases of an LTS line (`== Upgrading from 4.22.2 to 4.22.3`). Some guides
also have a `==` section that is not a
+ release (`== Camel Spring Boot`, `== Removed deprecated components`).
+- An entry is usually a `===` heading, but the 4.23 guide groups its entries
under `=== Breaking Changes` and
+ `=== Deprecated Components and Features`, with an entry per `====` heading.
+- A change that is backported has an entry in each line it went into: the 4.18
guide, the 4.22 guide, and the minor
+ guide of the release where it landed on main. A tool that lists all three
tells the user the same thing three
+ times. A tool that lists the minor entry to a user who already has the
backport tells them about a change they have.
+
+A parser in the catalog build, run once, with tests and with warnings when a
guide does not fit the rules, is better
+than one per tool.
+
+== Goals
+
+- One JSON entry per change, with the release that brings it, the components
it is about, its kind and a link to the
+ website.
+- A written rule for which entries apply to an upgrade from version A to
version B, including patch releases and
+ backports, which every tool follows.
+- The JSON in `camel-catalog`, read through `CamelCatalog`, and as plain files
in the JAR for a tool that is not
+ written in Java.
+- Data as accurate as we can make it: checks in the build that find the
mistakes of the guides (a section in the wrong
+ guide, a missing patch release, a backport with no entry on the minor
guide), a pass that fixes the ones there are
+ today, and a strict build afterwards, so the guides stay correct for the
website as well as for the JSON.
+
+== Non-goals
+
+- Changing the code of a project. That is the job of the Camel Upgrade Recipes
and `camel update run`.
+- A new authoring format. The guides stay AsciiDoc, written as today. The
conventions in
+ <<Conventions for guide authors>> are the ones most entries follow already.
+- The upgrade view itself (CAMEL-27352). It is one user of the data, not part
of this design.
+- The guides of Camel Spring Boot and Camel Quarkus, which live in their own
repositories. They can produce the same
+ format later (see <<Open questions>>).
+
+== Proposal
+
+=== The files
+
+A new goal of `camel-package-maven-plugin`, `prepare-upgrade-guides`, runs in
the normal `camel-catalog` build, next to
+`prepare-catalog`. Unlike the releases and the advisories, which are synced
from camel-website by a profile, the
+guides live in this repository, so the JSON is generated in every build and
committed like the other generated
+catalog files:
+
+----
+catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/upgrade-guides/
+ index.json
+ camel-4x-upgrade-guide-4_1.json
+ ...
+ camel-4x-upgrade-guide-4_24.json
+----
+
+`index.json` lists the guides:
+
+[source,json]
+----
+{
+ "schemaVersion": 1,
+ "guides": [
+ {
+ "guide": "4.22",
+ "file": "camel-4x-upgrade-guide-4_22.json",
+ "title": "Upgrade guide 4.21 -> 4.22 LTS",
+ "lts": true,
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html",
+ "sections": [
+ { "from": "4.22.2", "to": "4.22.3" },
+ { "from": "4.22.1", "to": "4.22.2" },
+ { "from": "4.22.0", "to": "4.22.1" },
+ { "from": "4.21", "to": "4.22" }
+ ],
+ "entries": 214
+ }
+ ]
+}
+----
+
+Each guide file is a JSON array of entries. The 4.x guides are 2 MB of
AsciiDoc. As JSON with Markdown text they are
+about the same size, and about 600 KB compressed in the JAR.
+
+=== The entry
+
+[cols="1,1,4"]
+|===
+| Field | Type | What it is
+
+| `id`
+| string
+| The id of the change: the title, lower case, with each run of characters
that are not a letter or a digit replaced
+ by `-`. The entries of a backported change have the same title in every
guide, so they share the id (see
Review Comment:
Fixed in 11b342cc. The slug rule now says it: runs of characters that are
not `a-z0-9` become one `-`, with none at the start or the end, and no maximum
length. The id also gets the release as a prefix (`4.22.3/...`), and a
duplicate title in one section gets `-2`. There is an override for backports:
an AsciiDoc comment under the heading, `// upgrade-guide-change: <id>`. It does
not change the anchor, which an explicit `[[id]]` would. An entry that matches
nothing is its own change, so a tool lists one entry too many rather than one
too few.
_Claude Code on behalf of Claus Ibsen_
##########
design/upgrade-guides-as-data.adoc:
##########
@@ -0,0 +1,435 @@
+---
+title: Upgrade guides as data in the Camel catalog
+authors:
+ - "@davsclaus"
+reviewers: []
+approvers: []
+creation-date: 2026-11-21
+last-updated: 2026-11-21
+status: proposed
+see-also:
+ - "CAMEL-27352"
+ - "CAMEL-27351"
+replaces: []
+superseded-by: []
+---
+
+== Summary
+
+The upgrade guides
(`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_*.adoc`) are
written for people
+who read them on the website, one page per minor release. A tool that helps
with an upgrade needs the same content
+as data: the entries that apply between the version in use and the target, the
components each entry is about,
+whether it is a removal or a deprecation, and a link to the entry on the
website.
+
+This proposal adds a build step that turns the guides into JSON, one entry per
change, and ships the JSON in
+`camel-catalog`, as the catalog already ships the Camel releases and the
security advisories:
+
+[source,json]
+----
+{
+ "id": "camel-ftp-sftp-uses-remote-file-and-directory-names-as-given",
+ "guide": "4.22",
+ "from": "4.22.2",
+ "to": "4.22.3",
+ "title": "camel-ftp - sftp uses remote file and directory names as given",
+ "components": ["camel-ftp"],
+ "kind": "change",
+ "breaking": false,
+ "summary": "The sftp component now uses a remote file or directory name
exactly as given, also when it contains * or ?.",
+ "text": "...the entry, as Markdown...",
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html#_camel_ftp_sftp_uses_remote_file_and_directory_names_as_given"
+}
+----
+
+The AsciiDoc stays the source. Guide authors write it as they do today. Checks
in the build find the mistakes of the
+guides, which are fixed in the guides, so the JSON is as accurate as the
guides can be made. The document also defines the rule for
+choosing the entries of an upgrade from one version to another, so every tool
lists the same entries.
+
+The point is that the format is shared. The Camel CLI, the MCP server, an IDE
plugin, Camel Kit or a tool nobody has
+written yet can each build their own upgrade help on the same data. None of
them has to parse AsciiDoc.
+
+== Motivation
+
+Today a tool that wants the guides parses the AsciiDoc itself:
+
+- The MCP server (`camel-jbang-mcp`) copies the guide files into its JAR at
build time (`copy-migration-guides` in
+ its `pom.xml`). `MigrationData` splits them into sections at the `==` and
`===` headings, and searches them with
+ BM25 for `camel_migration_guide_search`. It does not know which component an
entry is about, or whether an entry
+ of a patch release is already in the version in use.
+- The upgrade view planned in CAMEL-27352 (the Camel CLI `camel update check`
and a screen of the Camel TUI) needs the
+ entries between two versions, per component, so it can show only the entries
that touch the components the
+ integration uses. The guides are not in the CLI, so it would have to parse
them again.
+- The https://github.com/apache/camel-upgrade-recipes/[Camel Upgrade Recipes]
automate part of a migration. They
+ would gain from knowing which guide entries a recipe covers, so a tool can
say "this entry is done for you, these
+ you do by hand".
+- An IDE plugin, Karavan or Camel Kit would each write a third, fourth and
fifth parser.
+
+Each parser has its own idea of where an entry starts and ends, which version
it belongs to, and which component it is
+about. The guides have more structure than a quick parser sees:
+
+- A guide has a `==` section per release: the minor release (`== Upgrading
Camel 4.21 to 4.22`) and the patch
+ releases of an LTS line (`== Upgrading from 4.22.2 to 4.22.3`). Some guides
also have a `==` section that is not a
+ release (`== Camel Spring Boot`, `== Removed deprecated components`).
+- An entry is usually a `===` heading, but the 4.23 guide groups its entries
under `=== Breaking Changes` and
+ `=== Deprecated Components and Features`, with an entry per `====` heading.
+- A change that is backported has an entry in each line it went into: the 4.18
guide, the 4.22 guide, and the minor
+ guide of the release where it landed on main. A tool that lists all three
tells the user the same thing three
+ times. A tool that lists the minor entry to a user who already has the
backport tells them about a change they have.
+
+A parser in the catalog build, run once, with tests and with warnings when a
guide does not fit the rules, is better
+than one per tool.
+
+== Goals
+
+- One JSON entry per change, with the release that brings it, the components
it is about, its kind and a link to the
+ website.
+- A written rule for which entries apply to an upgrade from version A to
version B, including patch releases and
+ backports, which every tool follows.
+- The JSON in `camel-catalog`, read through `CamelCatalog`, and as plain files
in the JAR for a tool that is not
+ written in Java.
+- Data as accurate as we can make it: checks in the build that find the
mistakes of the guides (a section in the wrong
+ guide, a missing patch release, a backport with no entry on the minor
guide), a pass that fixes the ones there are
+ today, and a strict build afterwards, so the guides stay correct for the
website as well as for the JSON.
+
+== Non-goals
+
+- Changing the code of a project. That is the job of the Camel Upgrade Recipes
and `camel update run`.
+- A new authoring format. The guides stay AsciiDoc, written as today. The
conventions in
+ <<Conventions for guide authors>> are the ones most entries follow already.
+- The upgrade view itself (CAMEL-27352). It is one user of the data, not part
of this design.
+- The guides of Camel Spring Boot and Camel Quarkus, which live in their own
repositories. They can produce the same
+ format later (see <<Open questions>>).
+
+== Proposal
+
+=== The files
+
+A new goal of `camel-package-maven-plugin`, `prepare-upgrade-guides`, runs in
the normal `camel-catalog` build, next to
+`prepare-catalog`. Unlike the releases and the advisories, which are synced
from camel-website by a profile, the
+guides live in this repository, so the JSON is generated in every build and
committed like the other generated
+catalog files:
+
+----
+catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/upgrade-guides/
+ index.json
+ camel-4x-upgrade-guide-4_1.json
+ ...
+ camel-4x-upgrade-guide-4_24.json
+----
+
+`index.json` lists the guides:
+
+[source,json]
+----
+{
+ "schemaVersion": 1,
+ "guides": [
+ {
+ "guide": "4.22",
+ "file": "camel-4x-upgrade-guide-4_22.json",
+ "title": "Upgrade guide 4.21 -> 4.22 LTS",
+ "lts": true,
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html",
+ "sections": [
+ { "from": "4.22.2", "to": "4.22.3" },
+ { "from": "4.22.1", "to": "4.22.2" },
+ { "from": "4.22.0", "to": "4.22.1" },
+ { "from": "4.21", "to": "4.22" }
+ ],
+ "entries": 214
+ }
+ ]
+}
+----
+
+Each guide file is a JSON array of entries. The 4.x guides are 2 MB of
AsciiDoc. As JSON with Markdown text they are
+about the same size, and about 600 KB compressed in the JAR.
+
+=== The entry
+
+[cols="1,1,4"]
+|===
+| Field | Type | What it is
+
+| `id`
+| string
+| The id of the change: the title, lower case, with each run of characters
that are not a letter or a digit replaced
+ by `-`. The entries of a backported change have the same title in every
guide, so they share the id (see
+ <<Which entries apply to an upgrade>>).
+
+| `guide`
+| string
+| The minor version of the guide the entry is in: `4.22`.
+
+| `from`, `to`
+| string
+| The `==` section the entry is in. For a minor section `4.21` and `4.22`, for
a patch section `4.22.2` and
+ `4.22.3`. A `==` section that is not a release (`== Camel Spring Boot`)
belongs to the minor release of its guide.
+
+| `title`
+| string
+| The heading of the entry, as written.
+
+| `group`
+| string, optional
+| The `===` heading an entry is grouped under, when the entry is a `====`
heading: `Breaking Changes`,
+ `camel-core - Enterprise Integration Patterns (EIPs)`.
+
+| `components`
+| array of strings
+| The Maven artifact ids the entry is about: `camel-ftp`, `camel-core`,
`camel-yaml-dsl`. Empty for a general entry
+ (Java DSL, EIPs, Spring Boot).
+
+| `eips`
+| array of strings, optional
+| The EIPs an entry is about, by their model name (`split`, `recipientList`),
when the heading names them:
+ `=== Recipient List, Split and Multicast EIP`.
+
+| `kind`
+| string
+| `change`, `deprecation` or `removal`.
+
+| `breaking`
+| boolean
+| `true` when the heading or its group says it is a breaking change
(`(Breaking change)`, `- potential breaking change`,
+ `=== Breaking Changes`).
+
+| `summary`
+| string
+| The first sentence of the entry, as plain text: for a list, a table or a
one-line view.
+
+| `text`
+| string
+| The whole entry, as Markdown (see <<The text>>).
+
+| `url`
+| string
+| The entry on the website: the page of the guide and the anchor of the
heading.
+|===
+
+New fields can be added in a later version of the format. A tool ignores the
fields it does not know. A change that
+breaks a reader increases `schemaVersion`.
+
+=== From AsciiDoc to entries
+
+The goal reads each guide line by line, as `MigrationData` does today, and
skips the content of delimited blocks
+(`----`, `....`, `====`, `|===`), so a heading inside an example is not taken
for one.
+
+Sections::
+* `== Upgrading Camel X.Y to X.Z` is a minor section, `from` X.Y and `to` X.Z.
+* `== Upgrading from X.Y.A to X.Y.B` is a patch section. The versions are as
written: `4.18.1 to 4.18.3` skips 4.18.2,
+ which was not released.
+* Any other `==` section belongs to the minor release of the guide.
+
+Entries::
+* A `===` heading with no `====` heading under it is one entry.
+* A `===` heading with `====` headings under it is a group. Each `====`
heading is an entry, with the `===` heading as
+ its `group`. The text between the `===` heading and the first `====`
heading, if any, is one more entry, titled as
+ the group.
+* The list under `Removed deprecated components` (as a `==` or a `===`
heading) gives one entry of kind `removal` per
+ component in the list.
+
+Components::
+* The part of the heading before ` - ` or ` (` is split at `,`, `/` and ` and
`. Each part that is a Maven artifact id of
+ this repository is a component of the entry: `=== camel-file / camel-aws2-s3
/ camel-ibm-cos` names three.
+* A small alias file maps names that are not artifact ids: `camel-jbang` to
the Camel CLI artifacts, `camel-sftp` and
+ `camel-ftps` to `camel-ftp`, `camel-cxf` to `camel-cxf-soap` and
`camel-cxf-rest`. A removed component (`camel-irc`,
+ `camel-ironmq`) is not an artifact any more: its name is kept as written, as
it is the name a project that still
+ uses it has in its `pom.xml`.
+* An entry of a group with no component in its own heading gets the components
of the group heading:
+ `==== Split EIP - ...` under `=== camel-core - Enterprise Integration
Patterns (EIPs)` is about `camel-core`.
+
+Kind::
+* `removal` for a heading or group with `(Removal)`, `Removed`, or the list of
removed components.
+* `deprecation` for a heading or group with `(Deprecation)`, `(deprecated)`,
`Deprecated` or ending in `deprecated`.
+* `change` for all other entries.
+
+URL::
+The anchor is the id Asciidoctor gives the heading on the website: `_` and the
title in lower case, with the characters
+that are not a letter, a digit, a space, `-` or `.` removed, and each space,
`-` or `.` replaced by `_`. A second
+heading with the same title on the page gets `_2`, as the second `===
camel-kafka` of the 4.19 guide does. A test
+checks the goal against the ids of a guide rendered with Asciidoctor.
+
+The goal does not use a full AsciiDoc parser. The guides use a small part of
AsciiDoc (headings, lists, source
+blocks, tables, admonitions, `xref:`), and the line reader that
`MigrationData` uses has worked on all of them.
+
+=== The text
+
+`text` is the entry as Markdown: a source block becomes a fenced code block
with its language, an admonition a quote
+starting with `**NOTE:**`, an `xref:` a link to the page on the website, and a
table a GitHub table. A table that has
+blocks inside a cell (lists, code), which Markdown tables cannot hold, is kept
as a preformatted block of the
+AsciiDoc. Today the 4.x guides have 294 source blocks, 121 tables, 51
admonitions and 88 `xref:` links.
+
+Markdown reads well in a terminal, in an IDE tooltip and in a prompt for an
AI, and most tools can render it. The
+alternative, the raw AsciiDoc, is in <<Open questions>>.
+
+=== Which entries apply to an upgrade
+
+This is the rule every tool follows, so `camel update check`, the MCP server
and an IDE plugin agree on what an
+upgrade from version A to version B brings.
+
+A version `V` on the line `L` (its major and minor: `4.18.2` is on the line
`4.18`) *has* an entry `e` when:
+
+* `e` is in a minor section and `e.to` is `L` or older, or
+* `e` is in a patch section of the guide of `L` and `e.to` is `V` or older.
+
+The entries of an upgrade from `A` to `B` are the entries `B` has whose `id`
no entry of `A` has. When several of them
+share an `id`, the one of the guide of `B`'s line is listed, else the one of
the oldest minor section.
Review Comment:
Thanks, this one led to a real flaw. The id was the title alone, so two
different changes titled `=== camel-kafka` in different minor guides shared an
id. The rule would then have hidden the 4.21 entry from a user coming from 4.19
(246 minor entries share their title with another guide). Fixed in 11b342cc:
every entry has a unique `id` (release + slug), and patch entries carry a
`change`, the id of the minor entry they backport. A change has one minor entry
and at most one patch entry per line, so the tie-break is gone. The entry of
the target's line is listed, else the minor entry.
_Claude Code on behalf of Claus Ibsen_
##########
design/upgrade-guides-as-data.adoc:
##########
@@ -0,0 +1,435 @@
+---
+title: Upgrade guides as data in the Camel catalog
+authors:
+ - "@davsclaus"
+reviewers: []
+approvers: []
+creation-date: 2026-11-21
+last-updated: 2026-11-21
+status: proposed
+see-also:
+ - "CAMEL-27352"
+ - "CAMEL-27351"
+replaces: []
+superseded-by: []
+---
+
+== Summary
+
+The upgrade guides
(`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_*.adoc`) are
written for people
+who read them on the website, one page per minor release. A tool that helps
with an upgrade needs the same content
+as data: the entries that apply between the version in use and the target, the
components each entry is about,
+whether it is a removal or a deprecation, and a link to the entry on the
website.
+
+This proposal adds a build step that turns the guides into JSON, one entry per
change, and ships the JSON in
+`camel-catalog`, as the catalog already ships the Camel releases and the
security advisories:
+
+[source,json]
+----
+{
+ "id": "camel-ftp-sftp-uses-remote-file-and-directory-names-as-given",
+ "guide": "4.22",
+ "from": "4.22.2",
+ "to": "4.22.3",
+ "title": "camel-ftp - sftp uses remote file and directory names as given",
+ "components": ["camel-ftp"],
+ "kind": "change",
+ "breaking": false,
+ "summary": "The sftp component now uses a remote file or directory name
exactly as given, also when it contains * or ?.",
+ "text": "...the entry, as Markdown...",
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html#_camel_ftp_sftp_uses_remote_file_and_directory_names_as_given"
+}
+----
+
+The AsciiDoc stays the source. Guide authors write it as they do today. Checks
in the build find the mistakes of the
+guides, which are fixed in the guides, so the JSON is as accurate as the
guides can be made. The document also defines the rule for
+choosing the entries of an upgrade from one version to another, so every tool
lists the same entries.
+
+The point is that the format is shared. The Camel CLI, the MCP server, an IDE
plugin, Camel Kit or a tool nobody has
+written yet can each build their own upgrade help on the same data. None of
them has to parse AsciiDoc.
+
+== Motivation
+
+Today a tool that wants the guides parses the AsciiDoc itself:
+
+- The MCP server (`camel-jbang-mcp`) copies the guide files into its JAR at
build time (`copy-migration-guides` in
+ its `pom.xml`). `MigrationData` splits them into sections at the `==` and
`===` headings, and searches them with
+ BM25 for `camel_migration_guide_search`. It does not know which component an
entry is about, or whether an entry
+ of a patch release is already in the version in use.
+- The upgrade view planned in CAMEL-27352 (the Camel CLI `camel update check`
and a screen of the Camel TUI) needs the
+ entries between two versions, per component, so it can show only the entries
that touch the components the
+ integration uses. The guides are not in the CLI, so it would have to parse
them again.
+- The https://github.com/apache/camel-upgrade-recipes/[Camel Upgrade Recipes]
automate part of a migration. They
+ would gain from knowing which guide entries a recipe covers, so a tool can
say "this entry is done for you, these
+ you do by hand".
+- An IDE plugin, Karavan or Camel Kit would each write a third, fourth and
fifth parser.
+
+Each parser has its own idea of where an entry starts and ends, which version
it belongs to, and which component it is
+about. The guides have more structure than a quick parser sees:
+
+- A guide has a `==` section per release: the minor release (`== Upgrading
Camel 4.21 to 4.22`) and the patch
+ releases of an LTS line (`== Upgrading from 4.22.2 to 4.22.3`). Some guides
also have a `==` section that is not a
+ release (`== Camel Spring Boot`, `== Removed deprecated components`).
+- An entry is usually a `===` heading, but the 4.23 guide groups its entries
under `=== Breaking Changes` and
+ `=== Deprecated Components and Features`, with an entry per `====` heading.
+- A change that is backported has an entry in each line it went into: the 4.18
guide, the 4.22 guide, and the minor
+ guide of the release where it landed on main. A tool that lists all three
tells the user the same thing three
+ times. A tool that lists the minor entry to a user who already has the
backport tells them about a change they have.
+
+A parser in the catalog build, run once, with tests and with warnings when a
guide does not fit the rules, is better
+than one per tool.
+
+== Goals
+
+- One JSON entry per change, with the release that brings it, the components
it is about, its kind and a link to the
+ website.
+- A written rule for which entries apply to an upgrade from version A to
version B, including patch releases and
+ backports, which every tool follows.
+- The JSON in `camel-catalog`, read through `CamelCatalog`, and as plain files
in the JAR for a tool that is not
+ written in Java.
+- Data as accurate as we can make it: checks in the build that find the
mistakes of the guides (a section in the wrong
+ guide, a missing patch release, a backport with no entry on the minor
guide), a pass that fixes the ones there are
+ today, and a strict build afterwards, so the guides stay correct for the
website as well as for the JSON.
+
+== Non-goals
+
+- Changing the code of a project. That is the job of the Camel Upgrade Recipes
and `camel update run`.
+- A new authoring format. The guides stay AsciiDoc, written as today. The
conventions in
+ <<Conventions for guide authors>> are the ones most entries follow already.
+- The upgrade view itself (CAMEL-27352). It is one user of the data, not part
of this design.
+- The guides of Camel Spring Boot and Camel Quarkus, which live in their own
repositories. They can produce the same
+ format later (see <<Open questions>>).
+
+== Proposal
+
+=== The files
+
+A new goal of `camel-package-maven-plugin`, `prepare-upgrade-guides`, runs in
the normal `camel-catalog` build, next to
+`prepare-catalog`. Unlike the releases and the advisories, which are synced
from camel-website by a profile, the
+guides live in this repository, so the JSON is generated in every build and
committed like the other generated
+catalog files:
+
+----
+catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/upgrade-guides/
+ index.json
+ camel-4x-upgrade-guide-4_1.json
+ ...
+ camel-4x-upgrade-guide-4_24.json
+----
+
+`index.json` lists the guides:
+
+[source,json]
+----
+{
+ "schemaVersion": 1,
+ "guides": [
+ {
+ "guide": "4.22",
+ "file": "camel-4x-upgrade-guide-4_22.json",
+ "title": "Upgrade guide 4.21 -> 4.22 LTS",
+ "lts": true,
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html",
+ "sections": [
+ { "from": "4.22.2", "to": "4.22.3" },
+ { "from": "4.22.1", "to": "4.22.2" },
+ { "from": "4.22.0", "to": "4.22.1" },
+ { "from": "4.21", "to": "4.22" }
+ ],
+ "entries": 214
+ }
+ ]
+}
+----
+
+Each guide file is a JSON array of entries. The 4.x guides are 2 MB of
AsciiDoc. As JSON with Markdown text they are
+about the same size, and about 600 KB compressed in the JAR.
+
+=== The entry
+
+[cols="1,1,4"]
+|===
+| Field | Type | What it is
+
+| `id`
+| string
+| The id of the change: the title, lower case, with each run of characters
that are not a letter or a digit replaced
+ by `-`. The entries of a backported change have the same title in every
guide, so they share the id (see
+ <<Which entries apply to an upgrade>>).
+
+| `guide`
+| string
+| The minor version of the guide the entry is in: `4.22`.
+
+| `from`, `to`
+| string
+| The `==` section the entry is in. For a minor section `4.21` and `4.22`, for
a patch section `4.22.2` and
+ `4.22.3`. A `==` section that is not a release (`== Camel Spring Boot`)
belongs to the minor release of its guide.
+
+| `title`
+| string
+| The heading of the entry, as written.
+
+| `group`
+| string, optional
+| The `===` heading an entry is grouped under, when the entry is a `====`
heading: `Breaking Changes`,
+ `camel-core - Enterprise Integration Patterns (EIPs)`.
+
+| `components`
+| array of strings
+| The Maven artifact ids the entry is about: `camel-ftp`, `camel-core`,
`camel-yaml-dsl`. Empty for a general entry
+ (Java DSL, EIPs, Spring Boot).
+
+| `eips`
+| array of strings, optional
+| The EIPs an entry is about, by their model name (`split`, `recipientList`),
when the heading names them:
+ `=== Recipient List, Split and Multicast EIP`.
+
+| `kind`
+| string
+| `change`, `deprecation` or `removal`.
Review Comment:
Stated explicitly in 11b342cc. A rename is a `change`, with the old and new
names in the text. There is no `addition`, because the upgrade guides are for
migration only (the upgrade guide rule in CLAUDE.md), so an entry about a new
feature is a `change` too.
_Claude Code on behalf of Claus Ibsen_
##########
design/upgrade-guides-as-data.adoc:
##########
@@ -0,0 +1,435 @@
+---
+title: Upgrade guides as data in the Camel catalog
+authors:
+ - "@davsclaus"
+reviewers: []
+approvers: []
+creation-date: 2026-11-21
+last-updated: 2026-11-21
+status: proposed
+see-also:
+ - "CAMEL-27352"
+ - "CAMEL-27351"
+replaces: []
+superseded-by: []
+---
+
+== Summary
+
+The upgrade guides
(`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_*.adoc`) are
written for people
+who read them on the website, one page per minor release. A tool that helps
with an upgrade needs the same content
+as data: the entries that apply between the version in use and the target, the
components each entry is about,
+whether it is a removal or a deprecation, and a link to the entry on the
website.
+
+This proposal adds a build step that turns the guides into JSON, one entry per
change, and ships the JSON in
+`camel-catalog`, as the catalog already ships the Camel releases and the
security advisories:
+
+[source,json]
+----
+{
+ "id": "camel-ftp-sftp-uses-remote-file-and-directory-names-as-given",
+ "guide": "4.22",
+ "from": "4.22.2",
+ "to": "4.22.3",
+ "title": "camel-ftp - sftp uses remote file and directory names as given",
+ "components": ["camel-ftp"],
+ "kind": "change",
+ "breaking": false,
+ "summary": "The sftp component now uses a remote file or directory name
exactly as given, also when it contains * or ?.",
+ "text": "...the entry, as Markdown...",
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html#_camel_ftp_sftp_uses_remote_file_and_directory_names_as_given"
+}
+----
+
+The AsciiDoc stays the source. Guide authors write it as they do today. Checks
in the build find the mistakes of the
+guides, which are fixed in the guides, so the JSON is as accurate as the
guides can be made. The document also defines the rule for
+choosing the entries of an upgrade from one version to another, so every tool
lists the same entries.
+
+The point is that the format is shared. The Camel CLI, the MCP server, an IDE
plugin, Camel Kit or a tool nobody has
+written yet can each build their own upgrade help on the same data. None of
them has to parse AsciiDoc.
+
+== Motivation
+
+Today a tool that wants the guides parses the AsciiDoc itself:
+
+- The MCP server (`camel-jbang-mcp`) copies the guide files into its JAR at
build time (`copy-migration-guides` in
+ its `pom.xml`). `MigrationData` splits them into sections at the `==` and
`===` headings, and searches them with
+ BM25 for `camel_migration_guide_search`. It does not know which component an
entry is about, or whether an entry
+ of a patch release is already in the version in use.
+- The upgrade view planned in CAMEL-27352 (the Camel CLI `camel update check`
and a screen of the Camel TUI) needs the
+ entries between two versions, per component, so it can show only the entries
that touch the components the
+ integration uses. The guides are not in the CLI, so it would have to parse
them again.
+- The https://github.com/apache/camel-upgrade-recipes/[Camel Upgrade Recipes]
automate part of a migration. They
+ would gain from knowing which guide entries a recipe covers, so a tool can
say "this entry is done for you, these
+ you do by hand".
+- An IDE plugin, Karavan or Camel Kit would each write a third, fourth and
fifth parser.
+
+Each parser has its own idea of where an entry starts and ends, which version
it belongs to, and which component it is
+about. The guides have more structure than a quick parser sees:
+
+- A guide has a `==` section per release: the minor release (`== Upgrading
Camel 4.21 to 4.22`) and the patch
+ releases of an LTS line (`== Upgrading from 4.22.2 to 4.22.3`). Some guides
also have a `==` section that is not a
+ release (`== Camel Spring Boot`, `== Removed deprecated components`).
+- An entry is usually a `===` heading, but the 4.23 guide groups its entries
under `=== Breaking Changes` and
+ `=== Deprecated Components and Features`, with an entry per `====` heading.
+- A change that is backported has an entry in each line it went into: the 4.18
guide, the 4.22 guide, and the minor
+ guide of the release where it landed on main. A tool that lists all three
tells the user the same thing three
+ times. A tool that lists the minor entry to a user who already has the
backport tells them about a change they have.
+
+A parser in the catalog build, run once, with tests and with warnings when a
guide does not fit the rules, is better
+than one per tool.
+
+== Goals
+
+- One JSON entry per change, with the release that brings it, the components
it is about, its kind and a link to the
+ website.
+- A written rule for which entries apply to an upgrade from version A to
version B, including patch releases and
+ backports, which every tool follows.
+- The JSON in `camel-catalog`, read through `CamelCatalog`, and as plain files
in the JAR for a tool that is not
+ written in Java.
+- Data as accurate as we can make it: checks in the build that find the
mistakes of the guides (a section in the wrong
+ guide, a missing patch release, a backport with no entry on the minor
guide), a pass that fixes the ones there are
+ today, and a strict build afterwards, so the guides stay correct for the
website as well as for the JSON.
+
+== Non-goals
+
+- Changing the code of a project. That is the job of the Camel Upgrade Recipes
and `camel update run`.
+- A new authoring format. The guides stay AsciiDoc, written as today. The
conventions in
+ <<Conventions for guide authors>> are the ones most entries follow already.
+- The upgrade view itself (CAMEL-27352). It is one user of the data, not part
of this design.
+- The guides of Camel Spring Boot and Camel Quarkus, which live in their own
repositories. They can produce the same
+ format later (see <<Open questions>>).
+
+== Proposal
+
+=== The files
+
+A new goal of `camel-package-maven-plugin`, `prepare-upgrade-guides`, runs in
the normal `camel-catalog` build, next to
+`prepare-catalog`. Unlike the releases and the advisories, which are synced
from camel-website by a profile, the
+guides live in this repository, so the JSON is generated in every build and
committed like the other generated
+catalog files:
+
+----
+catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/upgrade-guides/
+ index.json
+ camel-4x-upgrade-guide-4_1.json
+ ...
+ camel-4x-upgrade-guide-4_24.json
+----
+
+`index.json` lists the guides:
+
+[source,json]
+----
+{
+ "schemaVersion": 1,
+ "guides": [
+ {
+ "guide": "4.22",
+ "file": "camel-4x-upgrade-guide-4_22.json",
+ "title": "Upgrade guide 4.21 -> 4.22 LTS",
+ "lts": true,
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html",
+ "sections": [
+ { "from": "4.22.2", "to": "4.22.3" },
+ { "from": "4.22.1", "to": "4.22.2" },
+ { "from": "4.22.0", "to": "4.22.1" },
+ { "from": "4.21", "to": "4.22" }
+ ],
+ "entries": 214
+ }
+ ]
+}
+----
+
+Each guide file is a JSON array of entries. The 4.x guides are 2 MB of
AsciiDoc. As JSON with Markdown text they are
+about the same size, and about 600 KB compressed in the JAR.
+
+=== The entry
+
+[cols="1,1,4"]
+|===
+| Field | Type | What it is
+
+| `id`
+| string
+| The id of the change: the title, lower case, with each run of characters
that are not a letter or a digit replaced
+ by `-`. The entries of a backported change have the same title in every
guide, so they share the id (see
+ <<Which entries apply to an upgrade>>).
+
+| `guide`
+| string
+| The minor version of the guide the entry is in: `4.22`.
+
+| `from`, `to`
+| string
+| The `==` section the entry is in. For a minor section `4.21` and `4.22`, for
a patch section `4.22.2` and
+ `4.22.3`. A `==` section that is not a release (`== Camel Spring Boot`)
belongs to the minor release of its guide.
+
+| `title`
+| string
+| The heading of the entry, as written.
+
+| `group`
+| string, optional
+| The `===` heading an entry is grouped under, when the entry is a `====`
heading: `Breaking Changes`,
+ `camel-core - Enterprise Integration Patterns (EIPs)`.
+
+| `components`
+| array of strings
+| The Maven artifact ids the entry is about: `camel-ftp`, `camel-core`,
`camel-yaml-dsl`. Empty for a general entry
+ (Java DSL, EIPs, Spring Boot).
+
+| `eips`
+| array of strings, optional
+| The EIPs an entry is about, by their model name (`split`, `recipientList`),
when the heading names them:
+ `=== Recipient List, Split and Multicast EIP`.
+
+| `kind`
+| string
+| `change`, `deprecation` or `removal`.
+
+| `breaking`
+| boolean
+| `true` when the heading or its group says it is a breaking change
(`(Breaking change)`, `- potential breaking change`,
+ `=== Breaking Changes`).
+
+| `summary`
+| string
+| The first sentence of the entry, as plain text: for a list, a table or a
one-line view.
+
+| `text`
+| string
+| The whole entry, as Markdown (see <<The text>>).
+
+| `url`
+| string
+| The entry on the website: the page of the guide and the anchor of the
heading.
+|===
+
+New fields can be added in a later version of the format. A tool ignores the
fields it does not know. A change that
+breaks a reader increases `schemaVersion`.
+
+=== From AsciiDoc to entries
+
+The goal reads each guide line by line, as `MigrationData` does today, and
skips the content of delimited blocks
+(`----`, `....`, `====`, `|===`), so a heading inside an example is not taken
for one.
+
+Sections::
+* `== Upgrading Camel X.Y to X.Z` is a minor section, `from` X.Y and `to` X.Z.
+* `== Upgrading from X.Y.A to X.Y.B` is a patch section. The versions are as
written: `4.18.1 to 4.18.3` skips 4.18.2,
+ which was not released.
+* Any other `==` section belongs to the minor release of the guide.
+
+Entries::
+* A `===` heading with no `====` heading under it is one entry.
+* A `===` heading with `====` headings under it is a group. Each `====`
heading is an entry, with the `===` heading as
+ its `group`. The text between the `===` heading and the first `====`
heading, if any, is one more entry, titled as
+ the group.
+* The list under `Removed deprecated components` (as a `==` or a `===`
heading) gives one entry of kind `removal` per
+ component in the list.
+
+Components::
+* The part of the heading before ` - ` or ` (` is split at `,`, `/` and ` and
`. Each part that is a Maven artifact id of
+ this repository is a component of the entry: `=== camel-file / camel-aws2-s3
/ camel-ibm-cos` names three.
+* A small alias file maps names that are not artifact ids: `camel-jbang` to
the Camel CLI artifacts, `camel-sftp` and
+ `camel-ftps` to `camel-ftp`, `camel-cxf` to `camel-cxf-soap` and
`camel-cxf-rest`. A removed component (`camel-irc`,
+ `camel-ironmq`) is not an artifact any more: its name is kept as written, as
it is the name a project that still
+ uses it has in its `pom.xml`.
+* An entry of a group with no component in its own heading gets the components
of the group heading:
+ `==== Split EIP - ...` under `=== camel-core - Enterprise Integration
Patterns (EIPs)` is about `camel-core`.
+
+Kind::
+* `removal` for a heading or group with `(Removal)`, `Removed`, or the list of
removed components.
+* `deprecation` for a heading or group with `(Deprecation)`, `(deprecated)`,
`Deprecated` or ending in `deprecated`.
+* `change` for all other entries.
+
+URL::
+The anchor is the id Asciidoctor gives the heading on the website: `_` and the
title in lower case, with the characters
+that are not a letter, a digit, a space, `-` or `.` removed, and each space,
`-` or `.` replaced by `_`. A second
+heading with the same title on the page gets `_2`, as the second `===
camel-kafka` of the 4.19 guide does. A test
+checks the goal against the ids of a guide rendered with Asciidoctor.
+
+The goal does not use a full AsciiDoc parser. The guides use a small part of
AsciiDoc (headings, lists, source
+blocks, tables, admonitions, `xref:`), and the line reader that
`MigrationData` uses has worked on all of them.
+
+=== The text
+
+`text` is the entry as Markdown: a source block becomes a fenced code block
with its language, an admonition a quote
+starting with `**NOTE:**`, an `xref:` a link to the page on the website, and a
table a GitHub table. A table that has
+blocks inside a cell (lists, code), which Markdown tables cannot hold, is kept
as a preformatted block of the
+AsciiDoc. Today the 4.x guides have 294 source blocks, 121 tables, 51
admonitions and 88 `xref:` links.
Review Comment:
Done differently in 11b342cc, without a new field. A complex table becomes a
fenced code block with the language `asciidoc`, so `text` is always Markdown,
and the exception is marked the way Markdown marks any code.
_Claude Code on behalf of Claus Ibsen_
##########
design/upgrade-guides-as-data.adoc:
##########
@@ -0,0 +1,435 @@
+---
+title: Upgrade guides as data in the Camel catalog
+authors:
+ - "@davsclaus"
+reviewers: []
+approvers: []
+creation-date: 2026-11-21
+last-updated: 2026-11-21
+status: proposed
+see-also:
+ - "CAMEL-27352"
+ - "CAMEL-27351"
+replaces: []
+superseded-by: []
+---
+
+== Summary
+
+The upgrade guides
(`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_*.adoc`) are
written for people
+who read them on the website, one page per minor release. A tool that helps
with an upgrade needs the same content
+as data: the entries that apply between the version in use and the target, the
components each entry is about,
+whether it is a removal or a deprecation, and a link to the entry on the
website.
+
+This proposal adds a build step that turns the guides into JSON, one entry per
change, and ships the JSON in
+`camel-catalog`, as the catalog already ships the Camel releases and the
security advisories:
+
+[source,json]
+----
+{
+ "id": "camel-ftp-sftp-uses-remote-file-and-directory-names-as-given",
+ "guide": "4.22",
+ "from": "4.22.2",
+ "to": "4.22.3",
+ "title": "camel-ftp - sftp uses remote file and directory names as given",
+ "components": ["camel-ftp"],
+ "kind": "change",
+ "breaking": false,
+ "summary": "The sftp component now uses a remote file or directory name
exactly as given, also when it contains * or ?.",
+ "text": "...the entry, as Markdown...",
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html#_camel_ftp_sftp_uses_remote_file_and_directory_names_as_given"
+}
+----
+
+The AsciiDoc stays the source. Guide authors write it as they do today. Checks
in the build find the mistakes of the
+guides, which are fixed in the guides, so the JSON is as accurate as the
guides can be made. The document also defines the rule for
+choosing the entries of an upgrade from one version to another, so every tool
lists the same entries.
+
+The point is that the format is shared. The Camel CLI, the MCP server, an IDE
plugin, Camel Kit or a tool nobody has
+written yet can each build their own upgrade help on the same data. None of
them has to parse AsciiDoc.
+
+== Motivation
+
+Today a tool that wants the guides parses the AsciiDoc itself:
+
+- The MCP server (`camel-jbang-mcp`) copies the guide files into its JAR at
build time (`copy-migration-guides` in
+ its `pom.xml`). `MigrationData` splits them into sections at the `==` and
`===` headings, and searches them with
+ BM25 for `camel_migration_guide_search`. It does not know which component an
entry is about, or whether an entry
+ of a patch release is already in the version in use.
+- The upgrade view planned in CAMEL-27352 (the Camel CLI `camel update check`
and a screen of the Camel TUI) needs the
+ entries between two versions, per component, so it can show only the entries
that touch the components the
+ integration uses. The guides are not in the CLI, so it would have to parse
them again.
+- The https://github.com/apache/camel-upgrade-recipes/[Camel Upgrade Recipes]
automate part of a migration. They
+ would gain from knowing which guide entries a recipe covers, so a tool can
say "this entry is done for you, these
+ you do by hand".
+- An IDE plugin, Karavan or Camel Kit would each write a third, fourth and
fifth parser.
+
+Each parser has its own idea of where an entry starts and ends, which version
it belongs to, and which component it is
+about. The guides have more structure than a quick parser sees:
+
+- A guide has a `==` section per release: the minor release (`== Upgrading
Camel 4.21 to 4.22`) and the patch
+ releases of an LTS line (`== Upgrading from 4.22.2 to 4.22.3`). Some guides
also have a `==` section that is not a
+ release (`== Camel Spring Boot`, `== Removed deprecated components`).
+- An entry is usually a `===` heading, but the 4.23 guide groups its entries
under `=== Breaking Changes` and
+ `=== Deprecated Components and Features`, with an entry per `====` heading.
+- A change that is backported has an entry in each line it went into: the 4.18
guide, the 4.22 guide, and the minor
+ guide of the release where it landed on main. A tool that lists all three
tells the user the same thing three
+ times. A tool that lists the minor entry to a user who already has the
backport tells them about a change they have.
+
+A parser in the catalog build, run once, with tests and with warnings when a
guide does not fit the rules, is better
+than one per tool.
+
+== Goals
+
+- One JSON entry per change, with the release that brings it, the components
it is about, its kind and a link to the
+ website.
+- A written rule for which entries apply to an upgrade from version A to
version B, including patch releases and
+ backports, which every tool follows.
+- The JSON in `camel-catalog`, read through `CamelCatalog`, and as plain files
in the JAR for a tool that is not
+ written in Java.
+- Data as accurate as we can make it: checks in the build that find the
mistakes of the guides (a section in the wrong
+ guide, a missing patch release, a backport with no entry on the minor
guide), a pass that fixes the ones there are
+ today, and a strict build afterwards, so the guides stay correct for the
website as well as for the JSON.
+
+== Non-goals
+
+- Changing the code of a project. That is the job of the Camel Upgrade Recipes
and `camel update run`.
+- A new authoring format. The guides stay AsciiDoc, written as today. The
conventions in
+ <<Conventions for guide authors>> are the ones most entries follow already.
+- The upgrade view itself (CAMEL-27352). It is one user of the data, not part
of this design.
+- The guides of Camel Spring Boot and Camel Quarkus, which live in their own
repositories. They can produce the same
+ format later (see <<Open questions>>).
+
+== Proposal
+
+=== The files
+
+A new goal of `camel-package-maven-plugin`, `prepare-upgrade-guides`, runs in
the normal `camel-catalog` build, next to
+`prepare-catalog`. Unlike the releases and the advisories, which are synced
from camel-website by a profile, the
+guides live in this repository, so the JSON is generated in every build and
committed like the other generated
+catalog files:
+
+----
+catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/upgrade-guides/
+ index.json
+ camel-4x-upgrade-guide-4_1.json
+ ...
+ camel-4x-upgrade-guide-4_24.json
+----
+
+`index.json` lists the guides:
+
+[source,json]
+----
+{
+ "schemaVersion": 1,
+ "guides": [
+ {
+ "guide": "4.22",
+ "file": "camel-4x-upgrade-guide-4_22.json",
+ "title": "Upgrade guide 4.21 -> 4.22 LTS",
+ "lts": true,
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html",
+ "sections": [
+ { "from": "4.22.2", "to": "4.22.3" },
+ { "from": "4.22.1", "to": "4.22.2" },
+ { "from": "4.22.0", "to": "4.22.1" },
+ { "from": "4.21", "to": "4.22" }
+ ],
+ "entries": 214
+ }
+ ]
+}
+----
+
+Each guide file is a JSON array of entries. The 4.x guides are 2 MB of
AsciiDoc. As JSON with Markdown text they are
+about the same size, and about 600 KB compressed in the JAR.
+
+=== The entry
+
+[cols="1,1,4"]
+|===
+| Field | Type | What it is
+
+| `id`
+| string
+| The id of the change: the title, lower case, with each run of characters
that are not a letter or a digit replaced
+ by `-`. The entries of a backported change have the same title in every
guide, so they share the id (see
+ <<Which entries apply to an upgrade>>).
+
+| `guide`
+| string
+| The minor version of the guide the entry is in: `4.22`.
+
+| `from`, `to`
+| string
+| The `==` section the entry is in. For a minor section `4.21` and `4.22`, for
a patch section `4.22.2` and
+ `4.22.3`. A `==` section that is not a release (`== Camel Spring Boot`)
belongs to the minor release of its guide.
+
+| `title`
+| string
+| The heading of the entry, as written.
+
+| `group`
+| string, optional
+| The `===` heading an entry is grouped under, when the entry is a `====`
heading: `Breaking Changes`,
+ `camel-core - Enterprise Integration Patterns (EIPs)`.
+
+| `components`
+| array of strings
+| The Maven artifact ids the entry is about: `camel-ftp`, `camel-core`,
`camel-yaml-dsl`. Empty for a general entry
+ (Java DSL, EIPs, Spring Boot).
+
+| `eips`
+| array of strings, optional
+| The EIPs an entry is about, by their model name (`split`, `recipientList`),
when the heading names them:
+ `=== Recipient List, Split and Multicast EIP`.
+
+| `kind`
+| string
+| `change`, `deprecation` or `removal`.
+
+| `breaking`
+| boolean
+| `true` when the heading or its group says it is a breaking change
(`(Breaking change)`, `- potential breaking change`,
+ `=== Breaking Changes`).
+
+| `summary`
+| string
+| The first sentence of the entry, as plain text: for a list, a table or a
one-line view.
+
+| `text`
+| string
+| The whole entry, as Markdown (see <<The text>>).
+
+| `url`
+| string
+| The entry on the website: the page of the guide and the anchor of the
heading.
+|===
+
+New fields can be added in a later version of the format. A tool ignores the
fields it does not know. A change that
+breaks a reader increases `schemaVersion`.
+
+=== From AsciiDoc to entries
+
+The goal reads each guide line by line, as `MigrationData` does today, and
skips the content of delimited blocks
+(`----`, `....`, `====`, `|===`), so a heading inside an example is not taken
for one.
+
+Sections::
+* `== Upgrading Camel X.Y to X.Z` is a minor section, `from` X.Y and `to` X.Z.
+* `== Upgrading from X.Y.A to X.Y.B` is a patch section. The versions are as
written: `4.18.1 to 4.18.3` skips 4.18.2,
+ which was not released.
+* Any other `==` section belongs to the minor release of the guide.
+
+Entries::
+* A `===` heading with no `====` heading under it is one entry.
+* A `===` heading with `====` headings under it is a group. Each `====`
heading is an entry, with the `===` heading as
+ its `group`. The text between the `===` heading and the first `====`
heading, if any, is one more entry, titled as
+ the group.
+* The list under `Removed deprecated components` (as a `==` or a `===`
heading) gives one entry of kind `removal` per
+ component in the list.
+
+Components::
+* The part of the heading before ` - ` or ` (` is split at `,`, `/` and ` and
`. Each part that is a Maven artifact id of
+ this repository is a component of the entry: `=== camel-file / camel-aws2-s3
/ camel-ibm-cos` names three.
+* A small alias file maps names that are not artifact ids: `camel-jbang` to
the Camel CLI artifacts, `camel-sftp` and
+ `camel-ftps` to `camel-ftp`, `camel-cxf` to `camel-cxf-soap` and
`camel-cxf-rest`. A removed component (`camel-irc`,
+ `camel-ironmq`) is not an artifact any more: its name is kept as written, as
it is the name a project that still
+ uses it has in its `pom.xml`.
+* An entry of a group with no component in its own heading gets the components
of the group heading:
+ `==== Split EIP - ...` under `=== camel-core - Enterprise Integration
Patterns (EIPs)` is about `camel-core`.
+
+Kind::
+* `removal` for a heading or group with `(Removal)`, `Removed`, or the list of
removed components.
+* `deprecation` for a heading or group with `(Deprecation)`, `(deprecated)`,
`Deprecated` or ending in `deprecated`.
+* `change` for all other entries.
+
+URL::
+The anchor is the id Asciidoctor gives the heading on the website: `_` and the
title in lower case, with the characters
+that are not a letter, a digit, a space, `-` or `.` removed, and each space,
`-` or `.` replaced by `_`. A second
+heading with the same title on the page gets `_2`, as the second `===
camel-kafka` of the 4.19 guide does. A test
+checks the goal against the ids of a guide rendered with Asciidoctor.
+
+The goal does not use a full AsciiDoc parser. The guides use a small part of
AsciiDoc (headings, lists, source
+blocks, tables, admonitions, `xref:`), and the line reader that
`MigrationData` uses has worked on all of them.
+
+=== The text
+
+`text` is the entry as Markdown: a source block becomes a fenced code block
with its language, an admonition a quote
+starting with `**NOTE:**`, an `xref:` a link to the page on the website, and a
table a GitHub table. A table that has
+blocks inside a cell (lists, code), which Markdown tables cannot hold, is kept
as a preformatted block of the
+AsciiDoc. Today the 4.x guides have 294 source blocks, 121 tables, 51
admonitions and 88 `xref:` links.
+
+Markdown reads well in a terminal, in an IDE tooltip and in a prompt for an
AI, and most tools can render it. The
+alternative, the raw AsciiDoc, is in <<Open questions>>.
+
+=== Which entries apply to an upgrade
+
+This is the rule every tool follows, so `camel update check`, the MCP server
and an IDE plugin agree on what an
+upgrade from version A to version B brings.
+
+A version `V` on the line `L` (its major and minor: `4.18.2` is on the line
`4.18`) *has* an entry `e` when:
+
+* `e` is in a minor section and `e.to` is `L` or older, or
+* `e` is in a patch section of the guide of `L` and `e.to` is `V` or older.
+
+The entries of an upgrade from `A` to `B` are the entries `B` has whose `id`
no entry of `A` has. When several of them
+share an `id`, the one of the guide of `B`'s line is listed, else the one of
the oldest minor section.
+
+An example, from 4.18.2 to 4.22.3:
+
+* The entries of the minor sections of 4.19, 4.20, 4.21 and 4.22 are listed.
+* The entries of the patch sections 4.22.0 to 4.22.3 are listed.
+* The entries of the patch sections 4.18.3 to 4.18.6 are not listed for what
they are: they are changes of the 4.18
+ line, and 4.22.3 has them only if they went into 4.22 as well, which its own
entries say.
+* An entry of 4.19 whose change was backported to 4.18.1 is not listed: 4.18.2
has it already, from the 4.18.1 patch
+ section, with the same `id`.
+* `camel-ftp - sftp uses remote file and directory names as given` is in the
4.18.6, 4.22.3 and 4.24 sections. 4.22.3
+ has it and 4.18.2 does not, so it is listed once, with the text of the
4.22.3 entry.
+
+The rule also answers a question an upgrade tool should ask: does `B` lack a
change `A` has? From 4.18.6 to 4.22.2,
+the sftp change above is in `A` and not in `B`, because it went into 4.22.3. A
tool can say "4.22.2 does not have
+this fix from 4.18.6 yet, take 4.22.3".
+
+A downgrade (`B` older than `A`) has no entries. A tool says so instead of
listing nothing.
+
+The `id` works only if the entries of a backported change have the same title
in each guide. Today 273 of the 356
+entries of patch sections have an entry with the same title in a minor
section. The other 83 are listed as their own
+entries (a tool lists one entry too many, not one too few), and the goal warns
about them, so the titles can be
+aligned (see <<Checks in the build>>).
+
+=== Which catalog to read
+
+The entries of an LTS line are added on `main` (the upgrade guide rule of
`CLAUDE.md`), so the newest catalog knows
+the most: the 4.24 catalog has the entries of 4.22.3, and the 4.22.3 catalog
does not have those of 4.22.4. A tool
+reads the catalog it ships with, and loads the catalog of the target version
(`CatalogLoader`) only when the target is
+newer than its own catalog.
Review Comment:
Clarified in 11b342cc: the comparison is by full version, number by number,
so a 4.22.2 catalog with a 4.22.3 target loads the target's catalog. The tool
then uses the entries of both catalogs, one per `id`, the newer catalog first.
_Claude Code on behalf of Claus Ibsen_
##########
design/upgrade-guides-as-data.adoc:
##########
@@ -0,0 +1,435 @@
+---
+title: Upgrade guides as data in the Camel catalog
+authors:
+ - "@davsclaus"
+reviewers: []
+approvers: []
+creation-date: 2026-11-21
+last-updated: 2026-11-21
+status: proposed
+see-also:
+ - "CAMEL-27352"
+ - "CAMEL-27351"
+replaces: []
+superseded-by: []
+---
+
+== Summary
+
+The upgrade guides
(`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_*.adoc`) are
written for people
+who read them on the website, one page per minor release. A tool that helps
with an upgrade needs the same content
+as data: the entries that apply between the version in use and the target, the
components each entry is about,
+whether it is a removal or a deprecation, and a link to the entry on the
website.
+
+This proposal adds a build step that turns the guides into JSON, one entry per
change, and ships the JSON in
+`camel-catalog`, as the catalog already ships the Camel releases and the
security advisories:
+
+[source,json]
+----
+{
+ "id": "camel-ftp-sftp-uses-remote-file-and-directory-names-as-given",
+ "guide": "4.22",
+ "from": "4.22.2",
+ "to": "4.22.3",
+ "title": "camel-ftp - sftp uses remote file and directory names as given",
+ "components": ["camel-ftp"],
+ "kind": "change",
+ "breaking": false,
+ "summary": "The sftp component now uses a remote file or directory name
exactly as given, also when it contains * or ?.",
+ "text": "...the entry, as Markdown...",
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html#_camel_ftp_sftp_uses_remote_file_and_directory_names_as_given"
+}
+----
+
+The AsciiDoc stays the source. Guide authors write it as they do today. Checks
in the build find the mistakes of the
+guides, which are fixed in the guides, so the JSON is as accurate as the
guides can be made. The document also defines the rule for
+choosing the entries of an upgrade from one version to another, so every tool
lists the same entries.
+
+The point is that the format is shared. The Camel CLI, the MCP server, an IDE
plugin, Camel Kit or a tool nobody has
+written yet can each build their own upgrade help on the same data. None of
them has to parse AsciiDoc.
+
+== Motivation
+
+Today a tool that wants the guides parses the AsciiDoc itself:
+
+- The MCP server (`camel-jbang-mcp`) copies the guide files into its JAR at
build time (`copy-migration-guides` in
+ its `pom.xml`). `MigrationData` splits them into sections at the `==` and
`===` headings, and searches them with
+ BM25 for `camel_migration_guide_search`. It does not know which component an
entry is about, or whether an entry
+ of a patch release is already in the version in use.
+- The upgrade view planned in CAMEL-27352 (the Camel CLI `camel update check`
and a screen of the Camel TUI) needs the
+ entries between two versions, per component, so it can show only the entries
that touch the components the
+ integration uses. The guides are not in the CLI, so it would have to parse
them again.
+- The https://github.com/apache/camel-upgrade-recipes/[Camel Upgrade Recipes]
automate part of a migration. They
+ would gain from knowing which guide entries a recipe covers, so a tool can
say "this entry is done for you, these
+ you do by hand".
+- An IDE plugin, Karavan or Camel Kit would each write a third, fourth and
fifth parser.
+
+Each parser has its own idea of where an entry starts and ends, which version
it belongs to, and which component it is
+about. The guides have more structure than a quick parser sees:
+
+- A guide has a `==` section per release: the minor release (`== Upgrading
Camel 4.21 to 4.22`) and the patch
+ releases of an LTS line (`== Upgrading from 4.22.2 to 4.22.3`). Some guides
also have a `==` section that is not a
+ release (`== Camel Spring Boot`, `== Removed deprecated components`).
+- An entry is usually a `===` heading, but the 4.23 guide groups its entries
under `=== Breaking Changes` and
+ `=== Deprecated Components and Features`, with an entry per `====` heading.
+- A change that is backported has an entry in each line it went into: the 4.18
guide, the 4.22 guide, and the minor
+ guide of the release where it landed on main. A tool that lists all three
tells the user the same thing three
+ times. A tool that lists the minor entry to a user who already has the
backport tells them about a change they have.
+
+A parser in the catalog build, run once, with tests and with warnings when a
guide does not fit the rules, is better
+than one per tool.
+
+== Goals
+
+- One JSON entry per change, with the release that brings it, the components
it is about, its kind and a link to the
+ website.
+- A written rule for which entries apply to an upgrade from version A to
version B, including patch releases and
+ backports, which every tool follows.
+- The JSON in `camel-catalog`, read through `CamelCatalog`, and as plain files
in the JAR for a tool that is not
+ written in Java.
+- Data as accurate as we can make it: checks in the build that find the
mistakes of the guides (a section in the wrong
+ guide, a missing patch release, a backport with no entry on the minor
guide), a pass that fixes the ones there are
+ today, and a strict build afterwards, so the guides stay correct for the
website as well as for the JSON.
+
+== Non-goals
+
+- Changing the code of a project. That is the job of the Camel Upgrade Recipes
and `camel update run`.
+- A new authoring format. The guides stay AsciiDoc, written as today. The
conventions in
+ <<Conventions for guide authors>> are the ones most entries follow already.
+- The upgrade view itself (CAMEL-27352). It is one user of the data, not part
of this design.
+- The guides of Camel Spring Boot and Camel Quarkus, which live in their own
repositories. They can produce the same
+ format later (see <<Open questions>>).
+
+== Proposal
+
+=== The files
+
+A new goal of `camel-package-maven-plugin`, `prepare-upgrade-guides`, runs in
the normal `camel-catalog` build, next to
+`prepare-catalog`. Unlike the releases and the advisories, which are synced
from camel-website by a profile, the
+guides live in this repository, so the JSON is generated in every build and
committed like the other generated
+catalog files:
+
+----
+catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/upgrade-guides/
+ index.json
+ camel-4x-upgrade-guide-4_1.json
+ ...
+ camel-4x-upgrade-guide-4_24.json
+----
+
+`index.json` lists the guides:
+
+[source,json]
+----
+{
+ "schemaVersion": 1,
+ "guides": [
+ {
+ "guide": "4.22",
+ "file": "camel-4x-upgrade-guide-4_22.json",
+ "title": "Upgrade guide 4.21 -> 4.22 LTS",
+ "lts": true,
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html",
+ "sections": [
+ { "from": "4.22.2", "to": "4.22.3" },
+ { "from": "4.22.1", "to": "4.22.2" },
+ { "from": "4.22.0", "to": "4.22.1" },
+ { "from": "4.21", "to": "4.22" }
+ ],
+ "entries": 214
+ }
+ ]
+}
+----
+
+Each guide file is a JSON array of entries. The 4.x guides are 2 MB of
AsciiDoc. As JSON with Markdown text they are
+about the same size, and about 600 KB compressed in the JAR.
+
+=== The entry
+
+[cols="1,1,4"]
+|===
+| Field | Type | What it is
+
+| `id`
+| string
+| The id of the change: the title, lower case, with each run of characters
that are not a letter or a digit replaced
+ by `-`. The entries of a backported change have the same title in every
guide, so they share the id (see
+ <<Which entries apply to an upgrade>>).
+
+| `guide`
+| string
+| The minor version of the guide the entry is in: `4.22`.
+
+| `from`, `to`
+| string
+| The `==` section the entry is in. For a minor section `4.21` and `4.22`, for
a patch section `4.22.2` and
+ `4.22.3`. A `==` section that is not a release (`== Camel Spring Boot`)
belongs to the minor release of its guide.
+
+| `title`
+| string
+| The heading of the entry, as written.
+
+| `group`
+| string, optional
+| The `===` heading an entry is grouped under, when the entry is a `====`
heading: `Breaking Changes`,
+ `camel-core - Enterprise Integration Patterns (EIPs)`.
+
+| `components`
+| array of strings
+| The Maven artifact ids the entry is about: `camel-ftp`, `camel-core`,
`camel-yaml-dsl`. Empty for a general entry
+ (Java DSL, EIPs, Spring Boot).
+
+| `eips`
+| array of strings, optional
+| The EIPs an entry is about, by their model name (`split`, `recipientList`),
when the heading names them:
Review Comment:
Added in 11b342cc: a value is the `name` of the EIP model in the catalog
(`models/split.json`, `CamelCatalog.findModelNames()`), case-sensitive, in
camel case.
_Claude Code on behalf of Claus Ibsen_
##########
design/upgrade-guides-as-data.adoc:
##########
@@ -0,0 +1,435 @@
+---
+title: Upgrade guides as data in the Camel catalog
+authors:
+ - "@davsclaus"
+reviewers: []
+approvers: []
+creation-date: 2026-11-21
+last-updated: 2026-11-21
+status: proposed
+see-also:
+ - "CAMEL-27352"
+ - "CAMEL-27351"
+replaces: []
+superseded-by: []
+---
+
+== Summary
+
+The upgrade guides
(`docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_*.adoc`) are
written for people
+who read them on the website, one page per minor release. A tool that helps
with an upgrade needs the same content
+as data: the entries that apply between the version in use and the target, the
components each entry is about,
+whether it is a removal or a deprecation, and a link to the entry on the
website.
+
+This proposal adds a build step that turns the guides into JSON, one entry per
change, and ships the JSON in
+`camel-catalog`, as the catalog already ships the Camel releases and the
security advisories:
+
+[source,json]
+----
+{
+ "id": "camel-ftp-sftp-uses-remote-file-and-directory-names-as-given",
+ "guide": "4.22",
+ "from": "4.22.2",
+ "to": "4.22.3",
+ "title": "camel-ftp - sftp uses remote file and directory names as given",
+ "components": ["camel-ftp"],
+ "kind": "change",
+ "breaking": false,
+ "summary": "The sftp component now uses a remote file or directory name
exactly as given, also when it contains * or ?.",
+ "text": "...the entry, as Markdown...",
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html#_camel_ftp_sftp_uses_remote_file_and_directory_names_as_given"
+}
+----
+
+The AsciiDoc stays the source. Guide authors write it as they do today. Checks
in the build find the mistakes of the
+guides, which are fixed in the guides, so the JSON is as accurate as the
guides can be made. The document also defines the rule for
+choosing the entries of an upgrade from one version to another, so every tool
lists the same entries.
+
+The point is that the format is shared. The Camel CLI, the MCP server, an IDE
plugin, Camel Kit or a tool nobody has
+written yet can each build their own upgrade help on the same data. None of
them has to parse AsciiDoc.
+
+== Motivation
+
+Today a tool that wants the guides parses the AsciiDoc itself:
+
+- The MCP server (`camel-jbang-mcp`) copies the guide files into its JAR at
build time (`copy-migration-guides` in
+ its `pom.xml`). `MigrationData` splits them into sections at the `==` and
`===` headings, and searches them with
+ BM25 for `camel_migration_guide_search`. It does not know which component an
entry is about, or whether an entry
+ of a patch release is already in the version in use.
+- The upgrade view planned in CAMEL-27352 (the Camel CLI `camel update check`
and a screen of the Camel TUI) needs the
+ entries between two versions, per component, so it can show only the entries
that touch the components the
+ integration uses. The guides are not in the CLI, so it would have to parse
them again.
+- The https://github.com/apache/camel-upgrade-recipes/[Camel Upgrade Recipes]
automate part of a migration. They
+ would gain from knowing which guide entries a recipe covers, so a tool can
say "this entry is done for you, these
+ you do by hand".
+- An IDE plugin, Karavan or Camel Kit would each write a third, fourth and
fifth parser.
+
+Each parser has its own idea of where an entry starts and ends, which version
it belongs to, and which component it is
+about. The guides have more structure than a quick parser sees:
+
+- A guide has a `==` section per release: the minor release (`== Upgrading
Camel 4.21 to 4.22`) and the patch
+ releases of an LTS line (`== Upgrading from 4.22.2 to 4.22.3`). Some guides
also have a `==` section that is not a
+ release (`== Camel Spring Boot`, `== Removed deprecated components`).
+- An entry is usually a `===` heading, but the 4.23 guide groups its entries
under `=== Breaking Changes` and
+ `=== Deprecated Components and Features`, with an entry per `====` heading.
+- A change that is backported has an entry in each line it went into: the 4.18
guide, the 4.22 guide, and the minor
+ guide of the release where it landed on main. A tool that lists all three
tells the user the same thing three
+ times. A tool that lists the minor entry to a user who already has the
backport tells them about a change they have.
+
+A parser in the catalog build, run once, with tests and with warnings when a
guide does not fit the rules, is better
+than one per tool.
+
+== Goals
+
+- One JSON entry per change, with the release that brings it, the components
it is about, its kind and a link to the
+ website.
+- A written rule for which entries apply to an upgrade from version A to
version B, including patch releases and
+ backports, which every tool follows.
+- The JSON in `camel-catalog`, read through `CamelCatalog`, and as plain files
in the JAR for a tool that is not
+ written in Java.
+- Data as accurate as we can make it: checks in the build that find the
mistakes of the guides (a section in the wrong
+ guide, a missing patch release, a backport with no entry on the minor
guide), a pass that fixes the ones there are
+ today, and a strict build afterwards, so the guides stay correct for the
website as well as for the JSON.
+
+== Non-goals
+
+- Changing the code of a project. That is the job of the Camel Upgrade Recipes
and `camel update run`.
+- A new authoring format. The guides stay AsciiDoc, written as today. The
conventions in
+ <<Conventions for guide authors>> are the ones most entries follow already.
+- The upgrade view itself (CAMEL-27352). It is one user of the data, not part
of this design.
+- The guides of Camel Spring Boot and Camel Quarkus, which live in their own
repositories. They can produce the same
+ format later (see <<Open questions>>).
+
+== Proposal
+
+=== The files
+
+A new goal of `camel-package-maven-plugin`, `prepare-upgrade-guides`, runs in
the normal `camel-catalog` build, next to
+`prepare-catalog`. Unlike the releases and the advisories, which are synced
from camel-website by a profile, the
+guides live in this repository, so the JSON is generated in every build and
committed like the other generated
+catalog files:
+
+----
+catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/upgrade-guides/
+ index.json
+ camel-4x-upgrade-guide-4_1.json
+ ...
+ camel-4x-upgrade-guide-4_24.json
+----
+
+`index.json` lists the guides:
+
+[source,json]
+----
+{
+ "schemaVersion": 1,
+ "guides": [
+ {
+ "guide": "4.22",
+ "file": "camel-4x-upgrade-guide-4_22.json",
+ "title": "Upgrade guide 4.21 -> 4.22 LTS",
+ "lts": true,
+ "url":
"https://camel.apache.org/manual/camel-4x-upgrade-guide-4_22.html",
+ "sections": [
+ { "from": "4.22.2", "to": "4.22.3" },
+ { "from": "4.22.1", "to": "4.22.2" },
+ { "from": "4.22.0", "to": "4.22.1" },
+ { "from": "4.21", "to": "4.22" }
+ ],
+ "entries": 214
+ }
+ ]
+}
+----
+
+Each guide file is a JSON array of entries. The 4.x guides are 2 MB of
AsciiDoc. As JSON with Markdown text they are
+about the same size, and about 600 KB compressed in the JAR.
Review Comment:
Clarified in 11b342cc: about 2 MB of JSON, and about 600 KB as stored
(compressed) in the JAR.
_Claude Code on behalf of Claus Ibsen_
--
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]