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

   > The `docling-serve` client (`docling-serve-client` 0.7.0) always sends the 
API key in a hardcoded `X-Api-Key` header -- the header name is not 
configurable by the caller. `DoclingProducer` only hands the key *value* to the 
builder:
   >
   > ```java
   > doclingServeClientBuilder.apiKey(configuration.getAuthenticationToken());
   > ```
   >
   > `apiKeyHeader` is never read anywhere in the component: its getter has no 
caller, and the setter only stores the value. So the option has never had any 
effect -- and a user who follows the docs and sets 
`apiKeyHeader=X-Custom-API-Key` against a docling-serve instance that expects a 
custom header gets a silent authentication failure, with nothing in the logs to 
explain it.
   
   This keeps the option (removing it would break existing endpoint URIs) but 
marks it deprecated with a note that says why, which is the same treatment 
`camel-neo4j` already gives its ineffective `query` option.
   
   ### Changes
   
   - `DoclingConfiguration`: `@Deprecated` + `deprecationNote` on the 
`apiKeyHeader` field, getter and setter, so the deprecation reaches tooling and 
the generated docs.
   - `docling.json`: regenerated (`deprecated` / `deprecationNote` for 
`apiKeyHeader`).
   - `docling-serve.adoc`: dropped the "Using Custom API Key Header" section -- 
it documented a configuration that cannot work -- and removed `apiKeyHeader` 
from the `API_KEY` examples. Replaced with a note that the key always goes in 
`X-Api-Key`.
   
   No behaviour change: the option was already inert.
   
   ### Verification
   
   `./mvnw -pl components/camel-ai/camel-docling install` -> BUILD SUCCESS 
(formatter, checkstyle, enforcer and rat all pass). Reverting only the 
annotation and rebuilding makes `docling.json` report `"deprecated": false` 
again, so the metadata really is driven by the source annotation rather than 
edited by hand.
   


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