Skip to content

Commit 12442c2

Browse files
fix bot comment on azure-ai-transcription sdk apiview (#48889)
* fix bot comment on apiview * Fix lint: drop @ServiceMethod on convenience transcribeWithResponse(TranscriptionOptions) overload The Checkstyle ServiceClientCheck requires sync methods annotated with @ServiceMethod to take Context/RequestOptions/RequestContext. The convenience overload only takes TranscriptionOptions, so the annotation is removed. Also drops unused ClientLogger imports/fields and fixes javadoc rendering in the customization. * update changelog
1 parent 27e6db8 commit 12442c2

5 files changed

Lines changed: 18 additions & 28 deletions

File tree

sdk/transcription/azure-ai-speech-transcription/CHANGELOG.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# Release History
22

3-
## 1.0.0-beta.3 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
3+
## 1.0.0-beta.3 (2026-04-22)
104

115
### Other Changes
126

7+
- Updated package metadata (display name and description) to align with Azure SDK guidelines.
8+
- Internal cleanup and lint fixes. No public API changes.
9+
1310
## 1.0.0-beta.2 (2026-02-05)
1411

1512
### Bugs Fixed

sdk/transcription/azure-ai-speech-transcription/customization/src/main/java/SpeechTranscriptionCustomization.java

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ private void customizeTranscriptionClient(PackageCustomization packageCustomizat
313313
= clazz.addMethod("transcribe", Modifier.Keyword.PUBLIC)
314314
.addParameter("TranscriptionOptions", "options")
315315
.setType("TranscriptionResult");
316-
transcribeMethod.setJavadocComment("/**\n"
316+
transcribeMethod.setJavadocComment("\n"
317317
+ " * Transcribes the provided audio stream with the specified options.\n" + " *\n"
318318
+ " * @param options the transcription options including audio file details or audio URL\n"
319319
+ " * @throws IllegalArgumentException thrown if parameters fail the validation.\n"
@@ -322,7 +322,7 @@ private void customizeTranscriptionClient(PackageCustomization packageCustomizat
322322
+ " * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.\n"
323323
+ " * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.\n"
324324
+ " * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n"
325-
+ " * @return the result of the transcribe operation.\n" + " */");
325+
+ " * @return the result of the transcribe operation.\n" + " ");
326326
com.github.javaparser.ast.expr.NormalAnnotationExpr transcribeServiceMethodAnnotation
327327
= new com.github.javaparser.ast.expr.NormalAnnotationExpr();
328328
transcribeServiceMethodAnnotation.setName("ServiceMethod");
@@ -338,7 +338,7 @@ private void customizeTranscriptionClient(PackageCustomization packageCustomizat
338338
= clazz.addMethod("transcribeWithResponse", Modifier.Keyword.PUBLIC)
339339
.addParameter("TranscriptionOptions", "options")
340340
.setType("Response<TranscriptionResult>");
341-
transcribeWithResponseMethod.setJavadocComment("/**\n"
341+
transcribeWithResponseMethod.setJavadocComment("\n"
342342
+ " * Transcribes the provided audio stream with the specified options.\n" + " *\n"
343343
+ " * @param options the transcription options including audio file details or audio URL\n"
344344
+ " * @throws IllegalArgumentException thrown if parameters fail the validation.\n"
@@ -347,12 +347,10 @@ private void customizeTranscriptionClient(PackageCustomization packageCustomizat
347347
+ " * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.\n"
348348
+ " * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.\n"
349349
+ " * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n"
350-
+ " * @return the response containing the result of the transcribe operation.\n" + " */");
351-
com.github.javaparser.ast.expr.NormalAnnotationExpr serviceMethodAnnotation
352-
= new com.github.javaparser.ast.expr.NormalAnnotationExpr();
353-
serviceMethodAnnotation.setName("ServiceMethod");
354-
serviceMethodAnnotation.addPair("returns", "ReturnType.SINGLE");
355-
transcribeWithResponseMethod.addAnnotation(serviceMethodAnnotation);
350+
+ " * @return the response containing the result of the transcribe operation.\n" + " ");
351+
// Note: intentionally NOT adding @ServiceMethod here. The Checkstyle ServiceClientCheck
352+
// requires sync methods annotated with @ServiceMethod to take Context/RequestOptions/RequestContext,
353+
// but we want to keep the simple public signature transcribeWithResponse(TranscriptionOptions).
356354
transcribeWithResponseMethod
357355
.setBody(parseBlock("{ TranscriptionContent requestContent = new TranscriptionContent(options); "
358356
+ "if (options.getFileDetails() != null) { requestContent.setAudio(options.getFileDetails()); } "
@@ -396,7 +394,7 @@ private void customizeTranscriptionAsyncClient(PackageCustomization packageCusto
396394
= clazz.addMethod("transcribe", Modifier.Keyword.PUBLIC)
397395
.addParameter("TranscriptionOptions", "options")
398396
.setType("Mono<TranscriptionResult>");
399-
transcribeMethod.setJavadocComment("/**\n"
397+
transcribeMethod.setJavadocComment("\n"
400398
+ " * Transcribes the provided audio stream with the specified options.\n" + " *\n"
401399
+ " * @param options the transcription options including audio file details or audio URL\n"
402400
+ " * @throws IllegalArgumentException thrown if parameters fail the validation.\n"
@@ -406,7 +404,7 @@ private void customizeTranscriptionAsyncClient(PackageCustomization packageCusto
406404
+ " * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.\n"
407405
+ " * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n"
408406
+ " * @return the result of the transcribe operation on successful completion of {@link Mono}.\n"
409-
+ " */");
407+
+ " ");
410408
com.github.javaparser.ast.expr.NormalAnnotationExpr transcribeServiceMethodAnnotation
411409
= new com.github.javaparser.ast.expr.NormalAnnotationExpr();
412410
transcribeServiceMethodAnnotation.setName("ServiceMethod");
@@ -422,7 +420,7 @@ private void customizeTranscriptionAsyncClient(PackageCustomization packageCusto
422420
= clazz.addMethod("transcribeWithResponse", Modifier.Keyword.PUBLIC)
423421
.addParameter("TranscriptionOptions", "options")
424422
.setType("Mono<Response<TranscriptionResult>>");
425-
transcribeWithResponseMethod.setJavadocComment("/**\n"
423+
transcribeWithResponseMethod.setJavadocComment("\n"
426424
+ " * Transcribes the provided audio stream with the specified options.\n" + " *\n"
427425
+ " * @param options the transcription options including audio file details or audio URL\n"
428426
+ " * @throws IllegalArgumentException thrown if parameters fail the validation.\n"
@@ -432,7 +430,7 @@ private void customizeTranscriptionAsyncClient(PackageCustomization packageCusto
432430
+ " * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.\n"
433431
+ " * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n"
434432
+ " * @return the response containing the result of the transcribe operation on successful completion of {@link Mono}.\n"
435-
+ " */");
433+
+ " ");
436434
com.github.javaparser.ast.expr.NormalAnnotationExpr serviceMethodAnnotation
437435
= new com.github.javaparser.ast.expr.NormalAnnotationExpr();
438436
serviceMethodAnnotation.setName("ServiceMethod");

sdk/transcription/azure-ai-speech-transcription/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Code generated by Microsoft (R) TypeSpec Code Generator.
1717
<version>1.0.0-beta.3</version> <!-- {x-version-update;com.azure:azure-ai-speech-transcription;current} -->
1818
<packaging>jar</packaging>
1919

20-
<name>Microsoft Azure SDK for Transcription</name>
21-
<description>This package contains Microsoft Azure Transcription client library.</description>
20+
<name>Microsoft Azure client library for Transcription</name>
21+
<description>This package contains the Microsoft Azure Transcription client library.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>

sdk/transcription/azure-ai-speech-transcription/src/main/java/com/azure/ai/speech/transcription/TranscriptionAsyncClient.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import com.azure.core.http.rest.SimpleResponse;
2222
import com.azure.core.util.BinaryData;
2323
import com.azure.core.util.FluxUtil;
24-
import com.azure.core.util.logging.ClientLogger;
2524
import reactor.core.publisher.Mono;
2625

2726
/**
@@ -30,8 +29,6 @@
3029
@ServiceClient(builder = TranscriptionClientBuilder.class, isAsync = true)
3130
public final class TranscriptionAsyncClient {
3231

33-
private static final ClientLogger LOGGER = new ClientLogger(TranscriptionAsyncClient.class);
34-
3532
@Generated
3633
private final TranscriptionClientImpl serviceClient;
3734

@@ -158,6 +155,7 @@ public Mono<TranscriptionResult> transcribe(TranscriptionOptions options) {
158155
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
159156
* @return the response containing the result of the transcribe operation on successful completion of {@link Mono}.
160157
*/
158+
@ServiceMethod(returns = ReturnType.SINGLE)
161159
public Mono<Response<TranscriptionResult>> transcribeWithResponse(TranscriptionOptions options) {
162160
TranscriptionContent requestContent = new TranscriptionContent(options);
163161
if (options.getFileDetails() != null) {

sdk/transcription/azure-ai-speech-transcription/src/main/java/com/azure/ai/speech/transcription/TranscriptionClient.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,13 @@
2020
import com.azure.core.http.rest.Response;
2121
import com.azure.core.http.rest.SimpleResponse;
2222
import com.azure.core.util.BinaryData;
23-
import com.azure.core.util.logging.ClientLogger;
2423

2524
/**
2625
* Initializes a new instance of the synchronous TranscriptionClient type.
2726
*/
2827
@ServiceClient(builder = TranscriptionClientBuilder.class)
2928
public final class TranscriptionClient {
3029

31-
private static final ClientLogger LOGGER = new ClientLogger(TranscriptionClient.class);
32-
3330
@Generated
3431
private final TranscriptionClientImpl serviceClient;
3532

0 commit comments

Comments
 (0)