Dhairya-007 opened a new pull request, #29706:
URL: https://github.com/apache/camel/pull/29706

   ## Problem
   
   `Transcribe2Configuration` declares a `protocol` option:
   
   ```java
   @UriParam(enums = "HTTP,HTTPS", defaultValue = "HTTPS")
   private Protocol protocol = Protocol.HTTPS;
   ```
   
   **Nothing reads it.** The Transcribe client is built by the shared 
`AwsClientBuilderUtil`, which reads the region, the endpoint override and the 
proxy settings off the `AwsCommonConfiguration` interface — and that interface 
has no `protocol`, only `getProxyProtocol()`. Across all of 
`components/camel-aws`, the only callers of 
`Transcribe2Configuration.getProtocol()` are the generated 
`Transcribe2EndpointConfigurer` and `Transcribe2ComponentConfigurer`. Setting 
`protocol=HTTP` on an `aws2-transcribe` endpoint is accepted and does nothing.
   
   It is also the only `Protocol protocol` field in the whole aws2 family. 
`aws2-sqs` has a `protocol` option too, but a `String` one that it genuinely 
uses to build the queue URL scheme.
   
   The description made it worse. `setProtocol` carried `setProxyProtocol`'s 
javadoc:
   
   ```java
   /**
    * To define a proxy protocol when instantiating the Transcribe client
    */
   public void setProtocol(Protocol protocol) {
   ```
   
   so the option read as if it configured the proxy — which is exactly what 
`proxyProtocol`, declared ten lines below it, really does and which the shared 
builder really applies. A user following the documentation would set `protocol` 
and get no proxy and no warning.
   
   ## Fix
   
   Deprecate it with a `deprecationNote`, following `camel-docling`'s 
`apiKeyHeader` in #29591 — the same situation, deprecated the same way in this 
release — and give it a description that no longer claims to configure a proxy.
   
   Changed:
   
   - `Transcribe2Configuration` — `@Deprecated` + `@Metadata(deprecationNote = 
...)`, and the getter/setter javadoc.
   - `aws2-transcribe.json` and its `camel-catalog` copy — `"deprecated": true` 
plus the note, on both the component property and the endpoint parameter. The 
two files are byte-identical afterwards.
   - `Transcribe2EndpointBuilderFactory` (2 methods) and 
`Aws2TranscribeComponentBuilderFactory` (1 method) — `@Deprecated` and the 
re-wrapped javadoc.
   - `camel-4x-upgrade-guide-4_24.adoc` — the entry a deprecation takes, 
pointing users at `proxyProtocol`/`proxyHost`/`proxyPort`.
   
   The generated files were updated by hand, since I cannot run maven here; I 
took the exact shape from the `apiKeyHeader` commit (`5de82a9`) and re-wrapped 
the DSL javadoc with the generator's own width (69 characters of text at indent 
9), checking first that the wrap reproduces the untouched lines. If the regen 
job still finds a difference I will take its patch.
   
   ## Tests
   
   No behaviour changes, so there is nothing new to assert: the option did 
nothing before and does nothing now, it is only labelled honestly. The existing 
`aws2-transcribe` tests cover the client building that this does not touch.


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