diff --git a/package-lock.json b/package-lock.json index c9b45ecd257..5f47dbcdeab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "@azure-tools/cadl-ranch-specs": "0.39.2", "@azure-tools/typespec-azure-resource-manager": "0.48.0", - "@azure-tools/typespec-client-generator-core": "0.48.1", + "@azure-tools/typespec-client-generator-core": "0.48.4", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.50", @@ -214,11 +214,10 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.48.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.48.1.tgz", - "integrity": "sha512-pYEZDExltNNLAaA12EwEag5VLESyPoKNQQ/6Olj4rJouA4cBjZDTW80VYgKuPQBt/uCtA0Yn6xxl0nH7TGOwWQ==", + "version": "0.48.4", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.48.4.tgz", + "integrity": "sha512-TvX84FiQ3rax0e838m6kpVj8F24OzKAbyLgUXXZ/TjfxhvZb1u0ojMjSKAvmcal2klROJqRlj4d9tImidPYpgA==", "dev": true, - "license": "MIT", "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -2167,11 +2166,10 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20241201.2", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241201.2.tgz", - "integrity": "sha512-xo2Tb7OftVgtnTKAV8AqAKCg0+3e9ZFLwuzjMVoMypTwUovR5NhCyKILG7WUb5X3mFvJrVIjyvp46G2eDC5HOw==", + "version": "0.1.9-alpha.20241210.2", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20241210.2.tgz", + "integrity": "sha512-dxD4ez8ZfrtXREXyLU64RIbntQVt4KSu6xhkBPTRYndaj5+Wa8NjoJPzrRJSw0yTYrSYqexlCXsnMXf5bALaaA==", "dev": true, - "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -7798,14 +7796,14 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "0.1.9-alpha.20241201.2" + "@typespec/http-client-csharp": "0.1.9-alpha.20241210.2" }, "devDependencies": { "@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.1", + "@azure-tools/typespec-client-generator-core": "0.48.4", "@eslint/js": "^9.15.0", "@types/mocha": "~10.0.9", "@types/node": "~22.7.9", diff --git a/package.json b/package.json index fec95e57231..72372b9b044 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@azure-tools/cadl-ranch-specs": "0.39.2", - "@azure-tools/typespec-client-generator-core": "0.48.1", + "@azure-tools/typespec-client-generator-core": "0.48.4", "@azure-tools/typespec-azure-resource-manager": "0.48.0", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", diff --git a/samples/AnomalyDetector/tspCodeModel.json b/samples/AnomalyDetector/tspCodeModel.json index 461bf7aad0e..e294b211e8a 100644 --- a/samples/AnomalyDetector/tspCodeModel.json +++ b/samples/AnomalyDetector/tspCodeModel.json @@ -894,7 +894,7 @@ ], "isFixed": true, "isFlags": false, - "usage": "Output,Json", + "usage": "Json,Exception", "decorators": [] }, { @@ -1017,7 +1017,7 @@ "kind": "model", "name": "ErrorResponse", "crossLanguageDefinitionId": "AnomalyDetector.Multivariate.ErrorResponse", - "usage": "Output,Error,Json", + "usage": "Output,Error,Json,Exception", "description": "ErrorResponse contains code and message that shows the error information.", "decorators": [], "properties": [ @@ -2959,7 +2959,7 @@ "kind": "model", "name": "AnomalyDetectorError", "crossLanguageDefinitionId": "AnomalyDetector.Univariate.AnomalyDetectorError", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "description": "Error information returned by the API.", "decorators": [], "properties": [ diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/InputModelTypeUsage.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/InputModelTypeUsage.cs index 2d1a428c1a2..34ed23cb1db 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/InputModelTypeUsage.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/InputModelTypeUsage.cs @@ -17,5 +17,6 @@ internal enum InputModelTypeUsage Spread = 1 << 6, Error = 1 << 7, Json = 1 << 8, - Xml = 1 << 9 + Xml = 1 << 9, + Exception = 1 << 10, } diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 8defe20fd39..fd2ad1c18b1 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -35,7 +35,7 @@ ], "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "0.1.9-alpha.20241201.2" + "@typespec/http-client-csharp": "0.1.9-alpha.20241210.2" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.48.0 <1.0.0", @@ -52,7 +52,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.48.0", - "@azure-tools/typespec-client-generator-core": "0.48.1", + "@azure-tools/typespec-client-generator-core": "0.48.4", "@azure-tools/typespec-azure-resource-manager": "0.48.0", "@azure-tools/typespec-azure-rulesets": "0.48.0", "@azure-tools/typespec-autorest": "0.48.0", diff --git a/test/CadlRanchProjects/authentication/api-key/tspCodeModel.json b/test/CadlRanchProjects/authentication/api-key/tspCodeModel.json index fc72c08e84d..e482e7e3f69 100644 --- a/test/CadlRanchProjects/authentication/api-key/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/api-key/tspCodeModel.json @@ -9,7 +9,7 @@ "kind": "model", "name": "InvalidAuth", "crossLanguageDefinitionId": "Authentication.ApiKey.InvalidAuth", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "decorators": [], "properties": [ { diff --git a/test/CadlRanchProjects/authentication/http/custom/tspCodeModel.json b/test/CadlRanchProjects/authentication/http/custom/tspCodeModel.json index 3cb96146845..d3581f4452f 100644 --- a/test/CadlRanchProjects/authentication/http/custom/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/http/custom/tspCodeModel.json @@ -9,7 +9,7 @@ "kind": "model", "name": "InvalidAuth", "crossLanguageDefinitionId": "Authentication.Http.Custom.InvalidAuth", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "decorators": [], "properties": [ { diff --git a/test/CadlRanchProjects/authentication/oauth2/tspCodeModel.json b/test/CadlRanchProjects/authentication/oauth2/tspCodeModel.json index f6950afdf7e..58548e88021 100644 --- a/test/CadlRanchProjects/authentication/oauth2/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/oauth2/tspCodeModel.json @@ -9,7 +9,7 @@ "kind": "model", "name": "InvalidAuth", "crossLanguageDefinitionId": "Authentication.OAuth2.InvalidAuth", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "decorators": [], "properties": [ { diff --git a/test/CadlRanchProjects/azure/core/lro/rpc/tspCodeModel.json b/test/CadlRanchProjects/azure/core/lro/rpc/tspCodeModel.json index a45cd0bfe56..e31d4193442 100644 --- a/test/CadlRanchProjects/azure/core/lro/rpc/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/lro/rpc/tspCodeModel.json @@ -273,7 +273,7 @@ "kind": "model", "name": "Error", "crossLanguageDefinitionId": "Azure.Core.Foundations.Error", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "description": "The error object.", "decorators": [], "properties": [ @@ -371,7 +371,7 @@ "kind": "model", "name": "InnerError", "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", "decorators": [], "properties": [ diff --git a/test/CadlRanchProjects/azure/core/lro/standard/tspCodeModel.json b/test/CadlRanchProjects/azure/core/lro/standard/tspCodeModel.json index cf090437d42..5aae124c3af 100644 --- a/test/CadlRanchProjects/azure/core/lro/standard/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/lro/standard/tspCodeModel.json @@ -313,7 +313,7 @@ "kind": "model", "name": "Error", "crossLanguageDefinitionId": "Azure.Core.Foundations.Error", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "description": "The error object.", "decorators": [], "properties": [ @@ -411,7 +411,7 @@ "kind": "model", "name": "InnerError", "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", "decorators": [], "properties": [ diff --git a/test/CadlRanchProjects/azure/resource-manager/common-properties/tspCodeModel.json b/test/CadlRanchProjects/azure/resource-manager/common-properties/tspCodeModel.json index 1b3088f3ae4..08f5e7985b8 100644 --- a/test/CadlRanchProjects/azure/resource-manager/common-properties/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/resource-manager/common-properties/tspCodeModel.json @@ -777,7 +777,7 @@ "kind": "model", "name": "ErrorResponse", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", "decorators": [], "properties": [ @@ -792,7 +792,7 @@ "kind": "model", "name": "ErrorDetail", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", - "usage": "Output,Json", + "usage": "Json,Exception", "description": "The error detail.", "decorators": [], "properties": [ @@ -894,7 +894,7 @@ "kind": "model", "name": "ErrorAdditionalInfo", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", - "usage": "Output,Json", + "usage": "Json,Exception", "description": "The resource management error additional info.", "decorators": [], "properties": [ @@ -929,7 +929,7 @@ "kind": "model", "name": "ErrorAdditionalInfoInfo", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", - "usage": "Output,Json", + "usage": "Json,Exception", "decorators": [], "properties": [] }, diff --git a/test/CadlRanchProjects/azure/resource-manager/resources/tspCodeModel.json b/test/CadlRanchProjects/azure/resource-manager/resources/tspCodeModel.json index 2416ac51d53..3c07dfc126d 100644 --- a/test/CadlRanchProjects/azure/resource-manager/resources/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/resource-manager/resources/tspCodeModel.json @@ -659,7 +659,7 @@ "kind": "model", "name": "ErrorResponse", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", "decorators": [], "properties": [ @@ -674,7 +674,7 @@ "kind": "model", "name": "ErrorDetail", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", - "usage": "Output,Json", + "usage": "Json,Exception", "description": "The error detail.", "decorators": [], "properties": [ @@ -776,7 +776,7 @@ "kind": "model", "name": "ErrorAdditionalInfo", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", - "usage": "Output,Json", + "usage": "Json,Exception", "description": "The resource management error additional info.", "decorators": [], "properties": [ @@ -811,7 +811,7 @@ "kind": "model", "name": "ErrorAdditionalInfoInfo", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", - "usage": "Output,Json", + "usage": "Json,Exception", "decorators": [], "properties": [] }, diff --git a/test/CadlRanchProjectsNonAzure/authentication/api-key/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/authentication/api-key/tspCodeModel.json index fc72c08e84d..e482e7e3f69 100644 --- a/test/CadlRanchProjectsNonAzure/authentication/api-key/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/authentication/api-key/tspCodeModel.json @@ -9,7 +9,7 @@ "kind": "model", "name": "InvalidAuth", "crossLanguageDefinitionId": "Authentication.ApiKey.InvalidAuth", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "decorators": [], "properties": [ { diff --git a/test/CadlRanchProjectsNonAzure/authentication/http/custom/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/authentication/http/custom/tspCodeModel.json index 3cb96146845..d3581f4452f 100644 --- a/test/CadlRanchProjectsNonAzure/authentication/http/custom/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/authentication/http/custom/tspCodeModel.json @@ -9,7 +9,7 @@ "kind": "model", "name": "InvalidAuth", "crossLanguageDefinitionId": "Authentication.Http.Custom.InvalidAuth", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "decorators": [], "properties": [ { diff --git a/test/TestProjects/Authoring-TypeSpec/tspCodeModel.json b/test/TestProjects/Authoring-TypeSpec/tspCodeModel.json index fac06d747ee..4e085ac5ba3 100644 --- a/test/TestProjects/Authoring-TypeSpec/tspCodeModel.json +++ b/test/TestProjects/Authoring-TypeSpec/tspCodeModel.json @@ -147,8 +147,8 @@ { "$id": "18", "kind": "enum", - "name": "ProjectKind", - "crossLanguageDefinitionId": "AuthoringTypeSpec.ProjectKind", + "name": "Versions", + "crossLanguageDefinitionId": "AuthoringTypeSpec.Versions", "valueType": { "$id": "19", "kind": "string", @@ -160,8 +160,8 @@ { "$id": "20", "kind": "enumvalue", - "name": "CustomSingleLabelClassification", - "value": "CustomSingleLabelClassification", + "name": "2022-05-15-preview", + "value": "2022-05-15-preview", "valueType": { "$id": "21", "kind": "string", @@ -172,70 +172,68 @@ "enumType": { "$ref": "18" }, - "description": "For building a classification model to classify text using your own data. Each file will have only one label. For example, file 1 is classified as A and file 2 is classified as B.", "decorators": [] - }, + } + ], + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "ProjectKind", + "crossLanguageDefinitionId": "AuthoringTypeSpec.ProjectKind", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ { - "$id": "22", + "$id": "24", "kind": "enumvalue", - "name": "CustomMultiLabelClassification", - "value": "CustomMultiLabelClassification", + "name": "CustomSingleLabelClassification", + "value": "CustomSingleLabelClassification", "valueType": { - "$id": "23", + "$id": "25", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "18" + "$ref": "22" }, - "description": "For building a classification model to classify text using your own data. Each file can have one or many labels. For example, file 1 is classified as A, B, and C and file 2 is classified as B and C.", + "description": "For building a classification model to classify text using your own data. Each file will have only one label. For example, file 1 is classified as A and file 2 is classified as B.", "decorators": [] }, { - "$id": "24", + "$id": "26", "kind": "enumvalue", - "name": "CustomEntityRecognition", - "value": "CustomEntityRecognition", + "name": "CustomMultiLabelClassification", + "value": "CustomMultiLabelClassification", "valueType": { - "$id": "25", + "$id": "27", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "18" + "$ref": "22" }, - "description": "For building an extraction model to identify your domain categories using your own data.", + "description": "For building a classification model to classify text using your own data. Each file can have one or many labels. For example, file 1 is classified as A, B, and C and file 2 is classified as B and C.", "decorators": [] - } - ], - "description": "Represents the project kind.", - "isFixed": false, - "isFlags": false, - "usage": "Json", - "decorators": [] - }, - { - "$id": "26", - "kind": "enum", - "name": "Versions", - "crossLanguageDefinitionId": "AuthoringTypeSpec.Versions", - "valueType": { - "$id": "27", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ + }, { "$id": "28", "kind": "enumvalue", - "name": "2022-05-15-preview", - "value": "2022-05-15-preview", + "name": "CustomEntityRecognition", + "value": "CustomEntityRecognition", "valueType": { "$id": "29", "kind": "string", @@ -244,14 +242,16 @@ "decorators": [] }, "enumType": { - "$ref": "26" + "$ref": "22" }, + "description": "For building an extraction model to identify your domain categories using your own data.", "decorators": [] } ], - "isFixed": true, + "description": "Represents the project kind.", + "isFixed": false, "isFlags": false, - "usage": "ApiVersionEnum", + "usage": "None", "decorators": [] }, { @@ -361,7 +361,7 @@ "description": "Enum describing allowed operation states.", "isFixed": false, "isFlags": false, - "usage": "Json", + "usage": "None", "decorators": [] } ], @@ -369,243 +369,19 @@ { "$id": "42", "kind": "model", - "name": "SupportedLanguages", - "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguages", - "usage": "Json", - "description": "Paged collection of SupportedLanguage items", - "decorators": [], - "properties": [ - { - "$id": "43", - "kind": "property", - "name": "value", - "serializedName": "value", - "description": "The SupportedLanguage items on this page", - "type": { - "$id": "44", - "kind": "array", - "name": "ArraySupportedLanguage", - "valueType": { - "$id": "45", - "kind": "model", - "name": "SupportedLanguage", - "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguage", - "usage": "Json", - "description": "Represents a supported language.", - "decorators": [], - "properties": [ - { - "$id": "46", - "kind": "property", - "name": "languageName", - "serializedName": "languageName", - "description": "The language name.", - "type": { - "$id": "47", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguage.languageName" - }, - { - "$id": "48", - "kind": "property", - "name": "languageCode", - "serializedName": "languageCode", - "description": "The language code. This is BCP-47 representation of a language. For example, \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc.", - "type": { - "$id": "49", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguage.languageCode" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguages.value" - }, - { - "$id": "50", - "kind": "property", - "name": "nextLink", - "serializedName": "nextLink", - "description": "The link to the next page of items", - "type": { - "$id": "51", - "kind": "url", - "name": "ResourceLocation", - "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", - "baseType": { - "$id": "52", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguages.nextLink" - } - ] - }, - { - "$ref": "45" - }, - { - "$id": "53", - "kind": "model", - "name": "TrainingConfigVersions", - "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersions", - "usage": "Json", - "description": "Paged collection of TrainingConfigVersion items", - "decorators": [], - "properties": [ - { - "$id": "54", - "kind": "property", - "name": "value", - "serializedName": "value", - "description": "The TrainingConfigVersion items on this page", - "type": { - "$id": "55", - "kind": "array", - "name": "ArrayTrainingConfigVersion", - "valueType": { - "$id": "56", - "kind": "model", - "name": "TrainingConfigVersion", - "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersion", - "usage": "Json", - "description": "Represents a training config version.", - "decorators": [], - "properties": [ - { - "$id": "57", - "kind": "property", - "name": "trainingConfigVersionStr", - "serializedName": "trainingConfigVersionStr", - "description": "Represents the version of the config.", - "type": { - "$id": "58", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersion.trainingConfigVersionStr" - }, - { - "$id": "59", - "kind": "property", - "name": "modelExpirationDate", - "serializedName": "modelExpirationDate", - "description": "Represents the training config version expiration date.", - "type": { - "$id": "60", - "kind": "plainDate", - "name": "plainDate", - "crossLanguageDefinitionId": "TypeSpec.plainDate", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersion.modelExpirationDate" - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersions.value" - }, - { - "$id": "61", - "kind": "property", - "name": "nextLink", - "serializedName": "nextLink", - "description": "The link to the next page of items", - "type": { - "$id": "62", - "kind": "url", - "name": "ResourceLocation", - "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", - "baseType": { - "$id": "63", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersions.nextLink" - } - ] - }, - { - "$ref": "56" - }, - { - "$id": "64", - "kind": "model", "name": "DeploymentJob", "crossLanguageDefinitionId": "AuthoringTypeSpec.DeploymentJob", "usage": "Output,Json", "decorators": [], "properties": [ { - "$id": "65", + "$id": "43", "kind": "property", "name": "jobId", "serializedName": "jobId", "description": "The job ID.", "type": { - "$id": "66", + "$id": "44", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -619,18 +395,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.DeploymentJob.jobId" }, { - "$id": "67", + "$id": "45", "kind": "property", "name": "createdDateTime", "serializedName": "createdDateTime", "description": "The creation date time of the job.", "type": { - "$id": "68", + "$id": "46", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "69", + "$id": "47", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -647,18 +423,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.DeploymentJob.createdDateTime" }, { - "$id": "70", + "$id": "48", "kind": "property", "name": "lastUpdatedDateTime", "serializedName": "lastUpdatedDateTime", "description": "The the last date time the job was updated.", "type": { - "$id": "71", + "$id": "49", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "72", + "$id": "50", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -675,18 +451,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.DeploymentJob.lastUpdatedDateTime" }, { - "$id": "73", + "$id": "51", "kind": "property", "name": "expirationDateTime", "serializedName": "expirationDateTime", "description": "The expiration date time of the job.", "type": { - "$id": "74", + "$id": "52", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "75", + "$id": "53", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -703,7 +479,7 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.DeploymentJob.expirationDateTime" }, { - "$id": "76", + "$id": "54", "kind": "property", "name": "status", "serializedName": "status", @@ -719,17 +495,17 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.DeploymentJob.status" }, { - "$id": "77", + "$id": "55", "kind": "property", "name": "warnings", "serializedName": "warnings", "description": "The warnings that were encountered while executing the job.", "type": { - "$id": "78", + "$id": "56", "kind": "array", "name": "ArrayJobWarning", "valueType": { - "$id": "79", + "$id": "57", "kind": "model", "name": "JobWarning", "crossLanguageDefinitionId": "AuthoringTypeSpec.JobWarning", @@ -738,13 +514,13 @@ "decorators": [], "properties": [ { - "$id": "80", + "$id": "58", "kind": "property", "name": "code", "serializedName": "code", "description": "The warning code.", "type": { - "$id": "81", + "$id": "59", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -758,13 +534,13 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.JobWarning.code" }, { - "$id": "82", + "$id": "60", "kind": "property", "name": "message", "serializedName": "message", "description": "The warning message.", "type": { - "$id": "83", + "$id": "61", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -790,28 +566,28 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.DeploymentJob.warnings" }, { - "$id": "84", + "$id": "62", "kind": "property", "name": "errors", "serializedName": "errors", "description": "The errors encountered while executing the job.", "type": { - "$id": "85", + "$id": "63", "kind": "model", "name": "Error", "crossLanguageDefinitionId": "Azure.Core.Foundations.Error", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "description": "The error object.", "decorators": [], "properties": [ { - "$id": "86", + "$id": "64", "kind": "property", "name": "code", "serializedName": "code", "description": "One of a server-defined set of error codes.", "type": { - "$id": "87", + "$id": "65", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -825,13 +601,13 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.code" }, { - "$id": "88", + "$id": "66", "kind": "property", "name": "message", "serializedName": "message", "description": "A human-readable representation of the error.", "type": { - "$id": "89", + "$id": "67", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -845,13 +621,13 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.message" }, { - "$id": "90", + "$id": "68", "kind": "property", "name": "target", "serializedName": "target", "description": "The target of the error.", "type": { - "$id": "91", + "$id": "69", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -865,17 +641,17 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.target" }, { - "$id": "92", + "$id": "70", "kind": "property", "name": "details", "serializedName": "details", "description": "An array of details about specific errors that led to this reported error.", "type": { - "$id": "93", + "$id": "71", "kind": "array", "name": "ArrayError", "valueType": { - "$ref": "85" + "$ref": "63" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -888,28 +664,28 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.details" }, { - "$id": "94", + "$id": "72", "kind": "property", "name": "innererror", "serializedName": "innererror", "description": "An object containing more specific information than the current object about the error.", "type": { - "$id": "95", + "$id": "73", "kind": "model", "name": "InnerError", "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", "decorators": [], "properties": [ { - "$id": "96", + "$id": "74", "kind": "property", "name": "code", "serializedName": "code", "description": "One of a server-defined set of error codes.", "type": { - "$id": "97", + "$id": "75", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -923,13 +699,13 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError.code" }, { - "$id": "98", + "$id": "76", "kind": "property", "name": "innererror", "serializedName": "innererror", "description": "Inner error.", "type": { - "$ref": "95" + "$ref": "73" }, "optional": true, "readOnly": false, @@ -957,12 +733,12 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.DeploymentJob.errors" }, { - "$id": "99", + "$id": "77", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "100", + "$id": "78", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -978,16 +754,16 @@ ] }, { - "$ref": "79" + "$ref": "57" }, { - "$ref": "85" + "$ref": "63" }, { - "$ref": "95" + "$ref": "73" }, { - "$id": "101", + "$id": "79", "kind": "model", "name": "SwapDeploymentsJob", "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob", @@ -995,13 +771,13 @@ "decorators": [], "properties": [ { - "$id": "102", + "$id": "80", "kind": "property", "name": "jobId", "serializedName": "jobId", "description": "The job ID.", "type": { - "$id": "103", + "$id": "81", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1015,18 +791,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.jobId" }, { - "$id": "104", + "$id": "82", "kind": "property", "name": "createdDateTime", "serializedName": "createdDateTime", "description": "The creation date time of the job.", "type": { - "$id": "105", + "$id": "83", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "106", + "$id": "84", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1043,18 +819,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.createdDateTime" }, { - "$id": "107", + "$id": "85", "kind": "property", "name": "lastUpdatedDateTime", "serializedName": "lastUpdatedDateTime", "description": "The the last date time the job was updated.", "type": { - "$id": "108", + "$id": "86", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "109", + "$id": "87", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1071,18 +847,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.lastUpdatedDateTime" }, { - "$id": "110", + "$id": "88", "kind": "property", "name": "expirationDateTime", "serializedName": "expirationDateTime", "description": "The expiration date time of the job.", "type": { - "$id": "111", + "$id": "89", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "112", + "$id": "90", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1099,7 +875,7 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.expirationDateTime" }, { - "$id": "113", + "$id": "91", "kind": "property", "name": "status", "serializedName": "status", @@ -1115,17 +891,17 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.status" }, { - "$id": "114", + "$id": "92", "kind": "property", "name": "warnings", "serializedName": "warnings", "description": "The warnings that were encountered while executing the job.", "type": { - "$id": "115", + "$id": "93", "kind": "array", "name": "ArrayJobWarning", "valueType": { - "$ref": "79" + "$ref": "57" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1138,13 +914,13 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.warnings" }, { - "$id": "116", + "$id": "94", "kind": "property", "name": "errors", "serializedName": "errors", "description": "The errors encountered while executing the job.", "type": { - "$ref": "85" + "$ref": "63" }, "optional": false, "readOnly": false, @@ -1154,41 +930,12 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.errors" }, { - "$id": "117", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "118", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.id" - } - ] - }, - { - "$id": "119", - "kind": "model", - "name": "Deployment", - "crossLanguageDefinitionId": "AuthoringTypeSpec.Deployment", - "usage": "Json", - "decorators": [], - "properties": [ - { - "$id": "120", - "kind": "property", - "name": "name", - "serializedName": "name", + "$id": "95", + "kind": "property", + "name": "id", + "serializedName": "id", "type": { - "$id": "121", + "$id": "96", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1199,25 +946,25 @@ "discriminator": false, "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "AuthoringTypeSpec.Deployment.name" + "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsJob.id" } ] }, { - "$id": "122", + "$id": "97", "kind": "model", "name": "Project", "crossLanguageDefinitionId": "AuthoringTypeSpec.Project", - "usage": "Json", + "usage": "None", "decorators": [], "properties": [ { - "$id": "123", + "$id": "98", "kind": "property", "name": "projectName", "serializedName": "projectName", "type": { - "$id": "124", + "$id": "99", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1231,13 +978,13 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.projectName" }, { - "$id": "125", + "$id": "100", "kind": "property", "name": "projectKind", "serializedName": "projectKind", "description": "The project kind.", "type": { - "$ref": "18" + "$ref": "22" }, "optional": false, "readOnly": false, @@ -1247,13 +994,13 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.projectKind" }, { - "$id": "126", + "$id": "101", "kind": "property", "name": "storageInputContainerName", "serializedName": "storageInputContainerName", "description": "The storage container name.", "type": { - "$id": "127", + "$id": "102", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1267,21 +1014,21 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.storageInputContainerName" }, { - "$id": "128", + "$id": "103", "kind": "property", "name": "settings", "serializedName": "settings", "description": "The project settings.", "type": { - "$id": "129", + "$id": "104", "kind": "model", "name": "ProjectSettings", "crossLanguageDefinitionId": "AuthoringTypeSpec.ProjectSettings", - "usage": "Json", + "usage": "None", "description": "Represents the settings used to define the project behavior.", "decorators": [], "additionalProperties": { - "$id": "130", + "$id": "105", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1297,13 +1044,13 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.settings" }, { - "$id": "131", + "$id": "106", "kind": "property", "name": "multilingual", "serializedName": "multilingual", "description": "Whether the project would be used for multiple languages or not.", "type": { - "$id": "132", + "$id": "107", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1317,13 +1064,13 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.multilingual" }, { - "$id": "133", + "$id": "108", "kind": "property", "name": "description", "serializedName": "description", "description": "The project description.", "type": { - "$id": "134", + "$id": "109", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1337,13 +1084,13 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.description" }, { - "$id": "135", + "$id": "110", "kind": "property", "name": "language", "serializedName": "language", "description": "The project language. This is BCP-47 representation of a language. For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc.", "type": { - "$id": "136", + "$id": "111", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1357,18 +1104,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.language" }, { - "$id": "137", + "$id": "112", "kind": "property", "name": "createdDateTime", "serializedName": "createdDateTime", "description": "Represents the project creation datetime.", "type": { - "$id": "138", + "$id": "113", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "139", + "$id": "114", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1385,18 +1132,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.createdDateTime" }, { - "$id": "140", + "$id": "115", "kind": "property", "name": "lastModifiedDateTime", "serializedName": "lastModifiedDateTime", "description": "Represents the project last modification datetime.", "type": { - "$id": "141", + "$id": "116", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "142", + "$id": "117", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1413,18 +1160,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.lastModifiedDateTime" }, { - "$id": "143", + "$id": "118", "kind": "property", "name": "lastTrainedDateTime", "serializedName": "lastTrainedDateTime", "description": "Represents the project last training datetime.", "type": { - "$id": "144", + "$id": "119", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "145", + "$id": "120", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1441,18 +1188,18 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.Project.lastTrainedDateTime" }, { - "$id": "146", + "$id": "121", "kind": "property", "name": "lastDeployedDateTime", "serializedName": "lastDeployedDateTime", "description": "Represents the project last deployment datetime.", "type": { - "$id": "147", + "$id": "122", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "148", + "$id": "123", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1471,25 +1218,25 @@ ] }, { - "$ref": "129" + "$ref": "104" }, { - "$id": "149", + "$id": "124", "kind": "model", "name": "OperationStatusError", "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus", - "usage": "Json", + "usage": "None", "description": "Provides status details for long running operations.", "decorators": [], "properties": [ { - "$id": "150", + "$id": "125", "kind": "property", "name": "id", "serializedName": "id", "description": "The unique ID of the operation.", "type": { - "$id": "151", + "$id": "126", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1503,7 +1250,7 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.id" }, { - "$id": "152", + "$id": "127", "kind": "property", "name": "status", "serializedName": "status", @@ -1519,13 +1266,13 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.status" }, { - "$id": "153", + "$id": "128", "kind": "property", "name": "error", "serializedName": "error", "description": "Error object that describes the error when status is \"Failed\".", "type": { - "$ref": "85" + "$ref": "63" }, "optional": true, "readOnly": false, @@ -1537,26 +1284,26 @@ ] }, { - "$id": "154", + "$id": "129", "kind": "model", "name": "PagedProject", "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", - "usage": "Json", + "usage": "None", "description": "Paged collection of Project items", "decorators": [], "properties": [ { - "$id": "155", + "$id": "130", "kind": "property", "name": "value", "serializedName": "value", "description": "The Project items on this page", "type": { - "$id": "156", + "$id": "131", "kind": "array", "name": "ArrayProject", "valueType": { - "$ref": "122" + "$ref": "97" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1569,18 +1316,18 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" }, { - "$id": "157", + "$id": "132", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "description": "The link to the next page of items", "type": { - "$id": "158", + "$id": "133", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "159", + "$id": "134", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1598,7 +1345,7 @@ ] }, { - "$id": "160", + "$id": "135", "kind": "model", "name": "TrainingJobOptions", "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingJobOptions", @@ -1607,12 +1354,12 @@ "decorators": [], "properties": [ { - "$id": "161", + "$id": "136", "kind": "property", "name": "modelLabel", "serializedName": "modelLabel", "type": { - "$id": "162", + "$id": "137", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1628,26 +1375,55 @@ ] }, { - "$id": "163", + "$id": "138", + "kind": "model", + "name": "Deployment", + "crossLanguageDefinitionId": "AuthoringTypeSpec.Deployment", + "usage": "None", + "decorators": [], + "properties": [ + { + "$id": "139", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.Deployment.name" + } + ] + }, + { + "$id": "141", "kind": "model", "name": "PagedDeployment", "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", - "usage": "Json", + "usage": "None", "description": "Paged collection of Deployment items", "decorators": [], "properties": [ { - "$id": "164", + "$id": "142", "kind": "property", "name": "value", "serializedName": "value", "description": "The Deployment items on this page", "type": { - "$id": "165", + "$id": "143", "kind": "array", "name": "ArrayDeployment", "valueType": { - "$ref": "119" + "$ref": "138" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1660,18 +1436,18 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" }, { - "$id": "166", + "$id": "144", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "description": "The link to the next page of items", "type": { - "$id": "167", + "$id": "145", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "168", + "$id": "146", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1689,7 +1465,7 @@ ] }, { - "$id": "169", + "$id": "147", "kind": "model", "name": "SwapDeploymentsOptions", "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsOptions", @@ -1697,13 +1473,13 @@ "decorators": [], "properties": [ { - "$id": "170", + "$id": "148", "kind": "property", "name": "firstDeploymentName", "serializedName": "firstDeploymentName", "description": "Represents the first deployment name.", "type": { - "$id": "171", + "$id": "149", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1717,13 +1493,13 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsOptions.firstDeploymentName" }, { - "$id": "172", + "$id": "150", "kind": "property", "name": "secondDeploymentName", "serializedName": "secondDeploymentName", "description": "Represents the second deployment name.", "type": { - "$id": "173", + "$id": "151", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1737,6 +1513,230 @@ "crossLanguageDefinitionId": "AuthoringTypeSpec.SwapDeploymentsOptions.secondDeploymentName" } ] + }, + { + "$id": "152", + "kind": "model", + "name": "SupportedLanguages", + "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguages", + "usage": "None", + "description": "Paged collection of SupportedLanguage items", + "decorators": [], + "properties": [ + { + "$id": "153", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The SupportedLanguage items on this page", + "type": { + "$id": "154", + "kind": "array", + "name": "ArraySupportedLanguage", + "valueType": { + "$id": "155", + "kind": "model", + "name": "SupportedLanguage", + "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguage", + "usage": "None", + "description": "Represents a supported language.", + "decorators": [], + "properties": [ + { + "$id": "156", + "kind": "property", + "name": "languageName", + "serializedName": "languageName", + "description": "The language name.", + "type": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguage.languageName" + }, + { + "$id": "158", + "kind": "property", + "name": "languageCode", + "serializedName": "languageCode", + "description": "The language code. This is BCP-47 representation of a language. For example, \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc.", + "type": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguage.languageCode" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguages.value" + }, + { + "$id": "160", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "161", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "162", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.SupportedLanguages.nextLink" + } + ] + }, + { + "$ref": "155" + }, + { + "$id": "163", + "kind": "model", + "name": "TrainingConfigVersions", + "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersions", + "usage": "None", + "description": "Paged collection of TrainingConfigVersion items", + "decorators": [], + "properties": [ + { + "$id": "164", + "kind": "property", + "name": "value", + "serializedName": "value", + "description": "The TrainingConfigVersion items on this page", + "type": { + "$id": "165", + "kind": "array", + "name": "ArrayTrainingConfigVersion", + "valueType": { + "$id": "166", + "kind": "model", + "name": "TrainingConfigVersion", + "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersion", + "usage": "None", + "description": "Represents a training config version.", + "decorators": [], + "properties": [ + { + "$id": "167", + "kind": "property", + "name": "trainingConfigVersionStr", + "serializedName": "trainingConfigVersionStr", + "description": "Represents the version of the config.", + "type": { + "$id": "168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersion.trainingConfigVersionStr" + }, + { + "$id": "169", + "kind": "property", + "name": "modelExpirationDate", + "serializedName": "modelExpirationDate", + "description": "Represents the training config version expiration date.", + "type": { + "$id": "170", + "kind": "plainDate", + "name": "plainDate", + "crossLanguageDefinitionId": "TypeSpec.plainDate", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersion.modelExpirationDate" + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersions.value" + }, + { + "$id": "171", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "description": "The link to the next page of items", + "type": { + "$id": "172", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "173", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "AuthoringTypeSpec.TrainingConfigVersions.nextLink" + } + ] + }, + { + "$ref": "166" } ], "Clients": [ @@ -1896,7 +1896,7 @@ "NameInRequest": "resource", "Description": "The resource instance.", "Type": { - "$ref": "122" + "$ref": "97" }, "Location": "Body", "IsApiVersion": false, @@ -1916,7 +1916,7 @@ 201 ], "BodyType": { - "$ref": "122" + "$ref": "97" }, "BodyMediaType": "Json", "Headers": [ @@ -1952,7 +1952,7 @@ 200 ], "BodyType": { - "$ref": "122" + "$ref": "97" }, "BodyMediaType": "Json", "Headers": [ @@ -2000,7 +2000,7 @@ 200 ], "BodyType": { - "$ref": "122" + "$ref": "97" }, "BodyMediaType": "Json" } @@ -2105,7 +2105,7 @@ 200 ], "BodyType": { - "$ref": "122" + "$ref": "97" }, "BodyMediaType": "Json", "Headers": [], @@ -2220,7 +2220,7 @@ 202 ], "BodyType": { - "$ref": "149" + "$ref": "124" }, "BodyMediaType": "Json", "Headers": [ @@ -2346,7 +2346,7 @@ 200 ], "BodyType": { - "$ref": "154" + "$ref": "129" }, "BodyMediaType": "Json", "Headers": [], @@ -2794,7 +2794,7 @@ "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "160" + "$ref": "135" }, "Location": "Body", "IsApiVersion": false, @@ -3012,7 +3012,7 @@ 200 ], "BodyType": { - "$ref": "119" + "$ref": "138" }, "BodyMediaType": "Json", "Headers": [], @@ -3174,7 +3174,7 @@ "NameInRequest": "resource", "Description": "The resource instance.", "Type": { - "$ref": "119" + "$ref": "138" }, "Location": "Body", "IsApiVersion": false, @@ -3194,7 +3194,7 @@ 201 ], "BodyType": { - "$ref": "119" + "$ref": "138" }, "BodyMediaType": "Json", "Headers": [ @@ -3230,7 +3230,7 @@ 200 ], "BodyType": { - "$ref": "119" + "$ref": "138" }, "BodyMediaType": "Json", "Headers": [ @@ -3278,7 +3278,7 @@ 200 ], "BodyType": { - "$ref": "119" + "$ref": "138" }, "BodyMediaType": "Json" } @@ -3404,7 +3404,7 @@ 202 ], "BodyType": { - "$ref": "149" + "$ref": "124" }, "BodyMediaType": "Json", "Headers": [ @@ -3551,7 +3551,7 @@ 200 ], "BodyType": { - "$ref": "163" + "$ref": "141" }, "BodyMediaType": "Json", "Headers": [], @@ -3697,7 +3697,7 @@ "NameInRequest": "body", "Description": "The body schema of the operation.", "Type": { - "$ref": "169" + "$ref": "147" }, "Location": "Body", "IsApiVersion": false, @@ -3936,7 +3936,7 @@ 200 ], "BodyType": { - "$ref": "64" + "$ref": "42" }, "BodyMediaType": "Json", "Headers": [], @@ -4093,7 +4093,7 @@ 200 ], "BodyType": { - "$ref": "101" + "$ref": "79" }, "BodyMediaType": "Json", "Headers": [], @@ -4282,7 +4282,7 @@ 200 ], "BodyType": { - "$ref": "42" + "$ref": "152" }, "BodyMediaType": "Json", "Headers": [], @@ -4443,7 +4443,7 @@ 200 ], "BodyType": { - "$ref": "53" + "$ref": "163" }, "BodyMediaType": "Json", "Headers": [], diff --git a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json index b6cd9441806..bed5b4745fa 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json @@ -1052,7 +1052,7 @@ "description": "Enum describing allowed operation states.", "isFixed": false, "isFlags": false, - "usage": "Json", + "usage": "None", "decorators": [] } ], @@ -1921,54 +1921,6 @@ { "$id": "202", "kind": "model", - "name": "ExportedResource", - "crossLanguageDefinitionId": "FirstTestTypeSpec.ExportedResource", - "usage": "Json", - "decorators": [], - "properties": [ - { - "$id": "203", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "FirstTestTypeSpec.ExportedResource.id" - }, - { - "$id": "205", - "kind": "property", - "name": "name", - "serializedName": "name", - "type": { - "$id": "206", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "FirstTestTypeSpec.ExportedResource.name" - } - ] - }, - { - "$id": "207", - "kind": "model", "name": "RoundTripModel", "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel", "usage": "Input,Output,Json", @@ -1976,13 +1928,13 @@ "decorators": [], "properties": [ { - "$id": "208", + "$id": "203", "kind": "property", "name": "requiredString", "serializedName": "requiredString", "description": "Required string, illustrating a reference type property.", "type": { - "$id": "209", + "$id": "204", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1996,13 +1948,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.requiredString" }, { - "$id": "210", + "$id": "205", "kind": "property", "name": "requiredInt", "serializedName": "requiredInt", "description": "Required int, illustrating a value type property.", "type": { - "$id": "211", + "$id": "206", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2016,13 +1968,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.requiredInt" }, { - "$id": "212", + "$id": "207", "kind": "property", "name": "requiredCollection", "serializedName": "requiredCollection", "description": "Required collection of enums", "type": { - "$id": "213", + "$id": "208", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { @@ -2039,16 +1991,16 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.requiredCollection" }, { - "$id": "214", + "$id": "209", "kind": "property", "name": "requiredDictionary", "serializedName": "requiredDictionary", "description": "Required dictionary of enums", "type": { - "$id": "215", + "$id": "210", "kind": "dict", "keyType": { - "$id": "216", + "$id": "211", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2067,7 +2019,7 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.requiredDictionary" }, { - "$id": "217", + "$id": "212", "kind": "property", "name": "requiredModel", "serializedName": "requiredModel", @@ -2083,7 +2035,7 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.requiredModel" }, { - "$id": "218", + "$id": "213", "kind": "property", "name": "intExtensibleEnum", "serializedName": "intExtensibleEnum", @@ -2099,13 +2051,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.intExtensibleEnum" }, { - "$id": "219", + "$id": "214", "kind": "property", "name": "intExtensibleEnumCollection", "serializedName": "intExtensibleEnumCollection", "description": "this is a collection of int based extensible enum", "type": { - "$id": "220", + "$id": "215", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { @@ -2122,7 +2074,7 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.intExtensibleEnumCollection" }, { - "$id": "221", + "$id": "216", "kind": "property", "name": "floatExtensibleEnum", "serializedName": "floatExtensibleEnum", @@ -2138,13 +2090,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.floatExtensibleEnum" }, { - "$id": "222", + "$id": "217", "kind": "property", "name": "floatExtensibleEnumCollection", "serializedName": "floatExtensibleEnumCollection", "description": "this is a collection of float based extensible enum", "type": { - "$id": "223", + "$id": "218", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { @@ -2161,7 +2113,7 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.floatExtensibleEnumCollection" }, { - "$id": "224", + "$id": "219", "kind": "property", "name": "floatFixedEnum", "serializedName": "floatFixedEnum", @@ -2177,13 +2129,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.floatFixedEnum" }, { - "$id": "225", + "$id": "220", "kind": "property", "name": "floatFixedEnumCollection", "serializedName": "floatFixedEnumCollection", "description": "this is a collection of float based fixed enum", "type": { - "$id": "226", + "$id": "221", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { @@ -2200,7 +2152,7 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.floatFixedEnumCollection" }, { - "$id": "227", + "$id": "222", "kind": "property", "name": "intFixedEnum", "serializedName": "intFixedEnum", @@ -2216,13 +2168,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.intFixedEnum" }, { - "$id": "228", + "$id": "223", "kind": "property", "name": "intFixedEnumCollection", "serializedName": "intFixedEnumCollection", "description": "this is a collection of int based fixed enum", "type": { - "$id": "229", + "$id": "224", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { @@ -2239,7 +2191,7 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.intFixedEnumCollection" }, { - "$id": "230", + "$id": "225", "kind": "property", "name": "stringFixedEnum", "serializedName": "stringFixedEnum", @@ -2255,13 +2207,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.stringFixedEnum" }, { - "$id": "231", + "$id": "226", "kind": "property", "name": "requiredUnknown", "serializedName": "requiredUnknown", "description": "required unknown", "type": { - "$id": "232", + "$id": "227", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2275,13 +2227,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.requiredUnknown" }, { - "$id": "233", + "$id": "228", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "description": "optional unknown", "type": { - "$id": "234", + "$id": "229", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2295,23 +2247,23 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.optionalUnknown" }, { - "$id": "235", + "$id": "230", "kind": "property", "name": "requiredRecordUnknown", "serializedName": "requiredRecordUnknown", "description": "required record of unknown", "type": { - "$id": "236", + "$id": "231", "kind": "dict", "keyType": { - "$id": "237", + "$id": "232", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "238", + "$id": "233", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2327,23 +2279,23 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.requiredRecordUnknown" }, { - "$id": "239", + "$id": "234", "kind": "property", "name": "optionalRecordUnknown", "serializedName": "optionalRecordUnknown", "description": "optional record of unknown", "type": { - "$id": "240", + "$id": "235", "kind": "dict", "keyType": { - "$id": "241", + "$id": "236", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "242", + "$id": "237", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2359,23 +2311,23 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.optionalRecordUnknown" }, { - "$id": "243", + "$id": "238", "kind": "property", "name": "readOnlyRequiredRecordUnknown", "serializedName": "readOnlyRequiredRecordUnknown", "description": "required readonly record of unknown", "type": { - "$id": "244", + "$id": "239", "kind": "dict", "keyType": { - "$id": "245", + "$id": "240", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "246", + "$id": "241", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2391,23 +2343,23 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.readOnlyRequiredRecordUnknown" }, { - "$id": "247", + "$id": "242", "kind": "property", "name": "readOnlyOptionalRecordUnknown", "serializedName": "readOnlyOptionalRecordUnknown", "description": "optional readonly record of unknown", "type": { - "$id": "248", + "$id": "243", "kind": "dict", "keyType": { - "$id": "249", + "$id": "244", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "250", + "$id": "245", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2423,13 +2375,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.readOnlyOptionalRecordUnknown" }, { - "$id": "251", + "$id": "246", "kind": "property", "name": "modelWithRequiredNullable", "serializedName": "modelWithRequiredNullable", "description": "this is a model with required nullable properties", "type": { - "$id": "252", + "$id": "247", "kind": "model", "name": "ModelWithRequiredNullableProperties", "crossLanguageDefinitionId": "FirstTestTypeSpec.ModelWithRequiredNullableProperties", @@ -2438,16 +2390,16 @@ "decorators": [], "properties": [ { - "$id": "253", + "$id": "248", "kind": "property", "name": "requiredNullablePrimitive", "serializedName": "requiredNullablePrimitive", "description": "required nullable primitive type", "type": { - "$id": "254", + "$id": "249", "kind": "nullable", "type": { - "$id": "255", + "$id": "250", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2462,13 +2414,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.ModelWithRequiredNullableProperties.requiredNullablePrimitive" }, { - "$id": "256", + "$id": "251", "kind": "property", "name": "requiredExtensibleEnum", "serializedName": "requiredExtensibleEnum", "description": "required nullable extensible enum type", "type": { - "$id": "257", + "$id": "252", "kind": "nullable", "type": { "$ref": "44" @@ -2482,13 +2434,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.ModelWithRequiredNullableProperties.requiredExtensibleEnum" }, { - "$id": "258", + "$id": "253", "kind": "property", "name": "requiredFixedEnum", "serializedName": "requiredFixedEnum", "description": "required nullable fixed enum type", "type": { - "$id": "259", + "$id": "254", "kind": "nullable", "type": { "$ref": "36" @@ -2511,36 +2463,36 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.RoundTripModel.modelWithRequiredNullable" }, { - "$id": "260", + "$id": "255", "kind": "property", "name": "unionList", "serializedName": "unionList", "description": "this is a list of union types", "type": { - "$id": "261", + "$id": "256", "kind": "array", "name": "Array", "valueType": { - "$id": "262", + "$id": "257", "kind": "union", "name": "RoundTripModelUnionList", "variantTypes": [ { - "$id": "263", + "$id": "258", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "264", + "$id": "259", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, { - "$id": "265", + "$id": "260", "kind": "model", "name": "ModelForUnion", "crossLanguageDefinitionId": "FirstTestTypeSpec.ModelForUnion", @@ -2549,13 +2501,13 @@ "decorators": [], "properties": [ { - "$id": "266", + "$id": "261", "kind": "property", "name": "name", "serializedName": "name", "description": "name of the ModelForUnion", "type": { - "$id": "267", + "$id": "262", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2569,13 +2521,13 @@ "crossLanguageDefinitionId": "FirstTestTypeSpec.ModelForUnion.name" }, { - "$id": "268", + "$id": "263", "kind": "property", "name": "age", "serializedName": "age", "description": "age of the ModelForUnion", "type": { - "$id": "269", + "$id": "264", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2591,11 +2543,11 @@ ] }, { - "$id": "270", + "$id": "265", "kind": "array", "name": "ArrayModelForUnion", "valueType": { - "$ref": "265" + "$ref": "260" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2616,28 +2568,28 @@ ] }, { - "$ref": "252" + "$ref": "247" }, { - "$ref": "265" + "$ref": "260" }, { - "$id": "271", + "$id": "266", "kind": "model", "name": "ResourceOperationStatusResourceExportedResourceError", "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus", - "usage": "Json", + "usage": "None", "description": "Provides status details for long running operations.", "decorators": [], "properties": [ { - "$id": "272", + "$id": "267", "kind": "property", "name": "id", "serializedName": "id", "description": "The unique ID of the operation.", "type": { - "$id": "273", + "$id": "268", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2651,7 +2603,7 @@ "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.id" }, { - "$id": "274", + "$id": "269", "kind": "property", "name": "status", "serializedName": "status", @@ -2667,28 +2619,28 @@ "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.status" }, { - "$id": "275", + "$id": "270", "kind": "property", "name": "error", "serializedName": "error", "description": "Error object that describes the error when status is \"Failed\".", "type": { - "$id": "276", + "$id": "271", "kind": "model", "name": "Error", "crossLanguageDefinitionId": "Azure.Core.Foundations.Error", - "usage": "Json", + "usage": "None", "description": "The error object.", "decorators": [], "properties": [ { - "$id": "277", + "$id": "272", "kind": "property", "name": "code", "serializedName": "code", "description": "One of a server-defined set of error codes.", "type": { - "$id": "278", + "$id": "273", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2702,13 +2654,13 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.code" }, { - "$id": "279", + "$id": "274", "kind": "property", "name": "message", "serializedName": "message", "description": "A human-readable representation of the error.", "type": { - "$id": "280", + "$id": "275", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2722,13 +2674,13 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.message" }, { - "$id": "281", + "$id": "276", "kind": "property", "name": "target", "serializedName": "target", "description": "The target of the error.", "type": { - "$id": "282", + "$id": "277", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2742,17 +2694,17 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.target" }, { - "$id": "283", + "$id": "278", "kind": "property", "name": "details", "serializedName": "details", "description": "An array of details about specific errors that led to this reported error.", "type": { - "$id": "284", + "$id": "279", "kind": "array", "name": "ArrayError", "valueType": { - "$ref": "276" + "$ref": "271" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2765,28 +2717,28 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.details" }, { - "$id": "285", + "$id": "280", "kind": "property", "name": "innererror", "serializedName": "innererror", "description": "An object containing more specific information than the current object about the error.", "type": { - "$id": "286", + "$id": "281", "kind": "model", "name": "InnerError", "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError", - "usage": "Json", + "usage": "None", "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", "decorators": [], "properties": [ { - "$id": "287", + "$id": "282", "kind": "property", "name": "code", "serializedName": "code", "description": "One of a server-defined set of error codes.", "type": { - "$id": "288", + "$id": "283", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2800,13 +2752,13 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError.code" }, { - "$id": "289", + "$id": "284", "kind": "property", "name": "innererror", "serializedName": "innererror", "description": "Inner error.", "type": { - "$ref": "286" + "$ref": "281" }, "optional": true, "readOnly": false, @@ -2834,13 +2786,58 @@ "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.error" }, { - "$id": "290", + "$id": "285", "kind": "property", "name": "result", "serializedName": "result", "description": "The result of the operation.", "type": { - "$ref": "202" + "$id": "286", + "kind": "model", + "name": "ExportedResource", + "crossLanguageDefinitionId": "FirstTestTypeSpec.ExportedResource", + "usage": "None", + "decorators": [], + "properties": [ + { + "$id": "287", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "FirstTestTypeSpec.ExportedResource.id" + }, + { + "$id": "289", + "kind": "property", + "name": "name", + "serializedName": "name", + "type": { + "$id": "290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "FirstTestTypeSpec.ExportedResource.name" + } + ] }, "optional": true, "readOnly": false, @@ -2852,7 +2849,10 @@ ] }, { - "$ref": "276" + "$ref": "271" + }, + { + "$ref": "281" }, { "$ref": "286" @@ -5101,7 +5101,7 @@ "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "207" + "$ref": "202" }, "Location": "Body", "IsApiVersion": false, @@ -5121,7 +5121,7 @@ 200 ], "BodyType": { - "$ref": "207" + "$ref": "202" }, "BodyMediaType": "Json", "Headers": [], @@ -5253,7 +5253,7 @@ "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "207" + "$ref": "202" }, "Location": "Body", "IsApiVersion": false, @@ -5273,7 +5273,7 @@ 200 ], "BodyType": { - "$ref": "207" + "$ref": "202" }, "BodyMediaType": "Json", "Headers": [], @@ -6326,7 +6326,7 @@ 202 ], "BodyType": { - "$ref": "271" + "$ref": "266" }, "BodyMediaType": "Json", "Headers": [ @@ -6371,7 +6371,7 @@ 200 ], "BodyType": { - "$ref": "271" + "$ref": "266" }, "BodyMediaType": "Json" }, @@ -6498,7 +6498,7 @@ 202 ], "BodyType": { - "$ref": "271" + "$ref": "266" }, "BodyMediaType": "Json", "Headers": [ @@ -6543,7 +6543,7 @@ 200 ], "BodyType": { - "$ref": "271" + "$ref": "266" }, "BodyMediaType": "Json" }, diff --git a/test/TestProjects/MgmtTypeSpec/tspCodeModel.json b/test/TestProjects/MgmtTypeSpec/tspCodeModel.json index 05a3476a3a2..b6d2968078e 100644 --- a/test/TestProjects/MgmtTypeSpec/tspCodeModel.json +++ b/test/TestProjects/MgmtTypeSpec/tspCodeModel.json @@ -912,7 +912,7 @@ "kind": "model", "name": "ErrorResponse", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", "decorators": [], "properties": [ @@ -927,7 +927,7 @@ "kind": "model", "name": "ErrorDetail", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "description": "The error detail.", "decorators": [], "properties": [ @@ -1029,7 +1029,7 @@ "kind": "model", "name": "ErrorAdditionalInfo", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "description": "The resource management error additional info.", "decorators": [], "properties": [ @@ -1064,7 +1064,7 @@ "kind": "model", "name": "ErrorAdditionalInfoInfo", "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", - "usage": "Output,Json", + "usage": "Output,Json,Exception", "decorators": [], "properties": [] }, diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/tspCodeModel.json b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/tspCodeModel.json index b79f3acdb4a..b990113847e 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/tspCodeModel.json +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/tspCodeModel.json @@ -2784,7 +2784,7 @@ "kind": "model", "name": "ErrorResponse", "crossLanguageDefinitionId": "OpenAI.ErrorResponse", - "usage": "Output,Error,Json", + "usage": "Error,Json,Exception", "decorators": [], "properties": [ { @@ -2797,7 +2797,7 @@ "kind": "model", "name": "Error", "crossLanguageDefinitionId": "OpenAI.Error", - "usage": "Output,Json", + "usage": "Json,Exception", "decorators": [], "properties": [ {