Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 58 additions & 25 deletions eng/emitter-package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-java": "0.45.10"
"@azure-tools/typespec-java": "0.45.11"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "0.70.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo" : "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath" : "java",
"TagPrefix" : "java/translation/azure-ai-translation-document",
"Tag" : "java/translation/azure-ai-translation-document_2891c219c6"
"Tag" : "java/translation/azure-ai-translation-document_7eb12afe17"
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ public interface DocumentTranslationClientService {
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono<Response<Void>> translation(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
@BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
@HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body,
RequestOptions requestOptions, Context context);

@Post("/document/batches")
@ExpectedResponses({ 202 })
Expand All @@ -189,7 +190,8 @@ Mono<Response<Void>> translation(@HostParam("endpoint") String endpoint,
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response<Void> translationSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
@BodyParam("application/json") BinaryData body, RequestOptions requestOptions, Context context);
@HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body,
RequestOptions requestOptions, Context context);

@Get("/document/batches")
@ExpectedResponses({ 200 })
Expand Down Expand Up @@ -430,8 +432,9 @@ Response<BinaryData> listDocumentStatusesNextSync(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Void>> translationWithResponseAsync(BinaryData body, RequestOptions requestOptions) {
final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil.withContext(context -> service.translation(this.getEndpoint(),
this.getServiceVersion().getVersion(), contentType, body, requestOptions, context));
this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context));
}

/**
Expand Down Expand Up @@ -510,8 +513,9 @@ private Mono<Response<Void>> translationWithResponseAsync(BinaryData body, Reque
@ServiceMethod(returns = ReturnType.SINGLE)
private Response<Void> translationWithResponse(BinaryData body, RequestOptions requestOptions) {
final String contentType = "application/json";
return service.translationSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, body,
requestOptions, Context.NONE);
final String accept = "application/json";
return service.translationSync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept,
body, requestOptions, Context.NONE);
}

/**
Expand Down
Loading