From 53db4786535469127d399a64f8c996f76a6d3ad7 Mon Sep 17 00:00:00 2001 From: Haoling Dong <87355844+haolingdong-msft@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:50:07 +0800 Subject: [PATCH] tsp, prepare release for upgrading compiler to 0.62 (#2978) * update core * update versions * sync tests * update readme --- core | 2 +- typespec-extension/changelog.md | 4 + typespec-extension/package-lock.json | 239 +++++++++--------- typespec-extension/package.json | 46 ++-- typespec-extension/readme.md | 2 +- typespec-tests/package.json | 24 +- .../RelativeModelInOperationAsyncClient.java | 20 +- .../RelativeModelInOperationClient.java | 20 +- .../RelativeModelInOperationsImpl.java | 20 +- .../core/usage/UsageAsyncClient.java | 12 +- .../core/usage/UsageClient.java | 12 +- .../implementation/ModelInOperationsImpl.java | 12 +- .../CommonPropertiesManager.java | 4 +- .../resources/ResourcesManager.java | 4 +- .../ArmResourceProviderManager.java | 4 +- .../ArmStreamStyleSerializationManager.java | 4 +- typespec-tests/tsp/response.tsp | 6 +- 17 files changed, 225 insertions(+), 210 deletions(-) diff --git a/core b/core index 93af3d31d0..910ca35fd6 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 93af3d31d0bdac74d89385b661a429392b5ac316 +Subproject commit 910ca35fd6943c5a38140f4a2698b974bbcd022c diff --git a/typespec-extension/changelog.md b/typespec-extension/changelog.md index 3c5712d249..8ec78e1c56 100644 --- a/typespec-extension/changelog.md +++ b/typespec-extension/changelog.md @@ -1,5 +1,9 @@ # Release History +## 0.24.0 (2024-11-08) + +Compatible with compiler 0.62. + ## 0.23.0 (2024-11-07) Compatible with compiler 0.61. diff --git a/typespec-extension/package-lock.json b/typespec-extension/package-lock.json index beceb6146f..48cf4f078c 100644 --- a/typespec-extension/package-lock.json +++ b/typespec-extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "@azure-tools/typespec-java", - "version": "0.23.0", + "version": "0.24.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@azure-tools/typespec-java", - "version": "0.23.0", + "version": "0.24.0", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.0", @@ -14,23 +14,23 @@ "lodash": "~4.17.21" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.47.0", - "@azure-tools/typespec-azure-core": "0.47.0", - "@azure-tools/typespec-azure-resource-manager": "0.47.1", - "@azure-tools/typespec-azure-rulesets": "0.47.0", - "@azure-tools/typespec-client-generator-core": "0.47.2", + "@azure-tools/typespec-autorest": "0.48.0", + "@azure-tools/typespec-azure-core": "0.48.0", + "@azure-tools/typespec-azure-resource-manager": "0.48.0", + "@azure-tools/typespec-azure-rulesets": "0.48.0", + "@azure-tools/typespec-client-generator-core": "0.48.0", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.12", "@types/mocha": "~10.0.9", "@types/node": "~22.7.7", "@typescript-eslint/eslint-plugin": "~8.10.0", "@typescript-eslint/parser": "~8.10.0", - "@typespec/compiler": "0.61.2", - "@typespec/http": "0.61.0", - "@typespec/openapi": "0.61.0", - "@typespec/rest": "0.61.0", - "@typespec/versioning": "0.61.0", - "@typespec/xml": "0.61.0", + "@typespec/compiler": "0.62.0", + "@typespec/http": "0.62.0", + "@typespec/openapi": "0.62.0", + "@typespec/rest": "0.62.0", + "@typespec/versioning": "0.62.0", + "@typespec/xml": "0.62.0", "c8": "~10.1.2", "eslint": "~8.57.0", "eslint-plugin-deprecation": "~3.0.0", @@ -43,17 +43,17 @@ "node": ">=14.0.0" }, "peerDependencies": { - "@azure-tools/typespec-autorest": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-azure-core": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-azure-rulesets": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.47.1 <1.0.0", - "@typespec/compiler": ">=0.61.0 <1.0.0", - "@typespec/http": ">=0.61.0 <1.0.0", - "@typespec/openapi": ">=0.61.0 <1.0.0", - "@typespec/rest": ">=0.61.0 <1.0.0", - "@typespec/versioning": ">=0.61.0 <1.0.0", - "@typespec/xml": ">=0.61.0 <1.0.0" + "@azure-tools/typespec-autorest": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-core": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-rulesets": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.48.0 <1.0.0", + "@typespec/compiler": ">=0.62.0 <1.0.0", + "@typespec/http": ">=0.62.0 <1.0.0", + "@typespec/openapi": ">=0.62.0 <1.0.0", + "@typespec/rest": ">=0.62.0 <1.0.0", + "@typespec/versioning": ">=0.62.0 <1.0.0", + "@typespec/xml": ">=0.62.0 <1.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -106,42 +106,42 @@ } }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.47.0.tgz", - "integrity": "sha512-uYkk8mnzekSMhJKU3RS0cXvKPH0vbkonthYoPe7/vxZ7tWv4xJLSglV2v3m3QElFgvNebNVoBOEWSY8Kz/ip2Q==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.48.0.tgz", + "integrity": "sha512-AyoNMq3EORugHynFF8bN0TJh+zYxui/ApU5DoVEL7Xr1yMD6k9p5b90VD4HiCsP0dz8470ApFnjt5Vl6xCSzig==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.47.0", - "@azure-tools/typespec-azure-resource-manager": "~0.47.0", - "@azure-tools/typespec-client-generator-core": "~0.47.0", - "@typespec/compiler": "~0.61.0", - "@typespec/http": "~0.61.0", - "@typespec/openapi": "~0.61.0", - "@typespec/rest": "~0.61.0", - "@typespec/versioning": "~0.61.0" + "@azure-tools/typespec-azure-core": "~0.48.0", + "@azure-tools/typespec-azure-resource-manager": "~0.48.0", + "@azure-tools/typespec-client-generator-core": "~0.48.0", + "@typespec/compiler": "~0.62.0", + "@typespec/http": "~0.62.0", + "@typespec/openapi": "~0.62.0", + "@typespec/rest": "~0.62.0", + "@typespec/versioning": "~0.62.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.47.0.tgz", - "integrity": "sha512-RcBC5+dE1BVXTrUkkKULTImGxzM/ea3P3IL2kr9pk7r1uqF7D4CGqEKHFTg5L6QUtqc1f+zgTgQTNn6t4gI92w==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.48.0.tgz", + "integrity": "sha512-80qyqgTgBbrnCGXtz6eWAMBdEAjYVVL780L0Ye+rBEd6VoA0m3JrgzUqf5bC0Iwju6lEtBAb8o6sefKD/NGA7g==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.61.0", - "@typespec/http": "~0.61.0", - "@typespec/rest": "~0.61.0" + "@typespec/compiler": "~0.62.0", + "@typespec/http": "~0.62.0", + "@typespec/rest": "~0.62.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.47.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.47.1.tgz", - "integrity": "sha512-ZTrnHwPsc6aMVu6QghF7tPcKPVkt/ErHiEGP+vPXtb9iQh8YKMkkAl6jpvfnqMUqa1h3JkvOBCZM9w5FA84a6Q==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.48.0.tgz", + "integrity": "sha512-4JxPbKxd3EJ98sLbtfBlqyANWVrU6tT2nk3iLspg7MITPLhiMTeRT9BprsJXH18ks8qw8scR7/am5r57YERTmQ==", "dev": true, "dependencies": { "change-case": "~5.4.4", @@ -151,33 +151,33 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.47.0", - "@typespec/compiler": "~0.61.0", - "@typespec/http": "~0.61.0", - "@typespec/openapi": "~0.61.0", - "@typespec/rest": "~0.61.0", - "@typespec/versioning": "~0.61.0" + "@azure-tools/typespec-azure-core": "~0.48.0", + "@typespec/compiler": "~0.62.0", + "@typespec/http": "~0.62.0", + "@typespec/openapi": "~0.62.0", + "@typespec/rest": "~0.62.0", + "@typespec/versioning": "~0.62.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.47.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.47.0.tgz", - "integrity": "sha512-CG6sGYc/9qKAQIWtauzH6yEoTdugfz4DEmiWcytJMhgw1tQ2bqmcJuar01ctDKuaD5F1PKZ0X3oAxPu84pIlqw==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.48.0.tgz", + "integrity": "sha512-IkPxC8v9wVSl/eKU7N4NhqD3RPh+bIYpxDW5LBAhkuQVcE3RumAkWqh2pmkckihQRhgwiCXhcJVZAzBpVa5SUA==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.47.0", - "@azure-tools/typespec-azure-resource-manager": "~0.47.0", - "@azure-tools/typespec-client-generator-core": "~0.47.0", - "@typespec/compiler": "~0.61.0" + "@azure-tools/typespec-azure-core": "~0.48.0", + "@azure-tools/typespec-azure-resource-manager": "~0.48.0", + "@azure-tools/typespec-client-generator-core": "~0.48.0", + "@typespec/compiler": "~0.62.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.47.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.47.2.tgz", - "integrity": "sha512-mOsgeOuJcJa5CrQrT/BzqpbLDnb/X1TgSmfljhV3tJFB2dzZT6awzeAp5clV03Or/4xCMGbmHEABi4kCWot9Qw==", + "version": "0.48.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.48.0.tgz", + "integrity": "sha512-+fmKjapz0kP7ONPZap8dgcIKIdQw+YBSrf89csbIyhPTcLnVAk/BKljo8FoNypKXwqKHenslLm0njBKPllkopg==", "dev": true, "dependencies": { "change-case": "~5.4.4", @@ -187,20 +187,21 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.47.0", - "@typespec/compiler": "~0.61.0", - "@typespec/http": "~0.61.0", - "@typespec/openapi": "~0.61.0", - "@typespec/rest": "~0.61.0", - "@typespec/versioning": "~0.61.0" + "@azure-tools/typespec-azure-core": "~0.48.0", + "@typespec/compiler": "~0.62.0", + "@typespec/http": "~0.62.0", + "@typespec/openapi": "~0.62.0", + "@typespec/rest": "~0.62.0", + "@typespec/versioning": "~0.62.0" } }, "node_modules/@babel/code-frame": { - "version": "7.24.7", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.9.tgz", + "integrity": "sha512-z88xeGxnzehn2sqZ8UdGQEvYErF1odv2CftxInpSYJt6uHuPe9YjahKZITGs3l5LeI9d2ROG+obuDAoSlqbNfQ==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/highlight": "^7.24.7", + "@babel/highlight": "^7.25.9", "picocolors": "^1.0.0" }, "engines": { @@ -208,19 +209,21 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.7", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.9.tgz", + "integrity": "sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.24.7", + "@babel/helper-validator-identifier": "^7.25.9", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -754,12 +757,12 @@ } }, "node_modules/@typespec/compiler": { - "version": "0.61.2", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.61.2.tgz", - "integrity": "sha512-6QxYJd09VWssd/BvY+8eBxTVv085s1UNK63FdPrgT2lgI+j8VMMcpNR9m5l1zWlgGDM7sniA/Or8VCdVA6jerg==", + "version": "0.62.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.62.0.tgz", + "integrity": "sha512-RfKJ/rF2Wjxu7dl74oJE8yEfSkeL7NopFlyJ4dW1JQXpRN2IOJYPxas12qZA6H9ZEIB8rBjyrHNxJSQbvn/UDQ==", "dev": true, "dependencies": { - "@babel/code-frame": "~7.24.7", + "@babel/code-frame": "~7.25.7", "ajv": "~8.17.1", "change-case": "~5.4.4", "globby": "~14.0.2", @@ -824,16 +827,16 @@ } }, "node_modules/@typespec/http": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.61.0.tgz", - "integrity": "sha512-7+AYHkzkc+p652GY9BcEbXY4OZa1fTr03MVmZeafvmbQbXfyzUU9eJld13M3v6NaUWqXWZ7nBNMISyKiXp/kSw==", + "version": "0.62.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.62.0.tgz", + "integrity": "sha512-6H9y9e32lb2s76MMy29ITCwSZNG42sa/qWthiByUvfbTEXMpu5a1fQHNj7RXg+xmDKmVIHv3gAfjGPAWfXhkaQ==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.61.0", - "@typespec/streams": "~0.61.0" + "@typespec/compiler": "~0.62.0", + "@typespec/streams": "~0.62.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -842,53 +845,53 @@ } }, "node_modules/@typespec/openapi": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.61.0.tgz", - "integrity": "sha512-3AF319Ae4yGVOscsCLQeedXUJJcL/NdGOR2/e/nFiL/AOVdgLfIRnpR0Ad9Zj9XAESh1fq9XSu4Mi7N1k4V7rw==", + "version": "0.62.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.62.0.tgz", + "integrity": "sha512-Xtm0Nd2BuSmEfSWGtc10ok22jyomYm9L2jY+kVTy+v5J89DrVh0o6+YpipUl1QhcItM1YMBphWHIHPfwkDRbnw==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.61.0", - "@typespec/http": "~0.61.0" + "@typespec/compiler": "~0.62.0", + "@typespec/http": "~0.62.0" } }, "node_modules/@typespec/rest": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.61.0.tgz", - "integrity": "sha512-L9Oyor+l42p6S8GE+UvaZTi+dcu6WubGZKmaBRpX8mCZGsa69EgIK8DQoyxrfMcxAO4I5U0sfkzCKwCVFtRr9g==", + "version": "0.62.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.62.0.tgz", + "integrity": "sha512-ci5UjelEKFwsPTdpgysoUoDCcw02EnbG4GBuYJdR5mRrFCBZMxrbro+OJLgSN3g/TORSsWlW7dEOWLfbyrmlZQ==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.61.0", - "@typespec/http": "~0.61.0" + "@typespec/compiler": "~0.62.0", + "@typespec/http": "~0.62.0" } }, "node_modules/@typespec/versioning": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.61.0.tgz", - "integrity": "sha512-PIIug6eg3zc7E+BBHyNHHQD+OBq3FU465nhKrLEp35iVji/sYFuPc1ywnELDuwJVRWm6nvqNL1vtnc+4lEk+oA==", + "version": "0.62.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.62.0.tgz", + "integrity": "sha512-M5KTCVH5fBniZU8eQlw+NV13vAmPr58HyBLDIyxeOuV+SHNlx+f+qanUEDIPaJheKlaSSNTEZKsDhs83/iIMMA==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.61.0" + "@typespec/compiler": "~0.62.0" } }, "node_modules/@typespec/xml": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.61.0.tgz", - "integrity": "sha512-LnMYyzB7f6C8rBZmQwhKyJOJ8mUTFls6aVKXw4EAaO2+HPsm73GN16lj1bt2ffbWR3izCGnz911K2wGtUrtSpA==", + "version": "0.62.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.62.0.tgz", + "integrity": "sha512-DexGTQHB75fncDcYfs5CIbNwO6NOhjwCaaNoHYAsVVzs4T8qwzw6WQdEEMzZRbgsxwnllFkxKwGhLtRMQdv/cQ==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.61.0" + "@typespec/compiler": "~0.62.0" } }, "node_modules/@ungap/structured-clone": { @@ -952,8 +955,9 @@ }, "node_modules/ansi-styles": { "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -1079,8 +1083,9 @@ }, "node_modules/chalk": { "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -1147,16 +1152,18 @@ }, "node_modules/color-convert": { "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "1.1.3" } }, "node_modules/color-name": { "version": "1.1.3", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true }, "node_modules/concat-map": { "version": "0.0.1", @@ -1266,8 +1273,9 @@ }, "node_modules/escape-string-regexp": { "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -1885,8 +1893,9 @@ }, "node_modules/has-flag": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } @@ -2100,8 +2109,9 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", @@ -2615,9 +2625,9 @@ } }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true }, "node_modules/picomatch": { @@ -3001,8 +3011,9 @@ }, "node_modules/supports-color": { "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, diff --git a/typespec-extension/package.json b/typespec-extension/package.json index a2afe5f8cb..948a0f27e9 100644 --- a/typespec-extension/package.json +++ b/typespec-extension/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/typespec-java", - "version": "0.23.0", + "version": "0.24.0", "description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding", "keywords": [ "TypeSpec" @@ -45,17 +45,17 @@ "generator/http-client-generator/target/emitter.jar" ], "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-azure-resource-manager": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-autorest": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-azure-rulesets": ">=0.47.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.47.1 <1.0.0", - "@typespec/compiler": ">=0.61.0 <1.0.0", - "@typespec/http": ">=0.61.0 <1.0.0", - "@typespec/openapi": ">=0.61.0 <1.0.0", - "@typespec/rest": ">=0.61.0 <1.0.0", - "@typespec/versioning": ">=0.61.0 <1.0.0", - "@typespec/xml": ">=0.61.0 <1.0.0" + "@azure-tools/typespec-azure-core": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-resource-manager": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-autorest": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-azure-rulesets": ">=0.48.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.48.0 <1.0.0", + "@typespec/compiler": ">=0.62.0 <1.0.0", + "@typespec/http": ">=0.62.0 <1.0.0", + "@typespec/openapi": ">=0.62.0 <1.0.0", + "@typespec/rest": ">=0.62.0 <1.0.0", + "@typespec/versioning": ">=0.62.0 <1.0.0", + "@typespec/xml": ">=0.62.0 <1.0.0" }, "dependencies": { "@autorest/codemodel": "~4.20.0", @@ -63,23 +63,23 @@ "lodash": "~4.17.21" }, "devDependencies": { - "@azure-tools/typespec-azure-core": "0.47.0", - "@azure-tools/typespec-azure-resource-manager": "0.47.1", - "@azure-tools/typespec-autorest": "0.47.0", - "@azure-tools/typespec-azure-rulesets": "0.47.0", - "@azure-tools/typespec-client-generator-core": "0.47.2", + "@azure-tools/typespec-azure-core": "0.48.0", + "@azure-tools/typespec-azure-resource-manager": "0.48.0", + "@azure-tools/typespec-autorest": "0.48.0", + "@azure-tools/typespec-azure-rulesets": "0.48.0", + "@azure-tools/typespec-client-generator-core": "0.48.0", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.12", "@types/mocha": "~10.0.9", "@types/node": "~22.7.7", "@typescript-eslint/eslint-plugin": "~8.10.0", "@typescript-eslint/parser": "~8.10.0", - "@typespec/compiler": "0.61.2", - "@typespec/http": "0.61.0", - "@typespec/openapi": "0.61.0", - "@typespec/rest": "0.61.0", - "@typespec/versioning": "0.61.0", - "@typespec/xml": "0.61.0", + "@typespec/compiler": "0.62.0", + "@typespec/http": "0.62.0", + "@typespec/openapi": "0.62.0", + "@typespec/rest": "0.62.0", + "@typespec/versioning": "0.62.0", + "@typespec/xml": "0.62.0", "c8": "~10.1.2", "eslint": "~8.57.0", "eslint-plugin-deprecation": "~3.0.0", diff --git a/typespec-extension/readme.md b/typespec-extension/readme.md index 887463879c..b623fe90b4 100644 --- a/typespec-extension/readme.md +++ b/typespec-extension/readme.md @@ -4,7 +4,7 @@ Install [Node.js](https://nodejs.org/en/download/) 20 or above. (Verify by `node Install [Java](https://docs.microsoft.com/java/openjdk/download) 11 or above. (Verify by `java --version`) -Install [TypeSpec](https://github.com/microsoft/typespec/) 0.61. +Install [TypeSpec](https://github.com/microsoft/typespec/) 0.62. # Initialize TypeSpec Project diff --git a/typespec-tests/package.json b/typespec-tests/package.json index ff8e106b30..9db68be588 100644 --- a/typespec-tests/package.json +++ b/typespec-tests/package.json @@ -10,24 +10,24 @@ }, "dependencies": { "@azure-tools/cadl-ranch-specs": "0.38.0", - "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.23.0.tgz" + "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.24.0.tgz" }, "devDependencies": { - "@typespec/prettier-plugin-typespec": "~0.61.0", + "@typespec/prettier-plugin-typespec": "~0.62.0", "prettier-plugin-organize-imports": "4.0.0", "prettier": "~3.3.3" }, "overrides": { - "@typespec/compiler": "~0.61.0", - "@typespec/http": "~0.61.0", - "@typespec/rest": "~0.61.0", - "@typespec/versioning": "~0.61.0", - "@typespec/openapi": "~0.61.0", - "@typespec/xml": "~0.61.0", - "@azure-tools/typespec-azure-core": "~0.47.0", - "@azure-tools/typespec-client-generator-core": "~0.47.1", - "@azure-tools/typespec-azure-resource-manager": "~0.47.0", - "@azure-tools/typespec-autorest": "~0.47.0" + "@typespec/compiler": "~0.62.0", + "@typespec/http": "~0.62.0", + "@typespec/rest": "~0.62.0", + "@typespec/versioning": "~0.62.0", + "@typespec/openapi": "~0.62.0", + "@typespec/xml": "~0.62.0", + "@azure-tools/typespec-azure-core": "~0.48.0", + "@azure-tools/typespec-client-generator-core": "~0.48.0", + "@azure-tools/typespec-azure-resource-manager": "~0.48.0", + "@azure-tools/typespec-autorest": "~0.48.0" }, "private": true } diff --git a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationAsyncClient.java b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationAsyncClient.java index 734bd268bc..b6f0090795 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationAsyncClient.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationAsyncClient.java @@ -40,14 +40,14 @@ public final class RelativeModelInOperationAsyncClient { } /** - * Expected query parameter: name=<any string> + * Expected query parameter: name="Madge" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "inner": * { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -80,11 +80,11 @@ Mono> operationWithResponse(String name, RequestOptions req } /** - * Expected query parameter: kind=<any string> + * Expected query parameter: kind= "real" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "kind": "real" * } * ```. @@ -115,14 +115,14 @@ Mono> discriminatorWithResponse(String kind, RequestOptions } /** - * Expected query parameter: name=<any string> + * Expected query parameter: name="Madge" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "inner": * { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -147,11 +147,11 @@ Mono operation(String name) { } /** - * Expected query parameter: kind=<any string> + * Expected query parameter: kind= "real" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "kind": "real" * } * ```. diff --git a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationClient.java b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationClient.java index c8d11948e3..306db0e379 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationClient.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/RelativeModelInOperationClient.java @@ -38,14 +38,14 @@ public final class RelativeModelInOperationClient { } /** - * Expected query parameter: name=<any string> + * Expected query parameter: name="Madge" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "inner": * { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -77,11 +77,11 @@ Response operationWithResponse(String name, RequestOptions requestOp } /** - * Expected query parameter: kind=<any string> + * Expected query parameter: kind= "real" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "kind": "real" * } * ```. @@ -111,14 +111,14 @@ Response discriminatorWithResponse(String kind, RequestOptions reque } /** - * Expected query parameter: name=<any string> + * Expected query parameter: name="Madge" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "inner": * { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -141,11 +141,11 @@ OuterModel operation(String name) { } /** - * Expected query parameter: kind=<any string> + * Expected query parameter: kind= "real" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "kind": "real" * } * ```. diff --git a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/implementation/RelativeModelInOperationsImpl.java b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/implementation/RelativeModelInOperationsImpl.java index d447dd153e..f397c02aac 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/implementation/RelativeModelInOperationsImpl.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/access/implementation/RelativeModelInOperationsImpl.java @@ -97,14 +97,14 @@ Response discriminatorSync(@HostParam("endpoint") String endpoint, @ } /** - * Expected query parameter: name=<any string> + * Expected query parameter: name="Madge" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "inner": * { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -138,14 +138,14 @@ public Mono> operationWithResponseAsync(String name, Reques } /** - * Expected query parameter: name=<any string> + * Expected query parameter: name="Madge" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "inner": * { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -177,11 +177,11 @@ public Response operationWithResponse(String name, RequestOptions re } /** - * Expected query parameter: kind=<any string> + * Expected query parameter: kind= "real" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "kind": "real" * } * ```. @@ -213,11 +213,11 @@ public Mono> discriminatorWithResponseAsync(String kind, Re } /** - * Expected query parameter: kind=<any string> + * Expected query parameter: kind= "real" * Expected response body: * ```json * { - * "name": <any string>, + * "name": "Madge", * "kind": "real" * } * ```. diff --git a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageAsyncClient.java b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageAsyncClient.java index c35a913350..2b63966eda 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageAsyncClient.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageAsyncClient.java @@ -44,7 +44,7 @@ public final class UsageAsyncClient { * Expected body parameter: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. *

Request Body Schema

@@ -75,7 +75,7 @@ public Mono> inputToInputOutputWithResponse(BinaryData body, Requ * Expected response body: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. *

Response Body Schema

@@ -114,7 +114,7 @@ public Mono> outputToInputOutputWithResponse(RequestOptions * ```json * { * "result": { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -161,7 +161,7 @@ public Mono> modelInReadOnlyPropertyWithResponse(BinaryData * Expected body parameter: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. * @@ -186,7 +186,7 @@ public Mono inputToInputOutput(InputModel body) { * Expected response body: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. * @@ -219,7 +219,7 @@ public Mono outputToInputOutput() { * ```json * { * "result": { - * "name": <any string> + * "name": "Madge" * } * } * ```. diff --git a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageClient.java b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageClient.java index 28f466ab34..e93a7d7f32 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageClient.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/UsageClient.java @@ -42,7 +42,7 @@ public final class UsageClient { * Expected body parameter: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. *

Request Body Schema

@@ -73,7 +73,7 @@ public Response inputToInputOutputWithResponse(BinaryData body, RequestOpt * Expected response body: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. *

Response Body Schema

@@ -112,7 +112,7 @@ public Response outputToInputOutputWithResponse(RequestOptions reque * ```json * { * "result": { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -158,7 +158,7 @@ public Response modelInReadOnlyPropertyWithResponse(BinaryData body, * Expected body parameter: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. * @@ -182,7 +182,7 @@ public void inputToInputOutput(InputModel body) { * Expected response body: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. * @@ -214,7 +214,7 @@ public OutputModel outputToInputOutput() { * ```json * { * "result": { - * "name": <any string> + * "name": "Madge" * } * } * ```. diff --git a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/implementation/ModelInOperationsImpl.java b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/implementation/ModelInOperationsImpl.java index 4fb9f7a500..e1787bd987 100644 --- a/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/implementation/ModelInOperationsImpl.java +++ b/typespec-tests/src/main/java/com/_specs_/azure/clientgenerator/core/usage/implementation/ModelInOperationsImpl.java @@ -123,7 +123,7 @@ Response modelInReadOnlyPropertySync(@HostParam("endpoint") String e * Expected body parameter: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. *

Request Body Schema

@@ -155,7 +155,7 @@ public Mono> inputToInputOutputWithResponseAsync(BinaryData body, * Expected body parameter: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. *

Request Body Schema

@@ -187,7 +187,7 @@ public Response inputToInputOutputWithResponse(BinaryData body, RequestOpt * Expected response body: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. *

Response Body Schema

@@ -218,7 +218,7 @@ public Mono> outputToInputOutputWithResponseAsync(RequestOp * Expected response body: * ```json * { - * "name": <any string> + * "name": "Madge" * } * ```. *

Response Body Schema

@@ -257,7 +257,7 @@ public Response outputToInputOutputWithResponse(RequestOptions reque * ```json * { * "result": { - * "name": <any string> + * "name": "Madge" * } * } * ```. @@ -315,7 +315,7 @@ public Mono> modelInReadOnlyPropertyWithResponseAsync(Binar * ```json * { * "result": { - * "name": <any string> + * "name": "Madge" * } * } * ```. diff --git a/typespec-tests/src/main/java/com/azure/resourcemanager/commonproperties/CommonPropertiesManager.java b/typespec-tests/src/main/java/com/azure/resourcemanager/commonproperties/CommonPropertiesManager.java index 474ad6c4d1..33aaeca4d7 100644 --- a/typespec-tests/src/main/java/com/azure/resourcemanager/commonproperties/CommonPropertiesManager.java +++ b/typespec-tests/src/main/java/com/azure/resourcemanager/commonproperties/CommonPropertiesManager.java @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -19,7 +20,6 @@ import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -238,7 +238,7 @@ public CommonPropertiesManager authenticate(TokenCredential credential, AzurePro HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); diff --git a/typespec-tests/src/main/java/com/azure/resourcemanager/resources/ResourcesManager.java b/typespec-tests/src/main/java/com/azure/resourcemanager/resources/ResourcesManager.java index 6effb18705..c47b864bd3 100644 --- a/typespec-tests/src/main/java/com/azure/resourcemanager/resources/ResourcesManager.java +++ b/typespec-tests/src/main/java/com/azure/resourcemanager/resources/ResourcesManager.java @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -19,7 +20,6 @@ import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -246,7 +246,7 @@ public ResourcesManager authenticate(TokenCredential credential, AzureProfile pr HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); diff --git a/typespec-tests/src/main/java/com/cadl/armresourceprovider/ArmResourceProviderManager.java b/typespec-tests/src/main/java/com/cadl/armresourceprovider/ArmResourceProviderManager.java index 7ab65ba300..68e9fd19da 100644 --- a/typespec-tests/src/main/java/com/cadl/armresourceprovider/ArmResourceProviderManager.java +++ b/typespec-tests/src/main/java/com/cadl/armresourceprovider/ArmResourceProviderManager.java @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -19,7 +20,6 @@ import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -254,7 +254,7 @@ public ArmResourceProviderManager authenticate(TokenCredential credential, Azure HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); diff --git a/typespec-tests/src/main/java/com/cadl/armstreamstyleserialization/ArmStreamStyleSerializationManager.java b/typespec-tests/src/main/java/com/cadl/armstreamstyleserialization/ArmStreamStyleSerializationManager.java index 337c4c98fb..a1d417e587 100644 --- a/typespec-tests/src/main/java/com/cadl/armstreamstyleserialization/ArmStreamStyleSerializationManager.java +++ b/typespec-tests/src/main/java/com/cadl/armstreamstyleserialization/ArmStreamStyleSerializationManager.java @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -19,7 +20,6 @@ import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -244,7 +244,7 @@ public ArmStreamStyleSerializationManager authenticate(TokenCredential credentia HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); diff --git a/typespec-tests/tsp/response.tsp b/typespec-tests/tsp/response.tsp index 281833e70b..3781558d68 100644 --- a/typespec-tests/tsp/response.tsp +++ b/typespec-tests/tsp/response.tsp @@ -86,7 +86,7 @@ model StringsList { @items value: string[]; - @nextLink + @global.Azure.Core.nextLink nextLink?: string; } @@ -95,7 +95,7 @@ model Int32sList { @items value: int32[]; - @nextLink + @global.Azure.Core.nextLink nextLink?: string; } @@ -104,7 +104,7 @@ model DateTimesList { @items value: utcDateTime[]; - @nextLink + @global.Azure.Core.nextLink nextLink?: string; }