diff --git a/core b/core index 0b83fa0f7d..379841db73 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 0b83fa0f7db2a42205d5187f862ef13098758700 +Subproject commit 379841db7311ac647689ae7f1df319c1b24b1995 diff --git a/package-lock.json b/package-lock.json index 2b4a47be6b..daf96942e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@autorest/java", - "version": "4.1.63", + "version": "4.1.64", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@autorest/java", - "version": "4.1.63", + "version": "4.1.64", "license": "MIT", "devDependencies": { "@microsoft.azure/autorest.testserver": "3.3.50", diff --git a/package.json b/package.json index 857bd97ca1..1ab249e7be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/java", - "version": "4.1.63", + "version": "4.1.64", "description": "The Java extension for classic generators in AutoRest.", "scripts": { "autorest": "autorest", diff --git a/typespec-extension/changelog.md b/typespec-extension/changelog.md index 80f4510de2..25535ccab6 100644 --- a/typespec-extension/changelog.md +++ b/typespec-extension/changelog.md @@ -1,5 +1,11 @@ # Release History +## 0.43.2 (2026-03-20) + +Compatible with compiler 1.10.0. + +- Updated package dependencies to the latest versions. + ## 0.43.1 (2026-03-16) Compatible with compiler 1.10.0. diff --git a/typespec-extension/package-lock.json b/typespec-extension/package-lock.json index b50720cb7d..bb595665ee 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.1", + "version": "0.43.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@azure-tools/typespec-java", - "version": "0.43.1", + "version": "0.43.2", "license": "MIT", "dependencies": { "@autorest/codemodel": "~4.20.1", @@ -19,14 +19,14 @@ "@azure-tools/typespec-azure-core": "0.66.0", "@azure-tools/typespec-azure-resource-manager": "0.66.0", "@azure-tools/typespec-azure-rulesets": "0.66.0", - "@azure-tools/typespec-client-generator-core": "0.66.2", - "@azure-tools/typespec-liftr-base": "0.12.0", + "@azure-tools/typespec-client-generator-core": "0.66.3", + "@azure-tools/typespec-liftr-base": "0.13.0", "@microsoft/api-extractor": "^7.57.7", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.24", "@types/node": "~25.5.0", - "@typescript-eslint/eslint-plugin": "~8.57.0", - "@typescript-eslint/parser": "~8.57.0", + "@typescript-eslint/eslint-plugin": "~8.57.1", + "@typescript-eslint/parser": "~8.57.1", "@typespec/compiler": "1.10.0", "@typespec/events": "0.80.0", "@typespec/http": "1.10.0", @@ -48,7 +48,7 @@ "prettier": "~3.8.1", "rimraf": "~6.1.3", "typescript": "~5.9.3", - "typescript-eslint": "^8.57.0", + "typescript-eslint": "^8.57.1", "vitest": "^4.1.0" }, "engines": { @@ -60,8 +60,8 @@ "@azure-tools/typespec-azure-core": ">=0.66.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.66.0 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.66.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.66.2 <1.0.0", - "@azure-tools/typespec-liftr-base": ">=0.12.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.66.3 <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", @@ -200,6 +200,7 @@ "integrity": "sha512-OBKxRN7AucK3snh+GtLKSDdcZTz08IgcSZlIO3c4KSlmcR5twT1NMyqf1+V8SAhyOdZimndb+ikzrkkgab+GpA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -215,6 +216,7 @@ "integrity": "sha512-UbgYUaYTt7prsv+RYxd2kiOWjeEeoH56QOqgXnSOFhYzq/h9fyDaQAm6+CY7cklziED+MYy3uMQd1BG9mNwlfQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -248,11 +250,12 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.66.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.66.2.tgz", - "integrity": "sha512-Qr5fstJ0yQiTYNvp/EuY3+mUBue2ri9qNZkT6aC+CsfBt5yjfdjo++3SuEsDQtELyS8pBoDOT3weLiB0N+/fSw==", + "version": "0.66.3", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.66.3.tgz", + "integrity": "sha512-sNetQ6igxAp/vL6X2kEIy715ToDTqoJeb+OL59GEUtOW/3KBSi5tsxvDdCwSfEoaNEmv/FYjh/gJDwAWCJdFJg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0", @@ -275,9 +278,9 @@ } }, "node_modules/@azure-tools/typespec-liftr-base": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-liftr-base/-/typespec-liftr-base-0.12.0.tgz", - "integrity": "sha512-jM5jjhiWUsqRvzYNiDc+7q4UXs02EbA3m8LRaUiLUkF61n7Vzz2Y0Jw2pW88zD4feCyyXoixRjpqvmurIY8K2w==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-liftr-base/-/typespec-liftr-base-0.13.0.tgz", + "integrity": "sha512-MF40K/IHwyy3N606DTZSPhFSwA/84ekR9RqvmtJXsXD0SdYcQSoAHOJp4o5qw8OAPSC+aKZ5A+TXRx333V/3PQ==", "dev": true }, "node_modules/@babel/code-frame": { @@ -1893,6 +1896,7 @@ "integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.18.0" } @@ -1905,17 +1909,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.0.tgz", - "integrity": "sha512-qeu4rTHR3/IaFORbD16gmjq9+rEs9fGKdX0kF6BKSfi+gCuG3RCKLlSBYzn/bGsY9Tj7KE/DAQStbp8AHJGHEQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.1.tgz", + "integrity": "sha512-Gn3aqnvNl4NGc6x3/Bqk1AOn0thyTU9bqDRhiRnUWezgvr2OnhYCWCgC8zXXRVqBsIL1pSDt7T9nJUe0oM0kDQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/type-utils": "8.57.0", - "@typescript-eslint/utils": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", + "@typescript-eslint/scope-manager": "8.57.1", + "@typescript-eslint/type-utils": "8.57.1", + "@typescript-eslint/utils": "8.57.1", + "@typescript-eslint/visitor-keys": "8.57.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.4.0" @@ -1928,7 +1932,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.57.0", + "@typescript-eslint/parser": "^8.57.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.0.0" } @@ -1957,16 +1961,17 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.0.tgz", - "integrity": "sha512-XZzOmihLIr8AD1b9hL9ccNMzEMWt/dE2u7NyTY9jJG6YNiNthaD5XtUHVF2uCXZ15ng+z2hT3MVuxnUYhq6k1g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.1.tgz", + "integrity": "sha512-k4eNDan0EIMTT/dUKc/g+rsJ6wcHYhNPdY19VoX/EOtaAG8DLtKCykhrUnuHPYvinn5jhAPgD2Qw9hXBwrahsw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", + "@typescript-eslint/scope-manager": "8.57.1", + "@typescript-eslint/types": "8.57.1", + "@typescript-eslint/typescript-estree": "8.57.1", + "@typescript-eslint/visitor-keys": "8.57.1", "debug": "^4.4.3" }, "engines": { @@ -1982,14 +1987,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.0.tgz", - "integrity": "sha512-pR+dK0BlxCLxtWfaKQWtYr7MhKmzqZxuii+ZjuFlZlIGRZm22HnXFqa2eY+90MUz8/i80YJmzFGDUsi8dMOV5w==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.1.tgz", + "integrity": "sha512-vx1F37BRO1OftsYlmG9xay1TqnjNVlqALymwWVuYTdo18XuKxtBpCj1QlzNIEHlvlB27osvXFWptYiEWsVdYsg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.57.0", - "@typescript-eslint/types": "^8.57.0", + "@typescript-eslint/tsconfig-utils": "^8.57.1", + "@typescript-eslint/types": "^8.57.1", "debug": "^4.4.3" }, "engines": { @@ -2004,14 +2009,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.0.tgz", - "integrity": "sha512-nvExQqAHF01lUM66MskSaZulpPL5pgy5hI5RfrxviLgzZVffB5yYzw27uK/ft8QnKXI2X0LBrHJFr1TaZtAibw==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.1.tgz", + "integrity": "sha512-hs/QcpCwlwT2L5S+3fT6gp0PabyGk4Q0Rv2doJXA0435/OpnSR3VRgvrp8Xdoc3UAYSg9cyUjTeFXZEPg/3OKg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0" + "@typescript-eslint/types": "8.57.1", + "@typescript-eslint/visitor-keys": "8.57.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2022,9 +2027,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.0.tgz", - "integrity": "sha512-LtXRihc5ytjJIQEH+xqjB0+YgsV4/tW35XKX3GTZHpWtcC8SPkT/d4tqdf1cKtesryHm2bgp6l555NYcT2NLvA==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.1.tgz", + "integrity": "sha512-0lgOZB8cl19fHO4eI46YUx2EceQqhgkPSuCGLlGi79L2jwYY1cxeYc1Nae8Aw1xjgW3PKVDLlr3YJ6Bxx8HkWg==", "dev": true, "license": "MIT", "engines": { @@ -2039,15 +2044,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.0.tgz", - "integrity": "sha512-yjgh7gmDcJ1+TcEg8x3uWQmn8ifvSupnPfjP21twPKrDP/pTHlEQgmKcitzF/rzPSmv7QjJ90vRpN4U+zoUjwQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.1.tgz", + "integrity": "sha512-+Bwwm0ScukFdyoJsh2u6pp4S9ktegF98pYUU0hkphOOqdMB+1sNQhIz8y5E9+4pOioZijrkfNO/HUJVAFFfPKA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0", - "@typescript-eslint/utils": "8.57.0", + "@typescript-eslint/types": "8.57.1", + "@typescript-eslint/typescript-estree": "8.57.1", + "@typescript-eslint/utils": "8.57.1", "debug": "^4.4.3", "ts-api-utils": "^2.4.0" }, @@ -2064,9 +2069,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/ts-api-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", - "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", "dev": true, "license": "MIT", "engines": { @@ -2077,9 +2082,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.0.tgz", - "integrity": "sha512-dTLI8PEXhjUC7B9Kre+u0XznO696BhXcTlOn0/6kf1fHaQW8+VjJAVHJ3eTI14ZapTxdkOmc80HblPQLaEeJdg==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.1.tgz", + "integrity": "sha512-S29BOBPJSFUiblEl6RzPPjJt6w25A6XsBqRVDt53tA/tlL8q7ceQNZHTjPeONt/3S7KRI4quk+yP9jK2WjBiPQ==", "dev": true, "license": "MIT", "engines": { @@ -2091,16 +2096,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.0.tgz", - "integrity": "sha512-m7faHcyVg0BT3VdYTlX8GdJEM7COexXxS6KqGopxdtkQRvBanK377QDHr4W/vIPAR+ah9+B/RclSW5ldVniO1Q==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.1.tgz", + "integrity": "sha512-ybe2hS9G6pXpqGtPli9Gx9quNV0TWLOmh58ADlmZe9DguLq0tiAKVjirSbtM1szG6+QH6rVXyU6GTLQbWnMY+g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.57.0", - "@typescript-eslint/tsconfig-utils": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", + "@typescript-eslint/project-service": "8.57.1", + "@typescript-eslint/tsconfig-utils": "8.57.1", + "@typescript-eslint/types": "8.57.1", + "@typescript-eslint/visitor-keys": "8.57.1", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -2135,9 +2140,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/ts-api-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", - "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", "dev": true, "license": "MIT", "engines": { @@ -2148,16 +2153,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.0.tgz", - "integrity": "sha512-5iIHvpD3CZe06riAsbNxxreP+MuYgVUsV0n4bwLH//VJmgtt54sQeY2GszntJ4BjYCpMzrfVh2SBnUQTtys2lQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.1.tgz", + "integrity": "sha512-XUNSJ/lEVFttPMMoDVA2r2bwrl8/oPx8cURtczkSEswY5T3AeLmCy+EKWQNdL4u0MmAHOjcWrqJp2cdvgjn8dQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0" + "@typescript-eslint/scope-manager": "8.57.1", + "@typescript-eslint/types": "8.57.1", + "@typescript-eslint/typescript-estree": "8.57.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2172,13 +2177,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.0.tgz", - "integrity": "sha512-zm6xx8UT/Xy2oSr2ZXD0pZo7Jx2XsCoID2IUh9YSTFRu7z+WdwYTRk6LhUftm1crwqbuoF6I8zAFeCMw0YjwDg==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.1.tgz", + "integrity": "sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.0", + "@typescript-eslint/types": "8.57.1", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -2221,6 +2226,7 @@ "integrity": "sha512-R6BATDkughntPpaxeESJF+wxma5PEjgmnnKvH0/ByqUH8VyhIckQWE9kkP0Uc/EJ0o0VYhe8qCwWQvV70k5lTw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "~7.29.0", "@inquirer/prompts": "^8.0.1", @@ -2426,6 +2432,7 @@ "integrity": "sha512-FrWEUwxhDNbE2YN4fyqV5Qrz9qFJbvPoiKrJM7dexkb7eyhepq3dbc5zZgAm/qFBQ+XxGQQVJ4swXxKT+338fw==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -2439,6 +2446,7 @@ "integrity": "sha512-/fj55fmUj4m/FmNdfH0V52menVrmS2r5Xj9d1H+pnjQbxvvaxS906RSRcoF8kbg3PvlibP/Py5u82TAk53AyqA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -2458,6 +2466,7 @@ "integrity": "sha512-tukmyp+c9CFlA2FdF61XfT9eTe5WXWz6J8pOrJ9+IYg0BcBwhJkvDj6BYpDD6SjxbRr1wO5ZL2Whe6MequsyVw==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -2522,6 +2531,7 @@ "integrity": "sha512-xczXLoB2akSIDner41gQYTS9CG6TdCN0QHYvXBT6ZrYEnBh+pMvdymW//5CSOTamZLOGo9AOJVJaFfwbFA4vQQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -2536,6 +2546,7 @@ "integrity": "sha512-/lxYgMaxgEcjBVhep9tf/VnFD2wnkZlkmjUHLeZL8Cuf+qip61Ren6Ml91YtNnnIFYsuuymDzRclrA073ZBR6Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -2552,6 +2563,7 @@ "integrity": "sha512-lNvzrvX/ZRIxRpxIBZu90XNsT+uWsMbLtxHd9edspHAiID3c9WKZbl2fnLcPqdR/60odqKve4yGzB9gF58GUDQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -2722,6 +2734,7 @@ "integrity": "sha512-WQCT0jN2lSRfwOy+Cd1KUYzenpKR5TdoX0uW6zQdvxQ9nQZIXoaSaReh9/ldhmSV4xv3p2dqF9oq1cdbVGfJTg==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -2735,6 +2748,7 @@ "integrity": "sha512-Qfy5eyCcOF3xYOU/dejhpmmeY75U1Q9C8XBE+GvSZ3lakRfKBIpT+X6Q07qmKSAbGYJZKYLWCIAy/dgCuu/OAA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=20.0.0" }, @@ -2877,6 +2891,7 @@ "integrity": "sha512-sTSDtVM1GOevRGsCNhp1mBUHKo9Qlc55+HCreFT4fe99AHxl1QQNXSL3uj4Pkjh5yEuWZIx8E2tVC94nnBZECQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/utils": "4.1.0", "fflate": "^0.8.2", @@ -2931,6 +2946,7 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -3229,9 +3245,9 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz", - "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", "dev": true, "license": "MIT", "dependencies": { @@ -3282,6 +3298,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.19", "caniuse-lite": "^1.0.30001751", @@ -3973,6 +3990,7 @@ "integrity": "sha512-COV33RzXZkqhG9P2rZCFl9ZmJ7WL+gQSCRzE7RhkbclbQPtLAWReL7ysA0Sh4c8Im2U9ynybdR56PV0XcKvqaQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", @@ -7462,6 +7480,7 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -7630,6 +7649,7 @@ "integrity": "sha512-aw45vwtwOl3QkUAmWCnLV9QW1xY+FSX2zzlit4MAfE99wX+Jij4ycnpbAWgBXsRrxmfs9LaYktg/eX5Bpthd3g==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@gerrit0/mini-shiki": "^3.9.0", "lunr": "^2.3.9", @@ -7667,6 +7687,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7676,16 +7697,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.57.0.tgz", - "integrity": "sha512-W8GcigEMEeB07xEZol8oJ26rigm3+bfPHxHvwbYUlu1fUDsGuQ7Hiskx5xGW/xM4USc9Ephe3jtv7ZYPQntHeA==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.57.1.tgz", + "integrity": "sha512-fLvZWf+cAGw3tqMCYzGIU6yR8K+Y9NT2z23RwOjlNFF2HwSB3KhdEFI5lSBv8tNmFkkBShSjsCjzx1vahZfISA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.57.0", - "@typescript-eslint/parser": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0", - "@typescript-eslint/utils": "8.57.0" + "@typescript-eslint/eslint-plugin": "8.57.1", + "@typescript-eslint/parser": "8.57.1", + "@typescript-eslint/typescript-estree": "8.57.1", + "@typescript-eslint/utils": "8.57.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7815,6 +7836,7 @@ "integrity": "sha512-fPGaRNj9Zytaf8LEiBhY7Z6ijnFKdzU/+mL8EFBaKr7Vw1/FWcTBAMW0wLPJAGMPX38ZPVCVgLceWiEqeoqL2Q==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@oxc-project/runtime": "0.115.0", "lightningcss": "^1.32.0", @@ -7907,6 +7929,7 @@ "integrity": "sha512-YbDrMF9jM2Lqc++2530UourxZHmkKLxrs4+mYhEwqWS97WJ7wOYEkcr+QfRgJ3PW9wz3odRijLZjHEaRLTNbqw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/expect": "4.1.0", "@vitest/mocker": "4.1.0", diff --git a/typespec-extension/package.json b/typespec-extension/package.json index 738a885080..b26cfb43ab 100644 --- a/typespec-extension/package.json +++ b/typespec-extension/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/typespec-java", - "version": "0.43.1", + "version": "0.43.2", "description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding", "keywords": [ "TypeSpec" @@ -52,8 +52,8 @@ "@azure-tools/typespec-azure-core": ">=0.66.0 <1.0.0", "@azure-tools/typespec-azure-resource-manager": ">=0.66.0 <1.0.0", "@azure-tools/typespec-azure-rulesets": ">=0.66.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.66.2 <1.0.0", - "@azure-tools/typespec-liftr-base": ">=0.12.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.66.3 <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", @@ -73,14 +73,14 @@ "@azure-tools/typespec-azure-core": "0.66.0", "@azure-tools/typespec-azure-resource-manager": "0.66.0", "@azure-tools/typespec-azure-rulesets": "0.66.0", - "@azure-tools/typespec-client-generator-core": "0.66.2", - "@azure-tools/typespec-liftr-base": "0.12.0", + "@azure-tools/typespec-client-generator-core": "0.66.3", + "@azure-tools/typespec-liftr-base": "0.13.0", "@microsoft/api-extractor": "^7.57.7", "@types/js-yaml": "~4.0.9", "@types/lodash": "~4.17.24", "@types/node": "~25.5.0", - "@typescript-eslint/eslint-plugin": "~8.57.0", - "@typescript-eslint/parser": "~8.57.0", + "@typescript-eslint/eslint-plugin": "~8.57.1", + "@typescript-eslint/parser": "~8.57.1", "@typespec/compiler": "1.10.0", "@typespec/events": "0.80.0", "@typespec/http": "1.10.0", @@ -102,12 +102,12 @@ "prettier": "~3.8.1", "rimraf": "~6.1.3", "typescript": "~5.9.3", - "typescript-eslint": "^8.57.0", + "typescript-eslint": "^8.57.1", "vitest": "^4.1.0" }, "overrides": { "eslint": "~10.0.3", - "@typescript-eslint/eslint-plugin": "~8.57.0", - "@typescript-eslint/parser": "~8.57.0" + "@typescript-eslint/eslint-plugin": "~8.57.1", + "@typescript-eslint/parser": "~8.57.1" } } diff --git a/typespec-tests/package.json b/typespec-tests/package.json index 44586ddf3f..2903f26b67 100644 --- a/typespec-tests/package.json +++ b/typespec-tests/package.json @@ -13,7 +13,7 @@ "@typespec/spector": "0.1.0-alpha.24", "@typespec/http-specs": "0.1.0-alpha.34", "@azure-tools/azure-http-specs": "0.1.0-alpha.38", - "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.43.1.tgz" + "@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.43.2.tgz" }, "devDependencies": { "@typespec/prettier-plugin-typespec": "^1.10.0", @@ -31,10 +31,10 @@ "@typespec/sse": "0.80.0", "@typespec/streams": "0.80.0", "@azure-tools/typespec-azure-core": "0.66.0", - "@azure-tools/typespec-client-generator-core": "0.66.2", + "@azure-tools/typespec-client-generator-core": "0.66.3", "@azure-tools/typespec-azure-resource-manager": "0.66.0", "@azure-tools/typespec-autorest": "0.66.0", - "@azure-tools/typespec-liftr-base": "0.12.0" + "@azure-tools/typespec-liftr-base": "0.13.0" }, "private": true } diff --git a/typespec-tests/src/main/java/tsptest/discriminatoredgecases/DiscriminatorEdgeCasesAsyncClient.java b/typespec-tests/src/main/java/tsptest/discriminatoredgecases/DiscriminatorEdgeCasesAsyncClient.java index e73463da42..615aa6128a 100644 --- a/typespec-tests/src/main/java/tsptest/discriminatoredgecases/DiscriminatorEdgeCasesAsyncClient.java +++ b/typespec-tests/src/main/java/tsptest/discriminatoredgecases/DiscriminatorEdgeCasesAsyncClient.java @@ -20,6 +20,7 @@ import tsptest.discriminatoredgecases.implementation.DiscriminatorEdgeCasesClientImpl; import tsptest.discriminatoredgecases.models.ChildWithAnotherDiscriminator; import tsptest.discriminatoredgecases.models.ChildWithRequiredPropertyAsDiscriminator; +import tsptest.discriminatoredgecases.models.ModelWithDiscriminatorNoSubtypes; /** * Initializes a new instance of the asynchronous DiscriminatorEdgeCasesClient type. @@ -94,6 +95,32 @@ public Mono> getChildNewDiscrimWithResponse(RequestOptions return this.serviceClient.getChildNewDiscrimWithResponseAsync(requestOptions); } + /** + * The getNoSubtypes operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String (Required)
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @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 model with along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getNoSubtypesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getNoSubtypesWithResponseAsync(requestOptions); + } + /** * The getChildRequiredDiscrim operation. * @@ -131,4 +158,23 @@ public Mono getChildNewDiscrim() { return getChildNewDiscrimWithResponse(requestOptions).flatMap(FluxUtil::toMono) .map(protocolMethodData -> protocolMethodData.toObject(ChildWithAnotherDiscriminator.class)); } + + /** + * The getNoSubtypes 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 model with on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getNoSubtypes() { + // Generated convenience method for getNoSubtypesWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getNoSubtypesWithResponse(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(ModelWithDiscriminatorNoSubtypes.class)); + } } diff --git a/typespec-tests/src/main/java/tsptest/discriminatoredgecases/DiscriminatorEdgeCasesClient.java b/typespec-tests/src/main/java/tsptest/discriminatoredgecases/DiscriminatorEdgeCasesClient.java index 1ffb3e582e..81006ef04e 100644 --- a/typespec-tests/src/main/java/tsptest/discriminatoredgecases/DiscriminatorEdgeCasesClient.java +++ b/typespec-tests/src/main/java/tsptest/discriminatoredgecases/DiscriminatorEdgeCasesClient.java @@ -18,6 +18,7 @@ import tsptest.discriminatoredgecases.implementation.DiscriminatorEdgeCasesClientImpl; import tsptest.discriminatoredgecases.models.ChildWithAnotherDiscriminator; import tsptest.discriminatoredgecases.models.ChildWithRequiredPropertyAsDiscriminator; +import tsptest.discriminatoredgecases.models.ModelWithDiscriminatorNoSubtypes; /** * Initializes a new instance of the synchronous DiscriminatorEdgeCasesClient type. @@ -92,6 +93,32 @@ public Response getChildNewDiscrimWithResponse(RequestOptions reques return this.serviceClient.getChildNewDiscrimWithResponse(requestOptions); } + /** + * The getNoSubtypes operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String (Required)
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @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 model with along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getNoSubtypesWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getNoSubtypesWithResponse(requestOptions); + } + /** * The getChildRequiredDiscrim operation. * @@ -128,4 +155,22 @@ public ChildWithAnotherDiscriminator getChildNewDiscrim() { RequestOptions requestOptions = new RequestOptions(); return getChildNewDiscrimWithResponse(requestOptions).getValue().toObject(ChildWithAnotherDiscriminator.class); } + + /** + * The getNoSubtypes 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 model with. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelWithDiscriminatorNoSubtypes getNoSubtypes() { + // Generated convenience method for getNoSubtypesWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getNoSubtypesWithResponse(requestOptions).getValue().toObject(ModelWithDiscriminatorNoSubtypes.class); + } } diff --git a/typespec-tests/src/main/java/tsptest/discriminatoredgecases/implementation/DiscriminatorEdgeCasesClientImpl.java b/typespec-tests/src/main/java/tsptest/discriminatoredgecases/implementation/DiscriminatorEdgeCasesClientImpl.java index 9ac447b851..f76c06ec6c 100644 --- a/typespec-tests/src/main/java/tsptest/discriminatoredgecases/implementation/DiscriminatorEdgeCasesClientImpl.java +++ b/typespec-tests/src/main/java/tsptest/discriminatoredgecases/implementation/DiscriminatorEdgeCasesClientImpl.java @@ -160,6 +160,24 @@ Mono> getChildNewDiscrim(@HostParam("endpoint") String endp @UnexpectedResponseExceptionType(HttpResponseException.class) Response getChildNewDiscrimSync(@HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/model/nosubtypes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getNoSubtypes(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/model/nosubtypes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getNoSubtypesSync(@HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); } /** @@ -273,4 +291,57 @@ public Response getChildNewDiscrimWithResponse(RequestOptions reques final String accept = "application/json"; return service.getChildNewDiscrimSync(this.getEndpoint(), accept, requestOptions, Context.NONE); } + + /** + * The getNoSubtypes operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String (Required)
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @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 model with along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getNoSubtypesWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getNoSubtypes(this.getEndpoint(), accept, requestOptions, context)); + } + + /** + * The getNoSubtypes operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String (Required)
+     *     name: String (Required)
+     * }
+     * }
+     * 
+ * + * @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 model with along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getNoSubtypesWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getNoSubtypesSync(this.getEndpoint(), accept, requestOptions, Context.NONE); + } } diff --git a/typespec-tests/src/main/java/tsptest/discriminatoredgecases/models/ModelWithDiscriminatorNoSubtypes.java b/typespec-tests/src/main/java/tsptest/discriminatoredgecases/models/ModelWithDiscriminatorNoSubtypes.java new file mode 100644 index 0000000000..59c1737d62 --- /dev/null +++ b/typespec-tests/src/main/java/tsptest/discriminatoredgecases/models/ModelWithDiscriminatorNoSubtypes.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package tsptest.discriminatoredgecases.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model with. + */ +@Immutable +public final class ModelWithDiscriminatorNoSubtypes implements JsonSerializable { + /* + * The kind property. + */ + @Generated + private String kind = "ModelWithDiscriminatorNoSubtypes"; + + /* + * The name property. + */ + @Generated + private final String name; + + /** + * Creates an instance of ModelWithDiscriminatorNoSubtypes class. + * + * @param name the name value to set. + */ + @Generated + private ModelWithDiscriminatorNoSubtypes(String name) { + this.name = name; + } + + /** + * Get the kind property: The kind property. + * + * @return the kind value. + */ + @Generated + public String getKind() { + return this.kind; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("kind", this.kind); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ModelWithDiscriminatorNoSubtypes from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ModelWithDiscriminatorNoSubtypes if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ModelWithDiscriminatorNoSubtypes. + */ + @Generated + public static ModelWithDiscriminatorNoSubtypes fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + String kind = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("kind".equals(fieldName)) { + kind = reader.getString(); + } else { + reader.skipChildren(); + } + } + ModelWithDiscriminatorNoSubtypes deserializedModelWithDiscriminatorNoSubtypes + = new ModelWithDiscriminatorNoSubtypes(name); + deserializedModelWithDiscriminatorNoSubtypes.kind = kind; + + return deserializedModelWithDiscriminatorNoSubtypes; + }); + } +} diff --git a/typespec-tests/tsp/discriminator-edge-cases.tsp b/typespec-tests/tsp/discriminator-edge-cases.tsp index b3cfb94ed8..bb8982abd9 100644 --- a/typespec-tests/tsp/discriminator-edge-cases.tsp +++ b/typespec-tests/tsp/discriminator-edge-cases.tsp @@ -32,6 +32,13 @@ model GrandChildWithAnotherDiscriminator extends ChildWithAnotherDiscriminator { differentDiscriminator: "anotherValue"; } +/** Model with @discriminator but no known subtypes. */ +@discriminator("kind") +model ModelWithDiscriminatorNoSubtypes { + kind: string; + name: string; +} + @client({ service: TspTest.DiscriminatorEdgeCases, name: "DiscriminatorEdgeCasesClient", @@ -49,4 +56,10 @@ interface DiscriminatorEdgeCasesOp { getChildNewDiscrim(): { @body body: ChildWithAnotherDiscriminator; }; + + @get + @route("/nosubtypes") + getNoSubtypes(): { + @body body: ModelWithDiscriminatorNoSubtypes; + }; }