oscerd opened a new pull request, #1857:
URL: https://github.com/apache/camel-kafka-connector/pull/1857

   Fixes #677.
   
   ### Problem
   
   `camel-syslog-kafka-connector` is the only hand-maintained connector module, 
and neither generator writes it. It ships in every release and has reference 
docs, but it has no `src/generated/resources/*.json` metadata and no connector 
descriptors, so `camel-kafka-connector-catalog` doesn't list it.
   
   ### Change
   
   - **Syslog metadata.** The syslog module gets `camel-syslog-source.json` and 
`camel-syslog-sink.json`, plus `connector-source.properties` and 
`connector-sink.properties` under `src/generated/descriptors/`. They mirror the 
generated netty metadata, because `CamelSyslogSourceConnectorConfig` and 
`CamelSyslogSinkConnectorConfig` return the netty `conf()`. I checked this by 
running `config()` on both connectors: 121 source options and 115 sink options, 
all matching the JSON. The `version` is `${project.version}`, which the 
existing filtered copy into the catalog resolves. Release catalogs therefore 
carry the release version, as they do for the generated connectors.
   - **Catalog.** Regenerated by the build, not hand-edited: 
`camel-syslog-source.json`, `camel-syslog-sink.json` and the two 
`connectors.properties` entries.
   - **Docs build.** `connectors/ac-mappings.yml` excludes the syslog JSON. 
camel-website turns every connector JSON into 
`reference/connectors/camel-<name>-kafka-<type>-connector.adoc`, but the 
hand-written syslog pages are already mapped to those exact paths from 
`src/main/docs`. Antora fails on a duplicate page, so without the exclusion 
this change would break the site build. I'd welcome a second look from someone 
who knows the website build.
   - **Tests.**
     - `CamelKafkaConnectorCatalogTest#testSyslogConnectors` checks that both 
connectors are listed, with their class, coordinates, a resolved version and 
the required `protocol` option.
     - `#testSyslogOptionsMatchNetty` is a drift guard. If a Camel upgrade 
changes the netty options and the syslog JSON isn't updated, it fails and names 
both files.
   
   ### Verification
   
   - `./mvnw -pl camel-kafka-connector-catalog -Psourcecheck install` runs 8 
tests with 0 failures, and checkstyle is clean.
   - The full reactor build `./mvnw clean verify -DskipTests` succeeds.
   
   Unrelated to this change and left out of the PR: building from `main` makes 
the generator rewrite the `"version"` of every generated connector JSON and its 
catalog copy, from `4.22.0-SNAPSHOT` to `4.22.1-SNAPSHOT`.
   
   _Claude Code on behalf of Andrea Cosentino_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to