gnodet-bot commented on code in PR #30566:
URL: https://github.com/apache/camel/pull/30566#discussion_r4655218306
##########
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:
⚠️ **`id` edge-case handling missing**
The algorithm "each run of characters that are not a letter or a digit
replaced by `-`" leaves several cases underspecified:
- What happens to leading/trailing hyphens after the substitution? (e.g. a
title starting with `(Breaking)` → `-breaking-…`)
- Are consecutive hyphens collapsed to a single one?
- Is there a maximum length?
The document also notes that 83 patch entries have no matching minor entry
and warns about them — that is, id-based identity is already fragile. The spec
should include either a **manual `id` override** (an attribute in the AsciiDoc
heading) or an explicit policy for what happens when id matching fails at
runtime.
##########
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:
❓ **Tie-breaking: oldest vs. newest minor section**
> else the one of the oldest minor section
Oldest seems like the wrong default. The newest minor section is more likely
to have the most accurate and up-to-date description of the change. For
example, if `camel-ftp` has an entry in 4.19 and 4.21 (backport that also
landed on main), preferring the 4.21 text gives the user a more recent
explanation.
Consider: *else the one of the newest minor section* — or document the
rationale for preferring the oldest.
##########
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:
❓ **`kind` enumeration: missing `addition` and `rename`**
The three values are `change`, `deprecation`, and `removal`. Two common
entry types are absent:
- **`addition`**: a new component or EIP introduced in this release (e.g.
`=== New component: camel-foo`)
- **`rename`**: a component or DSL element was renamed
If these are intentionally collapsed into `change`, please state that
explicitly so tool authors don't infer the wrong mapping.
##########
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.
+
+=== Checks in the build
+
+The JSON is only as good as the guides. Where a guide is wrong, the fix goes
in the guide, not in a special case of
+the parser, so the website and the JSON say the same. The goal checks:
+
+* A patch section in the guide of another line, or with versions that are not
on the line of its guide.
+* A gap in the patch sections of a line: a released patch version (from the
releases in the catalog) that no section
+ goes to. A release with nothing to say gets a section that says `No
changes`, which gives no entry.
+* A section version that is neither released nor the next patch release of its
line.
+* A heading whose components it cannot place: a name that starts with `camel-`
and is neither an artifact id, an
+ alias, nor a removed component.
+* A heading that starts with a component and goes on with no ` - ` before the
summary (`=== camel-stomp removal`).
+* An entry of a patch section with no entry of the same title in a minor
section (83 today).
+* Two entries with the same title in one section (5 today), which share an
anchor on the website only by luck of
+ order.
+
+The checks start as warnings. A pass over the guides fixes what they find (see
<<Mistakes in the guides today>>), and
Review Comment:
❓ **Missing: error handling when AsciiDoc is malformed**
The document describes what the build goal *checks* and *warns about*, but
not what it does when it encounters AsciiDoc it *cannot parse at all* — for
example, an unclosed delimited block, a heading with no body, or a file with
encoding errors.
Should the build fail fast, skip the offending entry with a warning, or fall
back to raw text? This is particularly relevant during the initial cleanup pass
(step 3), when the guides may have more irregularities than usual.
##########
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.
+
+=== Checks in the build
+
+The JSON is only as good as the guides. Where a guide is wrong, the fix goes
in the guide, not in a special case of
+the parser, so the website and the JSON say the same. The goal checks:
+
+* A patch section in the guide of another line, or with versions that are not
on the line of its guide.
+* A gap in the patch sections of a line: a released patch version (from the
releases in the catalog) that no section
+ goes to. A release with nothing to say gets a section that says `No
changes`, which gives no entry.
+* A section version that is neither released nor the next patch release of its
line.
+* A heading whose components it cannot place: a name that starts with `camel-`
and is neither an artifact id, an
+ alias, nor a removed component.
+* A heading that starts with a component and goes on with no ` - ` before the
summary (`=== camel-stomp removal`).
+* An entry of a patch section with no entry of the same title in a minor
section (83 today).
+* Two entries with the same title in one section (5 today), which share an
anchor on the website only by luck of
+ order.
+
+The checks start as warnings. A pass over the guides fixes what they find (see
<<Mistakes in the guides today>>), and
Review Comment:
💡 **Cleanup timeline / gate undefined**
> The checks start as warnings. A pass over the guides fixes what they find,
and then the build is strict on `main`
This describes a two-phase process, but there is no gate defined: when
exactly does the transition from "warnings" to "strict" happen? A milestone, a
PR, or a specific commit signal would help contributors know whether they
should fix warnings today or wait.
Consider: "The build becomes strict in step 3 of <<Order of work>> (the
cleanup pass PR)."
##########
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:
💡 **Mixed `text` format needs a machine-readable discriminator**
> A table that has blocks inside a cell (lists, code), which Markdown tables
cannot hold, is kept as a preformatted block of the AsciiDoc.
This means `text` can contain either Markdown or raw AsciiDoc depending on
the table structure — but there is no field to signal which. A tool that wants
to render `text` must guess or try both.
Consider adding a **`textFormat` field** (values: `markdown` | `asciidoc`)
per entry. The default is `markdown`; it is `asciidoc` only for the
complex-table exception. This costs one extra field and makes the exception
programmatically detectable.
##########
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:
💡 **Size estimate: clarify compressed vs. uncompressed**
> about the same size, and about 600 KB compressed in the JAR
The sentence structure is ambiguous: is 600 KB the **compressed** size
(after JAR entry deflation) or the **uncompressed** JSON size that then goes
into the JAR? The contrast with "about the same size" (as the 2 MB AsciiDoc)
suggests this is the post-compression size, but that would be an unusually high
compression ratio (~70%).
Clarify: "~600 KB after JAR compression" or "~2 MB uncompressed, ~600 KB as
stored in the JAR".
##########
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:
❓ **`eips` field: "EIP model name" undefined**
> The EIPs an entry is about, by their model name (`split`, `recipientList`)
The parenthetical examples are illustrative, but the spec does not define
what an "EIP model name" is or where the canonical list of valid values lives.
Tool authors need to know:
- Is this the value of the `name` attribute in the EIP JSON model in the
catalog?
- Where is the authoritative list? (`camel-core-model`? The catalog's
`eips/` directory?)
- Are names case-sensitive?
Add a pointer to the canonical source.
##########
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:
⚠️ **`newer` is ambiguous for patch-level comparisons**
> loads the catalog of the target version (`CatalogLoader`) only when the
target is newer than its own catalog
Consider a tool that ships with the 4.22.2 catalog and the target is 4.22.3.
By semantic versioning, 4.22.3 IS newer than 4.22.2 — so the tool should load
the target catalog. But the sentence says "newer than its own catalog", which
could be read as "newer minor" (4.23 > 4.22) rather than "newer patch" (4.22.3
> 4.22.2).
Please clarify: is the comparison by **full version** (semver), or only by
**minor version line**? If patch-level differences are significant (and they
clearly are, given the sftp example), the comparison must be by full semver.
##########
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.
+
+=== Checks in the build
+
+The JSON is only as good as the guides. Where a guide is wrong, the fix goes
in the guide, not in a special case of
+the parser, so the website and the JSON say the same. The goal checks:
+
+* A patch section in the guide of another line, or with versions that are not
on the line of its guide.
+* A gap in the patch sections of a line: a released patch version (from the
releases in the catalog) that no section
+ goes to. A release with nothing to say gets a section that says `No
changes`, which gives no entry.
+* A section version that is neither released nor the next patch release of its
line.
+* A heading whose components it cannot place: a name that starts with `camel-`
and is neither an artifact id, an
+ alias, nor a removed component.
+* A heading that starts with a component and goes on with no ` - ` before the
summary (`=== camel-stomp removal`).
+* An entry of a patch section with no entry of the same title in a minor
section (83 today).
+* Two entries with the same title in one section (5 today), which share an
anchor on the website only by luck of
+ order.
+
+The checks start as warnings. A pass over the guides fixes what they find (see
<<Mistakes in the guides today>>), and
+then the build is strict on `main` (`-Dcamel.upgrade-guides.strict=true` by
default), so a new mistake fails the pull
+request that brings it, as a missing generated file does today.
+
+=== Mistakes in the guides today
+
+A prototype of the parser and the checks, run on the 4.x guides of `main`
(2031 entries, 1702 with a component), found:
+
+* The 4.14 guide has a section `== Upgrading from 4.10.0 to 4.10.1` ("No
changes"), copied from the 4.10 guide. It
+ should be 4.14.0 to 4.14.1. As it is, a tool would give the 4.10.1 release a
section in the 4.14 guide.
+* The 4.8 guide has no section from 4.8.3 to 4.8.4: it goes from `4.8.2 to
4.8.3` to `4.8.4 to 4.8.7`.
+* 83 of the 356 entries of patch sections have no entry of the same title in a
minor section. Some are titles that
+ changed when the entry was copied. Some may be backports whose entry on the
minor guide is missing, which the pass
+ checks one by one, against the commits.
+* Headings that name a component in a form the parser cannot split:
`camel-stomp removal`,
+ `camel-vertx-websocket clientOptions type changed from HttpClientOptions to
WebSocketClientOptions`,
+ `camel-opentelemetry2 — Embedded OTLP receiver ...` (an em dash),
`camel-dynamic-router EIP component`.
+* Names that are not artifacts: `camel-simple` (the language is in
`camel-core-languages`), `camel-cxfrs`,
+ `camel-aws`, `camel-aws2`, `camel-google`, `camel-tests`. Each becomes the
artifact, or an alias when it is a family
+ of components.
+* Entries of Camel Spring Boot starters (`camel-jolokia-starter binds to
loopback`, ...) in the guides of this
+ repository. They keep their place, and get `runtime` `spring-boot` (see
<<Open questions>>).
+* Five sections with two entries of the same title, such as the two `===
camel-kafka` of the 4.19 guide. Both are
+ merged into one, or each gets a summary in its title.
+
+The 4.18.6 and 4.22.3 sections are for releases still to come, which the check
allows (the next patch of the line).
+
+The pass is one pull request per kind of fix, so each is easy to review.
+
+=== Conventions for guide authors
+
+What most entries do already, written down:
+
+* Start the heading with the artifact id, then ` - ` and what changed: `===
camel-ftp - sftp uses remote file and
+ directory names as given`. Several components are separated by `,`.
+* Give a backported change the same heading in every guide.
+* Mark a deprecation or a removal in the heading: `(Deprecation)`,
`(Removal)`, or group the entries under a
+ `Deprecated` or `Removed` heading.
+
+These go in the upgrade guide section of `CLAUDE.md` and in the contributing
docs.
+
+=== The API
+
+A model in `camel-tooling-model`, `UpgradeGuideEntryModel`, with the fields of
the entry, as `ReleaseModel` and
+`SecurityAdvisoryModel` have theirs. In `CamelCatalog`:
+
+[source,java]
+----
+/**
+ * All the entries of the upgrade guides in this catalog.
+ */
+List<UpgradeGuideEntryModel> camelUpgradeGuideEntries();
+----
+
+The rule of <<Which entries apply to an upgrade>> is in one helper in
`camel-catalog`, `UpgradeGuideHelper`, with
+`entries(all, from, to)` and `missing(all, from, to)`, and tests built from
the example above. A tool in another
Review Comment:
❓ **`missing(all, from, to)` behaviour from a tool's perspective**
> `entries(all, from, to)` and `missing(all, from, to)`
The document explains what `missing` answers conceptually ("does B lack a
change A has?") and gives an example of what a tool *can* say. But it does not
specify whether tools *should* surface the result as an informational message,
a warning, or an error — and in which UI contexts (CLI output, IDE tooltip, MCP
response).
Add a note on the expected consumer behaviour, or at minimum clarify that it
is informational-only and tools decide how to present it.
--
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]