diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index c3c81dca404b..2e67b9258831 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-java": "0.45.10" + "@azure-tools/typespec-java": "0.45.11" }, "devDependencies": { "@azure-tools/openai-typespec": "1.23.0", @@ -204,9 +204,9 @@ } }, "node_modules/@azure-tools/typespec-java": { - "version": "0.45.10", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-java/-/typespec-java-0.45.10.tgz", - "integrity": "sha1-Xy/uF0mHNL/QZ9VQ6AXmrbudP1Q=", + "version": "0.45.11", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-java/-/typespec-java-0.45.11.tgz", + "integrity": "sha1-1qx1fW6K5AnoOweTsCJUAEGLTcQ=", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.1", @@ -996,6 +996,23 @@ "node": ">=20" } }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha1-tbuOIWXOJ11NQ0dt0nAK2Qkdttw=", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/emoji-regex": { "version": "10.6.0", "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/emoji-regex/-/emoji-regex-10.6.0.tgz", @@ -1324,17 +1341,16 @@ } }, "node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha1-tbuOIWXOJ11NQ0dt0nAK2Qkdttw=", + "version": "8.2.2", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/string-width/-/string-width-8.2.2.tgz", + "integrity": "sha1-cxBRZJPfV1dC/pivb66H2F1e0Kw=", "license": "MIT", "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1356,9 +1372,9 @@ } }, "node_modules/tar": { - "version": "7.5.21", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/tar/-/tar-7.5.21.tgz", - "integrity": "sha1-s0Ba8utJNSPOQ3n1Menr2gYBvFk=", + "version": "7.5.22", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/tar/-/tar-7.5.22.tgz", + "integrity": "sha1-ppb5mBNucUh9w/hpqFu6LGeXG6k=", "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", @@ -1372,19 +1388,19 @@ } }, "node_modules/temporal-polyfill": { - "version": "1.0.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/temporal-polyfill/-/temporal-polyfill-1.0.1.tgz", - "integrity": "sha1-lWd9+PpWcaeY6KqztY9FlJGIDZ8=", + "version": "1.0.2", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/temporal-polyfill/-/temporal-polyfill-1.0.2.tgz", + "integrity": "sha1-d+lBppdQQDoqz9pG5WhDyUCUI4s=", "license": "MIT", "dependencies": { - "temporal-spec": "1.0.0", + "temporal-spec": "1.0.1", "temporal-utils": "1.0.1" } }, "node_modules/temporal-spec": { - "version": "1.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/temporal-spec/-/temporal-spec-1.0.0.tgz", - "integrity": "sha1-gep3lAsAmndZ/SH0R9wPK3VHwco=", + "version": "1.0.1", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/temporal-spec/-/temporal-spec-1.0.1.tgz", + "integrity": "sha1-VnnOLdAImGWv6A4Ki9IqkDPBZxc=", "license": "Apache-2.0" }, "node_modules/temporal-utils": { @@ -1453,6 +1469,23 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha1-tbuOIWXOJ11NQ0dt0nAK2Qkdttw=", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/y18n/-/y18n-5.0.8.tgz", @@ -1487,15 +1520,15 @@ } }, "node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha1-bIQlmAYnOnRrCfV5CHtoo8LSW9E=", + "version": "18.1.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/yargs/-/yargs-18.1.0.tgz", + "integrity": "sha1-zX6YxwPvUWlbu/Bi7VjyjpQpG1Y=", "license": "MIT", "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", + "string-width": "^8.2.1", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" }, diff --git a/eng/emitter-package.json b/eng/emitter-package.json index c8f18741e56d..e0b03a91fff2 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -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", diff --git a/sdk/translation/azure-ai-translation-document/assets.json b/sdk/translation/azure-ai-translation-document/assets.json index eed125ed044e..605bbc07cc6d 100644 --- a/sdk/translation/azure-ai-translation-document/assets.json +++ b/sdk/translation/azure-ai-translation-document/assets.json @@ -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" } \ No newline at end of file diff --git a/sdk/translation/azure-ai-translation-document/src/main/java/com/azure/ai/translation/document/implementation/DocumentTranslationClientImpl.java b/sdk/translation/azure-ai-translation-document/src/main/java/com/azure/ai/translation/document/implementation/DocumentTranslationClientImpl.java index 7cbe53e6bb8e..b96b97f7b48e 100644 --- a/sdk/translation/azure-ai-translation-document/src/main/java/com/azure/ai/translation/document/implementation/DocumentTranslationClientImpl.java +++ b/sdk/translation/azure-ai-translation-document/src/main/java/com/azure/ai/translation/document/implementation/DocumentTranslationClientImpl.java @@ -179,7 +179,8 @@ public interface DocumentTranslationClientService { @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> 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 }) @@ -189,7 +190,8 @@ Mono> translation(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response 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 }) @@ -430,8 +432,9 @@ Response listDocumentStatusesNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> 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)); } /** @@ -510,8 +513,9 @@ private Mono> translationWithResponseAsync(BinaryData body, Reque @ServiceMethod(returns = ReturnType.SINGLE) private Response 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); } /**