oscerd opened a new pull request, #27822:
URL: https://github.com/apache/camel/pull/27822

   ## Motivation
   
   `camel export --runtime=quarkus` writes every `quarkus.*` key (except 
`quarkus.hawtio.*`) through `StringHelper.camelCaseToDash` 
(`ExportQuarkus.applicationPropertyLine`). That turns each upper-case letter 
into a dash plus the lower-case letter — including in segments that are **names 
chosen by the user** rather than Quarkus option names, and inside quoted 
segments. Quarkus takes such names literally, so the exported application gets 
different names than the project defines.
   
   ### Reproduction (CAMEL-25498)
   
   Exporting with
   ```
   '--prop=quarkus.swagger-ui.urls.Camel=../openapi.json'
   '--prop=quarkus.log.category."com.example.MyRoute".level=DEBUG'
   '--prop=quarkus.datasource.Orders.db-kind=postgresql'
   ```
   produced
   ```
   quarkus.swagger-ui.urls.-camel=../openapi.json
   quarkus.log.category."com.example.-my-route".level=DEBUG
   quarkus.datasource.-orders.db-kind=postgresql
   ```
   — the Swagger UI URL is named `-camel` instead of overriding the `Camel` 
entry, the log level targets a category no logger uses, and the datasource is 
named `-orders`.
   
   ## Change
   
   Write `quarkus.*` keys **as given**. Quarkus accepts both camelCase and 
kebab-case for its own option names, and the dash conversion was only needed 
when the export stored kebab-case keys in camel case (removed in 
`b7a4e868c172`). `camel.*` keys are still dash-cased, because Camel's property 
binding turns the dashes back at runtime. The former `quarkus.hawtio.*` special 
case (its option names are camel case) is no longer needed — the general rule 
covers it.
   
   This aligns with CAMEL-22139 ("Export to Quarkus should let property keys 
keep their current case").
   
   ## Testing
   
   New `ExportQuarkusTest` verifies `applicationPropertyLine`:
   - `quarkus.*` keys with user-chosen name segments (datasource name, quoted 
log category, swagger url key) and the camelCase 
`quarkus.hawtio.authenticationEnabled` are written verbatim;
   - a plain kebab `quarkus.*` key is unchanged;
   - `camel.*` keys are still dash-cased;
   - `camel.server.*` / `camel.management.*` keys are still skipped.
   
   `camel-jbang-core` module build is green.
   
   _Claude Code on behalf of oscerd_
   
   🤖 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