From 8fec3c11a59fcf4c8a4daa7bbad5eee6fa35801e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 04:38:46 +0000 Subject: [PATCH 1/4] Update Node.js dependencies to TypeSpec 1.11.0/0.81.0 and Azure tools 0.67.0, bump version to 0.44.0 Agent-Logs-Url: https://github.com/Azure/autorest.java/sessions/253ef309-b9e4-4c78-8745-22a801a7c025 Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com> --- core | 2 +- typespec-extension/changelog.md | 6 + typespec-extension/package-lock.json | 932 +++++++++++++-------------- typespec-extension/package.json | 66 +- typespec-tests/Generate.ps1 | 9 +- typespec-tests/package.json | 32 +- 6 files changed, 516 insertions(+), 531 deletions(-) diff --git a/core b/core index c1cc310738..a964f34ec4 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit c1cc3107388182bfe98599740e9bb39721e6a2b5 +Subproject commit a964f34ec49a598bb88276568b29b75f23e8948f diff --git a/typespec-extension/changelog.md b/typespec-extension/changelog.md index ce25a2b5d2..d690d3ca01 100644 --- a/typespec-extension/changelog.md +++ b/typespec-extension/changelog.md @@ -1,5 +1,11 @@ # Release History +## 0.44.0 (2026-04-08) + +Compatible with compiler 1.11.0. + +- Updated package dependencies to the latest versions. + ## 0.43.3 (2026-04-02) Compatible with compiler 1.10.0. diff --git a/typespec-extension/package-lock.json b/typespec-extension/package-lock.json index d87d06ed49..0a35536299 100644 --- a/typespec-extension/package-lock.json +++ b/typespec-extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "@azure-tools/typespec-java", - "version": "0.43.3", + "version": "0.44.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@azure-tools/typespec-java", - "version": "0.43.3", + "version": "0.44.0", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.1", @@ -15,31 +15,31 @@ }, "devDependencies": { "@azure-tools/openai-typespec": "1.11.0", - "@azure-tools/typespec-autorest": "0.66.2", - "@azure-tools/typespec-azure-core": "0.66.1", - "@azure-tools/typespec-azure-resource-manager": "0.66.1", - "@azure-tools/typespec-azure-rulesets": "0.66.0", - "@azure-tools/typespec-client-generator-core": "0.66.4", + "@azure-tools/typespec-autorest": "0.67.0", + "@azure-tools/typespec-azure-core": "0.67.0", + "@azure-tools/typespec-azure-resource-manager": "0.67.0", + "@azure-tools/typespec-azure-rulesets": "0.67.0", + "@azure-tools/typespec-client-generator-core": "0.67.0", "@azure-tools/typespec-liftr-base": "0.13.0", - "@microsoft/api-extractor": "^7.58.0", + "@microsoft/api-extractor": "^7.58.1", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.24", - "@types/node": "~25.5.0", + "@types/node": "~25.5.2", "@typescript-eslint/eslint-plugin": "~8.58.0", "@typescript-eslint/parser": "~8.58.0", - "@typespec/compiler": "1.10.0", - "@typespec/events": "0.80.0", - "@typespec/http": "1.10.0", - "@typespec/openapi": "1.10.0", - "@typespec/openapi3": "1.10.0", - "@typespec/rest": "0.80.0", - "@typespec/sse": "0.80.0", - "@typespec/streams": "0.80.0", + "@typespec/compiler": "1.11.0", + "@typespec/events": "0.81.0", + "@typespec/http": "1.11.0", + "@typespec/openapi": "1.11.0", + "@typespec/openapi3": "1.11.0", + "@typespec/rest": "0.81.0", + "@typespec/sse": "0.81.0", + "@typespec/streams": "0.81.0", "@typespec/tspd": "0.74.1", - "@typespec/versioning": "0.80.0", - "@typespec/xml": "0.80.0", - "@vitest/coverage-v8": "^4.1.2", - "@vitest/ui": "^4.1.2", + "@typespec/versioning": "0.81.0", + "@typespec/xml": "0.81.0", + "@vitest/coverage-v8": "^4.1.3", + "@vitest/ui": "^4.1.3", "c8": "~11.0.0", "eslint": "~10.1.0", "eslint-plugin-deprecation": "~3.0.0", @@ -49,26 +49,26 @@ "rimraf": "~6.1.3", "typescript": "~5.9.2", "typescript-eslint": "^8.58.0", - "vitest": "^4.1.2" + "vitest": "^4.1.3" }, "engines": { "node": ">=20.0.0" }, "peerDependencies": { "@azure-tools/openai-typespec": "^1.11.0", - "@azure-tools/typespec-autorest": ">=0.66.2 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.66.1 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.66.1 <1.0.0", - "@azure-tools/typespec-azure-rulesets": ">=0.66.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.66.4 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-rulesets": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.67.0 <1.0.0", "@azure-tools/typespec-liftr-base": ">=0.13.0 <1.0.0", - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/openapi3": "^1.10.0", - "@typespec/rest": ">=0.80.0 <1.0.0", - "@typespec/versioning": ">=0.80.0 <1.0.0", - "@typespec/xml": ">=0.80.0 <1.0.0" + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/openapi3": "^1.11.0", + "@typespec/rest": ">=0.81.0 <1.0.0", + "@typespec/versioning": ">=0.81.0 <1.0.0", + "@typespec/xml": ">=0.81.0 <1.0.0" } }, "node_modules/@alloy-js/core": { @@ -169,24 +169,24 @@ } }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.66.2.tgz", - "integrity": "sha512-KPloSDZvY7c2PkDCGeWPoWJ3NL+0n5GPQKiospILLE5pCof6g5a20NM8mJLqTE+NMgzbNzgoYE5wXEFFpe3A+A==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.67.0.tgz", + "integrity": "sha512-RP0TZB46tnYGfN5FKaaXDP5/rDff0PEERKz4epoYsm4RmXeRDYXVcOjw7DXLbcgFpMLTLBf/w/5dqJZBx03KpQ==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.66.1", - "@azure-tools/typespec-azure-resource-manager": "^0.66.1", - "@azure-tools/typespec-client-generator-core": "^0.66.4", - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/rest": "^0.80.0", - "@typespec/versioning": "^0.80.0", - "@typespec/xml": "^0.80.0" + "@azure-tools/typespec-azure-core": "^0.67.0", + "@azure-tools/typespec-azure-resource-manager": "^0.67.0", + "@azure-tools/typespec-client-generator-core": "^0.67.0", + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/rest": "^0.81.0", + "@typespec/versioning": "^0.81.0", + "@typespec/xml": "^0.81.0" }, "peerDependenciesMeta": { "@typespec/xml": { @@ -195,24 +195,24 @@ } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.66.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.66.1.tgz", - "integrity": "sha512-i8lMegL4s0I6xQT61zIIhmN1aA6iYFoH+7owSl/msOD0yVWx3Khf3ETULX53yHFd7OoUDAjmFx7+8j9atWXzHQ==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.67.0.tgz", + "integrity": "sha512-6DO/fOlVihMlPG0oDXrgURf5MNF4iBzPx5SMA5aaFDx/fW6MjiD+TN9Yy9O+l9mVNh1XaEMjhjA8/lmnHZ/U0g==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/rest": "^0.80.0" + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/rest": "^0.81.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.66.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.66.1.tgz", - "integrity": "sha512-LExgmD3oK7iaX0bIdQsoxBYLCMKwPPBHYmLMhNW/GseMF1Dqi1Ne/VP7rmMP0dhrZNFh22LaZI2lTyCKm08DFQ==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.67.0.tgz", + "integrity": "sha512-NFE1O4zlpo6Y+Lkh3XCo59g+7r141+oBomYib1LncbbpqoGDakHvBH4sLelt9ZCMnYAxlKGbjXrO9E6jd53P2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -223,34 +223,34 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.66.1", - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/rest": "^0.80.0", - "@typespec/versioning": "^0.80.0" + "@azure-tools/typespec-azure-core": "^0.67.0", + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/rest": "^0.81.0", + "@typespec/versioning": "^0.81.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.66.0.tgz", - "integrity": "sha512-Wf0SpphmKDDzHgaqpxl68DpP65VUWjpD3mrnZ3Lw4Pdtt8BcZf7+LKgFF06gPRnh15hR0VbjAERCzxI/qGY4ag==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.67.0.tgz", + "integrity": "sha512-YCkyTm090xQR0Gb3CnIdbEd+SbVUY1TRtuPXrBPTsNu3MJwvlaESnkJ7bt9zkP94mAFTNoSTuZlAUKDfPrFaFA==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.66.0", - "@azure-tools/typespec-azure-resource-manager": "^0.66.0", - "@azure-tools/typespec-client-generator-core": "^0.66.1", - "@typespec/compiler": "^1.10.0" + "@azure-tools/typespec-azure-core": "^0.67.0", + "@azure-tools/typespec-azure-resource-manager": "^0.67.0", + "@azure-tools/typespec-client-generator-core": "^0.67.0", + "@typespec/compiler": "^1.11.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.66.4", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.66.4.tgz", - "integrity": "sha512-KRMWLvojku2qFnPpUiZNTa/nm49IjSsGVhPmFhQ5a01KwI2T7zT+Ga39/xLTLHHT4aIgBaMWxD4ioZa2ZhbEKw==", + "version": "0.67.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.67.0.tgz", + "integrity": "sha512-cJZHRDnSSNhx8DpHudUMDpajpDQD3+lsAXI633dsQYIKdTuP10UEgRUgIKSkF0+ck0kJOeI25r/TBH2P+V/k6Q==", "dev": true, "license": "MIT", "dependencies": { @@ -262,16 +262,16 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.66.1", - "@typespec/compiler": "^1.10.0", - "@typespec/events": "^0.80.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/rest": "^0.80.0", - "@typespec/sse": "^0.80.0", - "@typespec/streams": "^0.80.0", - "@typespec/versioning": "^0.80.0", - "@typespec/xml": "^0.80.0" + "@azure-tools/typespec-azure-core": "^0.67.0", + "@typespec/compiler": "^1.11.0", + "@typespec/events": "^0.81.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/rest": "^0.81.0", + "@typespec/sse": "^0.81.0", + "@typespec/streams": "^0.81.0", + "@typespec/versioning": "^0.81.0", + "@typespec/xml": "^0.81.0" } }, "node_modules/@azure-tools/typespec-liftr-base": { @@ -373,7 +373,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@emnapi/wasi-threads": "1.2.0", "tslib": "^2.4.0" @@ -386,7 +385,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -398,7 +396,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -580,9 +577,9 @@ } }, "node_modules/@inquirer/ansi": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.2.tgz", - "integrity": "sha512-SYLX05PwJVnW+WVegZt1T4Ip1qba1ik+pNJPDiqvk6zS5Y/i8PhRzLpGEtVd7sW0G8cMtkD8t4AZYhQwm8vnww==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-2.0.5.tgz", + "integrity": "sha512-doc2sWgJpbFQ64UflSVd17ibMGDuxO1yKgOgLMwavzESnXjFWJqUeG8saYosqKpHp4kWiM5x1nXvEjbpx90gzw==", "dev": true, "license": "MIT", "engines": { @@ -590,16 +587,16 @@ } }, "node_modules/@inquirer/checkbox": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.0.2.tgz", - "integrity": "sha512-iTPV4tMMct7iOpwer5qmTP7gjnk1VQJjsNfAaC2b8Q3qiuHM3K2yjjDr5u1MKfkrvp2JD4Flf8sIPpF21pmZmw==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.1.3.tgz", + "integrity": "sha512-+G7I8CT+EHv/hasNfUl3P37DVoMoZfpA+2FXmM54dA8MxYle1YqucxbacxHalw1iAFSdKNEDTGNV7F+j1Ldqcg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.2", - "@inquirer/core": "^11.0.2", - "@inquirer/figures": "^2.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/ansi": "^2.0.5", + "@inquirer/core": "^11.1.8", + "@inquirer/figures": "^2.0.5", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -614,14 +611,14 @@ } }, "node_modules/@inquirer/confirm": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.2.tgz", - "integrity": "sha512-A0/13Wyi+8iFeNDX6D4zZYKPoBLIEbE4K/219qHcnpXMer2weWvaTo63+2c7mQPPA206DEMSYVOPnEw3meOlCw==", + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.0.11.tgz", + "integrity": "sha512-pTpHjg0iEIRMYV/7oCZUMf27/383E6Wyhfc/MY+AVQGEoUobffIYWOK9YLP2XFRGz/9i6WlTQh1CkFVIo2Y7XA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -636,19 +633,19 @@ } }, "node_modules/@inquirer/core": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.0.2.tgz", - "integrity": "sha512-lgMRx/n02ciiNELBvFLHtmcjbV5tf5D/I0UYfCg2YbTZWmBZ10/niLd3IjWBxz8LtM27xP+4oLEa06Slmb7p7A==", + "version": "11.1.8", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-11.1.8.tgz", + "integrity": "sha512-/u+yJk2pOKNDOh1ZgdUH2RQaRx6OOH4I0uwL95qPvTFTIL38YBsuSC4r1yXBB3Q6JvNqFFc202gk0Ew79rrcjA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.2", - "@inquirer/figures": "^2.0.2", - "@inquirer/type": "^4.0.2", + "@inquirer/ansi": "^2.0.5", + "@inquirer/figures": "^2.0.5", + "@inquirer/type": "^4.0.5", "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", - "signal-exit": "^4.1.0", - "wrap-ansi": "^9.0.2" + "signal-exit": "^4.1.0" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -662,101 +659,16 @@ } } }, - "node_modules/@inquirer/core/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@inquirer/core/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@inquirer/core/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "dev": true, - "license": "MIT" - }, - "node_modules/@inquirer/core/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "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/@inquirer/core/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@inquirer/core/node_modules/wrap-ansi": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@inquirer/editor": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.0.2.tgz", - "integrity": "sha512-pXQ4Nf0qmFcJuYB6NlcIIxH6l6zKOwNg1Jh/ZRdKd2dTqBB4OXKUFbFwR2K4LVXVtq15ZFFatBVT+rerYR8hWQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.1.0.tgz", + "integrity": "sha512-6wlkYl65Qfayy48gPCfU4D7li6KCAGN79mLXa/tYHZH99OfZ820yY+HA+DgE88r8YwwgeuY6PQgNqMeK6LuMmw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/external-editor": "^2.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/external-editor": "^3.0.0", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -771,14 +683,14 @@ } }, "node_modules/@inquirer/expand": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.2.tgz", - "integrity": "sha512-siFG1swxfjFIOxIcehtZkh+KUNB/YCpyfHNEGu+nC/SBXIbgUWibvThLn/WesSxLRGOeSKdNKoTm+GQCKFm6Ww==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.0.12.tgz", + "integrity": "sha512-vOfrB33b7YIZfDauXS8vNNz2Z86FozTZLIt7e+7/dCaPJ1RXZsHCuI9TlcERzEUq57vkM+UdnBgxP0rFd23JYQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -793,14 +705,14 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-2.0.2.tgz", - "integrity": "sha512-X/fMXK7vXomRWEex1j8mnj7s1mpnTeP4CO/h2gysJhHLT2WjBnLv4ZQEGpm/kcYI8QfLZ2fgW+9kTKD+jeopLg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-3.0.0.tgz", + "integrity": "sha512-lDSwMgg+M5rq6JKBYaJwSX6T9e/HK2qqZ1oxmOwn4AQoJE5D+7TumsxLGC02PWS//rkIVqbZv3XA3ejsc9FYvg==", "dev": true, "license": "MIT", "dependencies": { "chardet": "^2.1.1", - "iconv-lite": "^0.7.0" + "iconv-lite": "^0.7.2" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -815,9 +727,9 @@ } }, "node_modules/@inquirer/figures": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.2.tgz", - "integrity": "sha512-qXm6EVvQx/FmnSrCWCIGtMHwqeLgxABP8XgcaAoywsL0NFga9gD5kfG0gXiv80GjK9Hsoz4pgGwF/+CjygyV9A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.5.tgz", + "integrity": "sha512-NsSs4kzfm12lNetHwAn3GEuH317IzpwrMCbOuMIVytpjnJ90YYHNwdRgYGuKmVxwuIqSgqk3M5qqQt1cDk0tGQ==", "dev": true, "license": "MIT", "engines": { @@ -825,14 +737,14 @@ } }, "node_modules/@inquirer/input": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.2.tgz", - "integrity": "sha512-hN2YRo1QiEc9lD3mK+CPnTS4TK2RhCMmMmP4nCWwTkmQL2vx9jPJWYk+rbUZpwR1D583ZJk1FI3i9JZXIpi/qg==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.0.11.tgz", + "integrity": "sha512-twUWidn4ocPO8qi6fRM7tNWt7W1FOnOZqQ+/+PsfLUacMR5rFLDPK9ql0nBPwxi0oELbo8T5NhRs8B2+qQEqFQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -847,14 +759,14 @@ } }, "node_modules/@inquirer/number": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.2.tgz", - "integrity": "sha512-4McnjTSYrlthNW1ojkkmP75WLRYhQs7GXm6pDDoIrHqJuV5uUYwfdbB0geHdaKMarAqJQgoOVjzIT0jdWCsKew==", + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.0.11.tgz", + "integrity": "sha512-Vscmim9TCksQsfjPtka/JwPUcbLhqWYrgfPf1cHrCm24X/F2joFwnageD50yMKsaX14oNGOyKf/RNXAFkNjWpA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -869,15 +781,15 @@ } }, "node_modules/@inquirer/password": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.2.tgz", - "integrity": "sha512-oSDziMKiw4G2e4zS+0JRfxuPFFGh6N/9yUaluMgEHp2/Yyj2JGwfDO7XbwtOrxVrz+XsP/iaGyWXdQb9d8A0+g==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.0.11.tgz", + "integrity": "sha512-9KZFeRaNHIcejtPb0wN4ddFc7EvobVoAFa049eS3LrDZFxI8O7xUXiITEOinBzkZFAIwY5V4yzQae/QfO9cbbg==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.2", - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/ansi": "^2.0.5", + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -892,22 +804,22 @@ } }, "node_modules/@inquirer/prompts": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.0.2.tgz", - "integrity": "sha512-2zK5zY48fZcl6+gG4eqOC/UzZsJckHCRvjXoLuW4D8LKOCVGdcJiSKkLnumSZjR/6PXPINDGOrGHqNxb+sxJDg==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.4.1.tgz", + "integrity": "sha512-AH5xPQ997K7e0F0vulPlteIHke2awMkFi8F0dBemrDfmvtPmHJo82mdHbONC4F/t8d1NHwrbI5cGVI+RbLWdoQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^5.0.2", - "@inquirer/confirm": "^6.0.2", - "@inquirer/editor": "^5.0.2", - "@inquirer/expand": "^5.0.2", - "@inquirer/input": "^5.0.2", - "@inquirer/number": "^4.0.2", - "@inquirer/password": "^5.0.2", - "@inquirer/rawlist": "^5.0.2", - "@inquirer/search": "^4.0.2", - "@inquirer/select": "^5.0.2" + "@inquirer/checkbox": "^5.1.3", + "@inquirer/confirm": "^6.0.11", + "@inquirer/editor": "^5.1.0", + "@inquirer/expand": "^5.0.12", + "@inquirer/input": "^5.0.11", + "@inquirer/number": "^4.0.11", + "@inquirer/password": "^5.0.11", + "@inquirer/rawlist": "^5.2.7", + "@inquirer/search": "^4.1.7", + "@inquirer/select": "^5.1.3" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -922,14 +834,14 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.0.2.tgz", - "integrity": "sha512-AcNALEdQKUQDeJcpC1a3YC53m1MLv+sMUS+vRZ8Qigs1Yg3Dcdtmi82rscJplogKOY8CXkKW4wvVwHS2ZjCIBQ==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.2.7.tgz", + "integrity": "sha512-AqRMiD9+uE1lskDPrdqHwrV/EUmxKEBLX44SR7uxK3vD2413AmVfE5EQaPeNzYf5Pq5SitHJDYUFVF0poIr09w==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -944,15 +856,15 @@ } }, "node_modules/@inquirer/search": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.0.2.tgz", - "integrity": "sha512-hg63w5toohdzE65S3LiGhdfIL0kT+yisbZARf7zw65PvyMUTutTN3eMAvD/B6y/25z88vTrB7kSB45Vz5CbrXg==", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.1.7.tgz", + "integrity": "sha512-1y7+0N65AWk5RdlXH/Kn13txf3IjIQ7OEfhCEkDTU+h5wKMLq8DUF3P6z+/kLSxDGDtQT1dRBWEUC3o/VvImsQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.0.2", - "@inquirer/figures": "^2.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/core": "^11.1.8", + "@inquirer/figures": "^2.0.5", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -967,16 +879,16 @@ } }, "node_modules/@inquirer/select": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.0.2.tgz", - "integrity": "sha512-JygTohvQxSNnvt7IKANVlg/eds+yN5sLRilYeGc4ri/9Aqi/2QPoXBMV5Cz/L1VtQv63SnTbPXJZeCK2pSwsOA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.1.3.tgz", + "integrity": "sha512-zYyqWgGQi3NhBcNq4Isc5rB3oEdQEh1Q/EcAnOW0FK4MpnXWkvSBYgA4cYrTM4A9UB573omouZbnL9JJ74Mq3A==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.2", - "@inquirer/core": "^11.0.2", - "@inquirer/figures": "^2.0.2", - "@inquirer/type": "^4.0.2" + "@inquirer/ansi": "^2.0.5", + "@inquirer/core": "^11.1.8", + "@inquirer/figures": "^2.0.5", + "@inquirer/type": "^4.0.5" }, "engines": { "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" @@ -991,9 +903,9 @@ } }, "node_modules/@inquirer/type": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.2.tgz", - "integrity": "sha512-cae7mzluplsjSdgFA6ACLygb5jC8alO0UUnFPyu0E7tNRPrL+q/f8VcSXp+cjZQ7l5CMpDpi2G1+IQvkOiL1Lw==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.5.tgz", + "integrity": "sha512-aetVUNeKNc/VriqXlw1NRSW0zhMBB0W4bNbWRJgzRl/3d0QNDQFfk0GO5SDdtjMZVg6o8ZKEiadd7SCCzoOn5Q==", "dev": true, "license": "MIT", "engines": { @@ -1058,9 +970,9 @@ } }, "node_modules/@microsoft/api-extractor": { - "version": "7.58.0", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.58.0.tgz", - "integrity": "sha512-XcHlDylX5GblbGbs1eBoexjVyvdJMioTPuBCgCorE2rqijzTYxi6eudXyez3xACRxtH9aDtahoL9fYM4XTvQmg==", + "version": "7.58.1", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.58.1.tgz", + "integrity": "sha512-kF3GFME4lN22O5zbnXk2RP4y/4PDQdps0xKiYTipMYprkwCmmpsWLZt/N2Fkbil540cSLfJX0BW7LkHzgMVUYg==", "dev": true, "license": "MIT", "dependencies": { @@ -1072,7 +984,7 @@ "@rushstack/terminal": "0.22.4", "@rushstack/ts-command-line": "5.3.4", "diff": "~8.0.2", - "lodash": "~4.17.23", + "lodash": "~4.18.1", "minimatch": "10.2.3", "resolve": "~1.22.1", "semver": "~7.5.4", @@ -1095,13 +1007,6 @@ "@rushstack/node-core-library": "5.21.0" } }, - "node_modules/@microsoft/api-extractor/node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", - "dev": true, - "license": "MIT" - }, "node_modules/@microsoft/api-extractor/node_modules/minimatch": { "version": "10.2.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.3.tgz", @@ -1206,9 +1111,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.122.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.122.0.tgz", - "integrity": "sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA==", + "version": "0.123.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.123.0.tgz", + "integrity": "sha512-YtECP/y8Mj1lSHiUWGSRzy/C6teUKlS87dEfuVKT09LgQbUsBW1rNg+MiJ4buGu3yuADV60gbIvo9/HplA56Ew==", "dev": true, "license": "MIT", "funding": { @@ -1223,9 +1128,9 @@ "license": "MIT" }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.12.tgz", - "integrity": "sha512-pv1y2Fv0JybcykuiiD3qBOBdz6RteYojRFY1d+b95WVuzx211CRh+ytI/+9iVyWQ6koTh5dawe4S/yRfOFjgaA==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.13.tgz", + "integrity": "sha512-5ZiiecKH2DXAVJTNN13gNMUcCDg4Jy8ZjbXEsPnqa248wgOVeYRX0iqXXD5Jz4bI9BFHgKsI2qmyJynstbmr+g==", "cpu": [ "arm64" ], @@ -1240,9 +1145,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.12.tgz", - "integrity": "sha512-cFYr6zTG/3PXXF3pUO+umXxt1wkRK/0AYT8lDwuqvRC+LuKYWSAQAQZjCWDQpAH172ZV6ieYrNnFzVVcnSflAg==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.13.tgz", + "integrity": "sha512-tz/v/8G77seu8zAB3A5sK3UFoOl06zcshEzhUO62sAEtrEuW/H1CcyoupOrD+NbQJytYgA4CppXPzlrmp4JZKA==", "cpu": [ "arm64" ], @@ -1257,9 +1162,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.12.tgz", - "integrity": "sha512-ZCsYknnHzeXYps0lGBz8JrF37GpE9bFVefrlmDrAQhOEi4IOIlcoU1+FwHEtyXGx2VkYAvhu7dyBf75EJQffBw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.13.tgz", + "integrity": "sha512-8DakphqOz8JrMYWTJmWA+vDJxut6LijZ8Xcdc4flOlAhU7PNVwo2MaWBF9iXjJAPo5rC/IxEFZDhJ3GC7NHvug==", "cpu": [ "x64" ], @@ -1274,9 +1179,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.12.tgz", - "integrity": "sha512-dMLeprcVsyJsKolRXyoTH3NL6qtsT0Y2xeuEA8WQJquWFXkEC4bcu1rLZZSnZRMtAqwtrF/Ib9Ddtpa/Gkge9Q==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.13.tgz", + "integrity": "sha512-4wBQFfjDuXYN/SVI8inBF3Aa+isq40rc6VMFbk5jcpolUBTe5cYnMsHZ51nFWsx3PVyyNN3vgoESki0Hmr/4BA==", "cpu": [ "x64" ], @@ -1291,9 +1196,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.12.tgz", - "integrity": "sha512-YqWjAgGC/9M1lz3GR1r1rP79nMgo3mQiiA+Hfo+pvKFK1fAJ1bCi0ZQVh8noOqNacuY1qIcfyVfP6HoyBRZ85Q==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.13.tgz", + "integrity": "sha512-JW/e4yPIXLms+jmnbwwy5LA/LxVwZUWLN8xug+V200wzaVi5TEGIWQlh8o91gWYFxW609euI98OCCemmWGuPrw==", "cpu": [ "arm" ], @@ -1308,13 +1213,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.12.tgz", - "integrity": "sha512-/I5AS4cIroLpslsmzXfwbe5OmWvSsrFuEw3mwvbQ1kDxJ822hFHIx+vsN/TAzNVyepI/j/GSzrtCIwQPeKCLIg==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.13.tgz", + "integrity": "sha512-ZfKWpXiUymDnavepCaM6KG/uGydJ4l2nBmMxg60Ci4CbeefpqjPWpfaZM7PThOhk2dssqBAcwLc6rAyr0uTdXg==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1325,13 +1233,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.12.tgz", - "integrity": "sha512-V6/wZztnBqlx5hJQqNWwFdxIKN0m38p8Jas+VoSfgH54HSj9tKTt1dZvG6JRHcjh6D7TvrJPWFGaY9UBVOaWPw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.13.tgz", + "integrity": "sha512-bmRg3O6Z0gq9yodKKWCIpnlH051sEfdVwt+6m5UDffAQMUUqU0xjnQqqAUm+Gu7ofAAly9DqiQDtKu2nPDEABA==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1342,13 +1253,16 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.12.tgz", - "integrity": "sha512-AP3E9BpcUYliZCxa3w5Kwj9OtEVDYK6sVoUzy4vTOJsjPOgdaJZKFmN4oOlX0Wp0RPV2ETfmIra9x1xuayFB7g==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.13.tgz", + "integrity": "sha512-8Wtnbw4k7pMYN9B/mOEAsQ8HOiq7AZ31Ig4M9BKn2So4xRaFEhtCSa4ZJaOutOWq50zpgR4N5+L/opnlaCx8wQ==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1359,13 +1273,16 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.12.tgz", - "integrity": "sha512-nWwpvUSPkoFmZo0kQazZYOrT7J5DGOJ/+QHHzjvNlooDZED8oH82Yg67HvehPPLAg5fUff7TfWFHQS8IV1n3og==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.13.tgz", + "integrity": "sha512-D/0Nlo8mQuxSMohNJUF2lDXWRsFDsHldfRRgD9bRgktj+EndGPj4DOV37LqDKPYS+osdyhZEH7fTakTAEcW7qg==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1376,13 +1293,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.12.tgz", - "integrity": "sha512-RNrafz5bcwRy+O9e6P8Z/OCAJW/A+qtBczIqVYwTs14pf4iV1/+eKEjdOUta93q2TsT/FI0XYDP3TCky38LMAg==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.13.tgz", + "integrity": "sha512-eRrPvat2YaVQcwwKi/JzOP6MKf1WRnOCr+VaI3cTWz3ZoLcP/654z90lVCJ4dAuMEpPdke0n+qyAqXDZdIC4rA==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1393,13 +1313,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.12.tgz", - "integrity": "sha512-Jpw/0iwoKWx3LJ2rc1yjFrj+T7iHZn2JDg1Yny1ma0luviFS4mhAIcd1LFNxK3EYu3DHWCps0ydXQ5i/rrJ2ig==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.13.tgz", + "integrity": "sha512-PsdONiFRp8hR8KgVjTWjZ9s7uA3uueWL0t74/cKHfM4dR5zXYv4AjB8BvA+QDToqxAFg4ZkcVEqeu5F7inoz5w==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1410,9 +1333,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.12.tgz", - "integrity": "sha512-vRugONE4yMfVn0+7lUKdKvN4D5YusEiPilaoO2sgUWpCvrncvWgPMzK00ZFFJuiPgLwgFNP5eSiUlv2tfc+lpA==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.13.tgz", + "integrity": "sha512-hCNXgC5dI3TVOLrPT++PKFNZ+1EtS0mLQwfXXXSUD/+rGlB65gZDwN/IDuxLpQP4x8RYYHqGomlUXzpO8aVI2w==", "cpu": [ "arm64" ], @@ -1427,9 +1350,9 @@ } }, "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.12.tgz", - "integrity": "sha512-ykGiLr/6kkiHc0XnBfmFJuCjr5ZYKKofkx+chJWDjitX+KsJuAmrzWhwyOMSHzPhzOHOy7u9HlFoa5MoAOJ/Zg==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.13.tgz", + "integrity": "sha512-viLS5C5et8NFtLWw9Sw3M/w4vvnVkbWkO7wSNh3C+7G1+uCkGpr6PcjNDSFcNtmXY/4trjPBqUfcOL+P3sWy/g==", "cpu": [ "wasm32" ], @@ -1437,16 +1360,18 @@ "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^1.1.1" + "@emnapi/core": "1.9.1", + "@emnapi/runtime": "1.9.1", + "@napi-rs/wasm-runtime": "^1.1.2" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.12.tgz", - "integrity": "sha512-5eOND4duWkwx1AzCxadcOrNeighiLwMInEADT0YM7xeEOOFcovWZCq8dadXgcRHSf3Ulh1kFo/qvzoFiCLOL1Q==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.13.tgz", + "integrity": "sha512-Fqa3Tlt1xL4wzmAYxGNFV36Hb+VfPc9PYU+E25DAnswXv3ODDu/yyWjQDbXMo5AGWkQVjLgQExuVu8I/UaZhPQ==", "cpu": [ "arm64" ], @@ -1461,9 +1386,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.12.tgz", - "integrity": "sha512-PyqoipaswDLAZtot351MLhrlrh6lcZPo2LSYE+VDxbVk24LVKAGOuE4hb8xZQmrPAuEtTZW8E6D2zc5EUZX4Lw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.13.tgz", + "integrity": "sha512-/pLI5kPkGEi44TDlnbio3St/5gUFeN51YWNAk/Gnv6mEQBOahRBh52qVFVBpmrnU01n2yysvBML9Ynu7K4kGAQ==", "cpu": [ "x64" ], @@ -1478,9 +1403,9 @@ } }, "node_modules/@rolldown/pluginutils": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.12.tgz", - "integrity": "sha512-HHMwmarRKvoFsJorqYlFeFRzXZqCt2ETQlEDOb9aqssrnVBB1/+xgTGtuTrIk5vzLNX1MjMtTf7W9z3tsSbrxw==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.13.tgz", + "integrity": "sha512-3ngTAv6F/Py35BsYbeeLeecvhMKdsKm4AoOETVhAA+Qc8nrA2I0kF7oa93mE9qnIurngOSpMnQ0x2nQY2FPviA==", "dev": true, "license": "MIT" }, @@ -1876,9 +1801,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz", - "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", + "version": "25.5.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.2.tgz", + "integrity": "sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg==", "dev": true, "license": "MIT", "dependencies": { @@ -2204,25 +2129,25 @@ } }, "node_modules/@typespec/compiler": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.10.0.tgz", - "integrity": "sha512-R6BATDkughntPpaxeESJF+wxma5PEjgmnnKvH0/ByqUH8VyhIckQWE9kkP0Uc/EJ0o0VYhe8qCwWQvV70k5lTw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.11.0.tgz", + "integrity": "sha512-4vuWtoepc4rYJ81K+P7xn2ByXIRhBM40rfzAGnpagNuGSVHuKEC6lqJqs3ePvhCpnxiYAC8XWpaOi+BEDzyhnQ==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "~7.29.0", - "@inquirer/prompts": "^8.0.1", + "@inquirer/prompts": "^8.3.0", "ajv": "~8.18.0", "change-case": "~5.4.4", "env-paths": "^4.0.0", - "globby": "~16.1.0", + "globby": "~16.1.1", "is-unicode-supported": "^2.1.0", "mustache": "~4.2.0", "picocolors": "~1.1.1", - "prettier": "~3.8.0", - "semver": "^7.7.1", - "tar": "^7.5.2", - "temporal-polyfill": "^0.3.0", + "prettier": "~3.8.1", + "semver": "^7.7.4", + "tar": "^7.5.11", + "temporal-polyfill": "^0.3.2", "vscode-languageserver": "~9.0.1", "vscode-languageserver-textdocument": "~1.0.12", "yaml": "~2.8.2", @@ -2285,9 +2210,9 @@ "license": "MIT" }, "node_modules/@typespec/compiler/node_modules/globby": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-16.1.0.tgz", - "integrity": "sha512-+A4Hq7m7Ze592k9gZRy4gJ27DrXRNnC1vPjxTt1qQxEY8RxagBkBxivkCwg7FxSTG0iLLEMaUx13oOr0R2/qcQ==", + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-16.1.1.tgz", + "integrity": "sha512-dW7vl+yiAJSp6aCekaVnVJxurRv7DCOLyXqEG3RYMYUg7AuJ2jCqPkZTA8ooqC2vtnkaMcV5WfFBMuEnTu1OQg==", "dev": true, "license": "MIT", "dependencies": { @@ -2409,30 +2334,30 @@ } }, "node_modules/@typespec/events": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.80.0.tgz", - "integrity": "sha512-FrWEUwxhDNbE2YN4fyqV5Qrz9qFJbvPoiKrJM7dexkb7eyhepq3dbc5zZgAm/qFBQ+XxGQQVJ4swXxKT+338fw==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.81.0.tgz", + "integrity": "sha512-ee9QSBL+k6ccPlbJICZzaGt4iC1nTIl+J9sELY9yJNISvOvUEzY5MU8c7HaISB10cUESRJW+oaLWwyc8XjwHng==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.11.0" } }, "node_modules/@typespec/http": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.10.0.tgz", - "integrity": "sha512-/fj55fmUj4m/FmNdfH0V52menVrmS2r5Xj9d1H+pnjQbxvvaxS906RSRcoF8kbg3PvlibP/Py5u82TAk53AyqA==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.11.0.tgz", + "integrity": "sha512-/DOkN2+MUZyLdmqYmSMZDjxikJTOuNxikTeOwG2fVOibnu8e6S1jzPAuN/mn6YyQBKeBCItMPmUOXIj61Wy8Bg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/streams": "^0.80.0" + "@typespec/compiler": "^1.11.0", + "@typespec/streams": "^0.81.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -2441,23 +2366,23 @@ } }, "node_modules/@typespec/openapi": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.10.0.tgz", - "integrity": "sha512-tukmyp+c9CFlA2FdF61XfT9eTe5WXWz6J8pOrJ9+IYg0BcBwhJkvDj6BYpDD6SjxbRr1wO5ZL2Whe6MequsyVw==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.11.0.tgz", + "integrity": "sha512-xUQrHExKBh0XSP4cn+HcondDXjHJM5HCq2Xfy9tB1QflsFh5uP1JJt1+67g73VmHlhZVSUDcoFrnU95pfjyubg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0" + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0" } }, "node_modules/@typespec/openapi3": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-1.10.0.tgz", - "integrity": "sha512-G2UTfsDuUprvhFIymHiLKly6FoA9UkRmTImqgmROP4JkKCdY/Mo6Xo03sufY8urywVjIWE3dryXpy5DjpOt9Eg==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi3/-/openapi3-1.11.0.tgz", + "integrity": "sha512-AjMpTkIUy8+YlRaqUyQ1NZxbmVbWyT4fPpztVzclyX+TXyvxo9gqLEdqoMfvQ9KUjcU0nsOjfPdaYb5rj25oIA==", "dev": true, "license": "MIT", "dependencies": { @@ -2474,14 +2399,14 @@ "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/events": "^0.80.0", - "@typespec/http": "^1.10.0", - "@typespec/json-schema": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/sse": "^0.80.0", - "@typespec/streams": "^0.80.0", - "@typespec/versioning": "^0.80.0" + "@typespec/compiler": "^1.11.0", + "@typespec/events": "^0.81.0", + "@typespec/http": "^1.11.0", + "@typespec/json-schema": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/sse": "^0.81.0", + "@typespec/streams": "^0.81.0", + "@typespec/versioning": "^0.81.0" }, "peerDependenciesMeta": { "@typespec/events": { @@ -2505,46 +2430,46 @@ } }, "node_modules/@typespec/rest": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.80.0.tgz", - "integrity": "sha512-xczXLoB2akSIDner41gQYTS9CG6TdCN0QHYvXBT6ZrYEnBh+pMvdymW//5CSOTamZLOGo9AOJVJaFfwbFA4vQQ==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.81.0.tgz", + "integrity": "sha512-qQXZRKEvq5aNlDFEUqBiiXXPIFyr/+PWgBY0kIrnhyZzMjfUqPInkB12QgXpVp2O2Wm3jmETJD45SaLHTCYBbg==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0" + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0" } }, "node_modules/@typespec/sse": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.80.0.tgz", - "integrity": "sha512-/lxYgMaxgEcjBVhep9tf/VnFD2wnkZlkmjUHLeZL8Cuf+qip61Ren6Ml91YtNnnIFYsuuymDzRclrA073ZBR6Q==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.81.0.tgz", + "integrity": "sha512-VinoeN+5ClKlGXf77fWayAQna8SaYtvEBhnLR8t8FdvmMsL6ce1LghR2kAL3ARbNXfwMZRmQiq+ajKKebDLIng==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0", - "@typespec/events": "^0.80.0", - "@typespec/http": "^1.10.0", - "@typespec/streams": "^0.80.0" + "@typespec/compiler": "^1.11.0", + "@typespec/events": "^0.81.0", + "@typespec/http": "^1.11.0", + "@typespec/streams": "^0.81.0" } }, "node_modules/@typespec/streams": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.80.0.tgz", - "integrity": "sha512-lNvzrvX/ZRIxRpxIBZu90XNsT+uWsMbLtxHd9edspHAiID3c9WKZbl2fnLcPqdR/60odqKve4yGzB9gF58GUDQ==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.81.0.tgz", + "integrity": "sha512-IIEKq18aqAtM65f8ZLs3Kzua97wjkr8fTehqPs/Q4neWo2UkDJp64LfA37iXJzaku8xMFSwXdVu4EW8wo+KV8w==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.11.0" } }, "node_modules/@typespec/tspd": { @@ -2705,40 +2630,40 @@ } }, "node_modules/@typespec/versioning": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.80.0.tgz", - "integrity": "sha512-WQCT0jN2lSRfwOy+Cd1KUYzenpKR5TdoX0uW6zQdvxQ9nQZIXoaSaReh9/ldhmSV4xv3p2dqF9oq1cdbVGfJTg==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.81.0.tgz", + "integrity": "sha512-5bha4t64xA85zLY8VGm/6jNd2kwPHzjPq/dlCUjtgGfGXv2R6Ow/YIukqhqZnwnIgNAIlZ7nguekRMRx+2oO2w==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.11.0" } }, "node_modules/@typespec/xml": { - "version": "0.80.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.80.0.tgz", - "integrity": "sha512-Qfy5eyCcOF3xYOU/dejhpmmeY75U1Q9C8XBE+GvSZ3lakRfKBIpT+X6Q07qmKSAbGYJZKYLWCIAy/dgCuu/OAA==", + "version": "0.81.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.81.0.tgz", + "integrity": "sha512-4docnAcV1a8gE4c4TmYuirZf2PEzS4xHUH4QjHFU6hk6J2M6OMU6YG4iSq9tmlUzQ/2DraVcWNO/fsG8Lt383A==", "dev": true, "license": "MIT", "engines": { "node": ">=20.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.11.0" } }, "node_modules/@vitest/coverage-v8": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.2.tgz", - "integrity": "sha512-sPK//PHO+kAkScb8XITeB1bf7fsk85Km7+rt4eeuRR3VS1/crD47cmV5wicisJmjNdfeokTZwjMk4Mj2d58Mgg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.3.tgz", + "integrity": "sha512-/MBdrkA8t6hbdCWFKs09dPik774xvs4Z6L4bycdCxYNLHM8oZuRyosumQMG19LUlBsB6GeVpL1q4kFFazvyKGA==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^1.0.2", - "@vitest/utils": "4.1.2", + "@vitest/utils": "4.1.3", "ast-v8-to-istanbul": "^1.0.0", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", @@ -2752,8 +2677,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "4.1.2", - "vitest": "4.1.2" + "@vitest/browser": "4.1.3", + "vitest": "4.1.3" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -2762,16 +2687,16 @@ } }, "node_modules/@vitest/expect": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.2.tgz", - "integrity": "sha512-gbu+7B0YgUJ2nkdsRJrFFW6X7NTP44WlhiclHniUhxADQJH5Szt9mZ9hWnJPJ8YwOK5zUOSSlSvyzRf0u1DSBQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.3.tgz", + "integrity": "sha512-CW8Q9KMtXDGHj0vCsqui0M5KqRsu0zm0GNDW7Gd3U7nZ2RFpPKSCpeCXoT+/+5zr1TNlsoQRDEz+LzZUyq6gnQ==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.2", - "@vitest/utils": "4.1.2", + "@vitest/spy": "4.1.3", + "@vitest/utils": "4.1.3", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" }, @@ -2780,13 +2705,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.2.tgz", - "integrity": "sha512-Ize4iQtEALHDttPRCmN+FKqOl2vxTiNUhzobQFFt/BM1lRUTG7zRCLOykG/6Vo4E4hnUdfVLo5/eqKPukcWW7Q==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.3.tgz", + "integrity": "sha512-XN3TrycitDQSzGRnec/YWgoofkYRhouyVQj4YNsJ5r/STCUFqMrP4+oxEv3e7ZbLi4og5kIHrZwekDJgw6hcjw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.2", + "@vitest/spy": "4.1.3", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -2807,9 +2732,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.2.tgz", - "integrity": "sha512-dwQga8aejqeuB+TvXCMzSQemvV9hNEtDDpgUKDzOmNQayl2OG241PSWeJwKRH3CiC+sESrmoFd49rfnq7T4RnA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.3.tgz", + "integrity": "sha512-hYqqwuMbpkkBodpRh4k4cQSOELxXky1NfMmQvOfKvV8zQHz8x8Dla+2wzElkMkBvSAJX5TRGHJAQvK0TcOafwg==", "dev": true, "license": "MIT", "dependencies": { @@ -2820,13 +2745,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.2.tgz", - "integrity": "sha512-Gr+FQan34CdiYAwpGJmQG8PgkyFVmARK8/xSijia3eTFgVfpcpztWLuP6FttGNfPLJhaZVP/euvujeNYar36OQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.3.tgz", + "integrity": "sha512-VwgOz5MmT0KhlUj40h02LWDpUBVpflZ/b7xZFA25F29AJzIrE+SMuwzFf0b7t4EXdwRNX61C3B6auIXQTR3ttA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.2", + "@vitest/utils": "4.1.3", "pathe": "^2.0.3" }, "funding": { @@ -2834,14 +2759,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.2.tgz", - "integrity": "sha512-g7yfUmxYS4mNxk31qbOYsSt2F4m1E02LFqO53Xpzg3zKMhLAPZAjjfyl9e6z7HrW6LvUdTwAQR3HHfLjpko16A==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.3.tgz", + "integrity": "sha512-9l+k/J9KG5wPJDX9BcFFzhhwNjwkRb8RsnYhaT1vPY7OufxmQFc9sZzScRCPTiETzl37mrIWVY9zxzmdVeJwDQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.2", - "@vitest/utils": "4.1.2", + "@vitest/pretty-format": "4.1.3", + "@vitest/utils": "4.1.3", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -2850,9 +2775,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.2.tgz", - "integrity": "sha512-DU4fBnbVCJGNBwVA6xSToNXrkZNSiw59H8tcuUspVMsBDBST4nfvsPsEHDHGtWRRnqBERBQu7TrTKskmjqTXKA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.3.tgz", + "integrity": "sha512-ujj5Uwxagg4XUIfAUyRQxAg631BP6e9joRiN99mr48Bg9fRs+5mdUElhOoZ6rP5mBr8Bs3lmrREnkrQWkrsTCw==", "dev": true, "license": "MIT", "funding": { @@ -2860,13 +2785,13 @@ } }, "node_modules/@vitest/ui": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.1.2.tgz", - "integrity": "sha512-/irhyeAcKS2u6Zokagf9tqZJ0t8S6kMZq4ZG9BHZv7I+fkRrYfQX4w7geYeC2r6obThz39PDxvXQzZX+qXqGeg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.1.3.tgz", + "integrity": "sha512-xBPy+43o1fgMLUDlufUXh7tlT/Es8uS5eiyBY2PyPfFYSGpApZskLw65DROoDz+rgYkPuAmb20Mv9Z9g1WQE7w==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.2", + "@vitest/utils": "4.1.3", "fflate": "^0.8.2", "flatted": "^3.4.2", "pathe": "^2.0.3", @@ -2878,17 +2803,17 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "4.1.2" + "vitest": "4.1.3" } }, "node_modules/@vitest/utils": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.2.tgz", - "integrity": "sha512-xw2/TiX82lQHA06cgbqRKFb5lCAy3axQ4H4SoUFhUsg+wztiet+co86IAMDtF6Vm1hc7J6j09oh/rgDn+JdKIQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.3.tgz", + "integrity": "sha512-Pc/Oexse/khOWsGB+w3q4yzA4te7W4gpZZAvk+fr8qXfTURZUMj5i7kuxsNK5mP/dEB6ao3jfr0rs17fHhbHdw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.2", + "@vitest/pretty-format": "4.1.3", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" }, @@ -4534,12 +4459,39 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-string-truncated-width": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", + "integrity": "sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-string-width": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/fast-string-width/-/fast-string-width-3.0.2.tgz", + "integrity": "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-string-truncated-width": "^3.0.2" + } + }, "node_modules/fast-uri": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", "dev": true }, + "node_modules/fast-wrap-ansi": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/fast-wrap-ansi/-/fast-wrap-ansi-0.2.0.tgz", + "integrity": "sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-string-width": "^3.0.2" + } + }, "node_modules/fastq": { "version": "1.15.0", "dev": true, @@ -5027,9 +4979,9 @@ "license": "MIT" }, "node_modules/iconv-lite": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz", - "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", "dev": true, "license": "MIT", "dependencies": { @@ -5869,6 +5821,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5890,6 +5845,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5911,6 +5869,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -5932,6 +5893,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -6537,9 +6501,9 @@ } }, "node_modules/postcss": { - "version": "8.5.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", - "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.9.tgz", + "integrity": "sha512-7a70Nsot+EMX9fFU3064K/kdHWZqGVY+BADLyXc8Dfv+mTLLVl6JzJpPaCZ2kQL9gIJvKXSLMHhqdRRjwQeFtw==", "dev": true, "funding": [ { @@ -6787,14 +6751,14 @@ } }, "node_modules/rolldown": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.12.tgz", - "integrity": "sha512-yP4USLIMYrwpPHEFB5JGH1uxhcslv6/hL0OyvTuY+3qlOSJvZ7ntYnoWpehBxufkgN0cvXxppuTu5hHa/zPh+A==", + "version": "1.0.0-rc.13", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.13.tgz", + "integrity": "sha512-bvVj8YJmf0rq4pSFmH7laLa6pYrhghv3PRzrCdRAr23g66zOKVJ4wkvFtgohtPLWmthgg8/rkaqRHrpUEh0Zbw==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.122.0", - "@rolldown/pluginutils": "1.0.0-rc.12" + "@oxc-project/types": "=0.123.0", + "@rolldown/pluginutils": "1.0.0-rc.13" }, "bin": { "rolldown": "bin/cli.mjs" @@ -6803,21 +6767,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm64": "1.0.0-rc.12", - "@rolldown/binding-darwin-arm64": "1.0.0-rc.12", - "@rolldown/binding-darwin-x64": "1.0.0-rc.12", - "@rolldown/binding-freebsd-x64": "1.0.0-rc.12", - "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.12", - "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.12", - "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.12", - "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.12", - "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.12", - "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.12", - "@rolldown/binding-linux-x64-musl": "1.0.0-rc.12", - "@rolldown/binding-openharmony-arm64": "1.0.0-rc.12", - "@rolldown/binding-wasm32-wasi": "1.0.0-rc.12", - "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.12", - "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.12" + "@rolldown/binding-android-arm64": "1.0.0-rc.13", + "@rolldown/binding-darwin-arm64": "1.0.0-rc.13", + "@rolldown/binding-darwin-x64": "1.0.0-rc.13", + "@rolldown/binding-freebsd-x64": "1.0.0-rc.13", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.13", + "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.13", + "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.13", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.13", + "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.13", + "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.13", + "@rolldown/binding-linux-x64-musl": "1.0.0-rc.13", + "@rolldown/binding-openharmony-arm64": "1.0.0-rc.13", + "@rolldown/binding-wasm32-wasi": "1.0.0-rc.13", + "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.13", + "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.13" } }, "node_modules/run-parallel": { @@ -7331,19 +7295,19 @@ } }, "node_modules/temporal-polyfill": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.0.tgz", - "integrity": "sha512-qNsTkX9K8hi+FHDfHmf22e/OGuXmfBm9RqNismxBrnSmZVJKegQ+HYYXT+R7Ha8F/YSm2Y34vmzD4cxMu2u95g==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.3.2.tgz", + "integrity": "sha512-TzHthD/heRK947GNiSu3Y5gSPpeUDH34+LESnfsq8bqpFhsB79HFBX8+Z834IVX68P3EUyRPZK5bL/1fh437Eg==", "dev": true, "license": "MIT", "dependencies": { - "temporal-spec": "0.3.0" + "temporal-spec": "0.3.1" } }, "node_modules/temporal-spec": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.0.tgz", - "integrity": "sha512-n+noVpIqz4hYgFSMOSiINNOUOMFtV5cZQNCmmszA6GiVFVRt3G7AqVyhXjhCSmowvQn+NsGn+jMDMKJYHd3bSQ==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.3.1.tgz", + "integrity": "sha512-B4TUhezh9knfSIMwt7RVggApDRJZo73uZdj8AacL2mZ8RP5KtLianh2MXxL06GN9ESYiIsiuoLQhgVfwe55Yhw==", "dev": true, "license": "ISC" }, @@ -7386,9 +7350,9 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.4.tgz", - "integrity": "sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.1.tgz", + "integrity": "sha512-VKS/ZaQhhkKFMANmAOhhXVoIfBXblQxGX1myCQ2faQrfmobMftXeJPcZGp0gS07ocvGJWDLZGyOZDadDBqYIJg==", "dev": true, "license": "MIT", "engines": { @@ -7800,16 +7764,16 @@ } }, "node_modules/vite": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.5.tgz", - "integrity": "sha512-nmu43Qvq9UopTRfMx2jOYW5l16pb3iDC1JH6yMuPkpVbzK0k+L7dfsEDH4jRgYFmsg0sTAqkojoZgzLMlwHsCQ==", + "version": "8.0.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.7.tgz", + "integrity": "sha512-P1PbweD+2/udplnThz3btF4cf6AgPky7kk23RtHUkJIU5BIxwPprhRGmOAHs6FTI7UiGbTNrgNP6jSYD6JaRnw==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.8", - "rolldown": "1.0.0-rc.12", + "rolldown": "1.0.0-rc.13", "tinyglobby": "^0.2.15" }, "bin": { @@ -7891,19 +7855,19 @@ } }, "node_modules/vitest": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.2.tgz", - "integrity": "sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.3.tgz", + "integrity": "sha512-DBc4Tx0MPNsqb9isoyOq00lHftVx/KIU44QOm2q59npZyLUkENn8TMFsuzuO+4U2FUa9rgbbPt3udrP25GcjXw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.2", - "@vitest/mocker": "4.1.2", - "@vitest/pretty-format": "4.1.2", - "@vitest/runner": "4.1.2", - "@vitest/snapshot": "4.1.2", - "@vitest/spy": "4.1.2", - "@vitest/utils": "4.1.2", + "@vitest/expect": "4.1.3", + "@vitest/mocker": "4.1.3", + "@vitest/pretty-format": "4.1.3", + "@vitest/runner": "4.1.3", + "@vitest/snapshot": "4.1.3", + "@vitest/spy": "4.1.3", + "@vitest/utils": "4.1.3", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", @@ -7931,10 +7895,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.2", - "@vitest/browser-preview": "4.1.2", - "@vitest/browser-webdriverio": "4.1.2", - "@vitest/ui": "4.1.2", + "@vitest/browser-playwright": "4.1.3", + "@vitest/browser-preview": "4.1.3", + "@vitest/browser-webdriverio": "4.1.3", + "@vitest/coverage-istanbul": "4.1.3", + "@vitest/coverage-v8": "4.1.3", + "@vitest/ui": "4.1.3", "happy-dom": "*", "jsdom": "*", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -7958,6 +7924,12 @@ "@vitest/browser-webdriverio": { "optional": true }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, "@vitest/ui": { "optional": true }, diff --git a/typespec-extension/package.json b/typespec-extension/package.json index 3a784a8e01..67862b5df7 100644 --- a/typespec-extension/package.json +++ b/typespec-extension/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/typespec-java", - "version": "0.43.3", + "version": "0.44.0", "description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding", "keywords": [ "TypeSpec" @@ -48,19 +48,19 @@ ], "peerDependencies": { "@azure-tools/openai-typespec": "^1.11.0", - "@azure-tools/typespec-autorest": ">=0.66.2 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.66.1 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.66.1 <1.0.0", - "@azure-tools/typespec-azure-rulesets": ">=0.66.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.66.4 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-azure-rulesets": ">=0.67.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.67.0 <1.0.0", "@azure-tools/typespec-liftr-base": ">=0.13.0 <1.0.0", - "@typespec/compiler": "^1.10.0", - "@typespec/http": "^1.10.0", - "@typespec/openapi": "^1.10.0", - "@typespec/openapi3": "^1.10.0", - "@typespec/rest": ">=0.80.0 <1.0.0", - "@typespec/versioning": ">=0.80.0 <1.0.0", - "@typespec/xml": ">=0.80.0 <1.0.0" + "@typespec/compiler": "^1.11.0", + "@typespec/http": "^1.11.0", + "@typespec/openapi": "^1.11.0", + "@typespec/openapi3": "^1.11.0", + "@typespec/rest": ">=0.81.0 <1.0.0", + "@typespec/versioning": ">=0.81.0 <1.0.0", + "@typespec/xml": ">=0.81.0 <1.0.0" }, "dependencies": { "@autorest/codemodel": "~4.20.1", @@ -69,31 +69,31 @@ }, "devDependencies": { "@azure-tools/openai-typespec": "1.11.0", - "@azure-tools/typespec-autorest": "0.66.2", - "@azure-tools/typespec-azure-core": "0.66.1", - "@azure-tools/typespec-azure-resource-manager": "0.66.1", - "@azure-tools/typespec-azure-rulesets": "0.66.0", - "@azure-tools/typespec-client-generator-core": "0.66.4", + "@azure-tools/typespec-autorest": "0.67.0", + "@azure-tools/typespec-azure-core": "0.67.0", + "@azure-tools/typespec-azure-resource-manager": "0.67.0", + "@azure-tools/typespec-azure-rulesets": "0.67.0", + "@azure-tools/typespec-client-generator-core": "0.67.0", "@azure-tools/typespec-liftr-base": "0.13.0", - "@microsoft/api-extractor": "^7.58.0", + "@microsoft/api-extractor": "^7.58.1", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.24", - "@types/node": "~25.5.0", + "@types/node": "~25.5.2", "@typescript-eslint/eslint-plugin": "~8.58.0", "@typescript-eslint/parser": "~8.58.0", - "@typespec/compiler": "1.10.0", - "@typespec/events": "0.80.0", - "@typespec/http": "1.10.0", - "@typespec/openapi": "1.10.0", - "@typespec/openapi3": "1.10.0", - "@typespec/rest": "0.80.0", - "@typespec/sse": "0.80.0", - "@typespec/streams": "0.80.0", + "@typespec/compiler": "1.11.0", + "@typespec/events": "0.81.0", + "@typespec/http": "1.11.0", + "@typespec/openapi": "1.11.0", + "@typespec/openapi3": "1.11.0", + "@typespec/rest": "0.81.0", + "@typespec/sse": "0.81.0", + "@typespec/streams": "0.81.0", "@typespec/tspd": "0.74.1", - "@typespec/versioning": "0.80.0", - "@typespec/xml": "0.80.0", - "@vitest/coverage-v8": "^4.1.2", - "@vitest/ui": "^4.1.2", + "@typespec/versioning": "0.81.0", + "@typespec/xml": "0.81.0", + "@vitest/coverage-v8": "^4.1.3", + "@vitest/ui": "^4.1.3", "c8": "~11.0.0", "eslint": "~10.1.0", "eslint-plugin-deprecation": "~3.0.0", @@ -103,7 +103,7 @@ "rimraf": "~6.1.3", "typescript": "~5.9.2", "typescript-eslint": "^8.58.0", - "vitest": "^4.1.2" + "vitest": "^4.1.3" }, "overrides": { "eslint": "~10.1.0", diff --git a/typespec-tests/Generate.ps1 b/typespec-tests/Generate.ps1 index 1049a9e38a..e5873b335c 100644 --- a/typespec-tests/Generate.ps1 +++ b/typespec-tests/Generate.ps1 @@ -20,7 +20,7 @@ Write-Host "Parallelization: $Parallelization" $generateScript = { $tspFile = $_ - if (($tspFile -match "payload[\\/]pageable[\\/]main\.tsp") -and (-not ($tspFile -match "azure[\\/]payload[\\/]pageable[\\/]main\.tsp"))) { + if ((($tspFile -match "payload[\\/]pageable[\\/]main\.tsp") -and (-not ($tspFile -match "azure[\\/]payload[\\/]pageable[\\/]main\.tsp"))) -or ($tspFile -match "service[\\/]multiple-services[\\/]main\.tsp")) { Write-Host " SKIPPED $tspFile @@ -214,6 +214,13 @@ try { Remove-Item ./tsp-output -Recurse -Force + if (Test-Path ./src/main/resources/META-INF/client-structure-service_metadata.json) { + # client structure is generated from multiple client.tsp files and the last one to execute overwrites + # the api view properties file. Because the tests run in parallel, the order is not guaranteed. This + # causes git diff check to fail as the checked in file is not the same as the generated one. + Remove-Item ./src/main/resources/META-INF/client-structure-service_metadata.json -Force + } + if ($ExitCode -ne 0) { throw "Failed to generate from tsp" } diff --git a/typespec-tests/package.json b/typespec-tests/package.json index 4d33c917ff..00734000dc 100644 --- a/typespec-tests/package.json +++ b/typespec-tests/package.json @@ -11,9 +11,9 @@ "dependencies": { "@typespec/spec-api": "0.1.0-alpha.13", "@typespec/spector": "0.1.0-alpha.24", - "@typespec/http-specs": "0.1.0-alpha.35", - "@azure-tools/azure-http-specs": "0.1.0-alpha.38", - "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.43.3.tgz" + "@typespec/http-specs": "0.1.0-alpha.36", + "@azure-tools/azure-http-specs": "0.1.0-alpha.39", + "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.44.0.tgz" }, "devDependencies": { "@typespec/prettier-plugin-typespec": "^1.10.0", @@ -21,19 +21,19 @@ "prettier": "^3.8.1" }, "overrides": { - "@typespec/compiler": "1.10.0", - "@typespec/http": "1.10.0", - "@typespec/rest": "0.80.0", - "@typespec/versioning": "0.80.0", - "@typespec/openapi": "1.10.0", - "@typespec/xml": "0.80.0", - "@typespec/events": "0.80.0", - "@typespec/sse": "0.80.0", - "@typespec/streams": "0.80.0", - "@azure-tools/typespec-azure-core": "0.66.1", - "@azure-tools/typespec-client-generator-core": "0.66.4", - "@azure-tools/typespec-azure-resource-manager": "0.66.1", - "@azure-tools/typespec-autorest": "0.66.2", + "@typespec/compiler": "1.11.0", + "@typespec/http": "1.11.0", + "@typespec/rest": "0.81.0", + "@typespec/versioning": "0.81.0", + "@typespec/openapi": "1.11.0", + "@typespec/xml": "0.81.0", + "@typespec/events": "0.81.0", + "@typespec/sse": "0.81.0", + "@typespec/streams": "0.81.0", + "@azure-tools/typespec-azure-core": "0.67.0", + "@azure-tools/typespec-client-generator-core": "0.67.0", + "@azure-tools/typespec-azure-resource-manager": "0.67.0", + "@azure-tools/typespec-autorest": "0.67.0", "@azure-tools/typespec-liftr-base": "0.13.0" }, "private": true From 909cb19e65791e373a29952e5d8bc8b84c5b8a84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 8 Apr 2026 04:40:03 +0000 Subject: [PATCH 2/4] Sync tests from core (TypeSpec 1.11.0/0.81.0 and Azure tools 0.67.0) Agent-Logs-Url: https://github.com/Azure/autorest.java/sessions/253ef309-b9e4-4c78-8745-22a801a7c025 Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com> --- .../java/client/naming/HeaderAsyncClient.java | 109 ++++++ .../main/java/client/naming/HeaderClient.java | 105 ++++++ .../java/client/naming/NamingAsyncClient.java | 214 ----------- .../main/java/client/naming/NamingClient.java | 208 ---------- .../client/naming/NamingClientBuilder.java | 44 +++ .../client/naming/PropertyAsyncClient.java | 181 +++++++++ .../java/client/naming/PropertyClient.java | 175 +++++++++ .../naming/implementation/HeadersImpl.java | 158 ++++++++ .../implementation/NamingClientImpl.java | 354 ++---------------- .../naming/implementation/PropertiesImpl.java | 282 ++++++++++++++ .../subnamespace/package-info.java | 3 +- .../implementation/package-info.java | 3 +- .../clientoperationgroup/package-info.java | 3 +- .../implementation/package-info.java | 3 +- .../structure/multiclient/package-info.java | 3 +- .../implementation/package-info.java | 3 +- .../renamedoperation/package-info.java | 3 +- .../service/implementation/package-info.java | 3 +- .../service/models/package-info.java | 3 +- .../structure/service/package-info.java | 3 +- .../implementation/package-info.java | 3 +- .../twooperationgroup/package-info.java | 3 +- .../tsptest/response/ResponseAsyncClient.java | 7 +- .../java/tsptest/response/ResponseClient.java | 7 +- .../implementation/ResponseClientImpl.java | 4 +- .../models/GetUnionResponseContentType.java | 56 +++ .../main/java/type/file/FileAsyncClient.java | 56 ++- .../src/main/java/type/file/FileClient.java | 55 +-- .../type/file/implementation/BodiesImpl.java | 29 +- ...adFileMultipleContentTypesContentType.java | 56 +++ .../java/type/file/models/package-info.java | 11 + .../test/java/client/naming/NamingTests.java | 14 +- .../generated/NamingClientTestBase.java | 24 ++ .../src/test/java/type/file/FileTests.java | 10 +- 34 files changed, 1325 insertions(+), 870 deletions(-) create mode 100644 typespec-tests/src/main/java/client/naming/HeaderAsyncClient.java create mode 100644 typespec-tests/src/main/java/client/naming/HeaderClient.java create mode 100644 typespec-tests/src/main/java/client/naming/PropertyAsyncClient.java create mode 100644 typespec-tests/src/main/java/client/naming/PropertyClient.java create mode 100644 typespec-tests/src/main/java/client/naming/implementation/HeadersImpl.java create mode 100644 typespec-tests/src/main/java/client/naming/implementation/PropertiesImpl.java create mode 100644 typespec-tests/src/main/java/tsptest/response/models/GetUnionResponseContentType.java create mode 100644 typespec-tests/src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java create mode 100644 typespec-tests/src/main/java/type/file/models/package-info.java diff --git a/typespec-tests/src/main/java/client/naming/HeaderAsyncClient.java b/typespec-tests/src/main/java/client/naming/HeaderAsyncClient.java new file mode 100644 index 0000000000..21b19c6025 --- /dev/null +++ b/typespec-tests/src/main/java/client/naming/HeaderAsyncClient.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming; + +import client.naming.implementation.HeadersImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous NamingClient type. + */ +@ServiceClient(builder = NamingClientBuilder.class, isAsync = true) +public final class HeaderAsyncClient { + @Generated + private final HeadersImpl serviceClient; + + /** + * Initializes an instance of HeaderAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + HeaderAsyncClient(HeadersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> requestWithResponse(String clientName, RequestOptions requestOptions) { + return this.serviceClient.requestWithResponseAsync(clientName, requestOptions); + } + + /** + * The response operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> responseWithResponse(RequestOptions requestOptions) { + return this.serviceClient.responseWithResponseAsync(requestOptions); + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono request(String clientName) { + // Generated convenience method for requestWithResponse + RequestOptions requestOptions = new RequestOptions(); + return requestWithResponse(clientName, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * The response operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono response() { + // Generated convenience method for responseWithResponse + RequestOptions requestOptions = new RequestOptions(); + return responseWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/typespec-tests/src/main/java/client/naming/HeaderClient.java b/typespec-tests/src/main/java/client/naming/HeaderClient.java new file mode 100644 index 0000000000..41ac9ed13c --- /dev/null +++ b/typespec-tests/src/main/java/client/naming/HeaderClient.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming; + +import client.naming.implementation.HeadersImpl; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; + +/** + * Initializes a new instance of the synchronous NamingClient type. + */ +@ServiceClient(builder = NamingClientBuilder.class) +public final class HeaderClient { + @Generated + private final HeadersImpl serviceClient; + + /** + * Initializes an instance of HeaderClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + HeaderClient(HeadersImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response requestWithResponse(String clientName, RequestOptions requestOptions) { + return this.serviceClient.requestWithResponse(clientName, requestOptions); + } + + /** + * The response operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response responseWithResponse(RequestOptions requestOptions) { + return this.serviceClient.responseWithResponse(requestOptions); + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void request(String clientName) { + // Generated convenience method for requestWithResponse + RequestOptions requestOptions = new RequestOptions(); + requestWithResponse(clientName, requestOptions).getValue(); + } + + /** + * The response operation. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void response() { + // Generated convenience method for responseWithResponse + RequestOptions requestOptions = new RequestOptions(); + responseWithResponse(requestOptions).getValue(); + } +} diff --git a/typespec-tests/src/main/java/client/naming/NamingAsyncClient.java b/typespec-tests/src/main/java/client/naming/NamingAsyncClient.java index 29bdc3d424..1a9965972a 100644 --- a/typespec-tests/src/main/java/client/naming/NamingAsyncClient.java +++ b/typespec-tests/src/main/java/client/naming/NamingAsyncClient.java @@ -5,9 +5,6 @@ package client.naming; import client.naming.implementation.NamingClientImpl; -import client.naming.property.models.ClientNameAndJsonEncodedNameModel; -import client.naming.property.models.ClientNameModel; -import client.naming.property.models.LanguageClientNameModel; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; @@ -18,7 +15,6 @@ import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.util.BinaryData; import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; @@ -73,117 +69,6 @@ public Mono> parameterWithResponse(String clientName, RequestOpti return this.serviceClient.parameterWithResponseAsync(clientName, requestOptions); } - /** - * The client operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> clientWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.clientWithResponseAsync(body, requestOptions); - } - - /** - * The language operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> languageWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.languageWithResponseAsync(body, requestOptions); - } - - /** - * The compatibleWithEncodedName operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     wireName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.compatibleWithEncodedNameWithResponseAsync(body, requestOptions); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> requestWithResponse(String clientName, RequestOptions requestOptions) { - return this.serviceClient.requestWithResponseAsync(clientName, requestOptions); - } - - /** - * The response operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> responseWithResponse(RequestOptions requestOptions) { - return this.serviceClient.responseWithResponseAsync(requestOptions); - } - /** * The clientName operation. * @@ -221,103 +106,4 @@ public Mono parameter(String clientName) { RequestOptions requestOptions = new RequestOptions(); return parameterWithResponse(clientName, requestOptions).flatMap(FluxUtil::toMono); } - - /** - * The client operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono client(ClientNameModel body) { - // Generated convenience method for clientWithResponse - RequestOptions requestOptions = new RequestOptions(); - return clientWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono); - } - - /** - * The language operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono language(LanguageClientNameModel body) { - // Generated convenience method for languageWithResponse - RequestOptions requestOptions = new RequestOptions(); - return languageWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono); - } - - /** - * The compatibleWithEncodedName operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono compatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) { - // Generated convenience method for compatibleWithEncodedNameWithResponse - RequestOptions requestOptions = new RequestOptions(); - return compatibleWithEncodedNameWithResponse(BinaryData.fromObject(body), requestOptions) - .flatMap(FluxUtil::toMono); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono request(String clientName) { - // Generated convenience method for requestWithResponse - RequestOptions requestOptions = new RequestOptions(); - return requestWithResponse(clientName, requestOptions).flatMap(FluxUtil::toMono); - } - - /** - * The response operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono response() { - // Generated convenience method for responseWithResponse - RequestOptions requestOptions = new RequestOptions(); - return responseWithResponse(requestOptions).flatMap(FluxUtil::toMono); - } } diff --git a/typespec-tests/src/main/java/client/naming/NamingClient.java b/typespec-tests/src/main/java/client/naming/NamingClient.java index cbf0519ab3..bf91d85c0a 100644 --- a/typespec-tests/src/main/java/client/naming/NamingClient.java +++ b/typespec-tests/src/main/java/client/naming/NamingClient.java @@ -5,9 +5,6 @@ package client.naming; import client.naming.implementation.NamingClientImpl; -import client.naming.property.models.ClientNameAndJsonEncodedNameModel; -import client.naming.property.models.ClientNameModel; -import client.naming.property.models.LanguageClientNameModel; import com.azure.core.annotation.Generated; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; @@ -18,7 +15,6 @@ import com.azure.core.exception.ResourceNotFoundException; import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; -import com.azure.core.util.BinaryData; /** * Initializes a new instance of the synchronous NamingClient type. @@ -71,117 +67,6 @@ public Response parameterWithResponse(String clientName, RequestOptions re return this.serviceClient.parameterWithResponse(clientName, requestOptions); } - /** - * The client operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response clientWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.clientWithResponse(body, requestOptions); - } - - /** - * The language operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response languageWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.languageWithResponse(body, requestOptions); - } - - /** - * The compatibleWithEncodedName operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     wireName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.compatibleWithEncodedNameWithResponse(body, requestOptions); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response requestWithResponse(String clientName, RequestOptions requestOptions) { - return this.serviceClient.requestWithResponse(clientName, requestOptions); - } - - /** - * The response operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response responseWithResponse(RequestOptions requestOptions) { - return this.serviceClient.responseWithResponse(requestOptions); - } - /** * The clientName operation. * @@ -217,97 +102,4 @@ public void parameter(String clientName) { RequestOptions requestOptions = new RequestOptions(); parameterWithResponse(clientName, requestOptions).getValue(); } - - /** - * The client operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void client(ClientNameModel body) { - // Generated convenience method for clientWithResponse - RequestOptions requestOptions = new RequestOptions(); - clientWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); - } - - /** - * The language operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void language(LanguageClientNameModel body) { - // Generated convenience method for languageWithResponse - RequestOptions requestOptions = new RequestOptions(); - languageWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); - } - - /** - * The compatibleWithEncodedName operation. - * - * @param body The body parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void compatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) { - // Generated convenience method for compatibleWithEncodedNameWithResponse - RequestOptions requestOptions = new RequestOptions(); - compatibleWithEncodedNameWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void request(String clientName) { - // Generated convenience method for requestWithResponse - RequestOptions requestOptions = new RequestOptions(); - requestWithResponse(clientName, requestOptions).getValue(); - } - - /** - * The response operation. - * - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void response() { - // Generated convenience method for responseWithResponse - RequestOptions requestOptions = new RequestOptions(); - responseWithResponse(requestOptions).getValue(); - } } diff --git a/typespec-tests/src/main/java/client/naming/NamingClientBuilder.java b/typespec-tests/src/main/java/client/naming/NamingClientBuilder.java index e03f6a58db..2f2b24a617 100644 --- a/typespec-tests/src/main/java/client/naming/NamingClientBuilder.java +++ b/typespec-tests/src/main/java/client/naming/NamingClientBuilder.java @@ -43,9 +43,13 @@ @ServiceClientBuilder( serviceClients = { NamingClient.class, + PropertyClient.class, + HeaderClient.class, ModelClient.class, UnionEnumClient.class, NamingAsyncClient.class, + PropertyAsyncClient.class, + HeaderAsyncClient.class, ModelAsyncClient.class, UnionEnumAsyncClient.class }) public final class NamingClientBuilder implements HttpTrait, @@ -280,6 +284,26 @@ public NamingAsyncClient buildAsyncClient() { return new NamingAsyncClient(buildInnerClient()); } + /** + * Builds an instance of PropertyAsyncClient class. + * + * @return an instance of PropertyAsyncClient. + */ + @Generated + public PropertyAsyncClient buildPropertyAsyncClient() { + return new PropertyAsyncClient(buildInnerClient().getProperties()); + } + + /** + * Builds an instance of HeaderAsyncClient class. + * + * @return an instance of HeaderAsyncClient. + */ + @Generated + public HeaderAsyncClient buildHeaderAsyncClient() { + return new HeaderAsyncClient(buildInnerClient().getHeaders()); + } + /** * Builds an instance of ModelAsyncClient class. * @@ -310,6 +334,26 @@ public NamingClient buildClient() { return new NamingClient(buildInnerClient()); } + /** + * Builds an instance of PropertyClient class. + * + * @return an instance of PropertyClient. + */ + @Generated + public PropertyClient buildPropertyClient() { + return new PropertyClient(buildInnerClient().getProperties()); + } + + /** + * Builds an instance of HeaderClient class. + * + * @return an instance of HeaderClient. + */ + @Generated + public HeaderClient buildHeaderClient() { + return new HeaderClient(buildInnerClient().getHeaders()); + } + /** * Builds an instance of ModelClient class. * diff --git a/typespec-tests/src/main/java/client/naming/PropertyAsyncClient.java b/typespec-tests/src/main/java/client/naming/PropertyAsyncClient.java new file mode 100644 index 0000000000..07816f5371 --- /dev/null +++ b/typespec-tests/src/main/java/client/naming/PropertyAsyncClient.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming; + +import client.naming.implementation.PropertiesImpl; +import client.naming.property.models.ClientNameAndJsonEncodedNameModel; +import client.naming.property.models.ClientNameModel; +import client.naming.property.models.LanguageClientNameModel; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous NamingClient type. + */ +@ServiceClient(builder = NamingClientBuilder.class, isAsync = true) +public final class PropertyAsyncClient { + @Generated + private final PropertiesImpl serviceClient; + + /** + * Initializes an instance of PropertyAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + PropertyAsyncClient(PropertiesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The client operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> clientWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.clientWithResponseAsync(body, requestOptions); + } + + /** + * The language operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> languageWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.languageWithResponseAsync(body, requestOptions); + } + + /** + * The compatibleWithEncodedName operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     wireName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.compatibleWithEncodedNameWithResponseAsync(body, requestOptions); + } + + /** + * The client operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono client(ClientNameModel body) { + // Generated convenience method for clientWithResponse + RequestOptions requestOptions = new RequestOptions(); + return clientWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * The language operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono language(LanguageClientNameModel body) { + // Generated convenience method for languageWithResponse + RequestOptions requestOptions = new RequestOptions(); + return languageWithResponse(BinaryData.fromObject(body), requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * The compatibleWithEncodedName operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono compatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) { + // Generated convenience method for compatibleWithEncodedNameWithResponse + RequestOptions requestOptions = new RequestOptions(); + return compatibleWithEncodedNameWithResponse(BinaryData.fromObject(body), requestOptions) + .flatMap(FluxUtil::toMono); + } +} diff --git a/typespec-tests/src/main/java/client/naming/PropertyClient.java b/typespec-tests/src/main/java/client/naming/PropertyClient.java new file mode 100644 index 0000000000..bbd4d0fc8d --- /dev/null +++ b/typespec-tests/src/main/java/client/naming/PropertyClient.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming; + +import client.naming.implementation.PropertiesImpl; +import client.naming.property.models.ClientNameAndJsonEncodedNameModel; +import client.naming.property.models.ClientNameModel; +import client.naming.property.models.LanguageClientNameModel; +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; + +/** + * Initializes a new instance of the synchronous NamingClient type. + */ +@ServiceClient(builder = NamingClientBuilder.class) +public final class PropertyClient { + @Generated + private final PropertiesImpl serviceClient; + + /** + * Initializes an instance of PropertyClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + PropertyClient(PropertiesImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * The client operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response clientWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.clientWithResponse(body, requestOptions); + } + + /** + * The language operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response languageWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.languageWithResponse(body, requestOptions); + } + + /** + * The compatibleWithEncodedName operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     wireName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.compatibleWithEncodedNameWithResponse(body, requestOptions); + } + + /** + * The client operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void client(ClientNameModel body) { + // Generated convenience method for clientWithResponse + RequestOptions requestOptions = new RequestOptions(); + clientWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); + } + + /** + * The language operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void language(LanguageClientNameModel body) { + // Generated convenience method for languageWithResponse + RequestOptions requestOptions = new RequestOptions(); + languageWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); + } + + /** + * The compatibleWithEncodedName operation. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void compatibleWithEncodedName(ClientNameAndJsonEncodedNameModel body) { + // Generated convenience method for compatibleWithEncodedNameWithResponse + RequestOptions requestOptions = new RequestOptions(); + compatibleWithEncodedNameWithResponse(BinaryData.fromObject(body), requestOptions).getValue(); + } +} diff --git a/typespec-tests/src/main/java/client/naming/implementation/HeadersImpl.java b/typespec-tests/src/main/java/client/naming/implementation/HeadersImpl.java new file mode 100644 index 0000000000..a74651005c --- /dev/null +++ b/typespec-tests/src/main/java/client/naming/implementation/HeadersImpl.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Headers. + */ +public final class HeadersImpl { + /** + * The proxy service used to perform REST calls. + */ + private final HeadersService service; + + /** + * The service client containing this operation class. + */ + private final NamingClientImpl client; + + /** + * Initializes an instance of HeadersImpl. + * + * @param client the instance of the service client containing this operation class. + */ + HeadersImpl(NamingClientImpl client) { + this.service = RestProxy.create(HeadersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NamingClientHeaders to be used by the proxy service to perform REST + * calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NamingClientHeaders") + public interface HeadersService { + @Post("/client/naming/header") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> request(@HostParam("endpoint") String endpoint, + @HeaderParam("default-name") String clientName, RequestOptions requestOptions, Context context); + + @Post("/client/naming/header") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response requestSync(@HostParam("endpoint") String endpoint, + @HeaderParam("default-name") String clientName, RequestOptions requestOptions, Context context); + + @Get("/client/naming/header") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> response(@HostParam("endpoint") String endpoint, RequestOptions requestOptions, + Context context); + + @Get("/client/naming/header") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response responseSync(@HostParam("endpoint") String endpoint, RequestOptions requestOptions, + Context context); + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> requestWithResponseAsync(String clientName, RequestOptions requestOptions) { + return FluxUtil + .withContext(context -> service.request(this.client.getEndpoint(), clientName, requestOptions, context)); + } + + /** + * The request operation. + * + * @param clientName The clientName parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response requestWithResponse(String clientName, RequestOptions requestOptions) { + return service.requestSync(this.client.getEndpoint(), clientName, requestOptions, Context.NONE); + } + + /** + * The response operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> responseWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.response(this.client.getEndpoint(), requestOptions, context)); + } + + /** + * The response operation. + * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response responseWithResponse(RequestOptions requestOptions) { + return service.responseSync(this.client.getEndpoint(), requestOptions, Context.NONE); + } +} diff --git a/typespec-tests/src/main/java/client/naming/implementation/NamingClientImpl.java b/typespec-tests/src/main/java/client/naming/implementation/NamingClientImpl.java index e1555932b3..1ba9477a59 100644 --- a/typespec-tests/src/main/java/client/naming/implementation/NamingClientImpl.java +++ b/typespec-tests/src/main/java/client/naming/implementation/NamingClientImpl.java @@ -4,10 +4,7 @@ package client.naming.implementation; -import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Post; @@ -27,7 +24,6 @@ import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.serializer.JacksonAdapter; @@ -85,6 +81,34 @@ public SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } + /** + * The PropertiesImpl object to access its operations. + */ + private final PropertiesImpl properties; + + /** + * Gets the PropertiesImpl object to access its operations. + * + * @return the PropertiesImpl object. + */ + public PropertiesImpl getProperties() { + return this.properties; + } + + /** + * The HeadersImpl object to access its operations. + */ + private final HeadersImpl headers; + + /** + * Gets the HeadersImpl object to access its operations. + * + * @return the HeadersImpl object. + */ + public HeadersImpl getHeaders() { + return this.headers; + } + /** * The ModelClientsImpl object to access its operations. */ @@ -144,6 +168,8 @@ public NamingClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerA this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; + this.properties = new PropertiesImpl(this); + this.headers = new HeadersImpl(this); this.modelClients = new ModelClientsImpl(this); this.unionEnums = new UnionEnumsImpl(this); this.service = RestProxy.create(NamingClientService.class, this.httpPipeline, this.getSerializerAdapter()); @@ -190,102 +216,6 @@ Mono> parameter(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response parameterSync(@HostParam("endpoint") String endpoint, @QueryParam("defaultName") String clientName, RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/client") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> client(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/client") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response clientSync(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/language") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> language(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/language") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response languageSync(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/compatible-with-encoded-name") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> compatibleWithEncodedName(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/property/compatible-with-encoded-name") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response compatibleWithEncodedNameSync(@HostParam("endpoint") String endpoint, - @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, - RequestOptions requestOptions, Context context); - - @Post("/client/naming/header") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> request(@HostParam("endpoint") String endpoint, - @HeaderParam("default-name") String clientName, RequestOptions requestOptions, Context context); - - @Post("/client/naming/header") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response requestSync(@HostParam("endpoint") String endpoint, - @HeaderParam("default-name") String clientName, RequestOptions requestOptions, Context context); - - @Get("/client/naming/header") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> response(@HostParam("endpoint") String endpoint, RequestOptions requestOptions, - Context context); - - @Get("/client/naming/header") - @ExpectedResponses({ 204 }) - @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) - @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) - @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Response responseSync(@HostParam("endpoint") String endpoint, RequestOptions requestOptions, - Context context); } /** @@ -350,228 +280,4 @@ public Mono> parameterWithResponseAsync(String clientName, Reques public Response parameterWithResponse(String clientName, RequestOptions requestOptions) { return service.parameterSync(this.getEndpoint(), clientName, requestOptions, Context.NONE); } - - /** - * The client operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> clientWithResponseAsync(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return FluxUtil - .withContext(context -> service.client(this.getEndpoint(), contentType, body, requestOptions, context)); - } - - /** - * The client operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response clientWithResponse(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return service.clientSync(this.getEndpoint(), contentType, body, requestOptions, Context.NONE); - } - - /** - * The language operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> languageWithResponseAsync(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return FluxUtil - .withContext(context -> service.language(this.getEndpoint(), contentType, body, requestOptions, context)); - } - - /** - * The language operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     defaultName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response languageWithResponse(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return service.languageSync(this.getEndpoint(), contentType, body, requestOptions, Context.NONE); - } - - /** - * The compatibleWithEncodedName operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     wireName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> compatibleWithEncodedNameWithResponseAsync(BinaryData body, - RequestOptions requestOptions) { - final String contentType = "application/json"; - return FluxUtil.withContext(context -> service.compatibleWithEncodedName(this.getEndpoint(), contentType, body, - requestOptions, context)); - } - - /** - * The compatibleWithEncodedName operation. - *

Request Body Schema

- * - *
-     * {@code
-     * {
-     *     wireName: boolean (Required)
-     * }
-     * }
-     * 
- * - * @param body The body parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { - final String contentType = "application/json"; - return service.compatibleWithEncodedNameSync(this.getEndpoint(), contentType, body, requestOptions, - Context.NONE); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> requestWithResponseAsync(String clientName, RequestOptions requestOptions) { - return FluxUtil - .withContext(context -> service.request(this.getEndpoint(), clientName, requestOptions, context)); - } - - /** - * The request operation. - * - * @param clientName The clientName parameter. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response requestWithResponse(String clientName, RequestOptions requestOptions) { - return service.requestSync(this.getEndpoint(), clientName, requestOptions, Context.NONE); - } - - /** - * The response operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> responseWithResponseAsync(RequestOptions requestOptions) { - return FluxUtil.withContext(context -> service.response(this.getEndpoint(), requestOptions, context)); - } - - /** - * The response operation. - * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response responseWithResponse(RequestOptions requestOptions) { - return service.responseSync(this.getEndpoint(), requestOptions, Context.NONE); - } } diff --git a/typespec-tests/src/main/java/client/naming/implementation/PropertiesImpl.java b/typespec-tests/src/main/java/client/naming/implementation/PropertiesImpl.java new file mode 100644 index 0000000000..dae6af0ed5 --- /dev/null +++ b/typespec-tests/src/main/java/client/naming/implementation/PropertiesImpl.java @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package client.naming.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in Properties. + */ +public final class PropertiesImpl { + /** + * The proxy service used to perform REST calls. + */ + private final PropertiesService service; + + /** + * The service client containing this operation class. + */ + private final NamingClientImpl client; + + /** + * Initializes an instance of PropertiesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PropertiesImpl(NamingClientImpl client) { + this.service + = RestProxy.create(PropertiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for NamingClientProperties to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "NamingClientProperties") + public interface PropertiesService { + @Post("/client/naming/property/client") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> client(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/client") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response clientSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/language") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> language(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/language") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response languageSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/compatible-with-encoded-name") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> compatibleWithEncodedName(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/client/naming/property/compatible-with-encoded-name") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response compatibleWithEncodedNameSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") BinaryData body, + RequestOptions requestOptions, Context context); + } + + /** + * The client operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> clientWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return FluxUtil.withContext( + context -> service.client(this.client.getEndpoint(), contentType, body, requestOptions, context)); + } + + /** + * The client operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response clientWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return service.clientSync(this.client.getEndpoint(), contentType, body, requestOptions, Context.NONE); + } + + /** + * The language operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> languageWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return FluxUtil.withContext( + context -> service.language(this.client.getEndpoint(), contentType, body, requestOptions, context)); + } + + /** + * The language operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     defaultName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response languageWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return service.languageSync(this.client.getEndpoint(), contentType, body, requestOptions, Context.NONE); + } + + /** + * The compatibleWithEncodedName operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     wireName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> compatibleWithEncodedNameWithResponseAsync(BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/json"; + return FluxUtil.withContext(context -> service.compatibleWithEncodedName(this.client.getEndpoint(), contentType, + body, requestOptions, context)); + } + + /** + * The compatibleWithEncodedName operation. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     wireName: boolean (Required)
+     * }
+     * }
+     * 
+ * + * @param body The body parameter. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response compatibleWithEncodedNameWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/json"; + return service.compatibleWithEncodedNameSync(this.client.getEndpoint(), contentType, body, requestOptions, + Context.NONE); + } +} diff --git a/typespec-tests/src/main/java/client/structure/anotherclientoperationgroup/subnamespace/package-info.java b/typespec-tests/src/main/java/client/structure/anotherclientoperationgroup/subnamespace/package-info.java index 4a649af046..64f2b7bae5 100644 --- a/typespec-tests/src/main/java/client/structure/anotherclientoperationgroup/subnamespace/package-info.java +++ b/typespec-tests/src/main/java/client/structure/anotherclientoperationgroup/subnamespace/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for SecondClient. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/clientoperationgroup/implementation/package-info.java b/typespec-tests/src/main/java/client/structure/clientoperationgroup/implementation/package-info.java index a806f1928b..ef528715ce 100644 --- a/typespec-tests/src/main/java/client/structure/clientoperationgroup/implementation/package-info.java +++ b/typespec-tests/src/main/java/client/structure/clientoperationgroup/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/clientoperationgroup/package-info.java b/typespec-tests/src/main/java/client/structure/clientoperationgroup/package-info.java index 2b619ea0cb..d11613f5a9 100644 --- a/typespec-tests/src/main/java/client/structure/clientoperationgroup/package-info.java +++ b/typespec-tests/src/main/java/client/structure/clientoperationgroup/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/multiclient/implementation/package-info.java b/typespec-tests/src/main/java/client/structure/multiclient/implementation/package-info.java index 4bd35e2419..ab1b67ee1d 100644 --- a/typespec-tests/src/main/java/client/structure/multiclient/implementation/package-info.java +++ b/typespec-tests/src/main/java/client/structure/multiclient/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/multiclient/package-info.java b/typespec-tests/src/main/java/client/structure/multiclient/package-info.java index 9e0bc9b2cc..9671e62f44 100644 --- a/typespec-tests/src/main/java/client/structure/multiclient/package-info.java +++ b/typespec-tests/src/main/java/client/structure/multiclient/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/renamedoperation/implementation/package-info.java b/typespec-tests/src/main/java/client/structure/renamedoperation/implementation/package-info.java index ef4c542a7d..36fc52504d 100644 --- a/typespec-tests/src/main/java/client/structure/renamedoperation/implementation/package-info.java +++ b/typespec-tests/src/main/java/client/structure/renamedoperation/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/renamedoperation/package-info.java b/typespec-tests/src/main/java/client/structure/renamedoperation/package-info.java index d08052aad2..a16d444ee1 100644 --- a/typespec-tests/src/main/java/client/structure/renamedoperation/package-info.java +++ b/typespec-tests/src/main/java/client/structure/renamedoperation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/service/implementation/package-info.java b/typespec-tests/src/main/java/client/structure/service/implementation/package-info.java index c7595374ac..f2a385ef4c 100644 --- a/typespec-tests/src/main/java/client/structure/service/implementation/package-info.java +++ b/typespec-tests/src/main/java/client/structure/service/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/service/models/package-info.java b/typespec-tests/src/main/java/client/structure/service/models/package-info.java index 39f210ff84..38476d596b 100644 --- a/typespec-tests/src/main/java/client/structure/service/models/package-info.java +++ b/typespec-tests/src/main/java/client/structure/service/models/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the data models for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/service/package-info.java b/typespec-tests/src/main/java/client/structure/service/package-info.java index 8f70f1bf5d..23c6524931 100644 --- a/typespec-tests/src/main/java/client/structure/service/package-info.java +++ b/typespec-tests/src/main/java/client/structure/service/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/twooperationgroup/implementation/package-info.java b/typespec-tests/src/main/java/client/structure/twooperationgroup/implementation/package-info.java index 799b292b9d..c5e86c1afb 100644 --- a/typespec-tests/src/main/java/client/structure/twooperationgroup/implementation/package-info.java +++ b/typespec-tests/src/main/java/client/structure/twooperationgroup/implementation/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the implementations for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/client/structure/twooperationgroup/package-info.java b/typespec-tests/src/main/java/client/structure/twooperationgroup/package-info.java index e3d68ebcf7..f46b9bfe2e 100644 --- a/typespec-tests/src/main/java/client/structure/twooperationgroup/package-info.java +++ b/typespec-tests/src/main/java/client/structure/twooperationgroup/package-info.java @@ -5,8 +5,7 @@ /** * * Package containing the classes for Service. - * Test that we can use @client and @operationGroup decorators to customize client side code structure, such - * as: + * Test that we can use @client decorators to customize client side code structure, such as: * 1. have everything as default. * 2. to rename client or operation group * 3. one client can have more than one operations groups diff --git a/typespec-tests/src/main/java/tsptest/response/ResponseAsyncClient.java b/typespec-tests/src/main/java/tsptest/response/ResponseAsyncClient.java index bb5f84c9ca..7f4328aa4e 100644 --- a/typespec-tests/src/main/java/tsptest/response/ResponseAsyncClient.java +++ b/typespec-tests/src/main/java/tsptest/response/ResponseAsyncClient.java @@ -26,6 +26,7 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import tsptest.response.implementation.ResponseClientImpl; +import tsptest.response.models.GetUnionResponseContentType; import tsptest.response.models.OperationDetails1; import tsptest.response.models.OperationDetails2; import tsptest.response.models.Resource; @@ -368,7 +369,7 @@ public Mono> getPlusJsonResponseWithResponse(RequestOptions * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "application/json", "application/json". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -806,10 +807,10 @@ public Mono getPlusJsonResponse() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUnionResponse(String accept) { + public Mono getUnionResponse(GetUnionResponseContentType accept) { // Generated convenience method for getUnionResponseWithResponse RequestOptions requestOptions = new RequestOptions(); - return getUnionResponseWithResponse(accept, requestOptions).flatMap(FluxUtil::toMono); + return getUnionResponseWithResponse(accept.toString(), requestOptions).flatMap(FluxUtil::toMono); } /** diff --git a/typespec-tests/src/main/java/tsptest/response/ResponseClient.java b/typespec-tests/src/main/java/tsptest/response/ResponseClient.java index d6cfa44063..3acf0e9a67 100644 --- a/typespec-tests/src/main/java/tsptest/response/ResponseClient.java +++ b/typespec-tests/src/main/java/tsptest/response/ResponseClient.java @@ -20,6 +20,7 @@ import com.azure.core.util.serializer.TypeReference; import java.util.List; import tsptest.response.implementation.ResponseClientImpl; +import tsptest.response.models.GetUnionResponseContentType; import tsptest.response.models.OperationDetails1; import tsptest.response.models.OperationDetails2; import tsptest.response.models.Resource; @@ -362,7 +363,7 @@ public Response getPlusJsonResponseWithResponse(RequestOptions reque * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "application/json", "application/json". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -770,10 +771,10 @@ public Resource getPlusJsonResponse() { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryData getUnionResponse(String accept) { + public BinaryData getUnionResponse(GetUnionResponseContentType accept) { // Generated convenience method for getUnionResponseWithResponse RequestOptions requestOptions = new RequestOptions(); - return getUnionResponseWithResponse(accept, requestOptions).getValue(); + return getUnionResponseWithResponse(accept.toString(), requestOptions).getValue(); } /** diff --git a/typespec-tests/src/main/java/tsptest/response/implementation/ResponseClientImpl.java b/typespec-tests/src/main/java/tsptest/response/implementation/ResponseClientImpl.java index 6b93dafe6c..0cbf712deb 100644 --- a/typespec-tests/src/main/java/tsptest/response/implementation/ResponseClientImpl.java +++ b/typespec-tests/src/main/java/tsptest/response/implementation/ResponseClientImpl.java @@ -1598,7 +1598,7 @@ public Response getPlusJsonResponseWithResponse(RequestOptions reque * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "application/json", "application/json". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1622,7 +1622,7 @@ public Mono> getUnionResponseWithResponseAsync(String accep * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "application/json", "application/json". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. diff --git a/typespec-tests/src/main/java/tsptest/response/models/GetUnionResponseContentType.java b/typespec-tests/src/main/java/tsptest/response/models/GetUnionResponseContentType.java new file mode 100644 index 0000000000..10072a3d71 --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/response/models/GetUnionResponseContentType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.response.models; + +/** + * Defines values for GetUnionResponseContentType. + */ +public enum GetUnionResponseContentType { + /** + * Enum value application/json. + */ + APPLICATION_JSON("application/json"), + + /** + * Enum value application/json. + */ + APPLICATION_JSON_1("application/json"); + + /** + * The actual serialized value for a GetUnionResponseContentType instance. + */ + private final String value; + + GetUnionResponseContentType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a GetUnionResponseContentType instance. + * + * @param value the serialized value to parse. + * @return the parsed GetUnionResponseContentType object, or null if unable to parse. + */ + public static GetUnionResponseContentType fromString(String value) { + if (value == null) { + return null; + } + GetUnionResponseContentType[] items = GetUnionResponseContentType.values(); + for (GetUnionResponseContentType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/typespec-tests/src/main/java/type/file/FileAsyncClient.java b/typespec-tests/src/main/java/type/file/FileAsyncClient.java index 4630c036e8..6115e9a2e1 100644 --- a/typespec-tests/src/main/java/type/file/FileAsyncClient.java +++ b/typespec-tests/src/main/java/type/file/FileAsyncClient.java @@ -18,6 +18,7 @@ import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; import type.file.implementation.BodiesImpl; +import type.file.models.DownloadFileMultipleContentTypesContentType; /** * Initializes a new instance of the asynchronous FileClient type. @@ -47,7 +48,6 @@ public final class FileAsyncClient { * } * * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -58,9 +58,9 @@ public final class FileAsyncClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file, + public Mono> uploadFileSpecificContentTypeWithResponse(BinaryData file, RequestOptions requestOptions) { - return this.serviceClient.uploadFileSpecificContentTypeWithResponseAsync(contentType, file, requestOptions); + return this.serviceClient.uploadFileSpecificContentTypeWithResponseAsync(file, requestOptions); } /** @@ -143,7 +143,8 @@ public Mono> downloadFileSpecificContentTypeWithResponse(Re * } * * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. + * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. Allowed values: + * "image/png", "image/jpeg". * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -156,6 +157,8 @@ public Mono> downloadFileSpecificContentTypeWithResponse(Re @ServiceMethod(returns = ReturnType.SINGLE) public Mono> uploadFileMultipleContentTypesWithResponse(String contentType, BinaryData file, RequestOptions requestOptions) { + // Operation 'uploadFileMultipleContentTypes' can be invoked with multiple content-type. It is difficult to form + // a correct method signature for convenience API, and hence the convenience API is not generated. return this.serviceClient.uploadFileMultipleContentTypesWithResponseAsync(contentType, file, requestOptions); } @@ -169,7 +172,7 @@ public Mono> uploadFileMultipleContentTypesWithResponse(String co * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "image/png", "image/jpeg". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -220,6 +223,7 @@ public Mono> uploadFileDefaultContentTypeWithResponse(String cont * } * * + * @param accept The accept parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -229,14 +233,14 @@ public Mono> uploadFileDefaultContentTypeWithResponse(String cont */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> downloadFileDefaultContentTypeWithResponse(RequestOptions requestOptions) { - return this.serviceClient.downloadFileDefaultContentTypeWithResponseAsync(requestOptions); + public Mono> downloadFileDefaultContentTypeWithResponse(String accept, + RequestOptions requestOptions) { + return this.serviceClient.downloadFileDefaultContentTypeWithResponseAsync(accept, requestOptions); } /** * The uploadFileSpecificContentType operation. * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -248,10 +252,10 @@ public Mono> downloadFileDefaultContentTypeWithResponse(Req */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadFileSpecificContentType(String contentType, BinaryData file) { + public Mono uploadFileSpecificContentType(BinaryData file) { // Generated convenience method for uploadFileSpecificContentTypeWithResponse RequestOptions requestOptions = new RequestOptions(); - return uploadFileSpecificContentTypeWithResponse(contentType, file, requestOptions).flatMap(FluxUtil::toMono); + return uploadFileSpecificContentTypeWithResponse(file, requestOptions).flatMap(FluxUtil::toMono); } /** @@ -310,27 +314,6 @@ public Mono downloadFileSpecificContentType() { return downloadFileSpecificContentTypeWithResponse(requestOptions).flatMap(FluxUtil::toMono); } - /** - * The uploadFileMultipleContentTypes operation. - * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. - * @param file The file parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono uploadFileMultipleContentTypes(String contentType, BinaryData file) { - // Generated convenience method for uploadFileMultipleContentTypesWithResponse - RequestOptions requestOptions = new RequestOptions(); - return uploadFileMultipleContentTypesWithResponse(contentType, file, requestOptions).flatMap(FluxUtil::toMono); - } - /** * The downloadFileMultipleContentTypes operation. * @@ -345,10 +328,11 @@ public Mono uploadFileMultipleContentTypes(String contentType, BinaryData */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono downloadFileMultipleContentTypes(String accept) { + public Mono downloadFileMultipleContentTypes(DownloadFileMultipleContentTypesContentType accept) { // Generated convenience method for downloadFileMultipleContentTypesWithResponse RequestOptions requestOptions = new RequestOptions(); - return downloadFileMultipleContentTypesWithResponse(accept, requestOptions).flatMap(FluxUtil::toMono); + return downloadFileMultipleContentTypesWithResponse(accept.toString(), requestOptions) + .flatMap(FluxUtil::toMono); } /** @@ -375,6 +359,8 @@ public Mono uploadFileDefaultContentType(String contentType, BinaryData fi /** * The downloadFileDefaultContentType operation. * + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -384,9 +370,9 @@ public Mono uploadFileDefaultContentType(String contentType, BinaryData fi */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono downloadFileDefaultContentType() { + public Mono downloadFileDefaultContentType(String accept) { // Generated convenience method for downloadFileDefaultContentTypeWithResponse RequestOptions requestOptions = new RequestOptions(); - return downloadFileDefaultContentTypeWithResponse(requestOptions).flatMap(FluxUtil::toMono); + return downloadFileDefaultContentTypeWithResponse(accept, requestOptions).flatMap(FluxUtil::toMono); } } diff --git a/typespec-tests/src/main/java/type/file/FileClient.java b/typespec-tests/src/main/java/type/file/FileClient.java index 05170b2fdb..6c9b71af7d 100644 --- a/typespec-tests/src/main/java/type/file/FileClient.java +++ b/typespec-tests/src/main/java/type/file/FileClient.java @@ -16,6 +16,7 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; import type.file.implementation.BodiesImpl; +import type.file.models.DownloadFileMultipleContentTypesContentType; /** * Initializes a new instance of the synchronous FileClient type. @@ -45,7 +46,6 @@ public final class FileClient { * } * * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -56,9 +56,8 @@ public final class FileClient { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file, - RequestOptions requestOptions) { - return this.serviceClient.uploadFileSpecificContentTypeWithResponse(contentType, file, requestOptions); + public Response uploadFileSpecificContentTypeWithResponse(BinaryData file, RequestOptions requestOptions) { + return this.serviceClient.uploadFileSpecificContentTypeWithResponse(file, requestOptions); } /** @@ -141,7 +140,8 @@ public Response downloadFileSpecificContentTypeWithResponse(RequestO * } * * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. + * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. Allowed values: + * "image/png", "image/jpeg". * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -154,6 +154,8 @@ public Response downloadFileSpecificContentTypeWithResponse(RequestO @ServiceMethod(returns = ReturnType.SINGLE) public Response uploadFileMultipleContentTypesWithResponse(String contentType, BinaryData file, RequestOptions requestOptions) { + // Operation 'uploadFileMultipleContentTypes' can be invoked with multiple content-type. It is difficult to form + // a correct method signature for convenience API, and hence the convenience API is not generated. return this.serviceClient.uploadFileMultipleContentTypesWithResponse(contentType, file, requestOptions); } @@ -167,7 +169,7 @@ public Response uploadFileMultipleContentTypesWithResponse(String contentT * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "image/png", "image/jpeg". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -218,6 +220,7 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp * } * * + * @param accept The accept parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -227,14 +230,14 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response downloadFileDefaultContentTypeWithResponse(RequestOptions requestOptions) { - return this.serviceClient.downloadFileDefaultContentTypeWithResponse(requestOptions); + public Response downloadFileDefaultContentTypeWithResponse(String accept, + RequestOptions requestOptions) { + return this.serviceClient.downloadFileDefaultContentTypeWithResponse(accept, requestOptions); } /** * The uploadFileSpecificContentType operation. * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -245,10 +248,10 @@ public Response downloadFileDefaultContentTypeWithResponse(RequestOp */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void uploadFileSpecificContentType(String contentType, BinaryData file) { + public void uploadFileSpecificContentType(BinaryData file) { // Generated convenience method for uploadFileSpecificContentTypeWithResponse RequestOptions requestOptions = new RequestOptions(); - uploadFileSpecificContentTypeWithResponse(contentType, file, requestOptions).getValue(); + uploadFileSpecificContentTypeWithResponse(file, requestOptions).getValue(); } /** @@ -306,26 +309,6 @@ public BinaryData downloadFileSpecificContentType() { return downloadFileSpecificContentTypeWithResponse(requestOptions).getValue(); } - /** - * The uploadFileMultipleContentTypes operation. - * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. - * @param file The file parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void uploadFileMultipleContentTypes(String contentType, BinaryData file) { - // Generated convenience method for uploadFileMultipleContentTypesWithResponse - RequestOptions requestOptions = new RequestOptions(); - uploadFileMultipleContentTypesWithResponse(contentType, file, requestOptions).getValue(); - } - /** * The downloadFileMultipleContentTypes operation. * @@ -340,10 +323,10 @@ public void uploadFileMultipleContentTypes(String contentType, BinaryData file) */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryData downloadFileMultipleContentTypes(String accept) { + public BinaryData downloadFileMultipleContentTypes(DownloadFileMultipleContentTypesContentType accept) { // Generated convenience method for downloadFileMultipleContentTypesWithResponse RequestOptions requestOptions = new RequestOptions(); - return downloadFileMultipleContentTypesWithResponse(accept, requestOptions).getValue(); + return downloadFileMultipleContentTypesWithResponse(accept.toString(), requestOptions).getValue(); } /** @@ -369,6 +352,8 @@ public void uploadFileDefaultContentType(String contentType, BinaryData file) { /** * The downloadFileDefaultContentType operation. * + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -378,9 +363,9 @@ public void uploadFileDefaultContentType(String contentType, BinaryData file) { */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public BinaryData downloadFileDefaultContentType() { + public BinaryData downloadFileDefaultContentType(String accept) { // Generated convenience method for downloadFileDefaultContentTypeWithResponse RequestOptions requestOptions = new RequestOptions(); - return downloadFileDefaultContentTypeWithResponse(requestOptions).getValue(); + return downloadFileDefaultContentTypeWithResponse(accept, requestOptions).getValue(); } } diff --git a/typespec-tests/src/main/java/type/file/implementation/BodiesImpl.java b/typespec-tests/src/main/java/type/file/implementation/BodiesImpl.java index 43f5f03c38..715b03483f 100644 --- a/typespec-tests/src/main/java/type/file/implementation/BodiesImpl.java +++ b/typespec-tests/src/main/java/type/file/implementation/BodiesImpl.java @@ -221,7 +221,6 @@ Response downloadFileDefaultContentTypeSync(@HostParam("endpoint") S * } * * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -231,8 +230,9 @@ Response downloadFileDefaultContentTypeSync(@HostParam("endpoint") S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadFileSpecificContentTypeWithResponseAsync(String contentType, BinaryData file, + public Mono> uploadFileSpecificContentTypeWithResponseAsync(BinaryData file, RequestOptions requestOptions) { + final String contentType = "image/png"; return FluxUtil.withContext(context -> service.uploadFileSpecificContentType(this.client.getEndpoint(), contentType, file, requestOptions, context)); } @@ -247,7 +247,6 @@ public Mono> uploadFileSpecificContentTypeWithResponseAsync(Strin * } * * - * @param contentType Body parameter's content type. Known values are image/png. * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -257,8 +256,8 @@ public Mono> uploadFileSpecificContentTypeWithResponseAsync(Strin * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadFileSpecificContentTypeWithResponse(String contentType, BinaryData file, - RequestOptions requestOptions) { + public Response uploadFileSpecificContentTypeWithResponse(BinaryData file, RequestOptions requestOptions) { + final String contentType = "image/png"; return service.uploadFileSpecificContentTypeSync(this.client.getEndpoint(), contentType, file, requestOptions, Context.NONE); } @@ -419,7 +418,8 @@ public Response downloadFileSpecificContentTypeWithResponse(RequestO * } * * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. + * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. Allowed values: + * "image/png", "image/jpeg". * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -445,7 +445,8 @@ public Mono> uploadFileMultipleContentTypesWithResponseAsync(Stri * } * * - * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. + * @param contentType Body parameter's content type. Known values are image/png,image/jpeg. Allowed values: + * "image/png", "image/jpeg". * @param file The file parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. @@ -471,7 +472,7 @@ public Response uploadFileMultipleContentTypesWithResponse(String contentT * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "image/png", "image/jpeg". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -496,7 +497,7 @@ public Mono> downloadFileMultipleContentTypesWithResponseAs * } * * - * @param accept The accept parameter. + * @param accept The accept parameter. Allowed values: "image/png", "image/jpeg". * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -573,6 +574,7 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp * } * * + * @param accept The accept parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -581,8 +583,8 @@ public Response uploadFileDefaultContentTypeWithResponse(String contentTyp * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> downloadFileDefaultContentTypeWithResponseAsync(RequestOptions requestOptions) { - final String accept = "*/*"; + public Mono> downloadFileDefaultContentTypeWithResponseAsync(String accept, + RequestOptions requestOptions) { return FluxUtil.withContext(context -> service.downloadFileDefaultContentType(this.client.getEndpoint(), accept, requestOptions, context)); } @@ -597,6 +599,7 @@ public Mono> downloadFileDefaultContentTypeWithResponseAsyn * } * * + * @param accept The accept parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -605,8 +608,8 @@ public Mono> downloadFileDefaultContentTypeWithResponseAsyn * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response downloadFileDefaultContentTypeWithResponse(RequestOptions requestOptions) { - final String accept = "*/*"; + public Response downloadFileDefaultContentTypeWithResponse(String accept, + RequestOptions requestOptions) { return service.downloadFileDefaultContentTypeSync(this.client.getEndpoint(), accept, requestOptions, Context.NONE); } diff --git a/typespec-tests/src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java b/typespec-tests/src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java new file mode 100644 index 0000000000..809a1d1bd9 --- /dev/null +++ b/typespec-tests/src/main/java/type/file/models/DownloadFileMultipleContentTypesContentType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package type.file.models; + +/** + * Defines values for DownloadFileMultipleContentTypesContentType. + */ +public enum DownloadFileMultipleContentTypesContentType { + /** + * Enum value image/png. + */ + IMAGE_PNG("image/png"), + + /** + * Enum value image/jpeg. + */ + IMAGE_JPEG("image/jpeg"); + + /** + * The actual serialized value for a DownloadFileMultipleContentTypesContentType instance. + */ + private final String value; + + DownloadFileMultipleContentTypesContentType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DownloadFileMultipleContentTypesContentType instance. + * + * @param value the serialized value to parse. + * @return the parsed DownloadFileMultipleContentTypesContentType object, or null if unable to parse. + */ + public static DownloadFileMultipleContentTypesContentType fromString(String value) { + if (value == null) { + return null; + } + DownloadFileMultipleContentTypesContentType[] items = DownloadFileMultipleContentTypesContentType.values(); + for (DownloadFileMultipleContentTypesContentType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/typespec-tests/src/main/java/type/file/models/package-info.java b/typespec-tests/src/main/java/type/file/models/package-info.java new file mode 100644 index 0000000000..7089819772 --- /dev/null +++ b/typespec-tests/src/main/java/type/file/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * + * Package containing the data models for File. + * Test for File type usage in request and response bodies. + * + */ +package type.file.models; diff --git a/typespec-tests/src/test/java/client/naming/NamingTests.java b/typespec-tests/src/test/java/client/naming/NamingTests.java index 1389491b1a..30f6239850 100644 --- a/typespec-tests/src/test/java/client/naming/NamingTests.java +++ b/typespec-tests/src/test/java/client/naming/NamingTests.java @@ -16,6 +16,10 @@ public class NamingTests { private final NamingClient client = new NamingClientBuilder().buildClient(); + private final PropertyClient propertyClient = new NamingClientBuilder().buildPropertyClient(); + + private final HeaderClient headerClient = new NamingClientBuilder().buildHeaderClient(); + // client name should be "ClientModel", currently a bug in TCGC private final ModelClient modelClient = new NamingClientBuilder().buildModelClient(); @@ -30,13 +34,13 @@ public void testNaming() { client.parameter("true"); // property - client.client(new ClientNameModel(true)); - client.language(new LanguageClientNameModel(true)); - client.compatibleWithEncodedName(new ClientNameAndJsonEncodedNameModel(true)); + propertyClient.client(new ClientNameModel(true)); + propertyClient.language(new LanguageClientNameModel(true)); + propertyClient.compatibleWithEncodedName(new ClientNameAndJsonEncodedNameModel(true)); // header - client.request("true"); - client.response(); // no class about response header at present + headerClient.request("true"); + headerClient.response(); // no class about response header at present // model modelClient.client(new ClientModel(true)); diff --git a/typespec-tests/src/test/java/client/naming/generated/NamingClientTestBase.java b/typespec-tests/src/test/java/client/naming/generated/NamingClientTestBase.java index 56ab4a928b..ad09790a3b 100644 --- a/typespec-tests/src/test/java/client/naming/generated/NamingClientTestBase.java +++ b/typespec-tests/src/test/java/client/naming/generated/NamingClientTestBase.java @@ -8,9 +8,11 @@ // If you wish to modify these files, please copy them out of the 'generated' package, and modify there. // See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. +import client.naming.HeaderClient; import client.naming.ModelClient; import client.naming.NamingClient; import client.naming.NamingClientBuilder; +import client.naming.PropertyClient; import client.naming.UnionEnumClient; import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; @@ -21,6 +23,10 @@ class NamingClientTestBase extends TestProxyTestBase { protected NamingClient namingClient; + protected PropertyClient propertyClient; + + protected HeaderClient headerClient; + protected ModelClient modelClient; protected UnionEnumClient unionEnumClient; @@ -36,6 +42,24 @@ protected void beforeTest() { } namingClient = namingClientbuilder.buildClient(); + NamingClientBuilder propertyClientbuilder = new NamingClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + propertyClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + propertyClient = propertyClientbuilder.buildPropertyClient(); + + NamingClientBuilder headerClientbuilder = new NamingClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + headerClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + headerClient = headerClientbuilder.buildHeaderClient(); + NamingClientBuilder modelClientbuilder = new NamingClientBuilder() .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "http://localhost:3000")) .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) diff --git a/typespec-tests/src/test/java/type/file/FileTests.java b/typespec-tests/src/test/java/type/file/FileTests.java index c2559b257c..8d9349184b 100644 --- a/typespec-tests/src/test/java/type/file/FileTests.java +++ b/typespec-tests/src/test/java/type/file/FileTests.java @@ -8,6 +8,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.utils.FileUtils; +import type.file.models.DownloadFileMultipleContentTypesContentType; public class FileTests { @@ -17,7 +18,7 @@ public class FileTests { @Test public void testUploadFileSpecificContentType() { - client.uploadFileSpecificContentType("image/png", BinaryData.fromFile(PNG_FILE)); + client.uploadFileSpecificContentType(BinaryData.fromFile(PNG_FILE)); } @Test @@ -41,12 +42,13 @@ public void testDownloadFileSpecificContentType() { @Test public void testUploadFileMultipleContentTypes() { - client.uploadFileMultipleContentTypes("image/png", BinaryData.fromFile(PNG_FILE)); + client.uploadFileMultipleContentTypesWithResponse("image/png", BinaryData.fromFile(PNG_FILE), null); } @Test public void testDownloadFileMultipleContentTypes() { - BinaryData response = client.downloadFileMultipleContentTypes("image/png"); + BinaryData response + = client.downloadFileMultipleContentTypes(DownloadFileMultipleContentTypesContentType.IMAGE_PNG); Assertions.assertNotNull(response); } @@ -57,7 +59,7 @@ public void testUploadFileDefaultContentType() { @Test public void testDownloadFileDefaultContentType() { - BinaryData response = client.downloadFileDefaultContentType(); + BinaryData response = client.downloadFileDefaultContentType("image/png"); Assertions.assertNotNull(response); } } From 2559806c08c0e4a908fade0a74531d9e7bc65ed8 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 8 Apr 2026 12:54:32 +0800 Subject: [PATCH 3/4] update Generate.ps1 --- typespec-tests/Generate.ps1 | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/typespec-tests/Generate.ps1 b/typespec-tests/Generate.ps1 index e5873b335c..7d9b9250ab 100644 --- a/typespec-tests/Generate.ps1 +++ b/typespec-tests/Generate.ps1 @@ -62,8 +62,6 @@ $generateScript = { } elseif ($tspFile -match "azure[\\/]resource-manager[\\/].*[\\/]main\.tsp") { # for mgmt, do not generate tests due to random mock values $tspOptions += " --option ""@azure-tools/typespec-java.generate-tests=false""" - } elseif ($tspFile -match "azure[\\/]resource-manager[\\/]multi-service-older-versions[\\/]") { - $tspOptions += " --option ""@azure-tools/typespec-java.metadata-suffix=older-versions""" } elseif ($tspFile -match "azure[\\/]resource-manager[\\/]multi-service-shared-models[\\/]") { $tspOptions += " --option ""@azure-tools/typespec-java.metadata-suffix=shared-models""" } elseif ($tspFile -match "tsp[\\/]versioning.tsp") { @@ -200,7 +198,6 @@ try { $specFiles = Get-ChildItem ./specs -Include "main.tsp","old.tsp" -File -Recurse # ensure multi-service client specs are processed even though they do not match the default filter $specFiles += Get-Item (Join-Path ./specs "azure/resource-manager/multi-service/client.tsp") - $specFiles += Get-Item (Join-Path ./specs "azure/resource-manager/multi-service-older-versions/client.tsp") $specFiles += Get-Item (Join-Path ./specs "azure/resource-manager/multi-service-shared-models/client.tsp") $job = $specFiles | ForEach-Object -Parallel $generateScript -ThrottleLimit $Parallelization -AsJob @@ -214,13 +211,6 @@ try { Remove-Item ./tsp-output -Recurse -Force - if (Test-Path ./src/main/resources/META-INF/client-structure-service_metadata.json) { - # client structure is generated from multiple client.tsp files and the last one to execute overwrites - # the api view properties file. Because the tests run in parallel, the order is not guaranteed. This - # causes git diff check to fail as the checked in file is not the same as the generated one. - Remove-Item ./src/main/resources/META-INF/client-structure-service_metadata.json -Force - } - if ($ExitCode -ne 0) { throw "Failed to generate from tsp" } From efb4997b039bf9b7e3cd34c3836f098e424a0d7d Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 8 Apr 2026 13:18:38 +0800 Subject: [PATCH 4/4] fix test package.json --- typespec-tests/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typespec-tests/package.json b/typespec-tests/package.json index 00734000dc..6170e72330 100644 --- a/typespec-tests/package.json +++ b/typespec-tests/package.json @@ -9,14 +9,14 @@ "spector-serve": "tsp-spector serve ./node_modules/@typespec/http-specs/specs ./node_modules/@azure-tools/azure-http-specs/specs --coverageFile ./tsp-spector-coverage-java.json" }, "dependencies": { - "@typespec/spec-api": "0.1.0-alpha.13", - "@typespec/spector": "0.1.0-alpha.24", + "@typespec/spec-api": "0.1.0-alpha.14", + "@typespec/spector": "0.1.0-alpha.25", "@typespec/http-specs": "0.1.0-alpha.36", "@azure-tools/azure-http-specs": "0.1.0-alpha.39", "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.44.0.tgz" }, "devDependencies": { - "@typespec/prettier-plugin-typespec": "^1.10.0", + "@typespec/prettier-plugin-typespec": "^1.11.0", "prettier-plugin-organize-imports": "^4.3.0", "prettier": "^3.8.1" },