From 3dd660a459ec94931494bf7caddd9cbdab71e01e Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Fri, 19 Jan 2024 14:22:15 +0800 Subject: [PATCH 01/60] feat(dpg): adopt tcgc --- .../src/Generated/Docs/Multivariate.xml | 64 +- .../src/Generated/Docs/Univariate.xml | 24 +- .../src/Generated/tspCodeModel.json | 360 +++-- .../Generated/Samples/Samples_Multivariate.cs | 64 +- .../Generated/Samples/Samples_Univariate.cs | 24 +- .../TypeSpecInputModelTypeConverter.cs | 2 +- .../Serialization/TypeSpecReferenceHandler.cs | 2 +- .../Output/OperationMethodChainBuilder.cs | 2 +- .../Emitter.Csharp/src/emitter.ts | 13 + .../src/lib/clientModelBuilder.ts | 40 +- .../Emitter.Csharp/src/lib/model.ts | 152 ++- .../Emitter.Csharp/src/lib/operation.ts | 7 +- .../Emitter.Csharp/src/lib/typespecServer.ts | 4 +- .../Emitter.Csharp/src/lib/utils.ts | 17 + .../Emitter.Csharp/src/options.ts | 1 + .../Emitter.Csharp/src/type/converter.ts | 425 ++++++ .../union/src/Generated/tspCodeModel.json | 159 +-- .../union/src/Generated/tspCodeModel.json | 108 +- .../src/Generated/tspCodeModel.json | 6 +- .../src/Generated/tspCodeModel.json | 1216 ++++++++--------- .../Docs/ConfidentLevelsInTspClient.xml | 12 +- .../src/Generated/Models/BaseModel.cs | 4 +- .../src/Generated/tspCodeModel.json | 94 +- .../Samples_ConfidentLevelsInTspClient.cs | 12 +- .../src/Generated/tspCodeModel.json | 3 +- .../src/Generated/tspCodeModel.json | 137 +- .../src/Generated/tspCodeModel.json | 501 +++---- .../src/Generated/tspCodeModel.json | 177 ++- 28 files changed, 1948 insertions(+), 1682 deletions(-) create mode 100644 src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts diff --git a/samples/AnomalyDetector/src/Generated/Docs/Multivariate.xml b/samples/AnomalyDetector/src/Generated/Docs/Multivariate.xml index a6f630588c5..c8c4e2eaeac 100644 --- a/samples/AnomalyDetector/src/Generated/Docs/Multivariate.xml +++ b/samples/AnomalyDetector/src/Generated/Docs/Multivariate.xml @@ -151,7 +151,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); -ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.TrainMultivariateModelAsync(modelInfo); ]]> This sample shows how to call TrainMultivariateModelAsync with all parameters. @@ -160,7 +160,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); -ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) +ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) { DataSchema = DataSchema.OneTable, DisplayName = "", @@ -186,8 +186,8 @@ ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-0 Variable = "", FilledNARatio = 123.45F, EffectiveCount = 1234, - FirstTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), - LastTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + FirstTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + LastTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }}, }, }; @@ -202,7 +202,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); -ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.TrainMultivariateModel(modelInfo); ]]> This sample shows how to call TrainMultivariateModel with all parameters. @@ -211,7 +211,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); -ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) +ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) { DataSchema = DataSchema.OneTable, DisplayName = "", @@ -237,8 +237,8 @@ ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-0 Variable = "", FilledNARatio = 123.45F, EffectiveCount = 1234, - FirstTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), - LastTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + FirstTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + LastTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }}, }, }; @@ -256,8 +256,8 @@ Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultiva using RequestContent content = RequestContent.Create(new { dataSource = "", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.TrainMultivariateModelAsync(content); @@ -276,8 +276,8 @@ using RequestContent content = RequestContent.Create(new { dataSource = "", dataSchema = "OneTable", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", displayName = "", slidingWindow = 1234, alignPolicy = new @@ -315,8 +315,8 @@ using RequestContent content = RequestContent.Create(new variable = "", filledNARatio = 123.45F, effectiveCount = 1234, - firstTimestamp = "2022-05-10T14:57:31.2311892-04:00", - lastTimestamp = "2022-05-10T14:57:31.2311892-04:00", + firstTimestamp = "2022-05-10T18:57:31.2311892Z", + lastTimestamp = "2022-05-10T18:57:31.2311892Z", } }, }, @@ -361,8 +361,8 @@ Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultiva using RequestContent content = RequestContent.Create(new { dataSource = "", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = client.TrainMultivariateModel(content); @@ -381,8 +381,8 @@ using RequestContent content = RequestContent.Create(new { dataSource = "", dataSchema = "OneTable", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", displayName = "", slidingWindow = 1234, alignPolicy = new @@ -420,8 +420,8 @@ using RequestContent content = RequestContent.Create(new variable = "", filledNARatio = 123.45F, effectiveCount = 1234, - firstTimestamp = "2022-05-10T14:57:31.2311892-04:00", - lastTimestamp = "2022-05-10T14:57:31.2311892-04:00", + firstTimestamp = "2022-05-10T18:57:31.2311892Z", + lastTimestamp = "2022-05-10T18:57:31.2311892Z", } }, }, @@ -647,7 +647,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); -MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); ]]> This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters. @@ -656,7 +656,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); -MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); ]]> @@ -668,7 +668,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); -MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.DetectMultivariateBatchAnomaly("", options); ]]> This sample shows how to call DetectMultivariateBatchAnomaly with all parameters. @@ -677,7 +677,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); -MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.DetectMultivariateBatchAnomaly("", options); ]]> @@ -693,8 +693,8 @@ using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); @@ -717,8 +717,8 @@ using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); @@ -759,8 +759,8 @@ using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = client.DetectMultivariateBatchAnomaly("", content); @@ -783,8 +783,8 @@ using RequestContent content = RequestContent.Create(new { dataSource = "http://localhost:3000", topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = client.DetectMultivariateBatchAnomaly("", content); diff --git a/samples/AnomalyDetector/src/Generated/Docs/Univariate.xml b/samples/AnomalyDetector/src/Generated/Docs/Univariate.xml index 4472bd74e27..515ab1a9bf7 100644 --- a/samples/AnomalyDetector/src/Generated/Docs/Univariate.xml +++ b/samples/AnomalyDetector/src/Generated/Docs/Univariate.xml @@ -25,7 +25,7 @@ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeri { new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }) { @@ -64,7 +64,7 @@ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeri { new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }) { @@ -120,7 +120,7 @@ using RequestContent content = RequestContent.Create(new { new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", + timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -186,7 +186,7 @@ using RequestContent content = RequestContent.Create(new { new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", + timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -235,7 +235,7 @@ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeri { new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }) { @@ -274,7 +274,7 @@ UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeri { new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }) { @@ -331,7 +331,7 @@ using RequestContent content = RequestContent.Create(new { new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", + timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -399,7 +399,7 @@ using RequestContent content = RequestContent.Create(new { new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", + timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -449,7 +449,7 @@ UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetecti { new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }, TimeGranularity.Yearly) { @@ -485,7 +485,7 @@ UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetecti { new TimeSeriesPoint(123.45F) { - Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }, TimeGranularity.Yearly) { @@ -533,7 +533,7 @@ using RequestContent content = RequestContent.Create(new { new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", + timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -587,7 +587,7 @@ using RequestContent content = RequestContent.Create(new { new { - timestamp = "2022-05-10T14:57:31.2311892-04:00", + timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, diff --git a/samples/AnomalyDetector/src/Generated/tspCodeModel.json b/samples/AnomalyDetector/src/Generated/tspCodeModel.json index 6c8a6a04211..8fbdc2399d3 100644 --- a/samples/AnomalyDetector/src/Generated/tspCodeModel.json +++ b/samples/AnomalyDetector/src/Generated/tspCodeModel.json @@ -26,6 +26,8 @@ "$id": "4", "Kind": "Enum", "Name": "TimeGranularity", + "Namespace": "AnomalyDetector.Univariate", + "Description": "the time granularity of the data points.", "EnumValueType": "String", "AllowedValues": [ { @@ -74,8 +76,6 @@ "Value": "none" } ], - "Namespace": "AnomalyDetector.Univariate", - "Description": "the time granularity of the data points.", "IsExtensible": false, "IsNullable": false, "Usage": "Input" @@ -84,6 +84,8 @@ "$id": "14", "Kind": "Enum", "Name": "ImputeMode", + "Namespace": "AnomalyDetector.Univariate", + "Description": "The impute mode.", "EnumValueType": "String", "AllowedValues": [ { @@ -117,8 +119,6 @@ "Value": "notFill" } ], - "Namespace": "AnomalyDetector.Univariate", - "Description": "The impute mode.", "IsExtensible": true, "IsNullable": false, "Usage": "Input" @@ -127,6 +127,8 @@ "$id": "21", "Kind": "Enum", "Name": "MultivariateBatchDetectionStatus", + "Namespace": "AnomalyDetector.Multivariate", + "Description": "The batch detection status.", "EnumValueType": "String", "AllowedValues": [ { @@ -150,8 +152,6 @@ "Value": "FAILED" } ], - "Namespace": "AnomalyDetector.Multivariate", - "Description": "The batch detection status.", "IsExtensible": false, "IsNullable": false, "Usage": "Output" @@ -160,6 +160,8 @@ "$id": "26", "Kind": "Enum", "Name": "DataSchema", + "Namespace": "AnomalyDetector.Multivariate", + "Description": "Data schema of input data source: OneTable or MultiTable. The default DataSchema is OneTable.", "EnumValueType": "String", "AllowedValues": [ { @@ -175,8 +177,6 @@ "Description": "MultiTable means that your input data are separated in multiple CSV files, in each file containing one 'timestamp' column and one 'variable' column, and the CSV file name should indicate the name of the variable. The default DataSchema is OneTable." } ], - "Namespace": "AnomalyDetector.Multivariate", - "Description": "Data schema of input data source: OneTable or MultiTable. The default DataSchema is OneTable.", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -185,6 +185,8 @@ "$id": "29", "Kind": "Enum", "Name": "AlignMode", + "Namespace": "AnomalyDetector.Multivariate", + "Description": "The alignment mode.", "EnumValueType": "String", "AllowedValues": [ { @@ -198,8 +200,6 @@ "Value": "Outer" } ], - "Namespace": "AnomalyDetector.Multivariate", - "Description": "The alignment mode.", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -208,6 +208,8 @@ "$id": "32", "Kind": "Enum", "Name": "FillNAMethod", + "Namespace": "AnomalyDetector.Multivariate", + "Description": "An optional field, indicating how missing values will be filled. One of Previous, Subsequent, Linear, Zero, Fixed.", "EnumValueType": "String", "AllowedValues": [ { @@ -236,8 +238,6 @@ "Value": "Fixed" } ], - "Namespace": "AnomalyDetector.Multivariate", - "Description": "An optional field, indicating how missing values will be filled. One of Previous, Subsequent, Linear, Zero, Fixed.", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -246,6 +246,8 @@ "$id": "38", "Kind": "Enum", "Name": "ModelStatus", + "Namespace": "AnomalyDetector.Multivariate", + "Description": "the model status.", "EnumValueType": "String", "AllowedValues": [ { @@ -269,8 +271,6 @@ "Value": "FAILED" } ], - "Namespace": "AnomalyDetector.Multivariate", - "Description": "the model status.", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -279,6 +279,7 @@ "$id": "43", "Kind": "Enum", "Name": "AnomalyDetectorErrorCodes", + "Namespace": "AnomalyDetector.Univariate", "EnumValueType": "String", "AllowedValues": [ { @@ -337,8 +338,6 @@ "Value": "InvalidImputeFixedValue" } ], - "Namespace": "AnomalyDetector.Univariate", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "Output" @@ -398,11 +397,12 @@ "Type": { "$id": "62", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "63", @@ -416,14 +416,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "65", @@ -434,7 +436,8 @@ "$ref": "4" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "66", @@ -448,7 +451,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "68", @@ -462,7 +466,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "70", @@ -476,7 +481,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "72", @@ -490,7 +496,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "74", @@ -501,7 +508,8 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "75", @@ -515,7 +523,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -543,7 +552,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "80", @@ -563,7 +573,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "83", @@ -583,7 +594,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "86", @@ -603,7 +615,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "89", @@ -623,7 +636,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "92", @@ -643,7 +657,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "95", @@ -663,7 +678,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "98", @@ -683,7 +699,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -708,7 +725,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "104", @@ -722,7 +740,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "106", @@ -736,7 +755,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "108", @@ -750,7 +770,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "110", @@ -764,7 +785,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "112", @@ -778,7 +800,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "114", @@ -792,7 +815,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "116", @@ -806,7 +830,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "118", @@ -820,7 +845,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -848,7 +874,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "123", @@ -859,7 +886,8 @@ "$ref": "4" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "124", @@ -873,7 +901,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "126", @@ -887,7 +916,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "128", @@ -901,7 +931,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "130", @@ -915,7 +946,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -940,7 +972,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "135", @@ -960,7 +993,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "138", @@ -980,7 +1014,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1005,7 +1040,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "144", @@ -1030,7 +1066,8 @@ "$ref": "21" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "147", @@ -1062,7 +1099,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "152", @@ -1076,14 +1114,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "154", @@ -1115,7 +1155,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "159", @@ -1129,7 +1170,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "161", @@ -1143,7 +1185,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "163", @@ -1153,11 +1196,12 @@ "Type": { "$id": "164", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "165", @@ -1167,18 +1211,20 @@ "Type": { "$id": "166", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "167", @@ -1206,7 +1252,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "171", @@ -1220,7 +1267,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "173", @@ -1230,11 +1278,12 @@ "Type": { "$id": "174", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "175", @@ -1244,21 +1293,24 @@ "Type": { "$id": "176", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "177", @@ -1286,11 +1338,12 @@ "Type": { "$id": "181", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "182", @@ -1318,7 +1371,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "186", @@ -1332,7 +1386,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "188", @@ -1346,7 +1401,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "190", @@ -1378,7 +1434,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "195", @@ -1392,7 +1449,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "197", @@ -1426,24 +1484,28 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "202", @@ -1460,14 +1522,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1516,7 +1580,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "207", @@ -1527,7 +1592,8 @@ "$ref": "26" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "208", @@ -1537,11 +1603,12 @@ "Type": { "$id": "209", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "210", @@ -1551,11 +1618,12 @@ "Type": { "$id": "211", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "212", @@ -1569,7 +1637,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "214", @@ -1583,7 +1652,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "216", @@ -1608,7 +1678,8 @@ "$ref": "29" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "219", @@ -1619,7 +1690,8 @@ "$ref": "32" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "220", @@ -1633,12 +1705,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "222", @@ -1649,7 +1723,8 @@ "$ref": "38" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "223", @@ -1666,7 +1741,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "225", @@ -1714,7 +1790,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "232", @@ -1734,7 +1811,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "235", @@ -1754,7 +1832,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "238", @@ -1774,12 +1853,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "241", @@ -1796,12 +1877,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1835,7 +1918,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "246", @@ -1845,11 +1929,12 @@ "Type": { "$id": "247", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "248", @@ -1859,11 +1944,12 @@ "Type": { "$id": "249", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "250", @@ -1874,7 +1960,8 @@ "$ref": "204" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1902,7 +1989,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "254", @@ -1916,7 +2004,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "256", @@ -1930,7 +2019,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "258", @@ -1944,7 +2034,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1987,7 +2078,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "266", @@ -2007,7 +2099,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "269", @@ -2027,14 +2120,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "272", @@ -2048,7 +2143,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2079,7 +2175,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "277", @@ -2096,7 +2193,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2118,7 +2216,8 @@ "$ref": "43" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "281", @@ -2132,7 +2231,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2157,7 +2257,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "286", @@ -2171,7 +2272,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs index e36b3d30e8b..0b97b6a0708 100644 --- a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs +++ b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs @@ -184,8 +184,8 @@ public void Example_Multivariate_TrainMultivariateModel_ShortVersion() using RequestContent content = RequestContent.Create(new { dataSource = "", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = client.TrainMultivariateModel(content); @@ -206,8 +206,8 @@ public async Task Example_Multivariate_TrainMultivariateModel_ShortVersion_Async using RequestContent content = RequestContent.Create(new { dataSource = "", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.TrainMultivariateModelAsync(content); @@ -225,7 +225,7 @@ public void Example_Multivariate_TrainMultivariateModel_ShortVersion_Convenience AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); - ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.TrainMultivariateModel(modelInfo); } @@ -237,7 +237,7 @@ public async Task Example_Multivariate_TrainMultivariateModel_ShortVersion_Conve AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); - ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.TrainMultivariateModelAsync(modelInfo); } @@ -253,8 +253,8 @@ public void Example_Multivariate_TrainMultivariateModel_AllParameters() { dataSource = "", dataSchema = "OneTable", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", displayName = "", slidingWindow = 1234, alignPolicy = new @@ -292,8 +292,8 @@ public void Example_Multivariate_TrainMultivariateModel_AllParameters() variable = "", filledNARatio = 123.45F, effectiveCount = 1234, -firstTimestamp = "2022-05-10T14:57:31.2311892-04:00", -lastTimestamp = "2022-05-10T14:57:31.2311892-04:00", +firstTimestamp = "2022-05-10T18:57:31.2311892Z", +lastTimestamp = "2022-05-10T18:57:31.2311892Z", } }, }, @@ -339,8 +339,8 @@ public async Task Example_Multivariate_TrainMultivariateModel_AllParameters_Asyn { dataSource = "", dataSchema = "OneTable", - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", displayName = "", slidingWindow = 1234, alignPolicy = new @@ -378,8 +378,8 @@ public async Task Example_Multivariate_TrainMultivariateModel_AllParameters_Asyn variable = "", filledNARatio = 123.45F, effectiveCount = 1234, -firstTimestamp = "2022-05-10T14:57:31.2311892-04:00", -lastTimestamp = "2022-05-10T14:57:31.2311892-04:00", +firstTimestamp = "2022-05-10T18:57:31.2311892Z", +lastTimestamp = "2022-05-10T18:57:31.2311892Z", } }, }, @@ -421,7 +421,7 @@ public void Example_Multivariate_TrainMultivariateModel_AllParameters_Convenienc AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); - ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) + ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) { DataSchema = DataSchema.OneTable, DisplayName = "", @@ -447,8 +447,8 @@ public void Example_Multivariate_TrainMultivariateModel_AllParameters_Convenienc Variable = "", FilledNARatio = 123.45F, EffectiveCount = 1234, -FirstTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), -LastTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +FirstTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +LastTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }}, }, }; @@ -463,7 +463,7 @@ public async Task Example_Multivariate_TrainMultivariateModel_AllParameters_Conv AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); - ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")) + ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) { DataSchema = DataSchema.OneTable, DisplayName = "", @@ -489,8 +489,8 @@ public async Task Example_Multivariate_TrainMultivariateModel_AllParameters_Conv Variable = "", FilledNARatio = 123.45F, EffectiveCount = 1234, -FirstTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), -LastTimestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +FirstTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +LastTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }}, }, }; @@ -711,8 +711,8 @@ public void Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion() { dataSource = "http://localhost:3000", topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = client.DetectMultivariateBatchAnomaly("", content); @@ -738,8 +738,8 @@ public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersi { dataSource = "http://localhost:3000", topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); @@ -761,7 +761,7 @@ public void Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion_Con AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); - MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.DetectMultivariateBatchAnomaly("", options); } @@ -773,7 +773,7 @@ public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersi AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); - MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); } @@ -789,8 +789,8 @@ public void Example_Multivariate_DetectMultivariateBatchAnomaly_AllParameters() { dataSource = "http://localhost:3000", topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = client.DetectMultivariateBatchAnomaly("", content); @@ -831,8 +831,8 @@ public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_AllParamet { dataSource = "http://localhost:3000", topContributorCount = 1234, - startTime = "2022-05-10T14:57:31.2311892-04:00", - endTime = "2022-05-10T14:57:31.2311892-04:00", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); @@ -869,7 +869,7 @@ public void Example_Multivariate_DetectMultivariateBatchAnomaly_AllParameters_Co AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); - MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.DetectMultivariateBatchAnomaly("", options); } @@ -881,7 +881,7 @@ public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_AllParamet AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(apiVersion: "v1.1"); - MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); } diff --git a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs index 9bc7bb07323..1942d40057d 100644 --- a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs +++ b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs @@ -123,7 +123,7 @@ public void Example_Univariate_DetectUnivariateEntireSeries_AllParameters() { new { -timestamp = "2022-05-10T14:57:31.2311892-04:00", +timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -162,7 +162,7 @@ public async Task Example_Univariate_DetectUnivariateEntireSeries_AllParameters_ { new { -timestamp = "2022-05-10T14:57:31.2311892-04:00", +timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -199,7 +199,7 @@ public void Example_Univariate_DetectUnivariateEntireSeries_AllParameters_Conven { new TimeSeriesPoint(123.45F) { -Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }) { @@ -226,7 +226,7 @@ public async Task Example_Univariate_DetectUnivariateEntireSeries_AllParameters_ { new TimeSeriesPoint(123.45F) { -Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }) { @@ -347,7 +347,7 @@ public void Example_Univariate_DetectUnivariateLastPoint_AllParameters() { new { -timestamp = "2022-05-10T14:57:31.2311892-04:00", +timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -387,7 +387,7 @@ public async Task Example_Univariate_DetectUnivariateLastPoint_AllParameters_Asy { new { -timestamp = "2022-05-10T14:57:31.2311892-04:00", +timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -425,7 +425,7 @@ public void Example_Univariate_DetectUnivariateLastPoint_AllParameters_Convenien { new TimeSeriesPoint(123.45F) { -Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }) { @@ -452,7 +452,7 @@ public async Task Example_Univariate_DetectUnivariateLastPoint_AllParameters_Con { new TimeSeriesPoint(123.45F) { -Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }) { @@ -561,7 +561,7 @@ public void Example_Univariate_DetectUnivariateChangePoint_AllParameters() { new { -timestamp = "2022-05-10T14:57:31.2311892-04:00", +timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -593,7 +593,7 @@ public async Task Example_Univariate_DetectUnivariateChangePoint_AllParameters_A { new { -timestamp = "2022-05-10T14:57:31.2311892-04:00", +timestamp = "2022-05-10T18:57:31.2311892Z", value = 123.45F, } }, @@ -623,7 +623,7 @@ public void Example_Univariate_DetectUnivariateChangePoint_AllParameters_Conveni { new TimeSeriesPoint(123.45F) { -Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }, TimeGranularity.Yearly) { @@ -647,7 +647,7 @@ public async Task Example_Univariate_DetectUnivariateChangePoint_AllParameters_C { new TimeSeriesPoint(123.45F) { -Timestamp = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), +Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), } }, TimeGranularity.Yearly) { diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputModelTypeConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputModelTypeConverter.cs index 381d6a809b9..ca776e16fb2 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputModelTypeConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputModelTypeConverter.cs @@ -82,7 +82,7 @@ public static InputModelType CreateModelType(ref Utf8JsonReader reader, string? CreateProperties(ref reader, properties, options); if (reader.TokenType != JsonTokenType.EndObject) { - throw new JsonException($"{nameof(InputModelType)}.{nameof(InputModelType.Properties)} must be the last defined property."); + throw new JsonException($"{nameof(InputModelType)}.{nameof(InputModelType.Properties)} must be the last defined property for id '{id}', name '{name}'"); } } else diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecReferenceHandler.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecReferenceHandler.cs index e86f2d3c925..f9f04f21688 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecReferenceHandler.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecReferenceHandler.cs @@ -26,7 +26,7 @@ public override void AddReference(string referenceId, object value) { if (!_referenceIdToObjectMap.TryAdd(referenceId, value)) { - throw new JsonException(); + throw new JsonException($"Failed to add reference ID '{referenceId}' with value type '{value.GetType()}'"); } } diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs index 625f5893584..8df586f167e 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -390,7 +390,7 @@ private ReturnTypeChain BuildReturnTypes() } else { - throw new InvalidOperationException($"The parameter {convenienceParameter.Name} is marked as Spread but its type is not ModelTypeProvider (got {convenienceParameter.Type})"); + throw new InvalidOperationException($"The parameter {convenienceParameter.Name} in method {_client?.Declaration.FullName}.{name} is marked as Spread but its type is not ModelTypeProvider (got {convenienceParameter.Type})"); } } else diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts index ffcb05c40d2..27d8ad929ed 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts @@ -40,6 +40,18 @@ export const $lib = createTypeSpecLibrary({ messages: { default: paramMessage`No Route for service for service ${"service"}` } + }, + "No-Model": { + severity: "error", + messages: { + default: paramMessage`Model '${"name"}' is not found` + } + }, + "No-Type": { + severity: "error", + messages: { + default: paramMessage`Type '${"kind"}' is not found` + } } }, emitter: { @@ -56,6 +68,7 @@ export async function $onEmit(context: EmitContext) { for (const transport of logger.transports) { transport.level = options.logLevel ?? LoggerLevel.INFO; } + context.options["filter-out-core-models"] = false; if (!program.compilerOptions.noEmit && !program.hasError()) { // Write out the dotnet model to the output path diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts index d42e49f01be..6c85b2fabfc 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts @@ -3,36 +3,37 @@ import { SdkClient, + SdkContext, + SdkOperationGroup, + getAllModels, listClients, listOperationGroups, - listOperationsInOperationGroup, - SdkOperationGroup, - SdkContext + listOperationsInOperationGroup } from "@azure-tools/typespec-client-generator-core"; import { EmitContext, - listServices, + NoTarget, Service, getDoc, getNamespaceFullName, - Operation, ignoreDiagnostics, - NoTarget, - Namespace, - Interface, - getLocationContext + listServices } from "@typespec/compiler"; import { - getAuthentication, - getServers, HttpOperation, getAllHttpServices, - getHttpOperation + getAuthentication, + getHttpOperation, + getServers } from "@typespec/http"; import { getVersions } from "@typespec/versioning"; +import { $lib } from "../emitter.js"; import { NetEmitterOptions, resolveOptions } from "../options.js"; +import { ClientKind } from "../type/clientKind.js"; import { CodeModel } from "../type/codeModel.js"; +import { InputClient } from "../type/inputClient.js"; import { InputConstant } from "../type/inputConstant.js"; +import { InputOperation } from "../type/inputOperation.js"; import { InputOperationParameterKind } from "../type/inputOperationParameterKind.js"; import { InputParameter } from "../type/inputParameter.js"; import { @@ -42,23 +43,22 @@ import { } from "../type/inputType.js"; import { InputPrimitiveTypeKind } from "../type/inputPrimitiveTypeKind.js"; import { RequestLocation } from "../type/requestLocation.js"; +import { Usage } from "../type/usage.js"; import { getExternalDocs } from "./decorators.js"; -import { processServiceAuthentication } from "./serviceAuthentication.js"; -import { resolveServers } from "./typespecServer.js"; -import { InputClient } from "../type/inputClient.js"; -import { ClientKind } from "../type/clientKind.js"; -import { InputOperation } from "../type/inputOperation.js"; +import { logger } from "./logger.js"; import { getUsages, navigateModels } from "./model.js"; -import { Usage } from "../type/usage.js"; import { loadOperation } from "./operation.js"; -import { logger } from "./logger.js"; -import { $lib } from "../emitter.js"; +import { processServiceAuthentication } from "./serviceAuthentication.js"; +import { resolveServers } from "./typespecServer.js"; import { createContentTypeOrAcceptParameter } from "./utils.js"; import { InputTypeKind } from "../type/inputTypeKind.js"; export function createModel( sdkContext: SdkContext ): CodeModel { + // initialize tcgc model + if (!sdkContext.operationModelsMap) getAllModels(sdkContext); + const services = listServices(sdkContext.emitContext.program); if (services.length === 0) { services.push({ diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index 65f1b4fabaf..49856226874 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -30,7 +30,8 @@ import { isGlobalNamespace, navigateTypesInNamespace, isVoidType, - resolveUsages + resolveUsages, + NoTarget } from "@typespec/compiler"; import { HttpOperation, @@ -66,19 +67,27 @@ import { Usage } from "../type/usage.js"; import { logger } from "./logger.js"; import { SdkContext, + SdkEnumType, + SdkModelType, getAccess, getClientType, getUsageOverride, isInternal } from "@azure-tools/typespec-client-generator-core"; -import { capitalize, getSerializeName, getTypeName } from "./utils.js"; +import { + capitalize, + getFullNamespaceString, + getSerializeName, + getTypeName +} from "./utils.js"; import { InputTypeKind } from "../type/inputTypeKind.js"; import { InputIntrinsicTypeKind } from "../type/inputIntrinsicTypeKind.js"; +import { fromSdkEnumType, fromSdkModelType } from "../type/converter.js"; +import { $lib } from "../emitter.js"; /** * Map calType to csharp InputTypeKind */ export function mapTypeSpecTypeToCSharpInputTypeKind( - context: SdkContext, typespecType: Type, format?: string, encode?: EncodeData @@ -112,7 +121,7 @@ export function mapTypeSpecTypeToCSharpInputTypeKind( } } -function getCSharpInputTypeKindByIntrinsicModelName( +export function getCSharpInputTypeKindByIntrinsicModelName( name: string, format?: string, encode?: EncodeData @@ -280,7 +289,7 @@ export function getInputType( models: Map, enums: Map, literalTypeContext?: LiteralTypeContext -): InputType { +): InputType | undefined { const type = formattedType.type; logger.debug(`getInputType for kind: ${type.kind}`); const program = context.program; @@ -344,7 +353,7 @@ export function getInputType( function getInputModelType( m: Model - ): InputListType | InputDictionaryType | InputModelType { + ): InputListType | InputDictionaryType | InputModelType | undefined { /* Array and Map Type. */ if (isArrayModelType(program, m)) { return getInputTypeForArray(m.indexer.value); @@ -396,7 +405,6 @@ export function getInputType( const type = formattedType.type; const builtInKind: InputPrimitiveTypeKind = mapTypeSpecTypeToCSharpInputTypeKind( - context, type, formattedType.format, formattedType.encode @@ -466,7 +474,18 @@ export function getInputType( ): InputEnumType { const name = getTypeName(context, e); let enumType = enums.get(name); + if (!enumType) { + // if it's in TCGC model cache, then construct from TCGC + if (context.modelsMap?.has(e)) { + return fromSdkEnumType( + context.modelsMap!.get(e) as SdkEnumType, + context.program, + enums, + addToCollection + ); + } + // TODO remove the following after https://github.com/Azure/typespec-azure/issues/128 is resolved if (e.members.size === 0) { throw new Error( `Enum type '${e.name}' doesn't define any values.` @@ -511,6 +530,7 @@ export function getInputType( setUsage(context, e, enumType); if (addToCollection) enums.set(name, enumType); } + return enumType; function enumMemberType(member: EnumMember): string { @@ -525,7 +545,7 @@ export function getInputType( return { Kind: InputTypeKind.Array, Name: InputTypeKind.Array, - ElementType: getInputType( + ElementType: ensureInputType( context, getFormattedType(program, elementType), models, @@ -539,13 +559,13 @@ export function getInputType( return { Kind: InputTypeKind.Dictionary, Name: InputTypeKind.Dictionary, - KeyType: getInputType( + KeyType: ensureInputType( context, getFormattedType(program, key), models, enums ), - ValueType: getInputType( + ValueType: ensureInputType( context, getFormattedType(program, value), models, @@ -555,47 +575,18 @@ export function getInputType( }; } - function getInputModelForModel(m: Model): InputModelType { - const name = getTypeName(context, m); - let model = models.get(name); - if (!model) { - const { baseModel, inheritedDictionaryType } = - getInputModelBaseType(m); - model = models.get(name); - if (model) return model; - const properties: InputModelProperty[] = []; - - const discriminator = getDiscriminator(program, m); - model = { - Kind: InputTypeKind.Model, - Name: name, - Namespace: getFullNamespaceString(m.namespace), - Accessibility: isInternal(context, m) - ? "internal" - : getAccess(context, m), - Deprecated: getDeprecated(program, m), - Description: getDoc(program, m), - IsNullable: false, - DiscriminatorPropertyName: discriminator?.propertyName, - DiscriminatorValue: getDiscriminatorValue(m, baseModel), - Usage: Usage.None, - InheritedDictionaryType: inheritedDictionaryType, // InheritedDictionaryType represent the type of additional properties property - BaseModel: baseModel, // BaseModel should be the last but one assigned to model - Properties: properties // Properties should be the last assigned to model - }; - setUsage(context, m, model); - - // open generic type model which has un-instanced template parameter will not be generated. e.g. - // model GenericModel { value: T } - if (m.isFinished) { - models.set(name, model); - } - - // Resolve properties after model is added to the map to resolve possible circular dependencies - addModelProperties(model, m.properties, properties); + function getInputModelForModel(m: Model): InputModelType | undefined { + // Resolve properties after model is added to the map to resolve possible circular dependencies + // addModelProperties(model, m.properties, properties); + if (context.modelsMap!.has(m)) { + return fromSdkModelType( + context.modelsMap!.get(m) as SdkModelType, + context.program, + models, + enums + ); } - - return model; + return undefined; } function getDiscriminatorValue( @@ -649,7 +640,7 @@ export function getInputType( PropertyName: name, Namespace: model.Namespace }; - const inputType = getInputType( + const inputType = ensureInputType( context, getFormattedType(program, value), models, @@ -730,8 +721,15 @@ export function getInputType( if (baseModel) { const baseModelType = getInputModelType(baseModel); + if (baseModelType === undefined) { + $lib.reportDiagnostic(program, { + code: "No-Model", + format: { name: baseModel.name }, + target: NoTarget + }); + } - if (isInputListType(baseModelType)) { + if (isInputListType(baseModelType!)) { // tsp never allows array to be the base model of a model // meaning that it should be invalid tsp if you write: // model Foo extends Bar[] {} @@ -741,7 +739,7 @@ export function getInputType( return {}; } - if (isInputDictionaryType(baseModelType)) { + if (isInputDictionaryType(baseModelType!)) { return { inheritedDictionaryType: baseModelType }; @@ -755,20 +753,6 @@ export function getInputType( return {}; } - function getFullNamespaceString(namespace: Namespace | undefined): string { - if (!namespace || !namespace.name) { - return ""; - } - - let namespaceString: string = namespace.name; - let current: Namespace | undefined = namespace.namespace; - while (current && current.name) { - namespaceString = `${current.name}.${namespaceString}`; - current = current.namespace; - } - return namespaceString; - } - function getInputModelForIntrinsicType( type: IntrinsicType ): InputIntrinsicType { @@ -796,7 +780,7 @@ export function getInputType( let hasNullType = false; for (const variant of variants) { - const inputType = getInputType( + const inputType = ensureInputType( context, getFormattedType(program, variant.type), models, @@ -830,6 +814,38 @@ export function getInputType( } } +export function ensureInputType( + context: SdkContext, + formattedType: FormattedType, + models: Map, + enums: Map, + literalTypeContext?: LiteralTypeContext +): InputType { + const type = getInputType( + context, + formattedType, + models, + enums, + literalTypeContext + ); + if (type === undefined) { + if (formattedType.type.kind === "Model") { + $lib.reportDiagnostic(context.program, { + code: "No-Model", + format: { name: (formattedType.type as Model).name }, + target: NoTarget + }); + } else { + $lib.reportDiagnostic(context.program, { + code: "No-Type", + format: { kind: formattedType.type.kind }, + target: NoTarget + }); + } + } + return type!; +} + function setUsage( context: SdkContext, source: Model | Enum, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts index 8f3caad18dd..61030ccc288 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts @@ -59,6 +59,7 @@ import { import { getExternalDocs, getOperationId, hasDecorator } from "./decorators.js"; import { logger } from "./logger.js"; import { + ensureInputType, getDefaultValue, getEffectiveSchemaType, getFormattedType, @@ -253,7 +254,7 @@ export function loadOperation( const { type: location, name, param } = parameter; const format = parameter.type === "path" ? undefined : parameter.format; const typespecType = param.type; - const inputType: InputType = getInputType( + const inputType: InputType = ensureInputType( context, getFormattedType(program, param), models, @@ -308,7 +309,7 @@ export function loadOperation( context: SdkContext, body: ModelProperty | Model ): InputParameter { - const inputType: InputType = getInputType( + const inputType: InputType = ensureInputType( context, getFormattedType(program, body), models, @@ -349,7 +350,7 @@ export function loadOperation( let type: InputType | undefined = undefined; if (body?.type) { const typespecType = getEffectiveSchemaType(context, body.type); - const inputType: InputType = getInputType( + const inputType: InputType = ensureInputType( context, getFormattedType(program, typespecType), models, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/typespecServer.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/typespecServer.ts index b033534c2c6..f2ea444e3e7 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/typespecServer.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/typespecServer.ts @@ -14,7 +14,7 @@ import { } from "../type/inputType.js"; import { InputPrimitiveTypeKind } from "../type/inputPrimitiveTypeKind.js"; import { RequestLocation } from "../type/requestLocation.js"; -import { getInputType, getFormattedType } from "./model.js"; +import { getInputType, getFormattedType, ensureInputType } from "./model.js"; import { SdkContext } from "@azure-tools/typespec-client-generator-core"; import { InputTypeKind } from "../type/inputTypeKind.js"; @@ -62,7 +62,7 @@ export function resolveServers( Name: InputPrimitiveTypeKind.Uri, IsNullable: false } as InputPrimitiveType) - : getInputType( + : ensureInputType( context, getFormattedType(context.program, prop), models, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts index 65691a0ff3f..9c199beb214 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts @@ -3,6 +3,7 @@ import { EnumMember, Model, ModelProperty, + Namespace, Operation, Scalar, Type, @@ -120,3 +121,19 @@ export function createContentTypeOrAcceptParameter( : undefined } as InputParameter; } + +export function getFullNamespaceString( + namespace: Namespace | undefined +): string { + if (!namespace || !namespace.name) { + return ""; + } + + let namespaceString: string = namespace.name; + let current: Namespace | undefined = namespace.namespace; + while (current && current.name) { + namespaceString = `${current.name}.${namespaceString}`; + current = current.namespace; + } + return namespaceString; +} diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts index 6e3b59c5887..fc9a0073df7 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts @@ -126,6 +126,7 @@ const defaultOptions = { csharpGeneratorPath: dllFilePath, "clear-output-folder": false, "save-inputs": false, + "filter-out-core-models": false, "generate-protocol-methods": true, "generate-convenience-methods": true, "package-name": undefined, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts new file mode 100644 index 00000000000..76b25f7ac19 --- /dev/null +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -0,0 +1,425 @@ +import { + IntrinsicType, + Program, + UsageFlags, + getDeprecated, + getDiscriminator, + Type, + DateTimeKnownEncoding, + Model, + Enum +} from "@typespec/compiler"; +import { Usage } from "./usage.js"; +import { + SdkType, + SdkModelPropertyType, + SdkBodyModelPropertyType, + SdkModelType, + SdkEnumType, + SdkEnumValueType, + SdkDictionaryType, + SdkConstantType, + SdkBuiltInType, + SdkArrayType, + SdkDatetimeType, + SdkUnionType, + SdkBuiltInKinds +} from "@azure-tools/typespec-client-generator-core"; +import { + InputDictionaryType, + InputEnumType, + InputListType, + InputLiteralType, + InputModelType, + InputPrimitiveType, + InputType, + InputUnionType +} from "./inputType.js"; +import { InputModelProperty } from "./inputModelProperty.js"; +import { Visibility } from "@typespec/http"; +import { InputEnumTypeValue } from "./inputEnumTypeValue.js"; +import { + getCSharpInputTypeKindByIntrinsicModelName, + mapTypeSpecTypeToCSharpInputTypeKind +} from "../lib/model.js"; +import { InputTypeKind } from "./inputTypeKind.js"; +import { getFullNamespaceString } from "../lib/utils.js"; +import { InputPrimitiveTypeKind } from "./inputPrimitiveTypeKind.js"; +import { LiteralTypeContext } from "./literalTypeContext.js"; + +export function fromSdkType( + sdkType: SdkType, + program: Program, + models: Map, + enums: Map, + literalTypeContext?: LiteralTypeContext +): InputType { + if (sdkType.kind === "model") + return fromSdkModelType(sdkType, program, models, enums); + if (sdkType.kind === "enum") + return fromSdkEnumType(sdkType, program, enums); + if (sdkType.kind === "dict") + return fromSdkDictionaryType(sdkType, program, models, enums); + if (sdkType.kind === "array") + return fromSdkArrayType(sdkType, program, models, enums); + if (sdkType.kind === "constant") + return fromSdkConstantType(sdkType, enums, literalTypeContext); + if (sdkType.kind === "union") + return fromUnionType(sdkType, program, models, enums); + if (sdkType.kind === "datetime") return fromSdkDatetimeType(sdkType); + if (sdkType.__raw?.kind === "Scalar") return fromScalarType(sdkType); +// this happens for discriminator type, normally all other primitive types should be handled in scalar above +// TODO: can we improve the type in TCGC around discriminator + if (isSdkBuiltInType(sdkType.kind)) + return fromSdkBuiltInType(sdkType as SdkBuiltInType); + return {} as InputType; +} + +export function fromSdkModelType( + modelType: SdkModelType, + program: Program, + models: Map, + enums: Map +): InputModelType { + const modelTypeName = modelType.generatedName || modelType.name; + let inputModelType = models.get(modelTypeName); + if (!inputModelType) { + inputModelType = { + Kind: InputTypeKind.Model, + Name: modelTypeName, + Namespace: getFullNamespaceString( + (modelType.__raw as Model).namespace + ), + Accessibility: modelType.access, + Deprecated: getDeprecated(program, modelType.__raw!), // TO-DO: SdkModelType lacks of deprecated + Description: modelType.description, + IsNullable: modelType.nullable, + DiscriminatorPropertyName: getDiscriminator( + program, + modelType.__raw! + )?.propertyName, // TO-DO: SdkModelType lacks of DiscriminatorPropertyName + DiscriminatorValue: modelType.discriminatorValue, + Usage: fromUsageFlags(modelType.usage), + BaseModel: modelType.baseModel + ? fromSdkModelType(modelType.baseModel, program, models, enums) + : undefined, + } as InputModelType; + + models.set(modelTypeName, inputModelType); + + // TODO: can we fix the resolving reference issue in csharp? + // https://github.com/Azure/autorest.csharp/issues/4136 + // if (modelType.discriminatedSubtypes) { + // inputModelType.DerivedModels = Object.values( + // modelType.discriminatedSubtypes + // ).map((m) => fromSdkModelType(m, program, models, enums)); + // } + + inputModelType.Properties = modelType.properties + .filter( + (p) => + !(p as SdkBodyModelPropertyType).discriminator || + !modelType.baseModel + ) + .map((p) => + fromSdkModelPropertyType(p, program, models, enums, { + ModelName: inputModelType?.Name, + Namespace: inputModelType?.Namespace + } as LiteralTypeContext) + ); + const index = inputModelType.Properties.findIndex( + (p) => p.IsDiscriminator + ); + if (index !== 0 && index !== -1) { + const discriminator = inputModelType.Properties.splice(index, 1)[0]; + inputModelType.Properties.unshift(discriminator); + } + } + + return inputModelType; +} + +export function fromSdkEnumType( + enumType: SdkEnumType, + program: Program, + enums: Map, + addToCollection: boolean = true +): InputEnumType { + let inputEnumType = enums.get(enumType.name); + if (inputEnumType === undefined) { + const enumValueType = + enumType.valueType.kind === "float32" ? "Float32" : "String"; + const newInputEnumType: InputEnumType = { + Kind: InputTypeKind.Enum, + Name: enumType.name, + Namespace: getFullNamespaceString( + (enumType.__raw! as Enum).namespace + ), + Accessibility: enumType.access, + Deprecated: getDeprecated(program, enumType.__raw!), // TO-DO: SdkEnumType lacks of deprecated + Description: enumType.description, + EnumValueType: enumValueType, + AllowedValues: enumType.values.map((v) => fromSdkEnumValueType(v)), + IsExtensible: enumType.isFixed ? false : true, + IsNullable: false, + Usage: fromUsageFlags(enumType.usage) ?? Usage.None + }; + if (addToCollection) enums.set(enumType.name, newInputEnumType); + inputEnumType = newInputEnumType; + } + return inputEnumType; +} + +export function fromSdkDatetimeType( + datetimeType: SdkDatetimeType +): InputPrimitiveType { + function fromDateTimeKnownEncoding( + encoding: DateTimeKnownEncoding + ): InputPrimitiveTypeKind { + switch (encoding) { + case "rfc3339": + return InputPrimitiveTypeKind.DateTimeRFC3339; + case "rfc7231": + return InputPrimitiveTypeKind.DateTimeRFC7231; + case "unixTimestamp": + return InputPrimitiveTypeKind.DateTimeUnix; + } + } + return { + Kind: InputTypeKind.Primitive, + Name: fromDateTimeKnownEncoding(datetimeType.encode), + IsNullable: false + } as InputPrimitiveType; +} + +export function fromSdkBuiltInType(builtInType: SdkBuiltInType): InputType { + const builtInKind: InputPrimitiveTypeKind = + mapTypeSpecTypeToCSharpInputTypeKind( + builtInType.__raw!, + builtInType.kind, + undefined // To-Do: type incompatable + ); + return { + Kind: InputTypeKind.Primitive, + Name: builtInKind, + IsNullable: false + } as InputPrimitiveType; +} + +export function fromScalarType(scalarType: SdkType): InputPrimitiveType { + return { + Kind: InputTypeKind.Primitive, + Name: getCSharpInputTypeKindByIntrinsicModelName( + scalarType.kind, + scalarType.kind, + undefined // To-DO: encode not compatible + ), + IsNullable: scalarType.nullable + }; +} + +export function fromUnionType( + union: SdkUnionType, + program: Program, + models: Map, + enums: Map +): InputUnionType | InputType { + let itemTypes: InputType[] = []; + for (const value of union.values) { + const inputType = fromSdkType(value, program, models, enums); + itemTypes.push(inputType); + } + + return itemTypes.length > 1 + ? { + Kind: InputTypeKind.Union, + Name: InputTypeKind.Union, + UnionItemTypes: itemTypes, + IsNullable: false + } + : itemTypes[0]; +} + +export function fromSdkConstantType( + constantType: SdkConstantType, + enums: Map, + literalTypeContext?: LiteralTypeContext +): InputLiteralType { + return { + Kind: InputTypeKind.Literal, + Name: InputTypeKind.Literal, + LiteralValueType: + constantType.valueType.kind === "boolean" || + literalTypeContext === undefined + ? fromSdkBuiltInType(constantType.valueType) + : convertConstantToEnum( + constantType, + enums, + literalTypeContext + ), + Value: constantType.value, + IsNullable: false + }; + + function convertConstantToEnum( + constantType: SdkConstantType, + enums: Map, + literalTypeContext: LiteralTypeContext + ) { + // otherwise we need to wrap this into an extensible enum + // we use the model name followed by the property name as the enum name to ensure it is unique + const enumName = `${literalTypeContext.ModelName}_${literalTypeContext.PropertyName}`; + const enumValueType = + constantType.valueType.kind === "string" + ? InputPrimitiveTypeKind.String + : InputPrimitiveTypeKind.Float32; + const enumValueName = + constantType.value === null + ? "Null" + : constantType.value.toString(); + const allowValues: InputEnumTypeValue[] = [ + { + Name: enumValueName, + Value: constantType.value, + Description: enumValueName + } + ]; + const enumType: InputEnumType = { + Kind: InputTypeKind.Enum, + Name: enumName, + EnumValueType: enumValueType, //EnumValueType and AllowedValues should be the first field after id and name, so that it can be corrected serialized. + AllowedValues: allowValues, + Namespace: literalTypeContext.Namespace, + Accessibility: undefined, + Deprecated: undefined, + Description: `The ${enumName}`, // TODO -- what should we put here? + IsExtensible: true, + IsNullable: false, + Usage: "None" // will be updated later + }; + enums.set(enumName, enumType); + return enumType; + } +} + +export function fromSdkEnumValueType( + enumValueType: SdkEnumValueType +): InputEnumTypeValue { + return { + Name: enumValueType.name, + Value: enumValueType.value, + Description: enumValueType.description + }; +} + +export function fromSdkDictionaryType( + dictionaryType: SdkDictionaryType, + program: Program, + models: Map, + enums: Map +): InputDictionaryType { + return { + Kind: InputTypeKind.Dictionary, + Name: InputTypeKind.Dictionary, + KeyType: fromSdkType(dictionaryType.keyType, program, models, enums), + ValueType: fromSdkType( + dictionaryType.valueType, + program, + models, + enums + ), + IsNullable: dictionaryType.nullable + }; +} + +export function fromSdkArrayType( + arrayType: SdkArrayType, + program: Program, + models: Map, + enums: Map +): InputListType { + return { + Kind: InputTypeKind.Array, + Name: InputTypeKind.Array, + ElementType: fromSdkType(arrayType.valueType, program, models, enums), + IsNullable: arrayType.nullable + }; +} + +export function fromUsageFlags(usage: UsageFlags): Usage | undefined { + if (usage === UsageFlags.Input) return Usage.Input; + else if (usage === UsageFlags.Output) return Usage.Output; + else if (usage === (UsageFlags.Input | UsageFlags.Output)) + return Usage.RoundTrip; + return undefined; +} + +export function fromSdkModelPropertyType( + propertyType: SdkModelPropertyType, + program: Program, + models: Map, + enums: Map, + literalTypeContext: LiteralTypeContext +): InputModelProperty { + const serializedName = + propertyType.kind === "property" + ? (propertyType as SdkBodyModelPropertyType).serializedName + : ""; + literalTypeContext.PropertyName = serializedName; + + const isRequired = + propertyType.kind === "path" || propertyType.kind === "body" + ? true + : !propertyType.optional; // TO-DO: SdkBodyParameter lacks of optional + const isReadOnly = + propertyType.kind === "property" && + propertyType.visibility?.includes(Visibility.Read) + ? true + : false; + const isDiscriminator = + propertyType.kind === "property" && propertyType.discriminator + ? true + : false; + const modelProperty: InputModelProperty = { + Name: propertyType.nameInClient, + SerializedName: serializedName, + Description: propertyType.description ?? (isDiscriminator ? "Discriminator" : ""), + Type: fromSdkType( + propertyType.type, + program, + models, + enums, + literalTypeContext + ), + IsRequired: isRequired, + IsReadOnly: isReadOnly, + IsDiscriminator: isDiscriminator + }; + + return modelProperty; +} + +function isSdkBuiltInType(kind: string): boolean { + return [ + "bytes", + "boolean", + "date", + "time", + "any", + "int32", + "int64", + "float32", + "float64", + "decimal", + "decimal128", + "string", + "guid", + "url", + "uuid", + "password", + "armId", + "ipAddress", + "azureLocation", + "etag" + ].includes(kind); +} diff --git a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json index ec4e0516c38..8bf6e69f846 100644 --- a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json @@ -3,138 +3,27 @@ "Name": "Authentication.Union", "Description": "Illustrates clients generated with ApiKey and OAuth2 authentication.", "ApiVersions": [], - "Enums": [ - { - "$id": "2", - "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "3", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "4", - "Name": "implicit", - "Value": "implicit", - "Description": "implcit flow" - }, - { - "$id": "5", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "6", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "7", - "Kind": "Enum", - "Name": "MyFlow_authorizationUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "8", - "Name": "https://login.microsoftonline.com/common/oauth2/authorize", - "Value": "https://login.microsoftonline.com/common/oauth2/authorize", - "Description": "https://login.microsoftonline.com/common/oauth2/authorize" - } - ], - "Namespace": "Authentication.Union", - "Description": "The MyFlow_authorizationUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - } - ], - "Models": [ - { - "$id": "9", - "Kind": "Model", - "Name": "MyFlow", - "Namespace": "Authentication.Union", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "10", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$ref": "2" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "11", - "Name": "authorizationUrl", - "SerializedName": "authorizationUrl", - "Description": "", - "Type": { - "$id": "12", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "7" - }, - "Value": "https://login.microsoftonline.com/common/oauth2/authorize", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "13", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "14", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - } - ], + "Enums": [], + "Models": [], "Clients": [ { - "$id": "15", + "$id": "2", "Name": "UnionClient", "Description": "Illustrates clients generated with ApiKey and OAuth2 authentication.", "Operations": [ { - "$id": "16", + "$id": "3", "Name": "validKey", "ResourceName": "Union", "Description": "Check whether client is authenticated", "Parameters": [ { - "$id": "17", + "$id": "4", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "18", + "$id": "5", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -149,9 +38,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "19", + "$id": "6", "Type": { - "$id": "20", + "$id": "7", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -160,11 +49,11 @@ } }, { - "$id": "21", + "$id": "8", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "22", + "$id": "9", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -179,9 +68,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "23", + "$id": "10", "Type": { - "$ref": "22" + "$ref": "9" }, "Value": "application/json" } @@ -189,7 +78,7 @@ ], "Responses": [ { - "$id": "24", + "$id": "11", "StatusCodes": [ 204 ], @@ -207,20 +96,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "25", + "$id": "12", "Name": "validToken", "ResourceName": "Union", "Description": "Check whether client is authenticated", "Parameters": [ { - "$ref": "17" + "$ref": "4" }, { - "$id": "26", + "$id": "13", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "27", + "$id": "14", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -235,9 +124,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "28", + "$id": "15", "Type": { - "$ref": "27" + "$ref": "14" }, "Value": "application/json" } @@ -245,7 +134,7 @@ ], "Responses": [ { - "$id": "29", + "$id": "16", "StatusCodes": [ 204 ], @@ -264,19 +153,19 @@ } ], "Protocol": { - "$id": "30" + "$id": "17" }, "Creatable": true } ], "Auth": { - "$id": "31", + "$id": "18", "ApiKey": { - "$id": "32", + "$id": "19", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "33", + "$id": "20", "Scopes": [ "https://security.microsoft.com/.default" ] diff --git a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json index 3ef0fb3c021..a57e06d8cfa 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json @@ -8,6 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "LR", + "Namespace": "Type.Union", "EnumValueType": "String", "AllowedValues": [ { @@ -21,8 +22,6 @@ "Value": "right" } ], - "Namespace": "Type.Union", - "Description": "", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -31,6 +30,7 @@ "$id": "5", "Kind": "Enum", "Name": "UD", + "Namespace": "Type.Union", "EnumValueType": "String", "AllowedValues": [ { @@ -44,8 +44,6 @@ "Value": "down" } ], - "Namespace": "Type.Union", - "Description": "", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -113,7 +111,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -178,7 +177,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -236,7 +236,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -294,7 +295,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -352,7 +354,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -410,7 +413,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -475,7 +479,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -540,7 +545,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -605,7 +611,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -670,7 +677,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -712,7 +720,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -736,7 +745,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } @@ -744,7 +754,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -782,7 +793,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -827,7 +839,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "111", @@ -849,12 +862,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -878,7 +893,8 @@ "$ref": "108" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -935,7 +951,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "123", @@ -969,12 +986,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -998,7 +1017,8 @@ "$ref": "117" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1089,7 +1109,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "143", @@ -1157,7 +1178,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "153", @@ -1225,7 +1247,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "163", @@ -1293,12 +1316,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1322,7 +1347,8 @@ "$ref": "132" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1389,7 +1415,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "184", @@ -1433,7 +1460,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "190", @@ -1477,7 +1505,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "196", @@ -1521,12 +1550,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1550,7 +1581,8 @@ "$ref": "177" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json index a01ed486892..7bb9b2dbb6d 100644 --- a/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -32,6 +32,7 @@ "$id": "5", "Kind": "Enum", "Name": "Versions", + "Namespace": "ApiVersionInTsp", "EnumValueType": "String", "AllowedValues": [ { @@ -45,8 +46,6 @@ "Value": "v1.2" } ], - "Namespace": "ApiVersionInTsp", - "Description": "", "IsExtensible": true, "IsNullable": false, "Usage": "None" @@ -74,7 +73,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json index 734c2d22049..65f2328e0a6 100644 --- a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json @@ -9,6 +9,8 @@ "$id": "2", "Kind": "Enum", "Name": "ProjectKind", + "Namespace": "AuthoringTypeSpec", + "Description": "Represents the project kind.", "EnumValueType": "String", "AllowedValues": [ { @@ -30,8 +32,6 @@ "Description": "For building an extraction model to identify your domain categories using your own data." } ], - "Namespace": "AuthoringTypeSpec", - "Description": "Represents the project kind.", "IsExtensible": true, "IsNullable": false, "Usage": "None" @@ -40,6 +40,8 @@ "$id": "6", "Kind": "Enum", "Name": "OperationState", + "Namespace": "Azure.Core.Foundations", + "Description": "Enum describing allowed operation states.", "EnumValueType": "String", "AllowedValues": [ { @@ -73,8 +75,6 @@ "Description": "The operation has been canceled by the user." } ], - "Namespace": "Azure.Core.Foundations", - "Description": "Enum describing allowed operation states.", "IsExtensible": true, "IsNullable": false, "Usage": "None" @@ -83,6 +83,8 @@ "$id": "12", "Kind": "Enum", "Name": "JobStatus", + "Namespace": "AuthoringTypeSpec", + "Description": "Represents the job status values.", "EnumValueType": "String", "AllowedValues": [ { @@ -121,8 +123,6 @@ "Value": "partiallyCompleted" } ], - "Namespace": "AuthoringTypeSpec", - "Description": "Represents the job status values.", "IsExtensible": true, "IsNullable": false, "Usage": "Output" @@ -167,7 +167,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "25", @@ -178,7 +179,8 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "26", @@ -192,7 +194,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "28", @@ -207,126 +210,116 @@ "Description": "Represents the settings used to define the project behavior.", "IsNullable": false, "Usage": "None", - "InheritedDictionaryType": { - "$id": "30", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "31", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "32", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "33", + "$id": "30", "Name": "multilingual", "SerializedName": "multilingual", "Description": "Whether the project would be used for multiple languages or not.", "Type": { - "$id": "34", + "$id": "31", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "35", + "$id": "32", "Name": "description", "SerializedName": "description", "Description": "The project description.", "Type": { - "$id": "36", + "$id": "33", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "37", + "$id": "34", "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": "38", + "$id": "35", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "39", + "$id": "36", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "Represents the project creation datetime.", "Type": { - "$id": "40", + "$id": "37", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "41", + "$id": "38", "Name": "lastModifiedDateTime", "SerializedName": "lastModifiedDateTime", "Description": "Represents the project last modification datetime.", "Type": { - "$id": "42", + "$id": "39", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "43", + "$id": "40", "Name": "lastTrainedDateTime", "SerializedName": "lastTrainedDateTime", "Description": "Represents the project last training datetime.", "Type": { - "$id": "44", + "$id": "41", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "45", + "$id": "42", "Name": "lastDeployedDateTime", "SerializedName": "lastDeployedDateTime", "Description": "Represents the project last deployment datetime.", "Type": { - "$id": "46", + "$id": "43", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, @@ -334,30 +327,31 @@ "$ref": "29" }, { - "$id": "47", + "$id": "44", "Kind": "Model", - "Name": "OperationStatusneverError", + "Name": "OperationStatus", "Namespace": "Azure.Core.Foundations", "Description": "Provides status details for long running operations.", "IsNullable": false, "Usage": "None", "Properties": [ { - "$id": "48", + "$id": "45", "Name": "id", "SerializedName": "id", "Description": "The unique ID of the operation.", "Type": { - "$id": "49", + "$id": "46", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "50", + "$id": "47", "Name": "status", "SerializedName": "status", "Description": "The status of the operation", @@ -365,15 +359,16 @@ "$ref": "6" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "51", + "$id": "48", "Name": "error", "SerializedName": "error", "Description": "Error object that describes the error when status is \"Failed\".", "Type": { - "$id": "52", + "$id": "49", "Kind": "Model", "Name": "Error", "Namespace": "Azure.Core.Foundations", @@ -382,71 +377,75 @@ "Usage": "Output", "Properties": [ { - "$id": "53", + "$id": "50", "Name": "code", "SerializedName": "code", "Description": "One of a server-defined set of error codes.", "Type": { - "$id": "54", + "$id": "51", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "55", + "$id": "52", "Name": "message", "SerializedName": "message", "Description": "A human-readable representation of the error.", "Type": { - "$id": "56", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "57", + "$id": "54", "Name": "target", "SerializedName": "target", "Description": "The target of the error.", "Type": { - "$id": "58", + "$id": "55", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "59", + "$id": "56", "Name": "details", "SerializedName": "details", "Description": "An array of details about specific errors that led to this reported error.", "Type": { - "$id": "60", + "$id": "57", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "52" + "$ref": "49" }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "61", + "$id": "58", "Name": "innererror", "SerializedName": "innererror", "Description": "An object containing more specific information than the current object about the error.", "Type": { - "$id": "62", + "$id": "59", "Kind": "Model", "Name": "InnerError", "Namespace": "Azure.Core.Foundations", @@ -455,50 +454,54 @@ "Usage": "Output", "Properties": [ { - "$id": "63", + "$id": "60", "Name": "code", "SerializedName": "code", "Description": "One of a server-defined set of error codes.", "Type": { - "$id": "64", + "$id": "61", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "65", + "$id": "62", "Name": "InnerErrorObject", "SerializedName": "innererror", "Description": "Inner error.", "Type": { - "$ref": "62" + "$ref": "59" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "52" + "$ref": "49" }, { - "$ref": "62" + "$ref": "59" }, { - "$id": "66", + "$id": "63", "Kind": "Model", "Name": "PagedProject", "Namespace": "Azure.Core.Foundations", @@ -507,12 +510,12 @@ "Usage": "None", "Properties": [ { - "$id": "67", + "$id": "64", "Name": "value", "SerializedName": "value", "Description": "The Project items on this page", "Type": { - "$id": "68", + "$id": "65", "Kind": "Array", "Name": "Array", "ElementType": { @@ -521,26 +524,28 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "69", + "$id": "66", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "70", + "$id": "67", "Kind": "Primitive", "Name": "Uri", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "71", + "$id": "68", "Kind": "Model", "Name": "TrainingJobOptions", "Namespace": "AuthoringTypeSpec", @@ -549,23 +554,24 @@ "Usage": "None", "Properties": [ { - "$id": "72", + "$id": "69", "Name": "modelLabel", "SerializedName": "modelLabel", "Description": "", "Type": { - "$id": "73", + "$id": "70", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "74", + "$id": "71", "Kind": "Model", "Name": "Deployment", "Namespace": "AuthoringTypeSpec", @@ -573,23 +579,24 @@ "Usage": "None", "Properties": [ { - "$id": "75", + "$id": "72", "Name": "name", "SerializedName": "name", "Description": "", "Type": { - "$id": "76", + "$id": "73", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, { - "$id": "77", + "$id": "74", "Kind": "Model", "Name": "PagedDeployment", "Namespace": "Azure.Core.Foundations", @@ -598,40 +605,42 @@ "Usage": "None", "Properties": [ { - "$id": "78", + "$id": "75", "Name": "value", "SerializedName": "value", "Description": "The Deployment items on this page", "Type": { - "$id": "79", + "$id": "76", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "74" + "$ref": "71" }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "80", + "$id": "77", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "81", + "$id": "78", "Kind": "Primitive", "Name": "Uri", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "82", + "$id": "79", "Kind": "Model", "Name": "SwapDeploymentsOptions", "Namespace": "AuthoringTypeSpec", @@ -639,37 +648,39 @@ "Usage": "None", "Properties": [ { - "$id": "83", + "$id": "80", "Name": "firstDeploymentName", "SerializedName": "firstDeploymentName", "Description": "Represents the first deployment name.", "Type": { - "$id": "84", + "$id": "81", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "85", + "$id": "82", "Name": "secondDeploymentName", "SerializedName": "secondDeploymentName", "Description": "Represents the second deployment name.", "Type": { - "$id": "86", + "$id": "83", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "87", + "$id": "84", "Kind": "Model", "Name": "DeploymentJob", "Namespace": "AuthoringTypeSpec", @@ -677,63 +688,67 @@ "Usage": "Output", "Properties": [ { - "$id": "88", + "$id": "85", "Name": "jobId", "SerializedName": "jobId", "Description": "The job ID.", "Type": { - "$id": "89", + "$id": "86", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "90", + "$id": "87", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The creation date time of the job.", "Type": { - "$id": "91", + "$id": "88", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "92", + "$id": "89", "Name": "lastUpdatedDateTime", "SerializedName": "lastUpdatedDateTime", "Description": "The the last date time the job was updated.", "Type": { - "$id": "93", + "$id": "90", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "94", + "$id": "91", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The expiration date time of the job.", "Type": { - "$id": "95", + "$id": "92", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "96", + "$id": "93", "Name": "status", "SerializedName": "status", "Description": "The job status.", @@ -741,19 +756,20 @@ "$ref": "12" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "97", + "$id": "94", "Name": "warnings", "SerializedName": "warnings", "Description": "The warnings that were encountered while executing the job.", "Type": { - "$id": "98", + "$id": "95", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "99", + "$id": "96", "Kind": "Model", "Name": "JobWarning", "Namespace": "AuthoringTypeSpec", @@ -762,72 +778,77 @@ "Usage": "Output", "Properties": [ { - "$id": "100", + "$id": "97", "Name": "code", "SerializedName": "code", "Description": "The warning code.", "Type": { - "$id": "101", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "102", + "$id": "99", "Name": "message", "SerializedName": "message", "Description": "The warning message.", "Type": { - "$id": "103", + "$id": "100", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "104", + "$id": "101", "Name": "errors", "SerializedName": "errors", "Description": "The errors encountered while executing the job.", "Type": { - "$ref": "52" + "$ref": "49" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "105", + "$id": "102", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "106", + "$id": "103", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, { - "$ref": "99" + "$ref": "96" }, { - "$id": "107", + "$id": "104", "Kind": "Model", "Name": "SwapDeploymentsJob", "Namespace": "AuthoringTypeSpec", @@ -835,63 +856,67 @@ "Usage": "Output", "Properties": [ { - "$id": "108", + "$id": "105", "Name": "jobId", "SerializedName": "jobId", "Description": "The job ID.", "Type": { - "$id": "109", + "$id": "106", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "110", + "$id": "107", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The creation date time of the job.", "Type": { - "$id": "111", + "$id": "108", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "112", + "$id": "109", "Name": "lastUpdatedDateTime", "SerializedName": "lastUpdatedDateTime", "Description": "The the last date time the job was updated.", "Type": { - "$id": "113", + "$id": "110", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "114", + "$id": "111", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The expiration date time of the job.", "Type": { - "$id": "115", + "$id": "112", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "116", + "$id": "113", "Name": "status", "SerializedName": "status", "Description": "The job status.", @@ -899,54 +924,58 @@ "$ref": "12" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "117", + "$id": "114", "Name": "warnings", "SerializedName": "warnings", "Description": "The warnings that were encountered while executing the job.", "Type": { - "$id": "118", + "$id": "115", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "99" + "$ref": "96" }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "119", + "$id": "116", "Name": "errors", "SerializedName": "errors", "Description": "The errors encountered while executing the job.", "Type": { - "$ref": "52" + "$ref": "49" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "120", + "$id": "117", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "121", + "$id": "118", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, { - "$id": "122", + "$id": "119", "Kind": "Model", "Name": "PagedSupportedLanguage", "Namespace": "AuthoringTypeSpec", @@ -955,16 +984,16 @@ "Usage": "None", "Properties": [ { - "$id": "123", + "$id": "120", "Name": "value", "SerializedName": "value", "Description": "The SupportedLanguage items on this page", "Type": { - "$id": "124", + "$id": "121", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "125", + "$id": "122", "Kind": "Model", "Name": "SupportedLanguage", "Namespace": "AuthoringTypeSpec", @@ -973,61 +1002,65 @@ "Usage": "None", "Properties": [ { - "$id": "126", + "$id": "123", "Name": "languageName", "SerializedName": "languageName", "Description": "The language name.", "Type": { - "$id": "127", + "$id": "124", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "128", + "$id": "125", "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": "129", + "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "130", + "$id": "127", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "131", + "$id": "128", "Kind": "Primitive", "Name": "Uri", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "125" + "$ref": "122" }, { - "$id": "132", + "$id": "129", "Kind": "Model", "Name": "PagedTrainingConfigVersion", "Namespace": "AuthoringTypeSpec", @@ -1036,16 +1069,16 @@ "Usage": "None", "Properties": [ { - "$id": "133", + "$id": "130", "Name": "value", "SerializedName": "value", "Description": "The TrainingConfigVersion items on this page", "Type": { - "$id": "134", + "$id": "131", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "135", + "$id": "132", "Kind": "Model", "Name": "TrainingConfigVersion", "Namespace": "AuthoringTypeSpec", @@ -1054,241 +1087,92 @@ "Usage": "None", "Properties": [ { - "$id": "136", + "$id": "133", "Name": "trainingConfigVersionStr", "SerializedName": "trainingConfigVersionStr", "Description": "Represents the version of the config.", "Type": { - "$id": "137", + "$id": "134", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "138", + "$id": "135", "Name": "modelExpirationDate", "SerializedName": "modelExpirationDate", "Description": "Represents the training config version expiration date.", "Type": { - "$id": "139", + "$id": "136", "Kind": "Primitive", "Name": "Date", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "140", + "$id": "137", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "141", + "$id": "138", "Kind": "Primitive", "Name": "Uri", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "135" - }, - { - "$id": "142", - "Kind": "Model", - "Name": "Job", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "143", - "Name": "jobId", - "SerializedName": "jobId", - "Description": "The job ID.", - "Type": { - "$id": "144", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "145", - "Name": "createdDateTime", - "SerializedName": "createdDateTime", - "Description": "The creation date time of the job.", - "Type": { - "$id": "146", - "Kind": "Primitive", - "Name": "DateTime", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "147", - "Name": "lastUpdatedDateTime", - "SerializedName": "lastUpdatedDateTime", - "Description": "The the last date time the job was updated.", - "Type": { - "$id": "148", - "Kind": "Primitive", - "Name": "DateTime", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "149", - "Name": "expirationDateTime", - "SerializedName": "expirationDateTime", - "Description": "The expiration date time of the job.", - "Type": { - "$id": "150", - "Kind": "Primitive", - "Name": "DateTime", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "151", - "Name": "status", - "SerializedName": "status", - "Description": "The job status.", - "Type": { - "$ref": "12" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "152", - "Name": "warnings", - "SerializedName": "warnings", - "Description": "The warnings that were encountered while executing the job.", - "Type": { - "$id": "153", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$ref": "99" - }, - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "154", - "Name": "errors", - "SerializedName": "errors", - "Description": "The errors encountered while executing the job.", - "Type": { - "$ref": "52" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "155", - "Kind": "Model", - "Name": "ExportedProject", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "156", - "Kind": "Model", - "Name": "ListQueryParams", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "157", - "Kind": "Model", - "Name": "ExportParams", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "158", - "Kind": "Model", - "Name": "SwapDeploymentsParams", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "159", - "Name": "body", - "SerializedName": "body", - "Description": "The body schema of the operation.", - "Type": { - "$ref": "82" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] + "$ref": "132" } ], "Clients": [ { - "$id": "160", + "$id": "139", "Name": "AuthoringTypeSpecClient", "Description": "", "Operations": [], "Protocol": { - "$id": "161" + "$id": "140" }, "Creatable": true }, { - "$id": "162", + "$id": "141", "Name": "Projects", "Description": "", "Operations": [ { - "$id": "163", + "$id": "142", "Name": "createOrUpdate", "ResourceName": "Project", "Description": "Creates a new project or updates an existing one.", "Parameters": [ { - "$id": "164", + "$id": "143", "Name": "Endpoint", "NameInRequest": "Endpoint", "Type": { - "$id": "165", + "$id": "144", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1304,21 +1188,21 @@ "Kind": "Client" }, { - "$id": "166", + "$id": "145", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "167", + "$id": "146", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "168", + "$id": "147", "Type": { - "$id": "169", + "$id": "148", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1335,11 +1219,11 @@ "Kind": "Client" }, { - "$id": "170", + "$id": "149", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "171", + "$id": "150", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1355,7 +1239,7 @@ "Kind": "Method" }, { - "$id": "172", + "$id": "151", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -1373,11 +1257,11 @@ "Kind": "Method" }, { - "$id": "173", + "$id": "152", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "174", + "$id": "153", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1392,19 +1276,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "154", "Type": { - "$ref": "174" + "$ref": "153" }, "Value": "application/json" } }, { - "$id": "176", + "$id": "155", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "177", + "$id": "156", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1419,9 +1303,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "178", + "$id": "157", "Type": { - "$ref": "177" + "$ref": "156" }, "Value": "application/json" } @@ -1429,7 +1313,7 @@ ], "Responses": [ { - "$id": "179", + "$id": "158", "StatusCodes": [ 201 ], @@ -1439,12 +1323,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "180", + "$id": "159", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "181", + "$id": "160", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1457,7 +1341,7 @@ ] }, { - "$id": "182", + "$id": "161", "StatusCodes": [ 200 ], @@ -1467,12 +1351,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "183", + "$id": "162", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "184", + "$id": "163", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1494,10 +1378,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "185", + "$id": "164", "FinalStateVia": 2, "FinalResponse": { - "$id": "186", + "$id": "165", "StatusCodes": [ 200 ], @@ -1511,28 +1395,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "187", + "$id": "166", "Name": "get", "ResourceName": "Project", "Description": "Gets the details of a project.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "188", + "$id": "167", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "189", + "$id": "168", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -1544,11 +1428,11 @@ "Kind": "Client" }, { - "$id": "190", + "$id": "169", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "191", + "$id": "170", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1564,11 +1448,11 @@ "Kind": "Method" }, { - "$id": "192", + "$id": "171", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "193", + "$id": "172", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1583,9 +1467,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "194", + "$id": "173", "Type": { - "$ref": "193" + "$ref": "172" }, "Value": "application/json" } @@ -1593,7 +1477,7 @@ ], "Responses": [ { - "$id": "195", + "$id": "174", "StatusCodes": [ 200 ], @@ -1617,28 +1501,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "196", + "$id": "175", "Name": "delete", "ResourceName": "Project", "Description": "Deletes a project.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "197", + "$id": "176", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "198", + "$id": "177", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -1650,11 +1534,11 @@ "Kind": "Client" }, { - "$id": "199", + "$id": "178", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "200", + "$id": "179", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1670,11 +1554,11 @@ "Kind": "Method" }, { - "$id": "201", + "$id": "180", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1689,9 +1573,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "182", "Type": { - "$ref": "202" + "$ref": "181" }, "Value": "application/json" } @@ -1699,22 +1583,22 @@ ], "Responses": [ { - "$id": "204", + "$id": "183", "StatusCodes": [ 202 ], "BodyType": { - "$ref": "47" + "$ref": "44" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "205", + "$id": "184", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "206", + "$id": "185", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1733,10 +1617,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}", "BufferResponse": true, "LongRunning": { - "$id": "207", + "$id": "186", "FinalStateVia": 3, "FinalResponse": { - "$id": "208", + "$id": "187", "StatusCodes": [ 204 ], @@ -1747,28 +1631,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "209", + "$id": "188", "Name": "list", "ResourceName": "Project", "Description": "Lists the existing projects.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "210", + "$id": "189", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "211", + "$id": "190", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -1780,11 +1664,11 @@ "Kind": "Client" }, { - "$id": "212", + "$id": "191", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "213", + "$id": "192", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1799,9 +1683,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "214", + "$id": "193", "Type": { - "$ref": "213" + "$ref": "192" }, "Value": "application/json" } @@ -1809,12 +1693,12 @@ ], "Responses": [ { - "$id": "215", + "$id": "194", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "66" + "$ref": "63" }, "BodyMediaType": "Json", "Headers": [], @@ -1830,7 +1714,7 @@ "Path": "/authoring/analyze-text/projects", "BufferResponse": true, "Paging": { - "$id": "216", + "$id": "195", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1838,28 +1722,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "217", + "$id": "196", "Name": "export", "ResourceName": "Projects", "Description": "Triggers a job to export a project's data.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "218", + "$id": "197", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "219", + "$id": "198", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -1871,11 +1755,11 @@ "Kind": "Client" }, { - "$id": "220", + "$id": "199", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "221", + "$id": "200", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1891,11 +1775,11 @@ "Kind": "Method" }, { - "$id": "222", + "$id": "201", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "223", + "$id": "202", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1911,11 +1795,11 @@ "Kind": "Method" }, { - "$id": "224", + "$id": "203", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "225", + "$id": "204", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1930,9 +1814,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "205", "Type": { - "$ref": "225" + "$ref": "204" }, "Value": "application/json" } @@ -1940,19 +1824,19 @@ ], "Responses": [ { - "$id": "227", + "$id": "206", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "228", + "$id": "207", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "229", + "$id": "208", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1968,10 +1852,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}:export", "BufferResponse": true, "LongRunning": { - "$id": "230", + "$id": "209", "FinalStateVia": 3, "FinalResponse": { - "$id": "231", + "$id": "210", "StatusCodes": [ 200 ], @@ -1982,28 +1866,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "232", + "$id": "211", "Name": "importx", "ResourceName": "Projects", "Description": "Triggers a job to export a project's data.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "233", + "$id": "212", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "234", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -2015,11 +1899,11 @@ "Kind": "Client" }, { - "$id": "235", + "$id": "214", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "236", + "$id": "215", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2035,11 +1919,11 @@ "Kind": "Method" }, { - "$id": "237", + "$id": "216", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "238", + "$id": "217", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2054,9 +1938,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "239", + "$id": "218", "Type": { - "$ref": "238" + "$ref": "217" }, "Value": "application/json" } @@ -2064,19 +1948,19 @@ ], "Responses": [ { - "$id": "240", + "$id": "219", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "241", + "$id": "220", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "242", + "$id": "221", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2092,10 +1976,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}:importx", "BufferResponse": true, "LongRunning": { - "$id": "243", + "$id": "222", "FinalStateVia": 3, "FinalResponse": { - "$id": "244", + "$id": "223", "StatusCodes": [ 200 ], @@ -2106,28 +1990,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "245", + "$id": "224", "Name": "train", "ResourceName": "Projects", "Description": "Triggers a training job for a project.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "246", + "$id": "225", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "247", + "$id": "226", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -2139,11 +2023,11 @@ "Kind": "Client" }, { - "$id": "248", + "$id": "227", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "249", + "$id": "228", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2159,11 +2043,11 @@ "Kind": "Method" }, { - "$id": "250", + "$id": "229", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "71" + "$ref": "68" }, "Location": "Body", "IsRequired": true, @@ -2176,11 +2060,11 @@ "Kind": "Method" }, { - "$id": "251", + "$id": "230", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "252", + "$id": "231", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2195,19 +2079,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "253", + "$id": "232", "Type": { - "$ref": "252" + "$ref": "231" }, "Value": "application/json" } }, { - "$id": "254", + "$id": "233", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "255", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2222,9 +2106,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "235", "Type": { - "$ref": "255" + "$ref": "234" }, "Value": "application/json" } @@ -2232,19 +2116,19 @@ ], "Responses": [ { - "$id": "257", + "$id": "236", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "258", + "$id": "237", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "259", + "$id": "238", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2263,10 +2147,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "260", + "$id": "239", "FinalStateVia": 3, "FinalResponse": { - "$id": "261", + "$id": "240", "StatusCodes": [ 200 ], @@ -2278,39 +2162,39 @@ } ], "Protocol": { - "$id": "262" + "$id": "241" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "263", + "$id": "242", "Name": "Deployments", "Description": "", "Operations": [ { - "$id": "264", + "$id": "243", "Name": "getDeployment", "ResourceName": "Deployment", "Description": "Gets the details of a deployment.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "265", + "$id": "244", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "266", + "$id": "245", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -2322,11 +2206,11 @@ "Kind": "Client" }, { - "$id": "267", + "$id": "246", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "268", + "$id": "247", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2342,11 +2226,11 @@ "Kind": "Method" }, { - "$id": "269", + "$id": "248", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "270", + "$id": "249", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2362,11 +2246,11 @@ "Kind": "Method" }, { - "$id": "271", + "$id": "250", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "272", + "$id": "251", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2381,9 +2265,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "252", "Type": { - "$ref": "272" + "$ref": "251" }, "Value": "application/json" } @@ -2391,12 +2275,12 @@ ], "Responses": [ { - "$id": "274", + "$id": "253", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "74" + "$ref": "71" }, "BodyMediaType": "Json", "Headers": [], @@ -2415,28 +2299,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "275", + "$id": "254", "Name": "deployProject", "ResourceName": "Deployment", "Description": "Creates a new deployment or replaces an existing one.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "276", + "$id": "255", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "277", + "$id": "256", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -2448,11 +2332,11 @@ "Kind": "Client" }, { - "$id": "278", + "$id": "257", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "279", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2468,11 +2352,11 @@ "Kind": "Method" }, { - "$id": "280", + "$id": "259", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "281", + "$id": "260", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2488,12 +2372,12 @@ "Kind": "Method" }, { - "$id": "282", + "$id": "261", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", "Type": { - "$ref": "74" + "$ref": "71" }, "Location": "Body", "IsRequired": true, @@ -2506,11 +2390,11 @@ "Kind": "Method" }, { - "$id": "283", + "$id": "262", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "284", + "$id": "263", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2525,19 +2409,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "285", + "$id": "264", "Type": { - "$ref": "284" + "$ref": "263" }, "Value": "application/json" } }, { - "$id": "286", + "$id": "265", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "287", + "$id": "266", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2552,9 +2436,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "288", + "$id": "267", "Type": { - "$ref": "287" + "$ref": "266" }, "Value": "application/json" } @@ -2562,22 +2446,22 @@ ], "Responses": [ { - "$id": "289", + "$id": "268", "StatusCodes": [ 201 ], "BodyType": { - "$ref": "74" + "$ref": "71" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "290", + "$id": "269", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "291", + "$id": "270", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2590,22 +2474,22 @@ ] }, { - "$id": "292", + "$id": "271", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "74" + "$ref": "71" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "293", + "$id": "272", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "294", + "$id": "273", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2627,15 +2511,15 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "295", + "$id": "274", "FinalStateVia": 2, "FinalResponse": { - "$id": "296", + "$id": "275", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "74" + "$ref": "71" }, "BodyMediaType": "Json" } @@ -2644,28 +2528,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "297", + "$id": "276", "Name": "deleteDeployment", "ResourceName": "Deployment", "Description": "Deletes a project deployment.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "298", + "$id": "277", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "299", + "$id": "278", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -2677,11 +2561,11 @@ "Kind": "Client" }, { - "$id": "300", + "$id": "279", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "301", + "$id": "280", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2697,11 +2581,11 @@ "Kind": "Method" }, { - "$id": "302", + "$id": "281", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "303", + "$id": "282", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2717,11 +2601,11 @@ "Kind": "Method" }, { - "$id": "304", + "$id": "283", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "305", + "$id": "284", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2736,9 +2620,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "306", + "$id": "285", "Type": { - "$ref": "305" + "$ref": "284" }, "Value": "application/json" } @@ -2746,22 +2630,22 @@ ], "Responses": [ { - "$id": "307", + "$id": "286", "StatusCodes": [ 202 ], "BodyType": { - "$ref": "47" + "$ref": "44" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "308", + "$id": "287", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "309", + "$id": "288", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2780,10 +2664,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments/{deploymentName}", "BufferResponse": true, "LongRunning": { - "$id": "310", + "$id": "289", "FinalStateVia": 3, "FinalResponse": { - "$id": "311", + "$id": "290", "StatusCodes": [ 204 ], @@ -2794,28 +2678,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "312", + "$id": "291", "Name": "list", "ResourceName": "Deployment", "Description": "Lists the existing deployments.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "313", + "$id": "292", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "314", + "$id": "293", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -2827,11 +2711,11 @@ "Kind": "Client" }, { - "$id": "315", + "$id": "294", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "316", + "$id": "295", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2847,11 +2731,11 @@ "Kind": "Method" }, { - "$id": "317", + "$id": "296", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "318", + "$id": "297", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2866,9 +2750,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "319", + "$id": "298", "Type": { - "$ref": "318" + "$ref": "297" }, "Value": "application/json" } @@ -2876,12 +2760,12 @@ ], "Responses": [ { - "$id": "320", + "$id": "299", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "77" + "$ref": "74" }, "BodyMediaType": "Json", "Headers": [], @@ -2897,7 +2781,7 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments", "BufferResponse": true, "Paging": { - "$id": "321", + "$id": "300", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -2905,28 +2789,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "322", + "$id": "301", "Name": "swapDeployments", "ResourceName": "Deployments", "Description": "Swaps two existing deployments with each other.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "323", + "$id": "302", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "324", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -2938,11 +2822,11 @@ "Kind": "Client" }, { - "$id": "325", + "$id": "304", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "326", + "$id": "305", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2958,12 +2842,12 @@ "Kind": "Method" }, { - "$id": "327", + "$id": "306", "Name": "body", "NameInRequest": "body", "Description": "The body schema of the operation.", "Type": { - "$ref": "82" + "$ref": "79" }, "Location": "Body", "IsRequired": true, @@ -2976,11 +2860,11 @@ "Kind": "Method" }, { - "$id": "328", + "$id": "307", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "329", + "$id": "308", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2995,19 +2879,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "330", + "$id": "309", "Type": { - "$ref": "329" + "$ref": "308" }, "Value": "application/json" } }, { - "$id": "331", + "$id": "310", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "332", + "$id": "311", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3022,9 +2906,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "333", + "$id": "312", "Type": { - "$ref": "332" + "$ref": "311" }, "Value": "application/json" } @@ -3032,19 +2916,19 @@ ], "Responses": [ { - "$id": "334", + "$id": "313", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "335", + "$id": "314", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "336", + "$id": "315", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -3063,10 +2947,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "337", + "$id": "316", "FinalStateVia": 3, "FinalResponse": { - "$id": "338", + "$id": "317", "StatusCodes": [ 200 ], @@ -3078,39 +2962,39 @@ } ], "Protocol": { - "$id": "339" + "$id": "318" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "340", + "$id": "319", "Name": "Jobs", "Description": "", "Operations": [ { - "$id": "341", + "$id": "320", "Name": "getDeploymentStatus", "ResourceName": "DeploymentJob", "Description": "Gets the status of an existing deployment job.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "342", + "$id": "321", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "343", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -3122,11 +3006,11 @@ "Kind": "Client" }, { - "$id": "344", + "$id": "323", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "345", + "$id": "324", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3142,11 +3026,11 @@ "Kind": "Method" }, { - "$id": "346", + "$id": "325", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "347", + "$id": "326", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3162,11 +3046,11 @@ "Kind": "Method" }, { - "$id": "348", + "$id": "327", "Name": "jobId", "NameInRequest": "jobId", "Type": { - "$id": "349", + "$id": "328", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3182,11 +3066,11 @@ "Kind": "Method" }, { - "$id": "350", + "$id": "329", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "351", + "$id": "330", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3201,9 +3085,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "352", + "$id": "331", "Type": { - "$ref": "351" + "$ref": "330" }, "Value": "application/json" } @@ -3211,12 +3095,12 @@ ], "Responses": [ { - "$id": "353", + "$id": "332", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "87" + "$ref": "84" }, "BodyMediaType": "Json", "Headers": [], @@ -3235,28 +3119,28 @@ "GenerateConvenienceMethod": true }, { - "$id": "354", + "$id": "333", "Name": "getSwapDeploymentsStatus", "ResourceName": "SwapDeploymentsJob", "Description": "Gets the status of an existing swap deployment job.", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "355", + "$id": "334", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "356", + "$id": "335", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -3268,11 +3152,11 @@ "Kind": "Client" }, { - "$id": "357", + "$id": "336", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "358", + "$id": "337", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3288,11 +3172,11 @@ "Kind": "Method" }, { - "$id": "359", + "$id": "338", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "360", + "$id": "339", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3308,11 +3192,11 @@ "Kind": "Method" }, { - "$id": "361", + "$id": "340", "Name": "jobId", "NameInRequest": "jobId", "Type": { - "$id": "362", + "$id": "341", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3328,11 +3212,11 @@ "Kind": "Method" }, { - "$id": "363", + "$id": "342", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "364", + "$id": "343", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3347,9 +3231,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "365", + "$id": "344", "Type": { - "$ref": "364" + "$ref": "343" }, "Value": "application/json" } @@ -3357,12 +3241,12 @@ ], "Responses": [ { - "$id": "366", + "$id": "345", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "107" + "$ref": "104" }, "BodyMediaType": "Json", "Headers": [], @@ -3382,30 +3266,30 @@ } ], "Protocol": { - "$id": "367" + "$id": "346" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "368", + "$id": "347", "Name": "Global", "Description": "", "Operations": [ { - "$id": "369", + "$id": "348", "Name": "getSupportedLanguages", "ResourceName": "Global", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "370", + "$id": "349", "Name": "top", "NameInRequest": "top", "Type": { - "$id": "371", + "$id": "350", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3421,11 +3305,11 @@ "Kind": "Method" }, { - "$id": "372", + "$id": "351", "Name": "skip", "NameInRequest": "skip", "Type": { - "$id": "373", + "$id": "352", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3441,11 +3325,11 @@ "Kind": "Method" }, { - "$id": "374", + "$id": "353", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Type": { - "$id": "375", + "$id": "354", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3461,19 +3345,19 @@ "Kind": "Method" }, { - "$id": "376", + "$id": "355", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "377", + "$id": "356", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -3485,11 +3369,11 @@ "Kind": "Client" }, { - "$id": "378", + "$id": "357", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "379", + "$id": "358", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3504,9 +3388,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "380", + "$id": "359", "Type": { - "$ref": "379" + "$ref": "358" }, "Value": "application/json" } @@ -3514,12 +3398,12 @@ ], "Responses": [ { - "$id": "381", + "$id": "360", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "122" + "$ref": "119" }, "BodyMediaType": "Json", "Headers": [], @@ -3535,7 +3419,7 @@ "Path": "/authoring/analyze-text/projects/global/languages", "BufferResponse": true, "Paging": { - "$id": "382", + "$id": "361", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -3543,19 +3427,19 @@ "GenerateConvenienceMethod": false }, { - "$id": "383", + "$id": "362", "Name": "listTrainingConfigVersions", "ResourceName": "Global", "Parameters": [ { - "$ref": "164" + "$ref": "143" }, { - "$id": "384", + "$id": "363", "Name": "top", "NameInRequest": "top", "Type": { - "$id": "385", + "$id": "364", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3571,11 +3455,11 @@ "Kind": "Method" }, { - "$id": "386", + "$id": "365", "Name": "skip", "NameInRequest": "skip", "Type": { - "$id": "387", + "$id": "366", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3591,11 +3475,11 @@ "Kind": "Method" }, { - "$id": "388", + "$id": "367", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Type": { - "$id": "389", + "$id": "368", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3611,19 +3495,19 @@ "Kind": "Method" }, { - "$id": "390", + "$id": "369", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "391", + "$id": "370", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "147" }, "IsRequired": true, "IsApiVersion": true, @@ -3635,11 +3519,11 @@ "Kind": "Client" }, { - "$id": "392", + "$id": "371", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "393", + "$id": "372", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3654,9 +3538,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "394", + "$id": "373", "Type": { - "$ref": "393" + "$ref": "372" }, "Value": "application/json" } @@ -3664,12 +3548,12 @@ ], "Responses": [ { - "$id": "395", + "$id": "374", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "132" + "$ref": "129" }, "BodyMediaType": "Json", "Headers": [], @@ -3685,7 +3569,7 @@ "Path": "/authoring/analyze-text/projects/global/training-config-versions", "BufferResponse": true, "Paging": { - "$id": "396", + "$id": "375", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -3694,7 +3578,7 @@ } ], "Protocol": { - "$id": "397" + "$id": "376" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" diff --git a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Docs/ConfidentLevelsInTspClient.xml b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Docs/ConfidentLevelsInTspClient.xml index f35152411b3..3862eec2449 100644 --- a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Docs/ConfidentLevelsInTspClient.xml +++ b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Docs/ConfidentLevelsInTspClient.xml @@ -1171,6 +1171,7 @@ ConfidentLevelsInTspClient client = new ConfidentLevelsInTspClient(endpoint); DerivedModel input = new DerivedModel("") { Age = 1234, + Size = 123.45, }; Response response = await client.UseDerivedModelAsync(input); ]]> @@ -1193,6 +1194,7 @@ ConfidentLevelsInTspClient client = new ConfidentLevelsInTspClient(endpoint); DerivedModel input = new DerivedModel("") { Age = 1234, + Size = 123.45, }; Response response = client.UseDerivedModel(input); ]]> @@ -1274,7 +1276,10 @@ This sample shows how to call UseDerivedModelWithUnionAsync with all parameters. Uri endpoint = new Uri(""); ConfidentLevelsInTspClient client = new ConfidentLevelsInTspClient(endpoint); -DerivedModelWithUnion input = new DerivedModelWithUnion("", BinaryData.FromObjectAsJson("")); +DerivedModelWithUnion input = new DerivedModelWithUnion("", BinaryData.FromObjectAsJson("")) +{ + Size = 123.45, +}; Response response = await client.UseDerivedModelWithUnionAsync(input); ]]> @@ -1293,7 +1298,10 @@ This sample shows how to call UseDerivedModelWithUnion with all parameters. Uri endpoint = new Uri(""); ConfidentLevelsInTspClient client = new ConfidentLevelsInTspClient(endpoint); -DerivedModelWithUnion input = new DerivedModelWithUnion("", BinaryData.FromObjectAsJson("")); +DerivedModelWithUnion input = new DerivedModelWithUnion("", BinaryData.FromObjectAsJson("")) +{ + Size = 123.45, +}; Response response = client.UseDerivedModelWithUnion(input); ]]> diff --git a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Models/BaseModel.cs b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Models/BaseModel.cs index e9bcb2e0f2e..1f81619cc4b 100644 --- a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Models/BaseModel.cs +++ b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/Models/BaseModel.cs @@ -49,7 +49,7 @@ public partial class BaseModel /// Initializes a new instance of . /// The name. /// is null. - internal BaseModel(string name) + public BaseModel(string name) { Argument.AssertNotNull(name, nameof(name)); @@ -75,6 +75,6 @@ internal BaseModel() /// The name. public string Name { get; } /// The size. - public double? Size { get; } + public double? Size { get; set; } } } diff --git a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json index 471c71ea0e4..3111cb3f5fd 100644 --- a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json @@ -79,7 +79,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -104,7 +105,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "14", @@ -118,7 +120,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "16", @@ -132,7 +135,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -177,7 +181,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -202,7 +207,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "27", @@ -219,7 +225,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "29", @@ -253,7 +260,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -278,7 +286,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "37", @@ -310,7 +319,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "42", @@ -321,7 +331,8 @@ "$ref": "24" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "43", @@ -355,14 +366,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -390,7 +403,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "51", @@ -408,7 +422,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -433,7 +448,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "56", @@ -451,7 +467,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -470,14 +487,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { @@ -492,7 +509,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -511,14 +529,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "65", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { @@ -533,7 +551,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -562,7 +581,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "71", @@ -596,7 +616,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -625,7 +646,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -636,7 +658,7 @@ "Namespace": "ConfidentLevelsInTsp", "Description": "The base model", "IsNullable": false, - "Usage": "None", + "Usage": "Input", "Properties": [ { "$id": "80", @@ -650,7 +672,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "82", @@ -664,7 +687,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -692,7 +716,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -740,7 +765,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -769,7 +795,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -798,7 +825,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/TestProjects/ConfidentLevels-TypeSpec/tests/Generated/Samples/Samples_ConfidentLevelsInTspClient.cs b/test/TestProjects/ConfidentLevels-TypeSpec/tests/Generated/Samples/Samples_ConfidentLevelsInTspClient.cs index 875d2073e13..8a8f23442f8 100644 --- a/test/TestProjects/ConfidentLevels-TypeSpec/tests/Generated/Samples/Samples_ConfidentLevelsInTspClient.cs +++ b/test/TestProjects/ConfidentLevels-TypeSpec/tests/Generated/Samples/Samples_ConfidentLevelsInTspClient.cs @@ -1391,6 +1391,7 @@ public void Example_ConfidentLevelsInTsp_UseDerivedModel_AllParameters_Convenien DerivedModel input = new DerivedModel("") { Age = 1234, + Size = 123.45, }; Response response = client.UseDerivedModel(input); } @@ -1405,6 +1406,7 @@ public async Task Example_ConfidentLevelsInTsp_UseDerivedModel_AllParameters_Con DerivedModel input = new DerivedModel("") { Age = 1234, + Size = 123.45, }; Response response = await client.UseDerivedModelAsync(input); } @@ -1508,7 +1510,10 @@ public void Example_ConfidentLevelsInTsp_UseDerivedModelWithUnion_AllParameters_ Uri endpoint = new Uri(""); ConfidentLevelsInTspClient client = new ConfidentLevelsInTspClient(endpoint); - DerivedModelWithUnion input = new DerivedModelWithUnion("", BinaryData.FromObjectAsJson("")); + DerivedModelWithUnion input = new DerivedModelWithUnion("", BinaryData.FromObjectAsJson("")) + { + Size = 123.45, + }; Response response = client.UseDerivedModelWithUnion(input); } @@ -1519,7 +1524,10 @@ public async Task Example_ConfidentLevelsInTsp_UseDerivedModelWithUnion_AllParam Uri endpoint = new Uri(""); ConfidentLevelsInTspClient client = new ConfidentLevelsInTspClient(endpoint); - DerivedModelWithUnion input = new DerivedModelWithUnion("", BinaryData.FromObjectAsJson("")); + DerivedModelWithUnion input = new DerivedModelWithUnion("", BinaryData.FromObjectAsJson("")) + { + Size = 123.45, + }; Response response = await client.UseDerivedModelWithUnionAsync(input); } } diff --git a/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/tspCodeModel.json index d6e6763ab7a..256481b7c55 100644 --- a/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/tspCodeModel.json @@ -26,7 +26,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json index 6628c8e36b9..a26fc6fbc15 100644 --- a/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json @@ -8,6 +8,8 @@ "$id": "2", "Kind": "Enum", "Name": "ExtensibleEnumWithOperator", + "Namespace": "CustomizationsInTsp", + "Description": "Extensible enum to customize operator", "EnumValueType": "String", "AllowedValues": [ { @@ -23,8 +25,6 @@ "Description": "Tuesday." } ], - "Namespace": "CustomizationsInTsp", - "Description": "Extensible enum to customize operator", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -33,6 +33,8 @@ "$id": "5", "Kind": "Enum", "Name": "EnumToRename", + "Namespace": "CustomizationsInTsp", + "Description": "Renamed enum (original name: EnumToRename)", "EnumValueType": "String", "AllowedValues": [ { @@ -51,8 +53,6 @@ "Value": "3" } ], - "Namespace": "CustomizationsInTsp", - "Description": "Renamed enum (original name: EnumToRename)", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -61,6 +61,8 @@ "$id": "9", "Kind": "Enum", "Name": "EnumWithValueToRename", + "Namespace": "CustomizationsInTsp", + "Description": "Enum with renamed value (original name: ValueToRename)", "EnumValueType": "String", "AllowedValues": [ { @@ -79,8 +81,6 @@ "Value": "3" } ], - "Namespace": "CustomizationsInTsp", - "Description": "Enum with renamed value (original name: ValueToRename)", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -89,6 +89,8 @@ "$id": "13", "Kind": "Enum", "Name": "EnumToBeMadeExtensible", + "Namespace": "CustomizationsInTsp", + "Description": "Extensible enum", "EnumValueType": "String", "AllowedValues": [ { @@ -107,8 +109,6 @@ "Value": "3" } ], - "Namespace": "CustomizationsInTsp", - "Description": "Extensible enum", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -117,6 +117,8 @@ "$id": "17", "Kind": "Enum", "Name": "NormalEnum", + "Namespace": "CustomizationsInTsp", + "Description": "A normal enum", "EnumValueType": "String", "AllowedValues": [ { @@ -130,8 +132,6 @@ "Value": "b" } ], - "Namespace": "CustomizationsInTsp", - "Description": "A normal enum", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -156,7 +156,8 @@ "$ref": "2" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "22", @@ -184,12 +185,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "26", @@ -217,7 +220,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "30", @@ -231,12 +235,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "32", @@ -264,12 +270,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "36", @@ -297,7 +305,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "40", @@ -311,7 +320,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "42", @@ -325,7 +335,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "44", @@ -339,7 +350,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "46", @@ -353,7 +365,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "48", @@ -367,7 +380,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "50", @@ -381,7 +395,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "52", @@ -395,7 +410,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "54", @@ -415,7 +431,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "57", @@ -441,7 +458,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "61", @@ -467,7 +485,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "65", @@ -499,7 +518,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "70", @@ -519,7 +539,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "73", @@ -539,7 +560,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "76", @@ -559,7 +581,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "79", @@ -579,7 +602,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "82", @@ -599,7 +623,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "85", @@ -619,7 +644,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "88", @@ -639,7 +665,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "91", @@ -659,12 +686,14 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "94", @@ -675,7 +704,8 @@ "$ref": "5" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "95", @@ -686,7 +716,8 @@ "$ref": "9" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "96", @@ -697,7 +728,8 @@ "$ref": "13" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "97", @@ -725,12 +757,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "101", @@ -741,7 +775,8 @@ "$ref": "17" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "102", @@ -769,7 +804,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "106", @@ -783,7 +819,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "108", @@ -797,12 +834,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, diff --git a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json index 4280311aea9..1f4eb66abe6 100644 --- a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json @@ -8,6 +8,8 @@ "$id": "2", "Kind": "Enum", "Name": "JobStatus", + "Namespace": "lro", + "Description": "The status of the processing job.", "EnumValueType": "String", "AllowedValues": [ { @@ -36,91 +38,14 @@ "Value": "canceled" } ], - "Namespace": "lro", - "Description": "The status of the processing job.", "IsExtensible": true, "IsNullable": false, "Usage": "Output" - }, - { - "$id": "8", - "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "9", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "10", - "Name": "implicit", - "Value": "implicit", - "Description": "implcit flow" - }, - { - "$id": "11", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "12", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "13", - "Kind": "Enum", - "Name": "AuthFlow_tokenUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "14", - "Name": "https://api.example.com/oauth2/token", - "Value": "https://api.example.com/oauth2/token", - "Description": "https://api.example.com/oauth2/token" - } - ], - "Namespace": "lro", - "Description": "The AuthFlow_tokenUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "15", - "Kind": "Enum", - "Name": "AuthFlow_refreshUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "16", - "Name": "https://api.example.com/oauth2/refresh", - "Value": "https://api.example.com/oauth2/refresh", - "Description": "https://api.example.com/oauth2/refresh" - } - ], - "Namespace": "lro", - "Description": "The AuthFlow_refreshUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" } ], "Models": [ { - "$id": "17", + "$id": "8", "Kind": "Model", "Name": "RadiologyInsightsResult", "Namespace": "lro", @@ -129,21 +54,22 @@ "Usage": "Output", "Properties": [ { - "$id": "18", + "$id": "9", "Name": "id", "SerializedName": "id", "Description": "The unique ID of the operation.", "Type": { - "$id": "19", + "$id": "10", "Kind": "Primitive", "Name": "Guid", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "20", + "$id": "11", "Name": "status", "SerializedName": "status", "Description": "The status of the operation", @@ -151,57 +77,61 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "21", + "$id": "12", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The date and time when the processing job was created.", "Type": { - "$id": "22", + "$id": "13", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "23", + "$id": "14", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The date and time when the processing job is set to expire.", "Type": { - "$id": "24", + "$id": "15", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "25", + "$id": "16", "Name": "lastUpdateDateTime", "SerializedName": "lastUpdateDateTime", "Description": "The date and time when the processing job was last updated.", "Type": { - "$id": "26", + "$id": "17", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "27", + "$id": "18", "Name": "error", "SerializedName": "error", "Description": "Error object that describes the error when status is \"Failed\".", "Type": { - "$id": "28", + "$id": "19", "Kind": "Model", "Name": "Error", "Namespace": "Azure.Core.Foundations", @@ -210,71 +140,75 @@ "Usage": "Output", "Properties": [ { - "$id": "29", + "$id": "20", "Name": "code", "SerializedName": "code", "Description": "One of a server-defined set of error codes.", "Type": { - "$id": "30", + "$id": "21", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "31", + "$id": "22", "Name": "message", "SerializedName": "message", "Description": "A human-readable representation of the error.", "Type": { - "$id": "32", + "$id": "23", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "33", + "$id": "24", "Name": "target", "SerializedName": "target", "Description": "The target of the error.", "Type": { - "$id": "34", + "$id": "25", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "35", + "$id": "26", "Name": "details", "SerializedName": "details", "Description": "An array of details about specific errors that led to this reported error.", "Type": { - "$id": "36", + "$id": "27", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "28" + "$ref": "19" }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "37", + "$id": "28", "Name": "innererror", "SerializedName": "innererror", "Description": "An object containing more specific information than the current object about the error.", "Type": { - "$id": "38", + "$id": "29", "Kind": "Model", "Name": "InnerError", "Namespace": "Azure.Core.Foundations", @@ -283,47 +217,51 @@ "Usage": "Output", "Properties": [ { - "$id": "39", + "$id": "30", "Name": "code", "SerializedName": "code", "Description": "One of a server-defined set of error codes.", "Type": { - "$id": "40", + "$id": "31", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "41", + "$id": "32", "Name": "InnerErrorObject", "SerializedName": "innererror", "Description": "Inner error.", "Type": { - "$ref": "38" + "$ref": "29" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "42", + "$id": "33", "Name": "result", "SerializedName": "result", "Description": "The result of the operation.", "Type": { - "$id": "43", + "$id": "34", "Kind": "Model", "Name": "RadiologyInsightsInferenceResult", "Namespace": "lro", @@ -332,37 +270,39 @@ "Usage": "Output", "Properties": [ { - "$id": "44", + "$id": "35", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "45", + "$id": "36", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "28" + "$ref": "19" }, { - "$ref": "38" + "$ref": "29" }, { - "$ref": "43" + "$ref": "34" }, { - "$id": "46", + "$id": "37", "Kind": "Model", "Name": "RadiologyInsightsData", "Namespace": "lro", @@ -371,16 +311,16 @@ "Usage": "Input", "Properties": [ { - "$id": "47", + "$id": "38", "Name": "patients", "SerializedName": "patients", "Description": "The list of patients, including their clinical information and data.", "Type": { - "$id": "48", + "$id": "39", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "49", + "$id": "40", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -388,49 +328,52 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "50", + "$id": "41", "Name": "configuration", "SerializedName": "configuration", "Description": "Configuration affecting the Radiology Insights model's inference.", "Type": { - "$id": "51", + "$id": "42", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "52", + "$id": "43", "Kind": "Model", - "Name": "HealthInsightsOperationStatusneverError", + "Name": "HealthInsightsOperationStatus", "Namespace": "lro", "Description": "Provides status details for long running operations.", "IsNullable": false, "Usage": "Output", "Properties": [ { - "$id": "53", + "$id": "44", "Name": "id", "SerializedName": "id", "Description": "The unique ID of the operation.", "Type": { - "$id": "54", + "$id": "45", "Kind": "Primitive", "Name": "Guid", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "55", + "$id": "46", "Name": "status", "SerializedName": "status", "Description": "The status of the operation", @@ -438,218 +381,98 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "56", + "$id": "47", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The date and time when the processing job was created.", "Type": { - "$id": "57", + "$id": "48", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "58", + "$id": "49", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The date and time when the processing job is set to expire.", "Type": { - "$id": "59", + "$id": "50", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "60", + "$id": "51", "Name": "lastUpdateDateTime", "SerializedName": "lastUpdateDateTime", "Description": "The date and time when the processing job was last updated.", "Type": { - "$id": "61", + "$id": "52", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "62", + "$id": "53", "Name": "error", "SerializedName": "error", "Description": "Error object that describes the error when status is \"Failed\".", "Type": { - "$ref": "28" + "$ref": "19" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] - }, - { - "$id": "63", - "Kind": "Model", - "Name": "AuthFlow", - "Namespace": "lro", - "Description": "The auth flow model", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "64", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$ref": "8" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "65", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "66", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "13" - }, - "Value": "https://api.example.com/oauth2/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "67", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "68", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "15" - }, - "Value": "https://api.example.com/oauth2/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "69", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "70", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "71", - "Kind": "Model", - "Name": "HealthInsightsRetryAfterTrait", - "Namespace": "lro", - "Description": "Health Insights retry after trait", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "72", - "Name": "retryAfter", - "SerializedName": "retryAfter", - "Description": "The retry-after header.", - "Type": { - "$id": "73", - "Kind": "Model", - "Name": "HealthInsightsRetryAfterTraitRetryAfter", - "Namespace": "lro", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "74", - "Name": "response", - "SerializedName": "response", - "Description": "", - "Type": { - "$id": "75", - "Kind": "Model", - "Name": "RetryAfterHeader", - "Namespace": "Azure.Core.Foundations", - "Description": "The retry-after envelope.", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$ref": "73" - }, - { - "$ref": "75" } ], "Clients": [ { - "$id": "76", + "$id": "54", "Name": "lroClient", "Description": "", "Operations": [], "Protocol": { - "$id": "77" + "$id": "55" }, "Creatable": true }, { - "$id": "78", + "$id": "56", "Name": "LegacyLro", "Description": "", "Operations": [ { - "$id": "79", + "$id": "57", "Name": "getJob", "ResourceName": "LegacyLro", "Summary": "Get Radiology Insights job details", "Description": "Gets the status and details of the Radiology Insights job.", "Parameters": [ { - "$id": "80", + "$id": "58", "Name": "lroEndpoint", "NameInRequest": "lroEndpoint", "Type": { - "$id": "81", + "$id": "59", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -665,12 +488,12 @@ "Kind": "Client" }, { - "$id": "82", + "$id": "60", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "83", + "$id": "61", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -686,12 +509,12 @@ "Kind": "Method" }, { - "$id": "84", + "$id": "62", "Name": "id", "NameInRequest": "id", "Description": "A processing job identifier.", "Type": { - "$id": "85", + "$id": "63", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -707,11 +530,11 @@ "Kind": "Method" }, { - "$id": "86", + "$id": "64", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "87", + "$id": "65", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -726,9 +549,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "88", + "$id": "66", "Type": { - "$ref": "87" + "$ref": "65" }, "Value": "application/json" } @@ -736,22 +559,22 @@ ], "Responses": [ { - "$id": "89", + "$id": "67", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "8" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "90", + "$id": "68", "Name": "Retry-After", "NameInResponse": "retryAfter", "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "Type": { - "$id": "91", + "$id": "69", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -773,22 +596,22 @@ "GenerateConvenienceMethod": false }, { - "$id": "92", + "$id": "70", "Name": "createJob", "ResourceName": "LegacyLro", "Summary": "Create Radiology Insights job", "Description": "Creates a Radiology Insights job with the given request body.", "Parameters": [ { - "$ref": "80" + "$ref": "58" }, { - "$id": "93", + "$id": "71", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "94", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -804,12 +627,12 @@ "Kind": "Method" }, { - "$id": "95", + "$id": "73", "Name": "repeatabilityRequestId", "NameInRequest": "Repeatability-Request-ID", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "96", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -825,12 +648,12 @@ "Kind": "Method" }, { - "$id": "97", + "$id": "75", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Description": "Specifies the date and time at which the request was first created.", "Type": { - "$id": "98", + "$id": "76", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -846,12 +669,12 @@ "Kind": "Method" }, { - "$id": "99", + "$id": "77", "Name": "RadiologyInsightsData", "NameInRequest": "RadiologyInsightsData", "Description": "The body of the Radiology Insights request.", "Type": { - "$ref": "46" + "$ref": "37" }, "Location": "Body", "IsRequired": true, @@ -864,11 +687,11 @@ "Kind": "Method" }, { - "$id": "100", + "$id": "78", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "101", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -883,19 +706,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "102", + "$id": "80", "Type": { - "$ref": "101" + "$ref": "79" }, "Value": "application/json" } }, { - "$id": "103", + "$id": "81", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "104", + "$id": "82", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -910,9 +733,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "105", + "$id": "83", "Type": { - "$ref": "104" + "$ref": "82" }, "Value": "application/json" } @@ -920,55 +743,55 @@ ], "Responses": [ { - "$id": "106", + "$id": "84", "StatusCodes": [ 202 ], "BodyType": { - "$ref": "52" + "$ref": "43" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "107", + "$id": "85", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "108", + "$id": "86", "Kind": "Primitive", "Name": "Uri", "IsNullable": false } }, { - "$id": "109", + "$id": "87", "Name": "Retry-After", "NameInResponse": "retryAfter", "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "Type": { - "$id": "110", + "$id": "88", "Kind": "Primitive", "Name": "Int32", "IsNullable": false } }, { - "$id": "111", + "$id": "89", "Name": "Repeatability-Result", "NameInResponse": "repeatabilityResult", "Description": "Indicates whether the repeatable request was accepted or rejected.", "Type": { - "$id": "112", + "$id": "90", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "113", + "$id": "91", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "114", + "$id": "92", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -977,11 +800,11 @@ "IsNullable": false }, { - "$id": "115", + "$id": "93", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "116", + "$id": "94", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1009,15 +832,15 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "117", + "$id": "95", "FinalStateVia": 3, "FinalResponse": { - "$id": "118", + "$id": "96", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "8" }, "BodyMediaType": "Json" }, @@ -1028,20 +851,20 @@ } ], "Protocol": { - "$id": "119" + "$id": "97" }, "Creatable": false, "Parent": "lroClient" } ], "Auth": { - "$id": "120", + "$id": "98", "ApiKey": { - "$id": "121", + "$id": "99", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "122", + "$id": "100", "Scopes": [ "https://api.example.com/.default" ] diff --git a/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json index 0b4208ccb3a..57f74aec193 100644 --- a/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -47,7 +47,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "7", @@ -61,7 +62,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "9", @@ -75,7 +77,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -117,7 +120,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "17", @@ -131,7 +135,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "19", @@ -145,14 +150,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "21", @@ -166,7 +173,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -194,7 +202,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "26", @@ -208,71 +217,41 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "28", - "Kind": "Model", - "Name": "PetId", - "Namespace": "MixApiVersion", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "29", - "Kind": "Model", - "Name": "NotModifiedPet", - "Namespace": "MixApiVersion", - "Description": "Not modified", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "30", - "Name": "body", - "SerializedName": "body", - "Description": "", - "Type": { - "$ref": "4" - }, - "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } ], "Clients": [ { - "$id": "31", + "$id": "28", "Name": "MixApiVersionClient", "Description": "", "Operations": [], "Protocol": { - "$id": "32" + "$id": "29" }, "Creatable": true }, { - "$id": "33", + "$id": "30", "Name": "Pets", "Description": "Manage your pets. You can delete or get the Pet from pet store.", "Operations": [ { - "$id": "34", + "$id": "31", "Name": "delete", "ResourceName": "Pet", "Summary": "delete.", "Description": "Delete a pet.", "Parameters": [ { - "$id": "35", + "$id": "32", "Name": "petStoreUrl", "NameInRequest": "petStoreUrl", "Type": { - "$id": "36", + "$id": "33", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -288,21 +267,21 @@ "Kind": "Client" }, { - "$id": "37", + "$id": "34", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "38", + "$id": "35", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "39", + "$id": "36", "Type": { - "$id": "40", + "$id": "37", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -319,12 +298,12 @@ "Kind": "Client" }, { - "$id": "41", + "$id": "38", "Name": "name", "NameInRequest": "name", "Description": "pet name", "Type": { - "$id": "42", + "$id": "39", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -340,11 +319,11 @@ "Kind": "Method" }, { - "$id": "43", + "$id": "40", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "44", + "$id": "41", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -359,9 +338,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "45", + "$id": "42", "Type": { - "$ref": "44" + "$ref": "41" }, "Value": "application/json" } @@ -369,7 +348,7 @@ ], "Responses": [ { - "$id": "46", + "$id": "43", "StatusCodes": [ 204 ], @@ -387,21 +366,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "47", + "$id": "44", "Name": "read", "ResourceName": "Pets", "Description": "Returns a pet. Supports eTags.", "Parameters": [ { - "$ref": "35" + "$ref": "32" }, { - "$id": "48", + "$id": "45", "Name": "petId", "NameInRequest": "petId", "Description": "The id of pet.", "Type": { - "$id": "49", + "$id": "46", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -417,11 +396,11 @@ "Kind": "Method" }, { - "$id": "50", + "$id": "47", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "51", + "$id": "48", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -436,9 +415,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "52", + "$id": "49", "Type": { - "$ref": "51" + "$ref": "48" }, "Value": "application/json" } @@ -446,7 +425,7 @@ ], "Responses": [ { - "$id": "53", + "$id": "50", "StatusCodes": [ 200 ], @@ -461,7 +440,7 @@ ] }, { - "$id": "54", + "$id": "51", "StatusCodes": [ 304 ], @@ -485,23 +464,23 @@ "GenerateConvenienceMethod": false }, { - "$id": "55", + "$id": "52", "Name": "create", "ResourceName": "Pets", "Parameters": [ { - "$ref": "35" + "$ref": "32" }, { - "$id": "56", + "$id": "53", "Name": "apiVersion", "NameInRequest": "apiVersion", "Type": { - "$id": "57", + "$id": "54", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "58", + "$id": "55", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -511,9 +490,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "59", + "$id": "56", "Type": { - "$ref": "57" + "$ref": "54" }, "Value": "2022-07-09" }, @@ -527,7 +506,7 @@ "Kind": "Constant" }, { - "$id": "60", + "$id": "57", "Name": "pet", "NameInRequest": "pet", "Type": { @@ -544,11 +523,11 @@ "Kind": "Method" }, { - "$id": "61", + "$id": "58", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "62", + "$id": "59", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -563,19 +542,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "63", + "$id": "60", "Type": { - "$ref": "62" + "$ref": "59" }, "Value": "application/json" } }, { - "$id": "64", + "$id": "61", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "65", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -590,9 +569,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "66", + "$id": "63", "Type": { - "$ref": "65" + "$ref": "62" }, "Value": "application/json" } @@ -600,7 +579,7 @@ ], "Responses": [ { - "$id": "67", + "$id": "64", "StatusCodes": [ 200 ], @@ -628,40 +607,40 @@ } ], "Protocol": { - "$id": "68" + "$id": "65" }, "Creatable": false, "Parent": "MixApiVersionClient" }, { - "$id": "69", + "$id": "66", "Name": "ListPetToysResponse", "Description": "", "Operations": [ { - "$id": "70", + "$id": "67", "Name": "listPet", "ResourceName": "Toy", "Summary": "Gets ledger entries from a collection corresponding to a range.", "Description": "A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned.", "Parameters": [ { - "$ref": "35" + "$ref": "32" }, { - "$id": "71", + "$id": "68", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "72", + "$id": "69", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "39" + "$ref": "36" }, "IsRequired": true, "IsApiVersion": true, @@ -673,11 +652,11 @@ "Kind": "Client" }, { - "$id": "73", + "$id": "70", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "74", + "$id": "71", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -692,9 +671,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "75", + "$id": "72", "Type": { - "$ref": "74" + "$ref": "71" }, "Value": "application/json" } @@ -702,7 +681,7 @@ ], "Responses": [ { - "$id": "76", + "$id": "73", "StatusCodes": [ 200 ], @@ -723,7 +702,7 @@ "Path": "/pets/toys/Toy", "BufferResponse": true, "Paging": { - "$id": "77", + "$id": "74", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -732,7 +711,7 @@ } ], "Protocol": { - "$id": "78" + "$id": "75" }, "Creatable": false, "Parent": "MixApiVersionClient" From 74b95c921c6fab0304f16a2d9f228cff1423f812 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 31 Jan 2024 14:42:41 +0800 Subject: [PATCH 02/60] add intrinsic type support --- .../Emitter.Csharp/src/lib/model.ts | 8 +- .../Emitter.Csharp/src/type/converter.ts | 35 +- .../src/type/inputPrimitiveTypeKind.ts | 3 +- .../src/Generated/tspCodeModel.json | 878 ++++++++---------- 4 files changed, 420 insertions(+), 504 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index 49856226874..c2a0ebc6123 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -95,7 +95,7 @@ export function mapTypeSpecTypeToCSharpInputTypeKind( const kind = typespecType.kind; switch (kind) { case "Model": - return getCSharpInputTypeKindByIntrinsicModelName( + return getCSharpInputTypeKindByPrimitiveModelName( typespecType.name, format, encode @@ -117,11 +117,11 @@ export function mapTypeSpecTypeToCSharpInputTypeKind( if (format === "uri") return InputPrimitiveTypeKind.Uri; return InputPrimitiveTypeKind.String; default: - return InputPrimitiveTypeKind.UnKnownKind; + throw new Error(`Unsupported primitive kind ${kind}`); } } -export function getCSharpInputTypeKindByIntrinsicModelName( +export function getCSharpInputTypeKindByPrimitiveModelName( name: string, format?: string, encode?: EncodeData @@ -331,7 +331,7 @@ export function getInputType( const sdkType = getClientType(context, type); return { Kind: InputTypeKind.Primitive, - Name: getCSharpInputTypeKindByIntrinsicModelName( + Name: getCSharpInputTypeKindByPrimitiveModelName( sdkType.kind, formattedType.format, formattedType.encode diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 76b25f7ac19..47791b2844c 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -28,6 +28,7 @@ import { import { InputDictionaryType, InputEnumType, + InputIntrinsicType, InputListType, InputLiteralType, InputModelType, @@ -39,13 +40,14 @@ import { InputModelProperty } from "./inputModelProperty.js"; import { Visibility } from "@typespec/http"; import { InputEnumTypeValue } from "./inputEnumTypeValue.js"; import { - getCSharpInputTypeKindByIntrinsicModelName, + getCSharpInputTypeKindByPrimitiveModelName, mapTypeSpecTypeToCSharpInputTypeKind } from "../lib/model.js"; import { InputTypeKind } from "./inputTypeKind.js"; import { getFullNamespaceString } from "../lib/utils.js"; import { InputPrimitiveTypeKind } from "./inputPrimitiveTypeKind.js"; import { LiteralTypeContext } from "./literalTypeContext.js"; +import { InputIntrinsicTypeKind } from "./inputIntrinsicTypeKind.js"; export function fromSdkType( sdkType: SdkType, @@ -70,6 +72,7 @@ export function fromSdkType( if (sdkType.__raw?.kind === "Scalar") return fromScalarType(sdkType); // this happens for discriminator type, normally all other primitive types should be handled in scalar above // TODO: can we improve the type in TCGC around discriminator + if (sdkType.__raw?.kind === "Intrinsic") return fromIntrinsicType(sdkType); if (isSdkBuiltInType(sdkType.kind)) return fromSdkBuiltInType(sdkType as SdkBuiltInType); return {} as InputType; @@ -209,7 +212,7 @@ export function fromSdkBuiltInType(builtInType: SdkBuiltInType): InputType { export function fromScalarType(scalarType: SdkType): InputPrimitiveType { return { Kind: InputTypeKind.Primitive, - Name: getCSharpInputTypeKindByIntrinsicModelName( + Name: getCSharpInputTypeKindByPrimitiveModelName( scalarType.kind, scalarType.kind, undefined // To-DO: encode not compatible @@ -218,6 +221,15 @@ export function fromScalarType(scalarType: SdkType): InputPrimitiveType { }; } +function fromIntrinsicType(scalarType: SdkType): InputIntrinsicType { + const name = (scalarType.__raw! as IntrinsicType).name; + return { + Kind: InputTypeKind.Intrinsic, + Name: getCSharpInputTypeKindByIntrinsic(scalarType.__raw! as IntrinsicType), + IsNullable: false + }; +} + export function fromUnionType( union: SdkUnionType, program: Program, @@ -423,3 +435,22 @@ function isSdkBuiltInType(kind: string): boolean { "etag" ].includes(kind); } + +function getCSharpInputTypeKindByIntrinsic(type: IntrinsicType): InputIntrinsicTypeKind { + switch (type.name) + { + case "ErrorType": + return InputIntrinsicTypeKind.Error; + case "void": + return InputIntrinsicTypeKind.Void; + case "never": + return InputIntrinsicTypeKind.Never; + case "unknown": + return InputIntrinsicTypeKind.Unknown; + case "null": + return InputIntrinsicTypeKind.Null; + default: + throw new Error(`Unsupported intrinsic type name '${type.name}'`); + } +} + diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts index 4e3a15f7cff..da702a7fc36 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts @@ -39,6 +39,5 @@ export enum InputPrimitiveTypeKind { Uri = "Uri", Enum = "Enum", SByte = "SByte", //int8 - Byte = "Byte", //uint8 - UnKnownKind = "UnknownKind" + Byte = "Byte" //uint8 } diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json index b1c06a24d12..46445a4db46 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json @@ -122,6 +122,8 @@ "$id": "14", "Kind": "Enum", "Name": "StringFixedEnum", + "Namespace": "NewProjectTypeSpec", + "Description": "Simple enum", "EnumValueType": "String", "AllowedValues": [ { @@ -140,8 +142,6 @@ "Value": "4" } ], - "Namespace": "NewProjectTypeSpec", - "Description": "Simple enum", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -150,6 +150,8 @@ "$id": "18", "Kind": "Enum", "Name": "StringExtensibleEnum", + "Namespace": "NewProjectTypeSpec", + "Description": "Extensible enum", "EnumValueType": "String", "AllowedValues": [ { @@ -168,8 +170,6 @@ "Value": "4" } ], - "Namespace": "NewProjectTypeSpec", - "Description": "Extensible enum", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -178,7 +178,9 @@ "$id": "22", "Kind": "Enum", "Name": "IntExtensibleEnum", - "EnumValueType": "Float32", + "Namespace": "NewProjectTypeSpec", + "Description": "Int based extensible enum", + "EnumValueType": "String", "AllowedValues": [ { "$id": "23", @@ -196,8 +198,6 @@ "Value": 4 } ], - "Namespace": "NewProjectTypeSpec", - "Description": "Int based extensible enum", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -206,7 +206,9 @@ "$id": "26", "Kind": "Enum", "Name": "FloatExtensibleEnum", - "EnumValueType": "Float32", + "Namespace": "NewProjectTypeSpec", + "Description": "Float based extensible enum", + "EnumValueType": "String", "AllowedValues": [ { "$id": "27", @@ -224,8 +226,6 @@ "Value": 4 } ], - "Namespace": "NewProjectTypeSpec", - "Description": "Float based extensible enum", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -234,6 +234,8 @@ "$id": "30", "Kind": "Enum", "Name": "FloatFixedEnum", + "Namespace": "NewProjectTypeSpec", + "Description": "float fixed enum", "EnumValueType": "Float32", "AllowedValues": [ { @@ -252,8 +254,6 @@ "Value": 4.4 } ], - "Namespace": "NewProjectTypeSpec", - "Description": "float fixed enum", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -262,7 +262,9 @@ "$id": "34", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "Float32", + "Namespace": "NewProjectTypeSpec", + "Description": "int fixed enum", + "EnumValueType": "String", "AllowedValues": [ { "$id": "35", @@ -280,8 +282,6 @@ "Value": 4 } ], - "Namespace": "NewProjectTypeSpec", - "Description": "int fixed enum", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -290,6 +290,7 @@ "$id": "38", "Kind": "Enum", "Name": "DaysOfWeekExtensibleEnum", + "Namespace": "NewProjectTypeSpec", "EnumValueType": "String", "AllowedValues": [ { @@ -328,83 +329,6 @@ "Value": "Sunday" } ], - "Namespace": "NewProjectTypeSpec", - "Description": "", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "46", - "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "47", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "48", - "Name": "implicit", - "Value": "implicit", - "Description": "implcit flow" - }, - { - "$id": "49", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "50", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "51", - "Kind": "Enum", - "Name": "AuthFlow_tokenUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "52", - "Name": "https://api.example.com/oauth2/token", - "Value": "https://api.example.com/oauth2/token", - "Description": "https://api.example.com/oauth2/token" - } - ], - "Namespace": "NewProjectTypeSpec", - "Description": "The AuthFlow_tokenUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "53", - "Kind": "Enum", - "Name": "AuthFlow_refreshUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "54", - "Name": "https://api.example.com/oauth2/refresh", - "Value": "https://api.example.com/oauth2/refresh", - "Description": "https://api.example.com/oauth2/refresh" - } - ], - "Namespace": "NewProjectTypeSpec", - "Description": "The AuthFlow_refreshUrl", "IsExtensible": true, "IsNullable": false, "Usage": "None" @@ -412,7 +336,7 @@ ], "Models": [ { - "$id": "55", + "$id": "46", "Kind": "Model", "Name": "Thing", "Namespace": "NewProjectTypeSpec", @@ -421,41 +345,42 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "56", + "$id": "47", "Name": "name", "SerializedName": "name", "Description": "name of the Thing", "Type": { - "$id": "57", + "$id": "48", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "58", + "$id": "49", "Name": "requiredUnion", "SerializedName": "requiredUnion", "Description": "required Union", "Type": { - "$id": "59", + "$id": "50", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "60", + "$id": "51", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "61", + "$id": "52", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "62", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -463,7 +388,7 @@ "IsNullable": false }, { - "$id": "63", + "$id": "54", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -472,15 +397,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "64", + "$id": "55", "Name": "requiredLiteralString", "SerializedName": "requiredLiteralString", "Description": "required literal string", "Type": { - "$id": "65", + "$id": "56", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -490,15 +416,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "66", + "$id": "57", "Name": "requiredLiteralInt", "SerializedName": "requiredLiteralInt", "Description": "required literal int", "Type": { - "$id": "67", + "$id": "58", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -508,15 +435,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "68", + "$id": "59", "Name": "requiredLiteralFloat", "SerializedName": "requiredLiteralFloat", "Description": "required literal float", "Type": { - "$id": "69", + "$id": "60", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -526,19 +454,20 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "70", + "$id": "61", "Name": "requiredLiteralBool", "SerializedName": "requiredLiteralBool", "Description": "required literal bool", "Type": { - "$id": "71", + "$id": "62", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "72", + "$id": "63", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -547,15 +476,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "73", + "$id": "64", "Name": "optionalLiteralString", "SerializedName": "optionalLiteralString", "Description": "optional literal string", "Type": { - "$id": "74", + "$id": "65", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -565,15 +495,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "75", + "$id": "66", "Name": "optionalLiteralInt", "SerializedName": "optionalLiteralInt", "Description": "optional literal int", "Type": { - "$id": "76", + "$id": "67", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -583,15 +514,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "77", + "$id": "68", "Name": "optionalLiteralFloat", "SerializedName": "optionalLiteralFloat", "Description": "optional literal float", "Type": { - "$id": "78", + "$id": "69", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -601,19 +533,20 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "79", + "$id": "70", "Name": "optionalLiteralBool", "SerializedName": "optionalLiteralBool", "Description": "optional literal bool", "Type": { - "$id": "80", + "$id": "71", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "81", + "$id": "72", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -622,26 +555,28 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "82", + "$id": "73", "Name": "requiredBadDescription", "SerializedName": "requiredBadDescription", "Description": "description with xml <|endoftext|>", "Type": { - "$id": "83", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "84", + "$id": "75", "Kind": "Model", "Name": "Friend", "Namespace": "NewProjectTypeSpec", @@ -650,23 +585,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "85", + "$id": "76", "Name": "name", "SerializedName": "name", "Description": "name of the NotFriend", "Type": { - "$id": "86", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "87", + "$id": "78", "Kind": "Model", "Name": "ModelWithFormat", "Namespace": "NewProjectTypeSpec", @@ -674,37 +610,39 @@ "Usage": "Input", "Properties": [ { - "$id": "88", + "$id": "79", "Name": "sourceUrl", "SerializedName": "sourceUrl", "Description": "url format", "Type": { - "$id": "89", + "$id": "80", "Kind": "Primitive", "Name": "Uri", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "90", + "$id": "81", "Name": "guid", "SerializedName": "guid", "Description": "uuid format", "Type": { - "$id": "91", + "$id": "82", "Kind": "Primitive", "Name": "Guid", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "92", + "$id": "83", "Kind": "Model", "Name": "RoundTripModel", "Namespace": "NewProjectTypeSpec", @@ -713,40 +651,42 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "93", + "$id": "84", "Name": "requiredString", "SerializedName": "requiredString", "Description": "Required string, illustrating a reference type property.", "Type": { - "$id": "94", + "$id": "85", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "95", + "$id": "86", "Name": "requiredInt", "SerializedName": "requiredInt", "Description": "Required int, illustrating a value type property.", "Type": { - "$id": "96", + "$id": "87", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "97", + "$id": "88", "Name": "requiredCollection", "SerializedName": "requiredCollection", "Description": "Required collection of enums", "Type": { - "$id": "98", + "$id": "89", "Kind": "Array", "Name": "Array", "ElementType": { @@ -755,19 +695,20 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "99", + "$id": "90", "Name": "requiredDictionary", "SerializedName": "requiredDictionary", "Description": "Required dictionary of enums", "Type": { - "$id": "100", + "$id": "91", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "101", + "$id": "92", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -778,21 +719,23 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "102", + "$id": "93", "Name": "requiredModel", "SerializedName": "requiredModel", "Description": "Required model", "Type": { - "$ref": "55" + "$ref": "46" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "103", + "$id": "94", "Name": "intExtensibleEnum", "SerializedName": "intExtensibleEnum", "Description": "this is an int based extensible enum", @@ -800,15 +743,16 @@ "$ref": "22" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "104", + "$id": "95", "Name": "intExtensibleEnumCollection", "SerializedName": "intExtensibleEnumCollection", "Description": "this is a collection of int based extensible enum", "Type": { - "$id": "105", + "$id": "96", "Kind": "Array", "Name": "Array", "ElementType": { @@ -817,10 +761,11 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "106", + "$id": "97", "Name": "floatExtensibleEnum", "SerializedName": "floatExtensibleEnum", "Description": "this is a float based extensible enum", @@ -828,15 +773,16 @@ "$ref": "26" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "107", + "$id": "98", "Name": "floatExtensibleEnumCollection", "SerializedName": "floatExtensibleEnumCollection", "Description": "this is a collection of float based extensible enum", "Type": { - "$id": "108", + "$id": "99", "Kind": "Array", "Name": "Array", "ElementType": { @@ -845,10 +791,11 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "109", + "$id": "100", "Name": "floatFixedEnum", "SerializedName": "floatFixedEnum", "Description": "this is a float based fixed enum", @@ -856,15 +803,16 @@ "$ref": "30" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "110", + "$id": "101", "Name": "floatFixedEnumCollection", "SerializedName": "floatFixedEnumCollection", "Description": "this is a collection of float based fixed enum", "Type": { - "$id": "111", + "$id": "102", "Kind": "Array", "Name": "Array", "ElementType": { @@ -873,10 +821,11 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "112", + "$id": "103", "Name": "intFixedEnum", "SerializedName": "intFixedEnum", "Description": "this is a int based fixed enum", @@ -884,15 +833,16 @@ "$ref": "34" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "113", + "$id": "104", "Name": "intFixedEnumCollection", "SerializedName": "intFixedEnumCollection", "Description": "this is a collection of int based fixed enum", "Type": { - "$id": "114", + "$id": "105", "Kind": "Array", "Name": "Array", "ElementType": { @@ -901,10 +851,11 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "115", + "$id": "106", "Name": "stringFixedEnum", "SerializedName": "stringFixedEnum", "Description": "this is a string based fixed enum", @@ -912,53 +863,56 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "116", + "$id": "107", "Name": "requiredUnknown", "SerializedName": "requiredUnknown", "Description": "required unknown", "Type": { - "$id": "117", + "$id": "108", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "118", + "$id": "109", "Name": "optionalUnknown", "SerializedName": "optionalUnknown", "Description": "optional unknown", "Type": { - "$id": "119", + "$id": "110", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "120", + "$id": "111", "Name": "requiredRecordUnknown", "SerializedName": "requiredRecordUnknown", "Description": "required record of unknown", "Type": { - "$id": "121", + "$id": "112", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "122", + "$id": "113", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "123", + "$id": "114", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -966,25 +920,26 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "124", + "$id": "115", "Name": "optionalRecordUnknown", "SerializedName": "optionalRecordUnknown", "Description": "optional record of unknown", "Type": { - "$id": "125", + "$id": "116", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "126", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "127", + "$id": "118", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -992,25 +947,26 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "128", + "$id": "119", "Name": "readOnlyRequiredRecordUnknown", "SerializedName": "readOnlyRequiredRecordUnknown", "Description": "required readonly record of unknown", "Type": { - "$id": "129", + "$id": "120", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "130", + "$id": "121", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "131", + "$id": "122", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1018,25 +974,26 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "132", + "$id": "123", "Name": "readOnlyOptionalRecordUnknown", "SerializedName": "readOnlyOptionalRecordUnknown", "Description": "optional readonly record of unknown", "Type": { - "$id": "133", + "$id": "124", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "134", + "$id": "125", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "135", + "$id": "126", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1044,101 +1001,30 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true - } - ] - }, - { - "$id": "136", - "Kind": "Model", - "Name": "AuthFlow", - "Namespace": "NewProjectTypeSpec", - "Description": "The auth flow model", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "137", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$ref": "46" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "138", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "139", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "51" - }, - "Value": "https://api.example.com/oauth2/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "140", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "141", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "53" - }, - "Value": "https://api.example.com/oauth2/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "142", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "143", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": true, + "IsDiscriminator": false } ] } ], "Clients": [ { - "$id": "144", + "$id": "127", "Name": "NewProjectTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "145", + "$id": "128", "Name": "topAction", "ResourceName": "NewProjectTypeSpec", "Description": "top level method", "Parameters": [ { - "$id": "146", + "$id": "129", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "147", + "$id": "130", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1154,11 +1040,11 @@ "Kind": "Client" }, { - "$id": "148", + "$id": "131", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "149", + "$id": "132", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1174,11 +1060,11 @@ "Kind": "Method" }, { - "$id": "150", + "$id": "133", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "151", + "$id": "134", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1193,9 +1079,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "152", + "$id": "135", "Type": { - "$ref": "151" + "$ref": "134" }, "Value": "application/json" } @@ -1203,12 +1089,12 @@ ], "Responses": [ { - "$id": "153", + "$id": "136", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1227,20 +1113,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "154", + "$id": "137", "Name": "topAction2", "ResourceName": "NewProjectTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "155", + "$id": "138", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "156", + "$id": "139", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1255,9 +1141,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "157", + "$id": "140", "Type": { - "$ref": "156" + "$ref": "139" }, "Value": "application/json" } @@ -1265,12 +1151,12 @@ ], "Responses": [ { - "$id": "158", + "$id": "141", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1289,20 +1175,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "159", + "$id": "142", "Name": "patchAction", "ResourceName": "NewProjectTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "160", + "$id": "143", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -1315,11 +1201,11 @@ "Kind": "Method" }, { - "$id": "161", + "$id": "144", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "162", + "$id": "145", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1334,19 +1220,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "163", + "$id": "146", "Type": { - "$ref": "162" + "$ref": "145" }, "Value": "application/json" } }, { - "$id": "164", + "$id": "147", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "165", + "$id": "148", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1361,9 +1247,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "166", + "$id": "149", "Type": { - "$ref": "165" + "$ref": "148" }, "Value": "application/json" } @@ -1371,12 +1257,12 @@ ], "Responses": [ { - "$id": "167", + "$id": "150", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1398,21 +1284,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "168", + "$id": "151", "Name": "anonymousBody", "ResourceName": "NewProjectTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "169", + "$id": "152", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -1425,11 +1311,11 @@ "Kind": "Method" }, { - "$id": "170", + "$id": "153", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "171", + "$id": "154", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1444,19 +1330,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "172", + "$id": "155", "Type": { - "$ref": "171" + "$ref": "154" }, "Value": "application/json" } }, { - "$id": "173", + "$id": "156", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "174", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1471,9 +1357,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "158", "Type": { - "$ref": "174" + "$ref": "157" }, "Value": "application/json" } @@ -1481,12 +1367,12 @@ ], "Responses": [ { - "$id": "176", + "$id": "159", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1508,21 +1394,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "177", + "$id": "160", "Name": "friendlyModel", "ResourceName": "NewProjectTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "178", + "$id": "161", "Name": "Friend", "NameInRequest": "NotFriend", "Description": "this is not a friendly model but with a friendly name", "Type": { - "$ref": "84" + "$ref": "75" }, "Location": "Body", "IsRequired": true, @@ -1535,11 +1421,11 @@ "Kind": "Method" }, { - "$id": "179", + "$id": "162", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "180", + "$id": "163", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1554,19 +1440,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "181", + "$id": "164", "Type": { - "$ref": "180" + "$ref": "163" }, "Value": "application/json" } }, { - "$id": "182", + "$id": "165", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "183", + "$id": "166", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1581,9 +1467,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "184", + "$id": "167", "Type": { - "$ref": "183" + "$ref": "166" }, "Value": "application/json" } @@ -1591,12 +1477,12 @@ ], "Responses": [ { - "$id": "185", + "$id": "168", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "84" + "$ref": "75" }, "BodyMediaType": "Json", "Headers": [], @@ -1618,19 +1504,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "186", + "$id": "169", "Name": "addTimeHeader", "ResourceName": "NewProjectTypeSpec", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "187", + "$id": "170", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "188", + "$id": "171", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1646,11 +1532,11 @@ "Kind": "Method" }, { - "$id": "189", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "190", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1665,9 +1551,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "191", + "$id": "174", "Type": { - "$ref": "190" + "$ref": "173" }, "Value": "application/json" } @@ -1675,7 +1561,7 @@ ], "Responses": [ { - "$id": "192", + "$id": "175", "StatusCodes": [ 204 ], @@ -1693,20 +1579,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "193", + "$id": "176", "Name": "stringFormat", "ResourceName": "NewProjectTypeSpec", "Description": "paramete has string format.", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "194", + "$id": "177", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "195", + "$id": "178", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -1722,11 +1608,11 @@ "Kind": "Method" }, { - "$id": "196", + "$id": "179", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "87" + "$ref": "78" }, "Location": "Body", "IsRequired": true, @@ -1739,11 +1625,11 @@ "Kind": "Method" }, { - "$id": "197", + "$id": "180", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "198", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1758,19 +1644,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "199", + "$id": "182", "Type": { - "$ref": "198" + "$ref": "181" }, "Value": "application/json" } }, { - "$id": "200", + "$id": "183", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "201", + "$id": "184", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1785,9 +1671,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "202", + "$id": "185", "Type": { - "$ref": "201" + "$ref": "184" }, "Value": "application/json" } @@ -1795,7 +1681,7 @@ ], "Responses": [ { - "$id": "203", + "$id": "186", "StatusCodes": [ 204 ], @@ -1817,41 +1703,41 @@ } ], "Protocol": { - "$id": "204" + "$id": "187" }, "Creatable": true }, { - "$id": "205", + "$id": "188", "Name": "Hello", "Description": "", "Operations": [], "Protocol": { - "$id": "206" + "$id": "189" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" }, { - "$id": "207", + "$id": "190", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "208", + "$id": "191", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "209", + "$id": "192", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "210", + "$id": "193", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1867,11 +1753,11 @@ "Kind": "Method" }, { - "$id": "211", + "$id": "194", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "212", + "$id": "195", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1887,11 +1773,11 @@ "Kind": "Method" }, { - "$id": "213", + "$id": "196", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "214", + "$id": "197", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1907,11 +1793,11 @@ "Kind": "Method" }, { - "$id": "215", + "$id": "198", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "216", + "$id": "199", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1926,9 +1812,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "217", + "$id": "200", "Type": { - "$ref": "216" + "$ref": "199" }, "Value": "application/json" } @@ -1936,12 +1822,12 @@ ], "Responses": [ { - "$id": "218", + "$id": "201", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1961,31 +1847,31 @@ } ], "Protocol": { - "$id": "219" + "$id": "202" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "220", + "$id": "203", "Name": "HelloDemo2", "Description": "", "Operations": [ { - "$id": "221", + "$id": "204", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "222", + "$id": "205", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "223", + "$id": "206", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2001,15 +1887,15 @@ "Kind": "Method" }, { - "$id": "224", + "$id": "207", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "225", + "$id": "208", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "226", + "$id": "209", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2019,9 +1905,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "227", + "$id": "210", "Type": { - "$ref": "225" + "$ref": "208" }, "Value": "text/plain" }, @@ -2035,11 +1921,11 @@ "Kind": "Constant" }, { - "$id": "228", + "$id": "211", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "229", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2055,11 +1941,11 @@ "Kind": "Method" }, { - "$id": "230", + "$id": "213", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "92" + "$ref": "83" }, "Location": "Body", "IsRequired": true, @@ -2072,11 +1958,11 @@ "Kind": "Method" }, { - "$id": "231", + "$id": "214", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "232", + "$id": "215", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2091,9 +1977,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "233", + "$id": "216", "Type": { - "$ref": "232" + "$ref": "215" }, "Value": "application/json" } @@ -2101,12 +1987,12 @@ ], "Responses": [ { - "$id": "234", + "$id": "217", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "92" + "$ref": "83" }, "BodyMediaType": "Json", "Headers": [], @@ -2128,20 +2014,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "235", + "$id": "218", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "236", + "$id": "219", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "237", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2157,11 +2043,11 @@ "Kind": "Method" }, { - "$id": "238", + "$id": "221", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "239", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2177,11 +2063,11 @@ "Kind": "Method" }, { - "$id": "240", + "$id": "223", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "92" + "$ref": "83" }, "Location": "Body", "IsRequired": true, @@ -2194,11 +2080,11 @@ "Kind": "Method" }, { - "$id": "241", + "$id": "224", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "242", + "$id": "225", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2213,19 +2099,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "243", + "$id": "226", "Type": { - "$ref": "242" + "$ref": "225" }, "Value": "application/json" } }, { - "$id": "244", + "$id": "227", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "245", + "$id": "228", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2240,9 +2126,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "246", + "$id": "229", "Type": { - "$ref": "245" + "$ref": "228" }, "Value": "application/json" } @@ -2250,12 +2136,12 @@ ], "Responses": [ { - "$id": "247", + "$id": "230", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "92" + "$ref": "83" }, "BodyMediaType": "Json", "Headers": [], @@ -2277,20 +2163,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "248", + "$id": "231", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "249", + "$id": "232", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2303,11 +2189,11 @@ "Kind": "Method" }, { - "$id": "250", + "$id": "233", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "251", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2322,19 +2208,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "252", + "$id": "235", "Type": { - "$ref": "251" + "$ref": "234" }, "Value": "application/json" } }, { - "$id": "253", + "$id": "236", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "254", + "$id": "237", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2349,9 +2235,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "255", + "$id": "238", "Type": { - "$ref": "254" + "$ref": "237" }, "Value": "application/json" } @@ -2359,12 +2245,12 @@ ], "Responses": [ { - "$id": "256", + "$id": "239", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2386,24 +2272,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "257", + "$id": "240", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "258", + "$id": "241", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "259", + "$id": "242", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "260", + "$id": "243", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2413,9 +2299,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "261", + "$id": "244", "Type": { - "$ref": "259" + "$ref": "242" }, "Value": "test" }, @@ -2429,15 +2315,15 @@ "Kind": "Constant" }, { - "$id": "262", + "$id": "245", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "263", + "$id": "246", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "264", + "$id": "247", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -2447,9 +2333,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "265", + "$id": "248", "Type": { - "$ref": "263" + "$ref": "246" }, "Value": 123 }, @@ -2463,15 +2349,15 @@ "Kind": "Constant" }, { - "$id": "266", + "$id": "249", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "267", + "$id": "250", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "268", + "$id": "251", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2481,9 +2367,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "269", + "$id": "252", "Type": { - "$ref": "267" + "$ref": "250" }, "Value": true }, @@ -2497,11 +2383,11 @@ "Kind": "Constant" }, { - "$id": "270", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "271", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2516,9 +2402,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "272", + "$id": "255", "Type": { - "$ref": "271" + "$ref": "254" }, "Value": "application/json" } @@ -2526,12 +2412,12 @@ ], "Responses": [ { - "$id": "273", + "$id": "256", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2551,31 +2437,31 @@ } ], "Protocol": { - "$id": "274" + "$id": "257" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "275", + "$id": "258", "Name": "EnumTest", "Description": "", "Operations": [ { - "$id": "276", + "$id": "259", "Name": "getUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "277", + "$id": "260", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "278", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2590,9 +2476,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "279", + "$id": "262", "Type": { - "$ref": "278" + "$ref": "261" }, "Value": "application/json" } @@ -2600,7 +2486,7 @@ ], "Responses": [ { - "$id": "280", + "$id": "263", "StatusCodes": [ 200 ], @@ -2625,31 +2511,31 @@ } ], "Protocol": { - "$id": "281" + "$id": "264" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" }, { - "$id": "282", + "$id": "265", "Name": "ProtocolAndConvenient", "Description": "", "Operations": [ { - "$id": "283", + "$id": "266", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "284", + "$id": "267", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2662,11 +2548,11 @@ "Kind": "Method" }, { - "$id": "285", + "$id": "268", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "286", + "$id": "269", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2681,19 +2567,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "287", + "$id": "270", "Type": { - "$ref": "286" + "$ref": "269" }, "Value": "application/json" } }, { - "$id": "288", + "$id": "271", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "289", + "$id": "272", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2708,9 +2594,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "290", + "$id": "273", "Type": { - "$ref": "289" + "$ref": "272" }, "Value": "application/json" } @@ -2718,12 +2604,12 @@ ], "Responses": [ { - "$id": "291", + "$id": "274", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2745,20 +2631,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "292", + "$id": "275", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "293", + "$id": "276", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "294", + "$id": "277", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2773,9 +2659,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "295", + "$id": "278", "Type": { - "$ref": "294" + "$ref": "277" }, "Value": "application/json" } @@ -2783,7 +2669,7 @@ ], "Responses": [ { - "$id": "296", + "$id": "279", "StatusCodes": [ 204 ], @@ -2802,20 +2688,20 @@ } ], "Protocol": { - "$id": "297" + "$id": "280" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" } ], "Auth": { - "$id": "298", + "$id": "281", "ApiKey": { - "$id": "299", + "$id": "282", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "300", + "$id": "283", "Scopes": [ "https://api.example.com/.default" ] From 962d0e447fdae60fb5eea98bf7b88e805a69217a Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 1 Feb 2024 11:44:27 +0800 Subject: [PATCH 03/60] fix model traverse error, use preorder traverse --- .../Emitter.Csharp/src/lib/model.ts | 2 - .../Emitter.Csharp/src/type/converter.ts | 5 +- .../Docs/FirstTestTypeSpecClient.xml | 20 +- .../src/Generated/Docs/HelloDemo2.xml | 8 +- .../FirstTestTypeSpecModelFactory.cs | 26 +- .../Generated/Models/Element.Serialization.cs | 2 +- .../src/Generated/Models/Element.cs | 6 +- .../Models/Extension.Serialization.cs | 2 +- .../src/Generated/Models/Extension.cs | 2 +- ...equiredNullableProperties.Serialization.cs | 36 +- .../ModelWithRequiredNullableProperties.cs | 8 +- .../Models/RoundTripModel.Serialization.cs | 54 +- .../src/Generated/Models/RoundTripModel.cs | 8 +- .../Models/ThereLevelElement.Serialization.cs | 2 +- .../src/Generated/Models/ThereLevelElement.cs | 6 +- .../ThereLevelExtension.Serialization.cs | 2 +- .../Generated/Models/ThereLevelExtension.cs | 2 +- .../src/Generated/tspCodeModel.json | 1530 ++++++++--------- .../Samples_FirstTestTypeSpecClient.cs | 20 +- .../Generated/Samples/Samples_HelloDemo2.cs | 8 +- .../Tests/FirstTestTypeSpecClientTests.cs | 10 +- .../tests/Generated/Tests/HelloDemo2Tests.cs | 4 +- 22 files changed, 808 insertions(+), 955 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index c2a0ebc6123..58a5395a66e 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -576,8 +576,6 @@ export function getInputType( } function getInputModelForModel(m: Model): InputModelType | undefined { - // Resolve properties after model is added to the map to resolve possible circular dependencies - // addModelProperties(model, m.properties, properties); if (context.modelsMap!.has(m)) { return fromSdkModelType( context.modelsMap!.get(m) as SdkModelType, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 47791b2844c..d3041edba02 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -103,13 +103,12 @@ export function fromSdkModelType( )?.propertyName, // TO-DO: SdkModelType lacks of DiscriminatorPropertyName DiscriminatorValue: modelType.discriminatorValue, Usage: fromUsageFlags(modelType.usage), - BaseModel: modelType.baseModel - ? fromSdkModelType(modelType.baseModel, program, models, enums) - : undefined, } as InputModelType; models.set(modelTypeName, inputModelType); + inputModelType.BaseModel = modelType.baseModel ? fromSdkModelType(modelType.baseModel, program, models, enums) : undefined; + // TODO: can we fix the resolving reference issue in csharp? // https://github.com/Azure/autorest.csharp/issues/4136 // if (modelType.discriminatedSubtypes) { diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml index f68006e46ee..ebfb3406902 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml @@ -1446,7 +1446,10 @@ This sample shows how to call RecursiveExtensionAsync with all parameters. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Extension input = new Extension(1234); +Extension input = new Extension(1234) +{ + Extension = { default }, +}; Response response = await client.RecursiveExtensionAsync(input); ]]> @@ -1465,7 +1468,10 @@ This sample shows how to call RecursiveExtension with all parameters. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Extension input = new Extension(1234); +Extension input = new Extension(1234) +{ + Extension = { default }, +}; Response response = client.RecursiveExtension(input); ]]> @@ -1552,7 +1558,10 @@ FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); Extendible input = new Extendible { - Extension = { new ThereLevelExtension(1234) }, + Extension = {new ThereLevelExtension(1234) + { + Extension = {default}, + }}, }; Response response = await client.ThreeLevelRecursiveAsync(input); ]]> @@ -1574,7 +1583,10 @@ FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); Extendible input = new Extendible { - Extension = { new ThereLevelExtension(1234) }, + Extension = {new ThereLevelExtension(1234) + { + Extension = {default}, + }}, }; Response response = client.ThreeLevelRecursive(input); ]]> diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml index fc58774f97d..c61b533f058 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml @@ -8,7 +8,7 @@ This sample shows how to call HelloAgainAsync. Uri endpoint = new Uri(""); HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); -RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary +RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }), BinaryData.FromObjectAsJson(new object()), new Dictionary @@ -22,7 +22,7 @@ This sample shows how to call HelloAgainAsync with all parameters. Uri endpoint = new Uri(""); HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); -RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary +RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }) @@ -62,7 +62,7 @@ This sample shows how to call HelloAgain. Uri endpoint = new Uri(""); HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); -RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary +RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }), BinaryData.FromObjectAsJson(new object()), new Dictionary @@ -76,7 +76,7 @@ This sample shows how to call HelloAgain with all parameters. Uri endpoint = new Uri(""); HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); -RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary +RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }) diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecModelFactory.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecModelFactory.cs index 3b0da14b98c..4c1b50b6637 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecModelFactory.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecModelFactory.cs @@ -37,16 +37,6 @@ public static Thing Thing(string name = null, BinaryData requiredUnion = null, T return new Thing(name, requiredUnion, requiredLiteralString, requiredLiteralInt, requiredLiteralFloat, requiredLiteralBool, optionalLiteralString, optionalLiteralInt, optionalLiteralFloat, optionalLiteralBool, requiredBadDescription, optionalNullableList?.ToList(), requiredNullableList?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// A new instance for mocking. - public static Element Element(IEnumerable extension = null) - { - extension ??= new List(); - - return new Element(extension?.ToList(), serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// /// @@ -58,16 +48,6 @@ public static Extension Extension(IEnumerable extension = null, int l return new Extension(extension?.ToList(), serializedAdditionalRawData: null, level); } - /// Initializes a new instance of . - /// - /// A new instance for mocking. - public static ThereLevelElement ThereLevelElement(IEnumerable extension = null) - { - extension ??= new List(); - - return new ThereLevelElement(extension?.ToList(), serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// /// @@ -102,10 +82,10 @@ public static ThereLevelExtension ThereLevelExtension(IEnumerable optional readonly record of unknown. /// this is a model with required nullable properties. /// A new instance for mocking. - public static RoundTripModel RoundTripModel(string requiredString = null, int requiredInt = default, IEnumerable requiredCollection = null, IDictionary requiredDictionary = null, Thing requiredModel = null, IntExtensibleEnum? intExtensibleEnum = null, IEnumerable intExtensibleEnumCollection = null, FloatExtensibleEnum? floatExtensibleEnum = null, IEnumerable floatExtensibleEnumCollection = null, FloatFixedEnum? floatFixedEnum = null, IEnumerable floatFixedEnumCollection = null, IntFixedEnum? intFixedEnum = null, IEnumerable intFixedEnumCollection = null, StringFixedEnum? stringFixedEnum = null, BinaryData requiredUnknown = null, BinaryData optionalUnknown = null, IDictionary requiredRecordUnknown = null, IDictionary optionalRecordUnknown = null, IReadOnlyDictionary readOnlyRequiredRecordUnknown = null, IReadOnlyDictionary readOnlyOptionalRecordUnknown = null, ModelWithRequiredNullableProperties modelWithRequiredNullable = null) + public static RoundTripModel RoundTripModel(string requiredString = null, int requiredInt = default, IEnumerable requiredCollection = null, IDictionary requiredDictionary = null, Thing requiredModel = null, IntExtensibleEnum? intExtensibleEnum = null, IEnumerable intExtensibleEnumCollection = null, FloatExtensibleEnum? floatExtensibleEnum = null, IEnumerable floatExtensibleEnumCollection = null, FloatFixedEnum? floatFixedEnum = null, IEnumerable floatFixedEnumCollection = null, IntFixedEnum? intFixedEnum = null, IEnumerable intFixedEnumCollection = null, StringFixedEnum? stringFixedEnum = null, BinaryData requiredUnknown = null, BinaryData optionalUnknown = null, IDictionary requiredRecordUnknown = null, IDictionary optionalRecordUnknown = null, IReadOnlyDictionary readOnlyRequiredRecordUnknown = null, IReadOnlyDictionary readOnlyOptionalRecordUnknown = null, ModelWithRequiredNullableProperties modelWithRequiredNullable = null) { - requiredCollection ??= new List(); - requiredDictionary ??= new Dictionary(); + requiredCollection ??= new List(); + requiredDictionary ??= new Dictionary(); intExtensibleEnumCollection ??= new List(); floatExtensibleEnumCollection ??= new List(); floatFixedEnumCollection ??= new List(); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.Serialization.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.Serialization.cs index 1eafbdf37e7..469bbc78d12 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.Serialization.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.Serialization.cs @@ -75,7 +75,7 @@ internal static Element DeserializeElement(JsonElement element, ModelReaderWrite { return null; } - Optional> extension = default; + Optional> extension = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.cs index a714b84a6e5..6cfc7e180b6 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.cs @@ -47,7 +47,7 @@ public partial class Element private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal Element() + public Element() { Extension = new ChangeTrackingList(); } @@ -55,13 +55,13 @@ internal Element() /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal Element(IReadOnlyList extension, IDictionary serializedAdditionalRawData) + internal Element(IList extension, IDictionary serializedAdditionalRawData) { Extension = extension; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets the extension. - public IReadOnlyList Extension { get; } + public IList Extension { get; } } } diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.Serialization.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.Serialization.cs index 30579589f9e..b95cc8b4948 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.Serialization.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.Serialization.cs @@ -78,7 +78,7 @@ internal static Extension DeserializeExtension(JsonElement element, ModelReaderW return null; } int level = default; - Optional> extension = default; + Optional> extension = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.cs index 60fd57d919e..15c056edc58 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Extension.cs @@ -24,7 +24,7 @@ public Extension(int level) /// /// Keeps track of any properties unknown to the library. /// - internal Extension(IReadOnlyList extension, IDictionary serializedAdditionalRawData, int level) : base(extension, serializedAdditionalRawData) + internal Extension(IList extension, IDictionary serializedAdditionalRawData, int level) : base(extension, serializedAdditionalRawData) { Level = level; } diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.Serialization.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.Serialization.cs index d6ee2328e73..2387a817c7b 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.Serialization.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.Serialization.cs @@ -36,24 +36,10 @@ void IJsonModel.Write(Utf8JsonWriter writer { writer.WriteNull("requiredNullablePrimitive"); } - if (RequiredExtensibleEnum != null) - { - writer.WritePropertyName("requiredExtensibleEnum"u8); - writer.WriteStringValue(RequiredExtensibleEnum.Value.ToString()); - } - else - { - writer.WriteNull("requiredExtensibleEnum"); - } - if (RequiredFixedEnum != null) - { - writer.WritePropertyName("requiredFixedEnum"u8); - writer.WriteStringValue(RequiredFixedEnum.Value.ToSerialString()); - } - else - { - writer.WriteNull("requiredFixedEnum"); - } + writer.WritePropertyName("requiredExtensibleEnum"u8); + writer.WriteStringValue(RequiredExtensibleEnum.ToString()); + writer.WritePropertyName("requiredFixedEnum"u8); + writer.WriteStringValue(RequiredFixedEnum.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -93,8 +79,8 @@ internal static ModelWithRequiredNullableProperties DeserializeModelWithRequired return null; } int? requiredNullablePrimitive = default; - StringExtensibleEnum? requiredExtensibleEnum = default; - StringFixedEnum? requiredFixedEnum = default; + StringExtensibleEnum requiredExtensibleEnum = default; + StringFixedEnum requiredFixedEnum = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -111,21 +97,11 @@ internal static ModelWithRequiredNullableProperties DeserializeModelWithRequired } if (property.NameEquals("requiredExtensibleEnum"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - requiredExtensibleEnum = null; - continue; - } requiredExtensibleEnum = new StringExtensibleEnum(property.Value.GetString()); continue; } if (property.NameEquals("requiredFixedEnum"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - requiredFixedEnum = null; - continue; - } requiredFixedEnum = property.Value.GetString().ToStringFixedEnum(); continue; } diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.cs index f098541890d..b3e3a4b77b9 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithRequiredNullableProperties.cs @@ -49,7 +49,7 @@ public partial class ModelWithRequiredNullableProperties /// required nullable primitive type. /// required nullable extensible enum type. /// required nullable fixed enum type. - public ModelWithRequiredNullableProperties(int? requiredNullablePrimitive, StringExtensibleEnum? requiredExtensibleEnum, StringFixedEnum? requiredFixedEnum) + public ModelWithRequiredNullableProperties(int? requiredNullablePrimitive, StringExtensibleEnum requiredExtensibleEnum, StringFixedEnum requiredFixedEnum) { RequiredNullablePrimitive = requiredNullablePrimitive; RequiredExtensibleEnum = requiredExtensibleEnum; @@ -61,7 +61,7 @@ public ModelWithRequiredNullableProperties(int? requiredNullablePrimitive, Strin /// required nullable extensible enum type. /// required nullable fixed enum type. /// Keeps track of any properties unknown to the library. - internal ModelWithRequiredNullableProperties(int? requiredNullablePrimitive, StringExtensibleEnum? requiredExtensibleEnum, StringFixedEnum? requiredFixedEnum, IDictionary serializedAdditionalRawData) + internal ModelWithRequiredNullableProperties(int? requiredNullablePrimitive, StringExtensibleEnum requiredExtensibleEnum, StringFixedEnum requiredFixedEnum, IDictionary serializedAdditionalRawData) { RequiredNullablePrimitive = requiredNullablePrimitive; RequiredExtensibleEnum = requiredExtensibleEnum; @@ -77,8 +77,8 @@ internal ModelWithRequiredNullableProperties() /// required nullable primitive type. public int? RequiredNullablePrimitive { get; set; } /// required nullable extensible enum type. - public StringExtensibleEnum? RequiredExtensibleEnum { get; set; } + public StringExtensibleEnum RequiredExtensibleEnum { get; set; } /// required nullable fixed enum type. - public StringFixedEnum? RequiredFixedEnum { get; set; } + public StringFixedEnum RequiredFixedEnum { get; set; } } } diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs index a276a85fc76..50d2916b851 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.Serialization.cs @@ -35,12 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStartArray(); foreach (var item in RequiredCollection) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStringValue(item.Value.ToSerialString()); + writer.WriteStringValue(item.ToSerialString()); } writer.WriteEndArray(); writer.WritePropertyName("requiredDictionary"u8); @@ -48,12 +43,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp foreach (var item in RequiredDictionary) { writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStringValue(item.Value.Value.ToString()); + writer.WriteStringValue(item.Value.ToString()); } writer.WriteEndObject(); writer.WritePropertyName("requiredModel"u8); @@ -120,15 +110,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } if (Optional.IsDefined(StringFixedEnum)) { - if (StringFixedEnum != null) - { - writer.WritePropertyName("stringFixedEnum"u8); - writer.WriteStringValue(StringFixedEnum.Value.ToSerialString()); - } - else - { - writer.WriteNull("stringFixedEnum"); - } + writer.WritePropertyName("stringFixedEnum"u8); + writer.WriteStringValue(StringFixedEnum.Value.ToSerialString()); } writer.WritePropertyName("requiredUnknown"u8); #if NET6_0_OR_GREATER @@ -282,8 +265,8 @@ internal static RoundTripModel DeserializeRoundTripModel(JsonElement element, Mo } string requiredString = default; int requiredInt = default; - IList requiredCollection = default; - IDictionary requiredDictionary = default; + IList requiredCollection = default; + IDictionary requiredDictionary = default; Thing requiredModel = default; Optional intExtensibleEnum = default; Optional> intExtensibleEnumCollection = default; @@ -293,7 +276,7 @@ internal static RoundTripModel DeserializeRoundTripModel(JsonElement element, Mo Optional> floatFixedEnumCollection = default; Optional intFixedEnum = default; Optional> intFixedEnumCollection = default; - Optional stringFixedEnum = default; + Optional stringFixedEnum = default; BinaryData requiredUnknown = default; Optional optionalUnknown = default; IDictionary requiredRecordUnknown = default; @@ -317,34 +300,20 @@ internal static RoundTripModel DeserializeRoundTripModel(JsonElement element, Mo } if (property.NameEquals("requiredCollection"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(item.GetString().ToStringFixedEnum()); - } + array.Add(item.GetString().ToStringFixedEnum()); } requiredCollection = array; continue; } if (property.NameEquals("requiredDictionary"u8)) { - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, new StringExtensibleEnum(property0.Value.GetString())); - } + dictionary.Add(property0.Name, new StringExtensibleEnum(property0.Value.GetString())); } requiredDictionary = dictionary; continue; @@ -450,7 +419,6 @@ internal static RoundTripModel DeserializeRoundTripModel(JsonElement element, Mo { if (property.Value.ValueKind == JsonValueKind.Null) { - stringFixedEnum = null; continue; } stringFixedEnum = property.Value.GetString().ToStringFixedEnum(); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.cs index 9e4a5f063a3..cd79894e345 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/RoundTripModel.cs @@ -57,7 +57,7 @@ public partial class RoundTripModel /// required record of unknown. /// this is a model with required nullable properties. /// , , , , , or is null. - public RoundTripModel(string requiredString, int requiredInt, IEnumerable requiredCollection, IDictionary requiredDictionary, Thing requiredModel, BinaryData requiredUnknown, IDictionary requiredRecordUnknown, ModelWithRequiredNullableProperties modelWithRequiredNullable) + public RoundTripModel(string requiredString, int requiredInt, IEnumerable requiredCollection, IDictionary requiredDictionary, Thing requiredModel, BinaryData requiredUnknown, IDictionary requiredRecordUnknown, ModelWithRequiredNullableProperties modelWithRequiredNullable) { Argument.AssertNotNull(requiredString, nameof(requiredString)); Argument.AssertNotNull(requiredCollection, nameof(requiredCollection)); @@ -107,7 +107,7 @@ public RoundTripModel(string requiredString, int requiredInt, IEnumerable optional readonly record of unknown. /// this is a model with required nullable properties. /// Keeps track of any properties unknown to the library. - internal RoundTripModel(string requiredString, int requiredInt, IList requiredCollection, IDictionary requiredDictionary, Thing requiredModel, IntExtensibleEnum? intExtensibleEnum, IList intExtensibleEnumCollection, FloatExtensibleEnum? floatExtensibleEnum, IList floatExtensibleEnumCollection, FloatFixedEnum? floatFixedEnum, IList floatFixedEnumCollection, IntFixedEnum? intFixedEnum, IList intFixedEnumCollection, StringFixedEnum? stringFixedEnum, BinaryData requiredUnknown, BinaryData optionalUnknown, IDictionary requiredRecordUnknown, IDictionary optionalRecordUnknown, IReadOnlyDictionary readOnlyRequiredRecordUnknown, IReadOnlyDictionary readOnlyOptionalRecordUnknown, ModelWithRequiredNullableProperties modelWithRequiredNullable, IDictionary serializedAdditionalRawData) + internal RoundTripModel(string requiredString, int requiredInt, IList requiredCollection, IDictionary requiredDictionary, Thing requiredModel, IntExtensibleEnum? intExtensibleEnum, IList intExtensibleEnumCollection, FloatExtensibleEnum? floatExtensibleEnum, IList floatExtensibleEnumCollection, FloatFixedEnum? floatFixedEnum, IList floatFixedEnumCollection, IntFixedEnum? intFixedEnum, IList intFixedEnumCollection, StringFixedEnum? stringFixedEnum, BinaryData requiredUnknown, BinaryData optionalUnknown, IDictionary requiredRecordUnknown, IDictionary optionalRecordUnknown, IReadOnlyDictionary readOnlyRequiredRecordUnknown, IReadOnlyDictionary readOnlyOptionalRecordUnknown, ModelWithRequiredNullableProperties modelWithRequiredNullable, IDictionary serializedAdditionalRawData) { RequiredString = requiredString; RequiredInt = requiredInt; @@ -143,9 +143,9 @@ internal RoundTripModel() /// Required int, illustrating a value type property. public int RequiredInt { get; set; } /// Required collection of enums. - public IList RequiredCollection { get; } + public IList RequiredCollection { get; } /// Required dictionary of enums. - public IDictionary RequiredDictionary { get; } + public IDictionary RequiredDictionary { get; } /// Required model. public Thing RequiredModel { get; set; } /// this is an int based extensible enum. diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.Serialization.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.Serialization.cs index a5c05b91a7a..17d57d4feb6 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.Serialization.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.Serialization.cs @@ -75,7 +75,7 @@ internal static ThereLevelElement DeserializeThereLevelElement(JsonElement eleme { return null; } - Optional> extension = default; + Optional> extension = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.cs index bfe75812a2b..da2e76130a1 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.cs @@ -47,7 +47,7 @@ public partial class ThereLevelElement private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ThereLevelElement() + public ThereLevelElement() { Extension = new ChangeTrackingList(); } @@ -55,13 +55,13 @@ internal ThereLevelElement() /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal ThereLevelElement(IReadOnlyList extension, IDictionary serializedAdditionalRawData) + internal ThereLevelElement(IList extension, IDictionary serializedAdditionalRawData) { Extension = extension; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets the extension. - public IReadOnlyList Extension { get; } + public IList Extension { get; } } } diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.Serialization.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.Serialization.cs index 4911170ceae..1958a7a115f 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.Serialization.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.Serialization.cs @@ -78,7 +78,7 @@ internal static ThereLevelExtension DeserializeThereLevelExtension(JsonElement e return null; } int level = default; - Optional> extension = default; + Optional> extension = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.cs index 5ddc3b4b7d5..6c84c7bd41c 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelExtension.cs @@ -24,7 +24,7 @@ public ThereLevelExtension(int level) /// /// Keeps track of any properties unknown to the library. /// - internal ThereLevelExtension(IReadOnlyList extension, IDictionary serializedAdditionalRawData, int level) : base(extension, serializedAdditionalRawData) + internal ThereLevelExtension(IList extension, IDictionary serializedAdditionalRawData, int level) : base(extension, serializedAdditionalRawData) { Level = level; } diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json index 4c1f7346c45..e1ee61f694f 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json @@ -122,6 +122,8 @@ "$id": "14", "Kind": "Enum", "Name": "CsProjectedEnum", + "Namespace": "FirstTestTypeSpec", + "Description": "enum with projected name", "EnumValueType": "Float32", "AllowedValues": [ { @@ -140,8 +142,6 @@ "Value": 4.4 } ], - "Namespace": "FirstTestTypeSpec", - "Description": "enum with projected name", "IsExtensible": false, "IsNullable": false, "Usage": "Input" @@ -150,6 +150,8 @@ "$id": "18", "Kind": "Enum", "Name": "CsProjectedEnumInModel", + "Namespace": "FirstTestTypeSpec", + "Description": "enum with projected name used in a model", "EnumValueType": "Float32", "AllowedValues": [ { @@ -168,8 +170,6 @@ "Value": 4.4 } ], - "Namespace": "FirstTestTypeSpec", - "Description": "enum with projected name used in a model", "IsExtensible": false, "IsNullable": false, "Usage": "Input" @@ -178,6 +178,8 @@ "$id": "22", "Kind": "Enum", "Name": "StringFixedEnum", + "Namespace": "FirstTestTypeSpec", + "Description": "Simple enum", "EnumValueType": "String", "AllowedValues": [ { @@ -196,16 +198,16 @@ "Value": "4" } ], - "Namespace": "FirstTestTypeSpec", - "Description": "Simple enum", "IsExtensible": false, - "IsNullable": true, + "IsNullable": false, "Usage": "RoundTrip" }, { "$id": "26", "Kind": "Enum", "Name": "StringExtensibleEnum", + "Namespace": "FirstTestTypeSpec", + "Description": "Extensible enum", "EnumValueType": "String", "AllowedValues": [ { @@ -224,17 +226,17 @@ "Value": "4" } ], - "Namespace": "FirstTestTypeSpec", - "Description": "Extensible enum", "IsExtensible": true, - "IsNullable": true, + "IsNullable": false, "Usage": "RoundTrip" }, { "$id": "30", "Kind": "Enum", "Name": "IntExtensibleEnum", - "EnumValueType": "Float32", + "Namespace": "FirstTestTypeSpec", + "Description": "Int based extensible enum", + "EnumValueType": "String", "AllowedValues": [ { "$id": "31", @@ -252,8 +254,6 @@ "Value": 4 } ], - "Namespace": "FirstTestTypeSpec", - "Description": "Int based extensible enum", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -262,7 +262,9 @@ "$id": "34", "Kind": "Enum", "Name": "FloatExtensibleEnum", - "EnumValueType": "Float32", + "Namespace": "FirstTestTypeSpec", + "Description": "Float based extensible enum", + "EnumValueType": "String", "AllowedValues": [ { "$id": "35", @@ -280,8 +282,6 @@ "Value": 4 } ], - "Namespace": "FirstTestTypeSpec", - "Description": "Float based extensible enum", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -290,6 +290,8 @@ "$id": "38", "Kind": "Enum", "Name": "FloatFixedEnum", + "Namespace": "FirstTestTypeSpec", + "Description": "float fixed enum", "EnumValueType": "Float32", "AllowedValues": [ { @@ -308,8 +310,6 @@ "Value": 4.4 } ], - "Namespace": "FirstTestTypeSpec", - "Description": "float fixed enum", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -318,7 +318,9 @@ "$id": "42", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "Float32", + "Namespace": "FirstTestTypeSpec", + "Description": "int fixed enum", + "EnumValueType": "String", "AllowedValues": [ { "$id": "43", @@ -336,8 +338,6 @@ "Value": 4 } ], - "Namespace": "FirstTestTypeSpec", - "Description": "int fixed enum", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -346,6 +346,7 @@ "$id": "46", "Kind": "Enum", "Name": "DaysOfWeekExtensibleEnum", + "Namespace": "FirstTestTypeSpec", "EnumValueType": "String", "AllowedValues": [ { @@ -384,83 +385,6 @@ "Value": "Sunday" } ], - "Namespace": "FirstTestTypeSpec", - "Description": "", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "54", - "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "55", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "56", - "Name": "implicit", - "Value": "implicit", - "Description": "implcit flow" - }, - { - "$id": "57", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "58", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "59", - "Kind": "Enum", - "Name": "AuthFlow_tokenUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "60", - "Name": "https://api.example.com/oauth2/token", - "Value": "https://api.example.com/oauth2/token", - "Description": "https://api.example.com/oauth2/token" - } - ], - "Namespace": "FirstTestTypeSpec", - "Description": "The AuthFlow_tokenUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "61", - "Kind": "Enum", - "Name": "AuthFlow_refreshUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "62", - "Name": "https://api.example.com/oauth2/refresh", - "Value": "https://api.example.com/oauth2/refresh", - "Description": "https://api.example.com/oauth2/refresh" - } - ], - "Namespace": "FirstTestTypeSpec", - "Description": "The AuthFlow_refreshUrl", "IsExtensible": true, "IsNullable": false, "Usage": "None" @@ -468,7 +392,7 @@ ], "Models": [ { - "$id": "63", + "$id": "54", "Kind": "Model", "Name": "Thing", "Namespace": "FirstTestTypeSpec", @@ -477,41 +401,42 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "64", + "$id": "55", "Name": "name", "SerializedName": "name", "Description": "name of the Thing", "Type": { - "$id": "65", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "66", + "$id": "57", "Name": "requiredUnion", "SerializedName": "requiredUnion", "Description": "required Union", "Type": { - "$id": "67", + "$id": "58", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "68", + "$id": "59", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "69", + "$id": "60", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "70", + "$id": "61", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -519,7 +444,7 @@ "IsNullable": false }, { - "$id": "71", + "$id": "62", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -528,15 +453,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "72", + "$id": "63", "Name": "requiredLiteralString", "SerializedName": "requiredLiteralString", "Description": "required literal string", "Type": { - "$id": "73", + "$id": "64", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -546,15 +472,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "74", + "$id": "65", "Name": "requiredLiteralInt", "SerializedName": "requiredLiteralInt", "Description": "required literal int", "Type": { - "$id": "75", + "$id": "66", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -564,15 +491,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "76", + "$id": "67", "Name": "requiredLiteralFloat", "SerializedName": "requiredLiteralFloat", "Description": "required literal float", "Type": { - "$id": "77", + "$id": "68", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -582,19 +510,20 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "78", + "$id": "69", "Name": "requiredLiteralBool", "SerializedName": "requiredLiteralBool", "Description": "required literal bool", "Type": { - "$id": "79", + "$id": "70", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "80", + "$id": "71", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -603,15 +532,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "81", + "$id": "72", "Name": "optionalLiteralString", "SerializedName": "optionalLiteralString", "Description": "optional literal string", "Type": { - "$id": "82", + "$id": "73", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -621,15 +551,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "83", + "$id": "74", "Name": "optionalLiteralInt", "SerializedName": "optionalLiteralInt", "Description": "optional literal int", "Type": { - "$id": "84", + "$id": "75", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -639,15 +570,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "85", + "$id": "76", "Name": "optionalLiteralFloat", "SerializedName": "optionalLiteralFloat", "Description": "optional literal float", "Type": { - "$id": "86", + "$id": "77", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -657,19 +589,20 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "87", + "$id": "78", "Name": "optionalLiteralBool", "SerializedName": "optionalLiteralBool", "Description": "optional literal bool", "Type": { - "$id": "88", + "$id": "79", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "89", + "$id": "80", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -678,33 +611,35 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "90", + "$id": "81", "Name": "requiredBadDescription", "SerializedName": "requiredBadDescription", "Description": "description with xml <|endoftext|>", "Type": { - "$id": "91", + "$id": "82", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "92", + "$id": "83", "Name": "optionalNullableList", "SerializedName": "optionalNullableList", "Description": "optional nullable collection", "Type": { - "$id": "93", + "$id": "84", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "94", + "$id": "85", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -712,19 +647,20 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "95", + "$id": "86", "Name": "requiredNullableList", "SerializedName": "requiredNullableList", "Description": "required nullable collection", "Type": { - "$id": "96", + "$id": "87", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "97", + "$id": "88", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -732,12 +668,13 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "98", + "$id": "89", "Kind": "Model", "Name": "Friend", "Namespace": "FirstTestTypeSpec", @@ -746,23 +683,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "99", + "$id": "90", "Name": "name", "SerializedName": "name", "Description": "name of the NotFriend", "Type": { - "$id": "100", + "$id": "91", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "101", + "$id": "92", "Kind": "Model", "Name": "ModelWithFormat", "Namespace": "FirstTestTypeSpec", @@ -770,37 +708,39 @@ "Usage": "Input", "Properties": [ { - "$id": "102", + "$id": "93", "Name": "sourceUrl", "SerializedName": "sourceUrl", "Description": "url format", "Type": { - "$id": "103", + "$id": "94", "Kind": "Primitive", "Name": "Uri", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "104", + "$id": "95", "Name": "guid", "SerializedName": "guid", "Description": "uuid format", "Type": { - "$id": "105", + "$id": "96", "Kind": "Primitive", "Name": "Guid", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "106", + "$id": "97", "Kind": "Model", "Name": "ProjectedModel", "Namespace": "FirstTestTypeSpec", @@ -809,23 +749,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "107", + "$id": "98", "Name": "name", "SerializedName": "name", "Description": "name of the ModelWithProjectedName", "Type": { - "$id": "108", + "$id": "99", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "109", + "$id": "100", "Kind": "Model", "Name": "ReturnsAnonymousModelResponse", "Namespace": "FirstTestTypeSpec", @@ -834,63 +775,65 @@ "Properties": [] }, { - "$id": "110", + "$id": "101", "Kind": "Model", - "Name": "Element", + "Name": "Extension", "Namespace": "FirstTestTypeSpec", - "Description": "element", + "Description": "extension", "IsNullable": false, - "Usage": "None", + "Usage": "Input", + "BaseModel": { + "$id": "102", + "Kind": "Model", + "Name": "Element", + "Namespace": "FirstTestTypeSpec", + "Description": "element", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "103", + "Name": "extension", + "SerializedName": "extension", + "Description": "", + "Type": { + "$id": "104", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "101" + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] + }, "Properties": [ { - "$id": "111", - "Name": "extension", - "SerializedName": "extension", + "$id": "105", + "Name": "level", + "SerializedName": "level", "Description": "", "Type": { - "$id": "112", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$id": "113", - "Kind": "Model", - "Name": "Extension", - "Namespace": "FirstTestTypeSpec", - "Description": "extension", - "IsNullable": false, - "Usage": "Input", - "BaseModel": { - "$ref": "110" - }, - "Properties": [ - { - "$id": "114", - "Name": "level", - "SerializedName": "level", - "Description": "", - "Type": { - "$id": "115", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, + "$id": "106", + "Kind": "Primitive", + "Name": "Int32", "IsNullable": false }, - "IsRequired": false, - "IsReadOnly": false + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "113" + "$ref": "102" }, { - "$id": "116", + "$id": "107", "Kind": "Model", "Name": "Extendible", "Namespace": "FirstTestTypeSpec", @@ -899,16 +842,16 @@ "Usage": "Input", "Properties": [ { - "$id": "117", + "$id": "108", "Name": "extension", "SerializedName": "extension", "Description": "Additional Content defined by implementations", "Type": { - "$id": "118", + "$id": "109", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "119", + "$id": "110", "Kind": "Model", "Name": "ThereLevelExtension", "Namespace": "FirstTestTypeSpec", @@ -916,90 +859,68 @@ "IsNullable": false, "Usage": "Input", "BaseModel": { - "$id": "120", + "$id": "111", "Kind": "Model", "Name": "ThereLevelElement", "Namespace": "FirstTestTypeSpec", "Description": "element", "IsNullable": false, - "Usage": "None", + "Usage": "Input", "Properties": [ { - "$id": "121", + "$id": "112", "Name": "extension", "SerializedName": "extension", "Description": "", "Type": { - "$id": "122", + "$id": "113", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "119" + "$ref": "110" }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "Properties": [ { - "$id": "123", + "$id": "114", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "124", + "$id": "115", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "120" + "$ref": "110" }, { - "$ref": "119" - }, - { - "$id": "125", - "Kind": "Model", - "Name": "BaseModel", - "Namespace": "FirstTestTypeSpec", - "Description": "parenetModel", - "IsNullable": false, - "Usage": "Input", - "Properties": [ - { - "$id": "126", - "Name": "level", - "SerializedName": "level", - "Description": "", - "Type": { - "$id": "127", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] + "$ref": "111" }, { - "$id": "128", + "$id": "116", "Kind": "Model", "Name": "ChildModel", "Namespace": "FirstTestTypeSpec", @@ -1007,30 +928,57 @@ "IsNullable": false, "Usage": "Input", "BaseModel": { - "$ref": "125" + "$id": "117", + "Kind": "Model", + "Name": "BaseModel", + "Namespace": "FirstTestTypeSpec", + "Description": "parenetModel", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "118", + "Name": "level", + "SerializedName": "level", + "Description": "", + "Type": { + "$id": "119", + "Kind": "Primitive", + "Name": "Int32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] }, "Properties": [ { - "$id": "129", + "$id": "120", "Name": "parent", "SerializedName": "parent", "Description": "", "Type": { - "$id": "130", + "$id": "121", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "125" + "$ref": "117" }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "131", + "$ref": "117" + }, + { + "$id": "122", "Kind": "Model", "Name": "ContainSelf", "Namespace": "FirstTestTypeSpec", @@ -1039,20 +987,21 @@ "Usage": "Input", "Properties": [ { - "$id": "132", + "$id": "123", "Name": "self", "SerializedName": "self", "Description": "", "Type": { - "$ref": "131" + "$ref": "122" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "133", + "$id": "124", "Kind": "Model", "Name": "ModelWithProjectedEnum", "Namespace": "FirstTestTypeSpec", @@ -1060,7 +1009,7 @@ "Usage": "Input", "Properties": [ { - "$id": "134", + "$id": "125", "Name": "enumProperty", "SerializedName": "enumProperty", "Description": "enum with projected name used in a model", @@ -1068,12 +1017,13 @@ "$ref": "18" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "135", + "$id": "126", "Kind": "Model", "Name": "RoundTripModel", "Namespace": "FirstTestTypeSpec", @@ -1082,40 +1032,42 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "136", + "$id": "127", "Name": "requiredString", "SerializedName": "requiredString", "Description": "Required string, illustrating a reference type property.", "Type": { - "$id": "137", + "$id": "128", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "138", + "$id": "129", "Name": "requiredInt", "SerializedName": "requiredInt", "Description": "Required int, illustrating a value type property.", "Type": { - "$id": "139", + "$id": "130", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "140", + "$id": "131", "Name": "requiredCollection", "SerializedName": "requiredCollection", "Description": "Required collection of enums", "Type": { - "$id": "141", + "$id": "132", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1124,19 +1076,20 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "142", + "$id": "133", "Name": "requiredDictionary", "SerializedName": "requiredDictionary", "Description": "Required dictionary of enums", "Type": { - "$id": "143", + "$id": "134", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "144", + "$id": "135", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1147,21 +1100,23 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "145", + "$id": "136", "Name": "requiredModel", "SerializedName": "requiredModel", "Description": "Required model", "Type": { - "$ref": "63" + "$ref": "54" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "146", + "$id": "137", "Name": "intExtensibleEnum", "SerializedName": "intExtensibleEnum", "Description": "this is an int based extensible enum", @@ -1169,15 +1124,16 @@ "$ref": "30" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "147", + "$id": "138", "Name": "intExtensibleEnumCollection", "SerializedName": "intExtensibleEnumCollection", "Description": "this is a collection of int based extensible enum", "Type": { - "$id": "148", + "$id": "139", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1186,10 +1142,11 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "149", + "$id": "140", "Name": "floatExtensibleEnum", "SerializedName": "floatExtensibleEnum", "Description": "this is a float based extensible enum", @@ -1197,15 +1154,16 @@ "$ref": "34" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "150", + "$id": "141", "Name": "floatExtensibleEnumCollection", "SerializedName": "floatExtensibleEnumCollection", "Description": "this is a collection of float based extensible enum", "Type": { - "$id": "151", + "$id": "142", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1214,10 +1172,11 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "152", + "$id": "143", "Name": "floatFixedEnum", "SerializedName": "floatFixedEnum", "Description": "this is a float based fixed enum", @@ -1225,15 +1184,16 @@ "$ref": "38" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "153", + "$id": "144", "Name": "floatFixedEnumCollection", "SerializedName": "floatFixedEnumCollection", "Description": "this is a collection of float based fixed enum", "Type": { - "$id": "154", + "$id": "145", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1242,10 +1202,11 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "155", + "$id": "146", "Name": "intFixedEnum", "SerializedName": "intFixedEnum", "Description": "this is a int based fixed enum", @@ -1253,15 +1214,16 @@ "$ref": "42" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "156", + "$id": "147", "Name": "intFixedEnumCollection", "SerializedName": "intFixedEnumCollection", "Description": "this is a collection of int based fixed enum", "Type": { - "$id": "157", + "$id": "148", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1270,10 +1232,11 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "158", + "$id": "149", "Name": "stringFixedEnum", "SerializedName": "stringFixedEnum", "Description": "this is a string based fixed enum", @@ -1281,53 +1244,56 @@ "$ref": "22" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "159", + "$id": "150", "Name": "requiredUnknown", "SerializedName": "requiredUnknown", "Description": "required unknown", "Type": { - "$id": "160", + "$id": "151", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "161", + "$id": "152", "Name": "optionalUnknown", "SerializedName": "optionalUnknown", "Description": "optional unknown", "Type": { - "$id": "162", + "$id": "153", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "163", + "$id": "154", "Name": "requiredRecordUnknown", "SerializedName": "requiredRecordUnknown", "Description": "required record of unknown", "Type": { - "$id": "164", + "$id": "155", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "165", + "$id": "156", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "166", + "$id": "157", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1335,25 +1301,26 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "167", + "$id": "158", "Name": "optionalRecordUnknown", "SerializedName": "optionalRecordUnknown", "Description": "optional record of unknown", "Type": { - "$id": "168", + "$id": "159", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "169", + "$id": "160", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "170", + "$id": "161", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1361,25 +1328,26 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "171", + "$id": "162", "Name": "readOnlyRequiredRecordUnknown", "SerializedName": "readOnlyRequiredRecordUnknown", "Description": "required readonly record of unknown", "Type": { - "$id": "172", + "$id": "163", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "173", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "174", + "$id": "165", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1387,25 +1355,26 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "175", + "$id": "166", "Name": "readOnlyOptionalRecordUnknown", "SerializedName": "readOnlyOptionalRecordUnknown", "Description": "optional readonly record of unknown", "Type": { - "$id": "176", + "$id": "167", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "177", + "$id": "168", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "178", + "$id": "169", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1413,15 +1382,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { - "$id": "179", + "$id": "170", "Name": "modelWithRequiredNullable", "SerializedName": "modelWithRequiredNullable", "Description": "this is a model with required nullable properties", "Type": { - "$id": "180", + "$id": "171", "Kind": "Model", "Name": "ModelWithRequiredNullableProperties", "Namespace": "FirstTestTypeSpec", @@ -1430,21 +1400,22 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "181", + "$id": "172", "Name": "requiredNullablePrimitive", "SerializedName": "requiredNullablePrimitive", "Description": "required nullable primitive type", "Type": { - "$id": "182", + "$id": "173", "Kind": "Primitive", "Name": "Int32", "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "183", + "$id": "174", "Name": "requiredExtensibleEnum", "SerializedName": "requiredExtensibleEnum", "Description": "required nullable extensible enum type", @@ -1452,10 +1423,11 @@ "$ref": "26" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "184", + "$id": "175", "Name": "requiredFixedEnum", "SerializedName": "requiredFixedEnum", "Description": "required nullable fixed enum type", @@ -1463,109 +1435,39 @@ "$ref": "22" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "180" - }, - { - "$id": "185", - "Kind": "Model", - "Name": "AuthFlow", - "Namespace": "FirstTestTypeSpec", - "Description": "The auth flow model", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "186", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$ref": "54" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "187", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "188", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "59" - }, - "Value": "https://api.example.com/oauth2/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "189", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "190", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "61" - }, - "Value": "https://api.example.com/oauth2/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "191", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "192", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] + "$ref": "171" } ], "Clients": [ { - "$id": "193", + "$id": "176", "Name": "FirstTestTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "194", + "$id": "177", "Name": "topAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level method", "Parameters": [ { - "$id": "195", + "$id": "178", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "196", + "$id": "179", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1581,11 +1483,11 @@ "Kind": "Client" }, { - "$id": "197", + "$id": "180", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "198", + "$id": "181", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1601,11 +1503,11 @@ "Kind": "Method" }, { - "$id": "199", + "$id": "182", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "200", + "$id": "183", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1620,9 +1522,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "201", + "$id": "184", "Type": { - "$ref": "200" + "$ref": "183" }, "Value": "application/json" } @@ -1630,12 +1532,12 @@ ], "Responses": [ { - "$id": "202", + "$id": "185", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -1654,20 +1556,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "203", + "$id": "186", "Name": "topAction2", "ResourceName": "FirstTestTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "204", + "$id": "187", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "205", + "$id": "188", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1682,9 +1584,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "206", + "$id": "189", "Type": { - "$ref": "205" + "$ref": "188" }, "Value": "application/json" } @@ -1692,12 +1594,12 @@ ], "Responses": [ { - "$id": "207", + "$id": "190", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -1716,20 +1618,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "208", + "$id": "191", "Name": "patchAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "209", + "$id": "192", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "63" + "$ref": "54" }, "Location": "Body", "IsRequired": true, @@ -1742,11 +1644,11 @@ "Kind": "Method" }, { - "$id": "210", + "$id": "193", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "211", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1761,19 +1663,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "212", + "$id": "195", "Type": { - "$ref": "211" + "$ref": "194" }, "Value": "application/json" } }, { - "$id": "213", + "$id": "196", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "214", + "$id": "197", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1788,9 +1690,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "215", + "$id": "198", "Type": { - "$ref": "214" + "$ref": "197" }, "Value": "application/json" } @@ -1798,12 +1700,12 @@ ], "Responses": [ { - "$id": "216", + "$id": "199", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -1825,21 +1727,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "217", + "$id": "200", "Name": "anonymousBody", "ResourceName": "FirstTestTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "218", + "$id": "201", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", "Type": { - "$ref": "63" + "$ref": "54" }, "Location": "Body", "IsRequired": true, @@ -1852,11 +1754,11 @@ "Kind": "Method" }, { - "$id": "219", + "$id": "202", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "220", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1871,19 +1773,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "221", + "$id": "204", "Type": { - "$ref": "220" + "$ref": "203" }, "Value": "application/json" } }, { - "$id": "222", + "$id": "205", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "223", + "$id": "206", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1898,9 +1800,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "224", + "$id": "207", "Type": { - "$ref": "223" + "$ref": "206" }, "Value": "application/json" } @@ -1908,12 +1810,12 @@ ], "Responses": [ { - "$id": "225", + "$id": "208", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -1935,21 +1837,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "226", + "$id": "209", "Name": "friendlyModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "227", + "$id": "210", "Name": "Friend", "NameInRequest": "NotFriend", "Description": "this is not a friendly model but with a friendly name", "Type": { - "$ref": "98" + "$ref": "89" }, "Location": "Body", "IsRequired": true, @@ -1962,11 +1864,11 @@ "Kind": "Method" }, { - "$id": "228", + "$id": "211", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "229", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1981,19 +1883,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "230", + "$id": "213", "Type": { - "$ref": "229" + "$ref": "212" }, "Value": "application/json" } }, { - "$id": "231", + "$id": "214", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "232", + "$id": "215", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2008,9 +1910,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "233", + "$id": "216", "Type": { - "$ref": "232" + "$ref": "215" }, "Value": "application/json" } @@ -2018,12 +1920,12 @@ ], "Responses": [ { - "$id": "234", + "$id": "217", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "98" + "$ref": "89" }, "BodyMediaType": "Json", "Headers": [], @@ -2045,19 +1947,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "235", + "$id": "218", "Name": "addTimeHeader", "ResourceName": "FirstTestTypeSpec", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "236", + "$id": "219", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "237", + "$id": "220", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -2073,11 +1975,11 @@ "Kind": "Method" }, { - "$id": "238", + "$id": "221", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "239", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2092,9 +1994,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "240", + "$id": "223", "Type": { - "$ref": "239" + "$ref": "222" }, "Value": "application/json" } @@ -2102,7 +2004,7 @@ ], "Responses": [ { - "$id": "241", + "$id": "224", "StatusCodes": [ 204 ], @@ -2120,20 +2022,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "242", + "$id": "225", "Name": "stringFormat", "ResourceName": "FirstTestTypeSpec", "Description": "paramete has string format.", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "243", + "$id": "226", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "244", + "$id": "227", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -2149,11 +2051,11 @@ "Kind": "Method" }, { - "$id": "245", + "$id": "228", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "101" + "$ref": "92" }, "Location": "Body", "IsRequired": true, @@ -2166,11 +2068,11 @@ "Kind": "Method" }, { - "$id": "246", + "$id": "229", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "247", + "$id": "230", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2185,19 +2087,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "248", + "$id": "231", "Type": { - "$ref": "247" + "$ref": "230" }, "Value": "application/json" } }, { - "$id": "249", + "$id": "232", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "250", + "$id": "233", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2212,9 +2114,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "251", + "$id": "234", "Type": { - "$ref": "250" + "$ref": "233" }, "Value": "application/json" } @@ -2222,7 +2124,7 @@ ], "Responses": [ { - "$id": "252", + "$id": "235", "StatusCodes": [ 204 ], @@ -2243,21 +2145,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "253", + "$id": "236", "Name": "projectedNameModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its projected name", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "254", + "$id": "237", "Name": "ProjectedModel", "NameInRequest": "ModelWithProjectedName", "Description": "this is a model with a projected name", "Type": { - "$ref": "106" + "$ref": "97" }, "Location": "Body", "IsRequired": true, @@ -2270,11 +2172,11 @@ "Kind": "Method" }, { - "$id": "255", + "$id": "238", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "256", + "$id": "239", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2289,19 +2191,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "257", + "$id": "240", "Type": { - "$ref": "256" + "$ref": "239" }, "Value": "application/json" } }, { - "$id": "258", + "$id": "241", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "259", + "$id": "242", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2316,9 +2218,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "260", + "$id": "243", "Type": { - "$ref": "259" + "$ref": "242" }, "Value": "application/json" } @@ -2326,12 +2228,12 @@ ], "Responses": [ { - "$id": "261", + "$id": "244", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "106" + "$ref": "97" }, "BodyMediaType": "Json", "Headers": [], @@ -2353,20 +2255,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "262", + "$id": "245", "Name": "returnsAnonymousModel", "ResourceName": "FirstTestTypeSpec", "Description": "return anonymous model", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "263", + "$id": "246", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "264", + "$id": "247", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2381,9 +2283,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "265", + "$id": "248", "Type": { - "$ref": "264" + "$ref": "247" }, "Value": "application/json" } @@ -2391,12 +2293,12 @@ ], "Responses": [ { - "$id": "266", + "$id": "249", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "109" + "$ref": "100" }, "BodyMediaType": "Json", "Headers": [], @@ -2415,20 +2317,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "267", + "$id": "250", "Name": "headAsBoolean", "ResourceName": "FirstTestTypeSpec", "Description": "head as boolean.", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "268", + "$id": "251", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "269", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2444,11 +2346,11 @@ "Kind": "Method" }, { - "$id": "270", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "271", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2463,9 +2365,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "272", + "$id": "255", "Type": { - "$ref": "271" + "$ref": "254" }, "Value": "application/json" } @@ -2473,7 +2375,7 @@ ], "Responses": [ { - "$id": "273", + "$id": "256", "StatusCodes": [ 204 ], @@ -2491,20 +2393,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "274", + "$id": "257", "Name": "stringBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is string.", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "275", + "$id": "258", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "276", + "$id": "259", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2520,11 +2422,11 @@ "Kind": "Method" }, { - "$id": "277", + "$id": "260", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "278", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2539,19 +2441,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "279", + "$id": "262", "Type": { - "$ref": "278" + "$ref": "261" }, "Value": "application/json" } }, { - "$id": "280", + "$id": "263", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "281", + "$id": "264", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2566,9 +2468,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "282", + "$id": "265", "Type": { - "$ref": "281" + "$ref": "264" }, "Value": "application/json" } @@ -2576,7 +2478,7 @@ ], "Responses": [ { - "$id": "283", + "$id": "266", "StatusCodes": [ 204 ], @@ -2597,20 +2499,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "284", + "$id": "267", "Name": "boolBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is bool.", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "285", + "$id": "268", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "286", + "$id": "269", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2626,11 +2528,11 @@ "Kind": "Method" }, { - "$id": "287", + "$id": "270", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "288", + "$id": "271", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2645,19 +2547,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "289", + "$id": "272", "Type": { - "$ref": "288" + "$ref": "271" }, "Value": "application/json" } }, { - "$id": "290", + "$id": "273", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "291", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2672,9 +2574,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "275", "Type": { - "$ref": "291" + "$ref": "274" }, "Value": "application/json" } @@ -2682,7 +2584,7 @@ ], "Responses": [ { - "$id": "293", + "$id": "276", "StatusCodes": [ 204 ], @@ -2703,20 +2605,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "294", + "$id": "277", "Name": "dateTimeBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is datetime.", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "295", + "$id": "278", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "296", + "$id": "279", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -2732,11 +2634,11 @@ "Kind": "Method" }, { - "$id": "297", + "$id": "280", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "298", + "$id": "281", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2751,19 +2653,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "299", + "$id": "282", "Type": { - "$ref": "298" + "$ref": "281" }, "Value": "application/json" } }, { - "$id": "300", + "$id": "283", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "301", + "$id": "284", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2778,9 +2680,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "302", + "$id": "285", "Type": { - "$ref": "301" + "$ref": "284" }, "Value": "application/json" } @@ -2788,7 +2690,7 @@ ], "Responses": [ { - "$id": "303", + "$id": "286", "StatusCodes": [ 204 ], @@ -2809,20 +2711,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "304", + "$id": "287", "Name": "returnString", "ResourceName": "FirstTestTypeSpec", "Description": "The return type is datetime.", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "305", + "$id": "288", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "306", + "$id": "289", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2837,9 +2739,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "307", + "$id": "290", "Type": { - "$ref": "306" + "$ref": "289" }, "Value": "application/json" } @@ -2847,12 +2749,12 @@ ], "Responses": [ { - "$id": "308", + "$id": "291", "StatusCodes": [ 200 ], "BodyType": { - "$id": "309", + "$id": "292", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2874,19 +2776,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "310", + "$id": "293", "Name": "returnUnknown", "ResourceName": "FirstTestTypeSpec", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "311", + "$id": "294", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "312", + "$id": "295", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2901,9 +2803,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "313", + "$id": "296", "Type": { - "$ref": "312" + "$ref": "295" }, "Value": "application/json" } @@ -2911,12 +2813,12 @@ ], "Responses": [ { - "$id": "314", + "$id": "297", "StatusCodes": [ 200 ], "BodyType": { - "$id": "315", + "$id": "298", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -2938,20 +2840,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "316", + "$id": "299", "Name": "recursiveExtension", "ResourceName": "FirstTestTypeSpec", "Description": "test parent reference child", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "317", + "$id": "300", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "113" + "$ref": "101" }, "Location": "Body", "IsRequired": true, @@ -2964,11 +2866,11 @@ "Kind": "Method" }, { - "$id": "318", + "$id": "301", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "319", + "$id": "302", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2983,19 +2885,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "320", + "$id": "303", "Type": { - "$ref": "319" + "$ref": "302" }, "Value": "application/json" } }, { - "$id": "321", + "$id": "304", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "322", + "$id": "305", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3010,9 +2912,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "323", + "$id": "306", "Type": { - "$ref": "322" + "$ref": "305" }, "Value": "application/json" } @@ -3020,7 +2922,7 @@ ], "Responses": [ { - "$id": "324", + "$id": "307", "StatusCodes": [ 204 ], @@ -3041,20 +2943,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "325", + "$id": "308", "Name": "threeLevelRecursive", "ResourceName": "FirstTestTypeSpec", "Description": "test three level recursive extension", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "326", + "$id": "309", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "116" + "$ref": "107" }, "Location": "Body", "IsRequired": true, @@ -3067,11 +2969,11 @@ "Kind": "Method" }, { - "$id": "327", + "$id": "310", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "328", + "$id": "311", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3086,19 +2988,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "329", + "$id": "312", "Type": { - "$ref": "328" + "$ref": "311" }, "Value": "application/json" } }, { - "$id": "330", + "$id": "313", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "331", + "$id": "314", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3113,9 +3015,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "332", + "$id": "315", "Type": { - "$ref": "331" + "$ref": "314" }, "Value": "application/json" } @@ -3123,7 +3025,7 @@ ], "Responses": [ { - "$id": "333", + "$id": "316", "StatusCodes": [ 204 ], @@ -3144,20 +3046,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "334", + "$id": "317", "Name": "recursiveModels", "ResourceName": "FirstTestTypeSpec", "Description": "test child reference parent", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "335", + "$id": "318", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "128" + "$ref": "116" }, "Location": "Body", "IsRequired": true, @@ -3170,11 +3072,11 @@ "Kind": "Method" }, { - "$id": "336", + "$id": "319", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "337", + "$id": "320", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3189,19 +3091,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "338", + "$id": "321", "Type": { - "$ref": "337" + "$ref": "320" }, "Value": "application/json" } }, { - "$id": "339", + "$id": "322", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "340", + "$id": "323", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3216,9 +3118,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "341", + "$id": "324", "Type": { - "$ref": "340" + "$ref": "323" }, "Value": "application/json" } @@ -3226,7 +3128,7 @@ ], "Responses": [ { - "$id": "342", + "$id": "325", "StatusCodes": [ 204 ], @@ -3247,20 +3149,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "343", + "$id": "326", "Name": "ContainSelfModels", "ResourceName": "FirstTestTypeSpec", "Description": "test contain self models", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "344", + "$id": "327", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "131" + "$ref": "122" }, "Location": "Body", "IsRequired": true, @@ -3273,11 +3175,11 @@ "Kind": "Method" }, { - "$id": "345", + "$id": "328", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "346", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3292,19 +3194,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "347", + "$id": "330", "Type": { - "$ref": "346" + "$ref": "329" }, "Value": "application/json" } }, { - "$id": "348", + "$id": "331", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "349", + "$id": "332", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3319,9 +3221,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "350", + "$id": "333", "Type": { - "$ref": "349" + "$ref": "332" }, "Value": "application/json" } @@ -3329,7 +3231,7 @@ ], "Responses": [ { - "$id": "351", + "$id": "334", "StatusCodes": [ 204 ], @@ -3350,16 +3252,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "352", + "$id": "335", "Name": "enumParameter", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "353", + "$id": "336", "Name": "p1", "NameInRequest": "p1", "Type": { @@ -3376,11 +3278,11 @@ "Kind": "Method" }, { - "$id": "354", + "$id": "337", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "355", + "$id": "338", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3395,9 +3297,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "356", + "$id": "339", "Type": { - "$ref": "355" + "$ref": "338" }, "Value": "application/json" } @@ -3405,7 +3307,7 @@ ], "Responses": [ { - "$id": "357", + "$id": "340", "StatusCodes": [ 204 ], @@ -3423,20 +3325,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "358", + "$id": "341", "Name": "bodyIsModelWithProjectedEnum", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "359", + "$id": "342", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "133" + "$ref": "124" }, "Location": "Body", "IsRequired": true, @@ -3449,11 +3351,11 @@ "Kind": "Method" }, { - "$id": "360", + "$id": "343", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "361", + "$id": "344", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3468,19 +3370,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "362", + "$id": "345", "Type": { - "$ref": "361" + "$ref": "344" }, "Value": "application/json" } }, { - "$id": "363", + "$id": "346", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "364", + "$id": "347", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3495,9 +3397,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "365", + "$id": "348", "Type": { - "$ref": "364" + "$ref": "347" }, "Value": "application/json" } @@ -3505,7 +3407,7 @@ ], "Responses": [ { - "$id": "366", + "$id": "349", "StatusCodes": [ 204 ], @@ -3527,41 +3429,41 @@ } ], "Protocol": { - "$id": "367" + "$id": "350" }, "Creatable": true }, { - "$id": "368", + "$id": "351", "Name": "Hello", "Description": "", "Operations": [], "Protocol": { - "$id": "369" + "$id": "352" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "370", + "$id": "353", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "371", + "$id": "354", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "372", + "$id": "355", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "373", + "$id": "356", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3577,11 +3479,11 @@ "Kind": "Method" }, { - "$id": "374", + "$id": "357", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "375", + "$id": "358", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3597,11 +3499,11 @@ "Kind": "Method" }, { - "$id": "376", + "$id": "359", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "377", + "$id": "360", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3617,11 +3519,11 @@ "Kind": "Method" }, { - "$id": "378", + "$id": "361", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "379", + "$id": "362", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3636,9 +3538,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "380", + "$id": "363", "Type": { - "$ref": "379" + "$ref": "362" }, "Value": "application/json" } @@ -3646,12 +3548,12 @@ ], "Responses": [ { - "$id": "381", + "$id": "364", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -3671,31 +3573,31 @@ } ], "Protocol": { - "$id": "382" + "$id": "365" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "383", + "$id": "366", "Name": "HelloDemo2", "Description": "", "Operations": [ { - "$id": "384", + "$id": "367", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "385", + "$id": "368", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "386", + "$id": "369", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3711,15 +3613,15 @@ "Kind": "Method" }, { - "$id": "387", + "$id": "370", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "388", + "$id": "371", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "389", + "$id": "372", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3729,9 +3631,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "390", + "$id": "373", "Type": { - "$ref": "388" + "$ref": "371" }, "Value": "text/plain" }, @@ -3745,11 +3647,11 @@ "Kind": "Constant" }, { - "$id": "391", + "$id": "374", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "392", + "$id": "375", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3765,11 +3667,11 @@ "Kind": "Method" }, { - "$id": "393", + "$id": "376", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "135" + "$ref": "126" }, "Location": "Body", "IsRequired": true, @@ -3782,11 +3684,11 @@ "Kind": "Method" }, { - "$id": "394", + "$id": "377", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "395", + "$id": "378", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3801,9 +3703,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "396", + "$id": "379", "Type": { - "$ref": "395" + "$ref": "378" }, "Value": "application/json" } @@ -3811,12 +3713,12 @@ ], "Responses": [ { - "$id": "397", + "$id": "380", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "135" + "$ref": "126" }, "BodyMediaType": "Json", "Headers": [], @@ -3838,20 +3740,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "398", + "$id": "381", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "399", + "$id": "382", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "400", + "$id": "383", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3867,11 +3769,11 @@ "Kind": "Method" }, { - "$id": "401", + "$id": "384", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "402", + "$id": "385", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3887,11 +3789,11 @@ "Kind": "Method" }, { - "$id": "403", + "$id": "386", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "135" + "$ref": "126" }, "Location": "Body", "IsRequired": true, @@ -3904,11 +3806,11 @@ "Kind": "Method" }, { - "$id": "404", + "$id": "387", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "405", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3923,19 +3825,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "406", + "$id": "389", "Type": { - "$ref": "405" + "$ref": "388" }, "Value": "application/json" } }, { - "$id": "407", + "$id": "390", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "408", + "$id": "391", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3950,9 +3852,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "409", + "$id": "392", "Type": { - "$ref": "408" + "$ref": "391" }, "Value": "application/json" } @@ -3960,12 +3862,12 @@ ], "Responses": [ { - "$id": "410", + "$id": "393", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "135" + "$ref": "126" }, "BodyMediaType": "Json", "Headers": [], @@ -3987,20 +3889,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "411", + "$id": "394", "Name": "helloDemoAgain", "ResourceName": "Demo2", "Description": "Return hi in demo2", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "412", + "$id": "395", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "413", + "$id": "396", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4015,9 +3917,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "414", + "$id": "397", "Type": { - "$ref": "413" + "$ref": "396" }, "Value": "application/json" } @@ -4025,12 +3927,12 @@ ], "Responses": [ { - "$id": "415", + "$id": "398", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -4049,20 +3951,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "416", + "$id": "399", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "417", + "$id": "400", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "63" + "$ref": "54" }, "Location": "Body", "IsRequired": true, @@ -4075,11 +3977,11 @@ "Kind": "Method" }, { - "$id": "418", + "$id": "401", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "419", + "$id": "402", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4094,19 +3996,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "420", + "$id": "403", "Type": { - "$ref": "419" + "$ref": "402" }, "Value": "application/json" } }, { - "$id": "421", + "$id": "404", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "422", + "$id": "405", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4121,9 +4023,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "423", + "$id": "406", "Type": { - "$ref": "422" + "$ref": "405" }, "Value": "application/json" } @@ -4131,12 +4033,12 @@ ], "Responses": [ { - "$id": "424", + "$id": "407", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -4158,24 +4060,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "425", + "$id": "408", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "426", + "$id": "409", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "427", + "$id": "410", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "428", + "$id": "411", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4185,9 +4087,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "429", + "$id": "412", "Type": { - "$ref": "427" + "$ref": "410" }, "Value": "test" }, @@ -4201,15 +4103,15 @@ "Kind": "Constant" }, { - "$id": "430", + "$id": "413", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "431", + "$id": "414", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "432", + "$id": "415", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -4219,9 +4121,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "433", + "$id": "416", "Type": { - "$ref": "431" + "$ref": "414" }, "Value": 123 }, @@ -4235,15 +4137,15 @@ "Kind": "Constant" }, { - "$id": "434", + "$id": "417", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "435", + "$id": "418", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "436", + "$id": "419", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4253,9 +4155,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "437", + "$id": "420", "Type": { - "$ref": "435" + "$ref": "418" }, "Value": true }, @@ -4269,11 +4171,11 @@ "Kind": "Constant" }, { - "$id": "438", + "$id": "421", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "439", + "$id": "422", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4288,9 +4190,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "440", + "$id": "423", "Type": { - "$ref": "439" + "$ref": "422" }, "Value": "application/json" } @@ -4298,12 +4200,12 @@ ], "Responses": [ { - "$id": "441", + "$id": "424", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -4323,31 +4225,31 @@ } ], "Protocol": { - "$id": "442" + "$id": "425" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "443", + "$id": "426", "Name": "EnumTest", "Description": "", "Operations": [ { - "$id": "444", + "$id": "427", "Name": "getUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "445", + "$id": "428", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "446", + "$id": "429", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4362,9 +4264,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "447", + "$id": "430", "Type": { - "$ref": "446" + "$ref": "429" }, "Value": "application/json" } @@ -4372,7 +4274,7 @@ ], "Responses": [ { - "$id": "448", + "$id": "431", "StatusCodes": [ 200 ], @@ -4397,31 +4299,31 @@ } ], "Protocol": { - "$id": "449" + "$id": "432" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "450", + "$id": "433", "Name": "ProtocolAndConvenient", "Description": "", "Operations": [ { - "$id": "451", + "$id": "434", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "452", + "$id": "435", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "63" + "$ref": "54" }, "Location": "Body", "IsRequired": true, @@ -4434,11 +4336,11 @@ "Kind": "Method" }, { - "$id": "453", + "$id": "436", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "454", + "$id": "437", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4453,19 +4355,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "455", + "$id": "438", "Type": { - "$ref": "454" + "$ref": "437" }, "Value": "application/json" } }, { - "$id": "456", + "$id": "439", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "457", + "$id": "440", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4480,9 +4382,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "458", + "$id": "441", "Type": { - "$ref": "457" + "$ref": "440" }, "Value": "application/json" } @@ -4490,12 +4392,12 @@ ], "Responses": [ { - "$id": "459", + "$id": "442", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -4517,20 +4419,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "460", + "$id": "443", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "461", + "$id": "444", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "462", + "$id": "445", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4545,9 +4447,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "463", + "$id": "446", "Type": { - "$ref": "462" + "$ref": "445" }, "Value": "application/json" } @@ -4555,7 +4457,7 @@ ], "Responses": [ { - "$id": "464", + "$id": "447", "StatusCodes": [ 204 ], @@ -4574,31 +4476,31 @@ } ], "Protocol": { - "$id": "465" + "$id": "448" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "466", + "$id": "449", "Name": "Entity", "Description": "", "Operations": [ { - "$id": "467", + "$id": "450", "Name": "doSomething", "ResourceName": "Entity", "Description": "doSomething for entity", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "468", + "$id": "451", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "469", + "$id": "452", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4614,11 +4516,11 @@ "Kind": "Method" }, { - "$id": "470", + "$id": "453", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "471", + "$id": "454", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4633,9 +4535,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "472", + "$id": "455", "Type": { - "$ref": "471" + "$ref": "454" }, "Value": "application/json" } @@ -4643,12 +4545,12 @@ ], "Responses": [ { - "$id": "473", + "$id": "456", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -4668,31 +4570,31 @@ } ], "Protocol": { - "$id": "474" + "$id": "457" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "475", + "$id": "458", "Name": "Glossary", "Description": "", "Operations": [ { - "$id": "476", + "$id": "459", "Name": "doSomething", "ResourceName": "Glossary", "Description": "doSomething for glossary", "Parameters": [ { - "$ref": "195" + "$ref": "178" }, { - "$id": "477", + "$id": "460", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "478", + "$id": "461", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4708,11 +4610,11 @@ "Kind": "Method" }, { - "$id": "479", + "$id": "462", "Name": "h1", "NameInRequest": "h1", "Type": { - "$id": "480", + "$id": "463", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4728,11 +4630,11 @@ "Kind": "Method" }, { - "$id": "481", + "$id": "464", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "482", + "$id": "465", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4747,9 +4649,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "483", + "$id": "466", "Type": { - "$ref": "482" + "$ref": "465" }, "Value": "application/json" } @@ -4757,12 +4659,12 @@ ], "Responses": [ { - "$id": "484", + "$id": "467", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -4782,20 +4684,20 @@ } ], "Protocol": { - "$id": "485" + "$id": "468" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" } ], "Auth": { - "$id": "486", + "$id": "469", "ApiKey": { - "$id": "487", + "$id": "470", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "488", + "$id": "471", "Scopes": [ "https://api.example.com/.default" ] diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs index e44c3f24a8b..e01e87de43c 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs @@ -1706,7 +1706,10 @@ public void Example_FirstTestTypeSpec_RecursiveExtension_AllParameters_Convenien Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Extension input = new Extension(1234); + Extension input = new Extension(1234) + { + Extension = { default }, + }; Response response = client.RecursiveExtension(input); } @@ -1717,7 +1720,10 @@ public async Task Example_FirstTestTypeSpec_RecursiveExtension_AllParameters_Con Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Extension input = new Extension(1234); + Extension input = new Extension(1234) + { + Extension = { default }, + }; Response response = await client.RecursiveExtensionAsync(input); } @@ -1830,7 +1836,10 @@ public void Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Convenie Extendible input = new Extendible { - Extension = { new ThereLevelExtension(1234) }, + Extension = {new ThereLevelExtension(1234) +{ +Extension = {default}, +}}, }; Response response = client.ThreeLevelRecursive(input); } @@ -1844,7 +1853,10 @@ public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Co Extendible input = new Extendible { - Extension = { new ThereLevelExtension(1234) }, + Extension = {new ThereLevelExtension(1234) +{ +Extension = {default}, +}}, }; Response response = await client.ThreeLevelRecursiveAsync(input); } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs index 7db2655f063..bf5fd70cbee 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs @@ -163,7 +163,7 @@ public void Example_Demo2_HelloAgain_ShortVersion_Convenience() Uri endpoint = new Uri(""); HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary + RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }), BinaryData.FromObjectAsJson(new object()), new Dictionary @@ -180,7 +180,7 @@ public async Task Example_Demo2_HelloAgain_ShortVersion_Convenience_Async() Uri endpoint = new Uri(""); HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary + RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }), BinaryData.FromObjectAsJson(new object()), new Dictionary @@ -435,7 +435,7 @@ public void Example_Demo2_HelloAgain_AllParameters_Convenience() Uri endpoint = new Uri(""); HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary + RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }) @@ -475,7 +475,7 @@ public async Task Example_Demo2_HelloAgain_AllParameters_Convenience_Async() Uri endpoint = new Uri(""); HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary + RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }) diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs index 0448dca6f5a..712bce89c29 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs @@ -767,7 +767,10 @@ public async Task FirstTestTypeSpec_RecursiveExtension_AllParameters_Convenience AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - Extension input = new Extension(1234); + Extension input = new Extension(1234) + { + Extension = { default }, + }; Response response = await client.RecursiveExtensionAsync(input); } @@ -830,7 +833,10 @@ public async Task FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Convenienc Extendible input = new Extendible { - Extension = { new ThereLevelExtension(1234) }, + Extension = {new ThereLevelExtension(1234) +{ +Extension = {default}, +}}, }; Response response = await client.ThreeLevelRecursiveAsync(input); } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs index 30d823e0971..0ce649a90cd 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs @@ -80,7 +80,7 @@ public async Task Demo2_HelloAgain_ShortVersion_Convenience() AzureKeyCredential credential = null; HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary + RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }), BinaryData.FromObjectAsJson(new object()), new Dictionary @@ -181,7 +181,7 @@ public async Task Demo2_HelloAgain_AllParameters_Convenience() AzureKeyCredential credential = null; HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum?[] { StringFixedEnum.One }, new Dictionary + RoundTripModel action = new RoundTripModel("", 1234, new StringFixedEnum[] { StringFixedEnum.One }, new Dictionary { ["key"] = StringExtensibleEnum.One }, new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }) From 48fb87688bd34df0bc1e428e2a05735bd5a7caeb Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 1 Feb 2024 13:46:21 +0800 Subject: [PATCH 04/60] fix discriminator determination logic --- .../Emitter.Csharp/src/lib/model.ts | 4 + .../Emitter.Csharp/src/type/converter.ts | 13 +- .../ConfidentLevelsInTspModelFactory.cs | 18 +- .../src/Generated/tspCodeModel.json | 88 +- .../src/Generated/tspCodeModel.json | 3 +- ...elReaderWriterValidationTypeSpecClient.xml | 8 + ...derWriterValidationTypeSpecModelFactory.cs | 20 +- .../AvailabilitySetData.Serialization.cs | 2 +- .../Generated/Models/AvailabilitySetData.cs | 2 +- .../TrackedResourceData.Serialization.cs | 2 +- .../Generated/Models/TrackedResourceData.cs | 8 +- .../src/Generated/tspCodeModel.json | 374 +++--- ...delReaderWriterValidationTypeSpecClient.cs | 8 + .../Generated/Docs/ModelsTypeSpecClient.xml | 22 +- .../Models/BaseModelWithARequiredProperty.cs | 4 +- .../Models/BaseModelWithProperties.cs | 4 +- .../src/Generated/Models/Facet.cs | 2 +- .../Models/Int32ValuesFacet.Serialization.cs | 2 +- .../src/Generated/Models/Int32ValuesFacet.cs | 4 +- .../src/Generated/Models/NoUseBase.cs | 4 +- ...cs => NumericValuesFacet.Serialization.cs} | 44 +- ...uesFacetint32.cs => NumericValuesFacet.cs} | 18 +- .../RoundTripPrimitiveModel.Serialization.cs | 2 +- .../Models/RoundTripPrimitiveModel.cs | 24 +- .../Generated/ModelsTypeSpecModelFactory.cs | 85 +- .../src/Generated/tspCodeModel.json | 1105 +++++++++-------- .../Samples/Samples_ModelsTypeSpecClient.cs | 22 +- .../Tests/ModelsTypeSpecClientTests.cs | 11 +- .../src/Generated/tspCodeModel.json | 39 +- 29 files changed, 1065 insertions(+), 877 deletions(-) rename test/TestProjects/Models-TypeSpec/src/Generated/Models/{NumericValuesFacetint32.Serialization.cs => NumericValuesFacet.Serialization.cs} (69%) rename test/TestProjects/Models-TypeSpec/src/Generated/Models/{NumericValuesFacetint32.cs => NumericValuesFacet.cs} (78%) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index 58a5395a66e..492bf293955 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -92,6 +92,10 @@ export function mapTypeSpecTypeToCSharpInputTypeKind( format?: string, encode?: EncodeData ): InputPrimitiveTypeKind { + // TODO: https://github.com/Azure/typespec-azure/issues/201 + if (typespecType === undefined && format === "string") { + return InputPrimitiveTypeKind.String; + } const kind = typespecType.kind; switch (kind) { case "Model": diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index d3041edba02..0eff86322db 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -121,7 +121,7 @@ export function fromSdkModelType( .filter( (p) => !(p as SdkBodyModelPropertyType).discriminator || - !modelType.baseModel + !hasDiscriminator(modelType.baseModel) ) .map((p) => fromSdkModelPropertyType(p, program, models, enums, { @@ -141,6 +141,17 @@ export function fromSdkModelType( return inputModelType; } +function hasDiscriminator(model? : SdkModelType) : boolean { + if (model == null) + return false; + + if (model!.properties.some(p => { + return (p as SdkBodyModelPropertyType).discriminator; + })) + return true; + return hasDiscriminator(model!.baseModel); +} + export function fromSdkEnumType( enumType: SdkEnumType, program: Program, diff --git a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/ConfidentLevelsInTspModelFactory.cs b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/ConfidentLevelsInTspModelFactory.cs index fa553e2fb67..033caef9702 100644 --- a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/ConfidentLevelsInTspModelFactory.cs +++ b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/ConfidentLevelsInTspModelFactory.cs @@ -71,15 +71,6 @@ public static ModelWithFloatLiteralTypeProperty ModelWithFloatLiteralTypePropert return new ModelWithFloatLiteralTypeProperty(name, id, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The name. - /// The size. - /// A new instance for mocking. - public static BaseModel BaseModel(string name = null, double? size = null) - { - return new BaseModel(name, size, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The name. /// The size. @@ -90,6 +81,15 @@ public static DerivedModel DerivedModel(string name = null, double? size = null, return new DerivedModel(name, size, serializedAdditionalRawData: null, age); } + /// Initializes a new instance of . + /// The name. + /// The size. + /// A new instance for mocking. + public static BaseModel BaseModel(string name = null, double? size = null) + { + return new BaseModel(name, size, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The name. /// The size. diff --git a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json index 3111cb3f5fd..70162f2f60f 100644 --- a/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ConfidentLevels-TypeSpec/src/Generated/tspCodeModel.json @@ -654,54 +654,51 @@ { "$id": "79", "Kind": "Model", - "Name": "BaseModel", - "Namespace": "ConfidentLevelsInTsp", - "Description": "The base model", - "IsNullable": false, - "Usage": "Input", - "Properties": [ - { - "$id": "80", - "Name": "name", - "SerializedName": "name", - "Description": "The name", - "Type": { - "$id": "81", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false - }, - { - "$id": "82", - "Name": "size", - "SerializedName": "size", - "Description": "The size", - "Type": { - "$id": "83", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false - } - ] - }, - { - "$id": "84", - "Kind": "Model", "Name": "DerivedModel", "Namespace": "ConfidentLevelsInTsp", "Description": "The derived model", "IsNullable": false, "Usage": "Input", "BaseModel": { - "$ref": "79" + "$id": "80", + "Kind": "Model", + "Name": "BaseModel", + "Namespace": "ConfidentLevelsInTsp", + "Description": "The base model", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "81", + "Name": "name", + "SerializedName": "name", + "Description": "The name", + "Type": { + "$id": "82", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + }, + { + "$id": "83", + "Name": "size", + "SerializedName": "size", + "Description": "The size", + "Type": { + "$id": "84", + "Kind": "Primitive", + "Name": "Float64", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] }, "Properties": [ { @@ -721,6 +718,9 @@ } ] }, + { + "$ref": "80" + }, { "$id": "87", "Kind": "Model", @@ -730,7 +730,7 @@ "IsNullable": false, "Usage": "Input", "BaseModel": { - "$ref": "79" + "$ref": "80" }, "Properties": [ { @@ -1928,7 +1928,7 @@ "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "84" + "$ref": "79" }, "Location": "Body", "IsRequired": true, diff --git a/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json index b3b4a30640d..1b18a3fdab0 100644 --- a/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Docs/ModelReaderWriterValidationTypeSpecClient.xml b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Docs/ModelReaderWriterValidationTypeSpecClient.xml index 81a879b2ce4..63549b96dd6 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Docs/ModelReaderWriterValidationTypeSpecClient.xml +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Docs/ModelReaderWriterValidationTypeSpecClient.xml @@ -411,6 +411,10 @@ AvailabilitySetData body = new AvailabilitySetData("") PlatformFaultDomainCount = 1234, PlatformUpdateDomainCount = 1234, }, + Tags = + { + ["key"] = "" + }, }; Response response = await client.Op4Async(body); ]]> @@ -447,6 +451,10 @@ AvailabilitySetData body = new AvailabilitySetData("") PlatformFaultDomainCount = 1234, PlatformUpdateDomainCount = 1234, }, + Tags = + { + ["key"] = "" + }, }; Response response = client.Op4(body); ]]> diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/ModelReaderWriterValidationTypeSpecModelFactory.cs b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/ModelReaderWriterValidationTypeSpecModelFactory.cs index b7bca9e3dae..83366ca5511 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/ModelReaderWriterValidationTypeSpecModelFactory.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/ModelReaderWriterValidationTypeSpecModelFactory.cs @@ -28,34 +28,34 @@ public static ModelWithPersistableOnly ModelWithPersistableOnly(string name = nu return new ModelWithPersistableOnly(name, fields?.ToList(), nullProperty, keyValuePairs, xProperty, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id property. /// The name property. /// The resource type. /// The location property. /// The tags property. - /// A new instance for mocking. - public static TrackedResourceData TrackedResourceData(string id = null, string name = null, string resourceType = null, string location = null, IReadOnlyDictionary tags = null) + /// The sku. + /// The properties property. + /// A new instance for mocking. + public static AvailabilitySetData AvailabilitySetData(string id = null, string name = null, string resourceType = null, string location = null, IDictionary tags = null, ComputeSku sku = null, AvailabilitySetProperties properties = null) { tags ??= new Dictionary(); - return new TrackedResourceData(id, name, resourceType, location, tags, serializedAdditionalRawData: null); + return new AvailabilitySetData(id, name, resourceType, location, tags, serializedAdditionalRawData: null, sku, properties); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id property. /// The name property. /// The resource type. /// The location property. /// The tags property. - /// The sku. - /// The properties property. - /// A new instance for mocking. - public static AvailabilitySetData AvailabilitySetData(string id = null, string name = null, string resourceType = null, string location = null, IReadOnlyDictionary tags = null, ComputeSku sku = null, AvailabilitySetProperties properties = null) + /// A new instance for mocking. + public static TrackedResourceData TrackedResourceData(string id = null, string name = null, string resourceType = null, string location = null, IDictionary tags = null) { tags ??= new Dictionary(); - return new AvailabilitySetData(id, name, resourceType, location, tags, serializedAdditionalRawData: null, sku, properties); + return new TrackedResourceData(id, name, resourceType, location, tags, serializedAdditionalRawData: null); } /// Initializes a new instance of . diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.Serialization.cs b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.Serialization.cs index 7fa07fe2d73..8052b7ea4d0 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.Serialization.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.Serialization.cs @@ -109,7 +109,7 @@ internal static AvailabilitySetData DeserializeAvailabilitySetData(JsonElement e string name = default; string type = default; string location = default; - Optional> tags = default; + Optional> tags = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.cs b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.cs index 0a17d21ca90..2e40586217f 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.cs @@ -31,7 +31,7 @@ public AvailabilitySetData(string location) : base(location) /// Keeps track of any properties unknown to the library. /// The sku. /// The properties property. - internal AvailabilitySetData(string id, string name, string resourceType, string location, IReadOnlyDictionary tags, IDictionary serializedAdditionalRawData, ComputeSku sku, AvailabilitySetProperties properties) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) + internal AvailabilitySetData(string id, string name, string resourceType, string location, IDictionary tags, IDictionary serializedAdditionalRawData, ComputeSku sku, AvailabilitySetProperties properties) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) { Sku = sku; Properties = properties; diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.Serialization.cs b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.Serialization.cs index 14ba13d7ff5..4cbdd1bc2d0 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.Serialization.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.Serialization.cs @@ -97,7 +97,7 @@ internal static TrackedResourceData DeserializeTrackedResourceData(JsonElement e string name = default; string type = default; string location = default; - Optional> tags = default; + Optional> tags = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.cs b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.cs index 96c8e685541..6dc84cad224 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.cs @@ -49,7 +49,7 @@ public partial class TrackedResourceData /// Initializes a new instance of . /// The location property. /// is null. - internal TrackedResourceData(string location) + public TrackedResourceData(string location) { Argument.AssertNotNull(location, nameof(location)); @@ -64,7 +64,7 @@ internal TrackedResourceData(string location) /// The location property. /// The tags property. /// Keeps track of any properties unknown to the library. - internal TrackedResourceData(string id, string name, string resourceType, string location, IReadOnlyDictionary tags, IDictionary serializedAdditionalRawData) + internal TrackedResourceData(string id, string name, string resourceType, string location, IDictionary tags, IDictionary serializedAdditionalRawData) { Id = id; Name = name; @@ -86,8 +86,8 @@ internal TrackedResourceData() /// The resource type. public string ResourceType { get; } /// The location property. - public string Location { get; } + public string Location { get; set; } /// The tags property. - public IReadOnlyDictionary Tags { get; } + public IDictionary Tags { get; } } } diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json index 3411009a96e..a75e56eff4a 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json @@ -8,6 +8,8 @@ "$id": "2", "Kind": "Enum", "Name": "ResourceTypeAliasPatternType", + "Namespace": "ModelReaderWriterValidationTypeSpec", + "Description": "The type of alias pattern.", "EnumValueType": "String", "AllowedValues": [ { @@ -23,8 +25,6 @@ "Description": "Extract is the only allowed value." } ], - "Namespace": "ModelReaderWriterValidationTypeSpec", - "Description": "The type of alias pattern.", "IsExtensible": false, "IsNullable": false, "Usage": "Output" @@ -33,6 +33,8 @@ "$id": "5", "Kind": "Enum", "Name": "ResourceTypeAliasPathTokenType", + "Namespace": "ModelReaderWriterValidationTypeSpec", + "Description": "The type of the token that the alias path is referring to.", "EnumValueType": "String", "AllowedValues": [ { @@ -84,8 +86,6 @@ "Description": "The token type is boolean." } ], - "Namespace": "ModelReaderWriterValidationTypeSpec", - "Description": "The type of the token that the alias path is referring to.", "IsExtensible": true, "IsNullable": false, "Usage": "Output" @@ -94,6 +94,8 @@ "$id": "14", "Kind": "Enum", "Name": "ResourceTypeAliasPathAttributes", + "Namespace": "ModelReaderWriterValidationTypeSpec", + "Description": "The attributes of the token that the alias path is referring to.", "EnumValueType": "String", "AllowedValues": [ { @@ -109,8 +111,6 @@ "Description": "The token that the alias path is referring to is modifiable by policies with 'modify' effect." } ], - "Namespace": "ModelReaderWriterValidationTypeSpec", - "Description": "The attributes of the token that the alias path is referring to.", "IsExtensible": true, "IsNullable": false, "Usage": "Output" @@ -119,6 +119,8 @@ "$id": "17", "Kind": "Enum", "Name": "ResourceTypeAliasType", + "Namespace": "ModelReaderWriterValidationTypeSpec", + "Description": "The type of the alias.", "EnumValueType": "String", "AllowedValues": [ { @@ -140,8 +142,6 @@ "Description": "Alias value is secret." } ], - "Namespace": "ModelReaderWriterValidationTypeSpec", - "Description": "The type of the alias.", "IsExtensible": false, "IsNullable": false, "Usage": "Output" @@ -150,6 +150,8 @@ "$id": "21", "Kind": "Enum", "Name": "ProviderAuthorizationConsentState", + "Namespace": "ModelReaderWriterValidationTypeSpec", + "Description": "The provider authorization consent state.", "EnumValueType": "String", "AllowedValues": [ { @@ -177,8 +179,6 @@ "Description": "The provider authorization consent state is consented." } ], - "Namespace": "ModelReaderWriterValidationTypeSpec", - "Description": "The provider authorization consent state.", "IsExtensible": true, "IsNullable": false, "Usage": "Output" @@ -206,7 +206,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -230,7 +231,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "32", @@ -250,7 +252,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "35", @@ -264,7 +267,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "37", @@ -290,7 +294,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "41", @@ -304,7 +309,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, @@ -345,113 +351,116 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { "$id": "48", "Kind": "Model", - "Name": "TrackedResourceData", + "Name": "AvailabilitySetData", "Namespace": "ModelReaderWriterValidationTypeSpec", - "Description": "The tracked resource data", + "Description": "The availability set data", "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "49", - "Name": "id", - "SerializedName": "id", - "Description": "The id property.", - "Type": { + "Usage": "RoundTrip", + "BaseModel": { + "$id": "49", + "Kind": "Model", + "Name": "TrackedResourceData", + "Namespace": "ModelReaderWriterValidationTypeSpec", + "Description": "The tracked resource data", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { "$id": "50", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false + "Name": "id", + "SerializedName": "id", + "Description": "The id property.", + "Type": { + "$id": "51", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": true, + "IsDiscriminator": false }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "51", - "Name": "name", - "SerializedName": "name", - "Description": "The name property.", - "Type": { + { "$id": "52", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false + "Name": "name", + "SerializedName": "name", + "Description": "The name property.", + "Type": { + "$id": "53", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": true, + "IsDiscriminator": false }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "53", - "Name": "resourceType", - "SerializedName": "type", - "Description": "The resource type.", - "Type": { + { "$id": "54", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "55", - "Name": "location", - "SerializedName": "location", - "Description": "The location property.", - "Type": { - "$id": "56", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "57", - "Name": "tags", - "SerializedName": "tags", - "Description": "The tags property.", - "Type": { - "$id": "58", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "59", + "Name": "resourceType", + "SerializedName": "type", + "Description": "The resource type.", + "Type": { + "$id": "55", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "ValueType": { - "$id": "60", + "IsRequired": true, + "IsReadOnly": true, + "IsDiscriminator": false + }, + { + "$id": "56", + "Name": "location", + "SerializedName": "location", + "Description": "The location property.", + "Type": { + "$id": "57", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsNullable": false + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false }, - "IsRequired": false, - "IsReadOnly": false - } - ] - }, - { - "$id": "61", - "Kind": "Model", - "Name": "AvailabilitySetData", - "Namespace": "ModelReaderWriterValidationTypeSpec", - "Description": "The availability set data", - "IsNullable": false, - "Usage": "RoundTrip", - "BaseModel": { - "$ref": "48" + { + "$id": "58", + "Name": "tags", + "SerializedName": "tags", + "Description": "The tags property.", + "Type": { + "$id": "59", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "60", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "61", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] }, "Properties": [ { @@ -479,7 +488,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "66", @@ -493,7 +503,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "68", @@ -507,12 +518,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "70", @@ -558,14 +571,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "77", @@ -579,7 +594,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "79", @@ -593,15 +609,20 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, + { + "$ref": "49" + }, { "$ref": "63" }, @@ -632,7 +653,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "84", @@ -646,7 +668,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "86", @@ -660,7 +683,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "88", @@ -674,7 +698,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "90", @@ -705,7 +730,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "95", @@ -725,7 +751,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "98", @@ -757,7 +784,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "103", @@ -771,7 +799,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "105", @@ -791,14 +820,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "108", @@ -830,7 +861,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "113", @@ -862,7 +894,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "118", @@ -882,7 +915,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "121", @@ -910,7 +944,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "125", @@ -924,7 +959,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "127", @@ -935,12 +971,14 @@ "$ref": "2" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "128", @@ -965,7 +1003,8 @@ "$ref": "5" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "131", @@ -976,19 +1015,22 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "132", @@ -999,7 +1041,8 @@ "$ref": "17" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "133", @@ -1013,7 +1056,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "135", @@ -1024,7 +1068,8 @@ "$ref": "122" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "136", @@ -1035,14 +1080,16 @@ "$ref": "129" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "137", @@ -1062,7 +1109,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "140", @@ -1076,7 +1124,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "142", @@ -1108,7 +1157,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "147", @@ -1128,14 +1178,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "150", @@ -1166,7 +1218,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "155", @@ -1180,14 +1233,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "157", @@ -1201,7 +1256,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "159", @@ -1227,14 +1283,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "163", @@ -1245,7 +1303,8 @@ "$ref": "21" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1304,7 +1363,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "168", @@ -1318,7 +1378,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "170", @@ -1344,7 +1405,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "174", @@ -1358,7 +1420,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, @@ -1387,7 +1450,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] } @@ -1752,7 +1816,7 @@ "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "61" + "$ref": "48" }, "Location": "Body", "IsRequired": true, @@ -1826,7 +1890,7 @@ 200 ], "BodyType": { - "$ref": "61" + "$ref": "48" }, "BodyMediaType": "Json", "Headers": [], diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/tests/Generated/Samples/Samples_ModelReaderWriterValidationTypeSpecClient.cs b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/tests/Generated/Samples/Samples_ModelReaderWriterValidationTypeSpecClient.cs index 6a24cf061ec..e1bb725551b 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/tests/Generated/Samples/Samples_ModelReaderWriterValidationTypeSpecClient.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/tests/Generated/Samples/Samples_ModelReaderWriterValidationTypeSpecClient.cs @@ -617,6 +617,10 @@ public void Example_ModelReaderWriterValidationTypeSpec_Op4_AllParameters_Conven PlatformFaultDomainCount = 1234, PlatformUpdateDomainCount = 1234, }, + Tags = +{ +["key"] = "" +}, }; Response response = client.Op4(body); } @@ -645,6 +649,10 @@ public async Task Example_ModelReaderWriterValidationTypeSpec_Op4_AllParameters_ PlatformFaultDomainCount = 1234, PlatformUpdateDomainCount = 1234, }, + Tags = +{ +["key"] = "" +}, }; Response response = await client.Op4Async(body); } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml b/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml index 844ee6695b1..b0629a99dc9 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml @@ -8,7 +8,10 @@ This sample shows how to call PutBaseModelWithDiscriminatorDefinedOnBaseAsync. Uri endpoint = new Uri(""); ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); -BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase(""); +BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase("") +{ + Kind = "A", +}; Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(body); ]]> This sample shows how to call PutBaseModelWithDiscriminatorDefinedOnBaseAsync with all parameters. @@ -20,6 +23,7 @@ BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefin { OptionalInt = 1234, OptionalString = "", + Kind = "A", }; Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(body); ]]> @@ -31,7 +35,10 @@ This sample shows how to call PutBaseModelWithDiscriminatorDefinedOnBase. Uri endpoint = new Uri(""); ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); -BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase(""); +BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase("") +{ + Kind = "A", +}; Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(body); ]]> This sample shows how to call PutBaseModelWithDiscriminatorDefinedOnBase with all parameters. @@ -43,6 +50,7 @@ BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefin { OptionalInt = 1234, OptionalString = "", + Kind = "A", }; Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(body); ]]> @@ -1222,7 +1230,10 @@ RoundTripOptionalModel input = new RoundTripOptionalModel OptionalModelWithPropertiesOnBase = new DerivedModelWithProperties(new CollectionItem[] { default - }), + }) + { + OptionalPropertyOnBase = "", + }, OptionalFixedStringEnum = FixedStringEnum.One, OptionalExtensibleEnum = ExtensibleEnum.One, OptionalIntRecord = @@ -1279,7 +1290,10 @@ RoundTripOptionalModel input = new RoundTripOptionalModel OptionalModelWithPropertiesOnBase = new DerivedModelWithProperties(new CollectionItem[] { default - }), + }) + { + OptionalPropertyOnBase = "", + }, OptionalFixedStringEnum = FixedStringEnum.One, OptionalExtensibleEnum = ExtensibleEnum.One, OptionalIntRecord = diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithARequiredProperty.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithARequiredProperty.cs index 6534da28a11..bd952ca0b1d 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithARequiredProperty.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithARequiredProperty.cs @@ -49,7 +49,7 @@ public partial class BaseModelWithARequiredProperty /// Initializes a new instance of . /// Required kind. /// is null. - internal BaseModelWithARequiredProperty(string kind) + public BaseModelWithARequiredProperty(string kind) { Argument.AssertNotNull(kind, nameof(kind)); @@ -71,6 +71,6 @@ internal BaseModelWithARequiredProperty() } /// Required kind. - public string Kind { get; } + public string Kind { get; set; } } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithProperties.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithProperties.cs index 2b4277a722a..8d8cc5e91a2 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithProperties.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithProperties.cs @@ -46,7 +46,7 @@ public partial class BaseModelWithProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal BaseModelWithProperties() + public BaseModelWithProperties() { } @@ -60,6 +60,6 @@ internal BaseModelWithProperties(string optionalPropertyOnBase, IDictionary Optional properties on base. - public string OptionalPropertyOnBase { get; } + public string OptionalPropertyOnBase { get; set; } } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/Facet.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/Facet.cs index ea3d058e5f8..f4c78e6de6f 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/Facet.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/Facet.cs @@ -49,7 +49,7 @@ public partial class Facet /// Initializes a new instance of . /// A field to facet by, where the field is attributed as 'facetable'. /// is null. - internal Facet(string field) + public Facet(string field) { Argument.AssertNotNull(field, nameof(field)); diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.Serialization.cs index dbb269b0254..1e664c30b32 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.Serialization.cs @@ -79,7 +79,7 @@ internal static Int32ValuesFacet DeserializeInt32ValuesFacet(JsonElement element return null; } Int32ValuesFacetKind kind = default; - IReadOnlyList values = default; + IList values = default; int value = default; string field = default; IDictionary serializedAdditionalRawData = default; diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.cs index 6f3ba3ad02b..cf6494c8c2d 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.cs @@ -12,7 +12,7 @@ namespace ModelsTypeSpec.Models { /// Facets an int32 field by the specified value ranges. - public partial class Int32ValuesFacet : NumericValuesFacetint32 + public partial class Int32ValuesFacet : NumericValuesFacet { /// Initializes a new instance of . /// A field to facet by, where the field is attributed as 'facetable'. @@ -31,7 +31,7 @@ public Int32ValuesFacet(string field, IEnumerable values, int value) : base /// The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher. /// /// The facet type. - internal Int32ValuesFacet(string field, IDictionary serializedAdditionalRawData, IReadOnlyList values, int value, Int32ValuesFacetKind kind) : base(field, serializedAdditionalRawData, values, value) + internal Int32ValuesFacet(string field, IDictionary serializedAdditionalRawData, IList values, int value, Int32ValuesFacetKind kind) : base(field, serializedAdditionalRawData, values, value) { Kind = kind; } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/NoUseBase.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/NoUseBase.cs index 6726343e15c..3ebe702d94b 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/NoUseBase.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/NoUseBase.cs @@ -49,7 +49,7 @@ public partial class NoUseBase /// Initializes a new instance of . /// base model property. /// is null. - internal NoUseBase(string baseModelProp) + public NoUseBase(string baseModelProp) { Argument.AssertNotNull(baseModelProp, nameof(baseModelProp)); @@ -71,6 +71,6 @@ internal NoUseBase() } /// base model property. - public string BaseModelProp { get; } + public string BaseModelProp { get; set; } } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacetint32.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacet.Serialization.cs similarity index 69% rename from test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacetint32.Serialization.cs rename to test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacet.Serialization.cs index d0320d75593..61b715189f6 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacetint32.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacet.Serialization.cs @@ -14,16 +14,16 @@ namespace ModelsTypeSpec.Models { - public partial class NumericValuesFacetint32 : IUtf8JsonSerializable, IJsonModel + public partial class NumericValuesFacet : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(NumericValuesFacetint32)} does not support '{format}' format."); + throw new FormatException($"The model {nameof(NumericValuesFacet)} does not support '{format}' format."); } writer.WriteStartObject(); @@ -56,19 +56,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteEndObject(); } - NumericValuesFacetint32 IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + NumericValuesFacet IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(NumericValuesFacetint32)} does not support '{format}' format."); + throw new FormatException($"The model {nameof(NumericValuesFacet)} does not support '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNumericValuesFacetint32(document.RootElement, options); + return DeserializeNumericValuesFacet(document.RootElement, options); } - internal static NumericValuesFacetint32 DeserializeNumericValuesFacetint32(JsonElement element, ModelReaderWriterOptions options = null) + internal static NumericValuesFacet DeserializeNumericValuesFacet(JsonElement element, ModelReaderWriterOptions options = null) { options ??= new ModelReaderWriterOptions("W"); @@ -76,7 +76,7 @@ internal static NumericValuesFacetint32 DeserializeNumericValuesFacetint32(JsonE { return null; } - IReadOnlyList values = default; + IList values = default; int value = default; string field = default; IDictionary serializedAdditionalRawData = default; @@ -109,46 +109,46 @@ internal static NumericValuesFacetint32 DeserializeNumericValuesFacetint32(JsonE } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new NumericValuesFacetint32(field, serializedAdditionalRawData, values, value); + return new NumericValuesFacet(field, serializedAdditionalRawData, values, value); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(NumericValuesFacetint32)} does not support '{options.Format}' format."); + throw new FormatException($"The model {nameof(NumericValuesFacet)} does not support '{options.Format}' format."); } } - NumericValuesFacetint32 IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + NumericValuesFacet IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeNumericValuesFacetint32(document.RootElement, options); + return DeserializeNumericValuesFacet(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(NumericValuesFacetint32)} does not support '{options.Format}' format."); + throw new FormatException($"The model {nameof(NumericValuesFacet)} does not support '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new NumericValuesFacetint32 FromResponse(Response response) + internal static new NumericValuesFacet FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeNumericValuesFacetint32(document.RootElement); + return DeserializeNumericValuesFacet(document.RootElement); } /// Convert into a Utf8JsonRequestContent. diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacetint32.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacet.cs similarity index 78% rename from test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacetint32.cs rename to test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacet.cs index ffed7e82d9d..93f34051b7a 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacetint32.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacet.cs @@ -12,15 +12,15 @@ namespace ModelsTypeSpec.Models { - /// The NumericValuesFacetint32. - public partial class NumericValuesFacetint32 : Facet + /// The NumericValuesFacet. + public partial class NumericValuesFacet : Facet { - /// Initializes a new instance of . + /// Initializes a new instance of . /// A field to facet by, where the field is attributed as 'facetable'. /// The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher. /// /// or is null. - internal NumericValuesFacetint32(string field, IEnumerable values, int value) : base(field) + public NumericValuesFacet(string field, IEnumerable values, int value) : base(field) { Argument.AssertNotNull(field, nameof(field)); Argument.AssertNotNull(values, nameof(values)); @@ -29,24 +29,24 @@ internal NumericValuesFacetint32(string field, IEnumerable values, int valu Value = value; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// A field to facet by, where the field is attributed as 'facetable'. /// Keeps track of any properties unknown to the library. /// The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher. /// - internal NumericValuesFacetint32(string field, IDictionary serializedAdditionalRawData, IReadOnlyList values, int value) : base(field, serializedAdditionalRawData) + internal NumericValuesFacet(string field, IDictionary serializedAdditionalRawData, IList values, int value) : base(field, serializedAdditionalRawData) { Values = values; Value = value; } - /// Initializes a new instance of for deserialization. - internal NumericValuesFacetint32() + /// Initializes a new instance of for deserialization. + internal NumericValuesFacet() { } /// The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher. - public IReadOnlyList Values { get; } + public IList Values { get; } /// Gets the value. public int Value { get; } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.Serialization.cs index 5f85d6fb50d..9732972ad1a 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.Serialization.cs @@ -104,7 +104,7 @@ internal static RoundTripPrimitiveModel DeserializeRoundTripPrimitiveModel(JsonE bool requiredBoolean = default; DateTimeOffset requiredDateTimeOffset = default; TimeSpan requiredTimeSpan = default; - IList requiredCollectionWithNullableFloatElement = default; + IReadOnlyList requiredCollectionWithNullableFloatElement = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.cs index 4e91f6f3a18..643ab921175 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.cs @@ -27,7 +27,7 @@ public partial class RoundTripPrimitiveModel : BaseModel /// Required time span, illustrating a value type property. /// Required collection of which the element is a nullable float. /// or is null. - public RoundTripPrimitiveModel(string requiredString, int requiredInt, long requiredInt64, long requiredSafeInt, float requiredFloat, double requiredDouble, bool requiredBoolean, DateTimeOffset requiredDateTimeOffset, TimeSpan requiredTimeSpan, IEnumerable requiredCollectionWithNullableFloatElement) + internal RoundTripPrimitiveModel(string requiredString, int requiredInt, long requiredInt64, long requiredSafeInt, float requiredFloat, double requiredDouble, bool requiredBoolean, DateTimeOffset requiredDateTimeOffset, TimeSpan requiredTimeSpan, IEnumerable requiredCollectionWithNullableFloatElement) { Argument.AssertNotNull(requiredString, nameof(requiredString)); Argument.AssertNotNull(requiredCollectionWithNullableFloatElement, nameof(requiredCollectionWithNullableFloatElement)); @@ -56,7 +56,7 @@ public RoundTripPrimitiveModel(string requiredString, int requiredInt, long requ /// Required date time offset, illustrating a reference type property. /// Required time span, illustrating a value type property. /// Required collection of which the element is a nullable float. - internal RoundTripPrimitiveModel(IDictionary serializedAdditionalRawData, string requiredString, int requiredInt, long requiredInt64, long requiredSafeInt, float requiredFloat, double requiredDouble, bool requiredBoolean, DateTimeOffset requiredDateTimeOffset, TimeSpan requiredTimeSpan, IList requiredCollectionWithNullableFloatElement) : base(serializedAdditionalRawData) + internal RoundTripPrimitiveModel(IDictionary serializedAdditionalRawData, string requiredString, int requiredInt, long requiredInt64, long requiredSafeInt, float requiredFloat, double requiredDouble, bool requiredBoolean, DateTimeOffset requiredDateTimeOffset, TimeSpan requiredTimeSpan, IReadOnlyList requiredCollectionWithNullableFloatElement) : base(serializedAdditionalRawData) { RequiredString = requiredString; RequiredInt = requiredInt; @@ -76,24 +76,24 @@ internal RoundTripPrimitiveModel() } /// Required string, illustrating a reference type property. - public string RequiredString { get; set; } + public string RequiredString { get; } /// Required int, illustrating a value type property. - public int RequiredInt { get; set; } + public int RequiredInt { get; } /// Required int64, illustrating a value type property. - public long RequiredInt64 { get; set; } + public long RequiredInt64 { get; } /// Required safeint, illustrating a value type property. - public long RequiredSafeInt { get; set; } + public long RequiredSafeInt { get; } /// Required float, illustrating a value type property. - public float RequiredFloat { get; set; } + public float RequiredFloat { get; } /// Required double, illustrating a value type property. - public double RequiredDouble { get; set; } + public double RequiredDouble { get; } /// Required bolean, illustrating a value type property. - public bool RequiredBoolean { get; set; } + public bool RequiredBoolean { get; } /// Required date time offset, illustrating a reference type property. - public DateTimeOffset RequiredDateTimeOffset { get; set; } + public DateTimeOffset RequiredDateTimeOffset { get; } /// Required time span, illustrating a value type property. - public TimeSpan RequiredTimeSpan { get; set; } + public TimeSpan RequiredTimeSpan { get; } /// Required collection of which the element is a nullable float. - public IList RequiredCollectionWithNullableFloatElement { get; } + public IReadOnlyList RequiredCollectionWithNullableFloatElement { get; } } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs b/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs index b4b9b4152c1..09e97e2d662 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs @@ -14,23 +14,6 @@ namespace ModelsTypeSpec.Models /// Model factory for models. public static partial class ModelsTypeSpecModelFactory { - /// Initializes a new instance of . - /// Required kind. - /// A new instance for mocking. - public static BaseModelWithARequiredProperty BaseModelWithARequiredProperty(string kind = null) - { - return new BaseModelWithARequiredProperty(kind, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Required kind. - /// Optional string. - /// A new instance for mocking. - public static BaseModelWithDiscriminatorDefinedOnBase BaseModelWithDiscriminatorDefinedOnBase(string kind = null, string optionalString = null) - { - return new UnknownBaseModelWithDiscriminatorDefinedOnBase(kind, serializedAdditionalRawData: null, optionalString); - } - /// Initializes a new instance of . /// Required string. /// Required int. @@ -127,23 +110,23 @@ public static RoundTripModel RoundTripModel(string requiredString = null, int re return new RoundTripModel(serializedAdditionalRawData: null, requiredString, requiredInt, nonRequiredString, nonRequiredInt, requiredNullableInt, requiredNullableString, nonRequiredNullableInt, nonRequiredNullableString, requiredReadonlyInt, nonRequiredReadonlyInt, requiredModel, requiredFixedStringEnum, requiredFixedIntEnum, requiredExtensibleEnum, requiredList?.ToList(), requiredIntRecord, requiredStringRecord, requiredModelRecord, requiredBytes, optionalBytes, requiredUint8Array?.ToList(), optionalUint8Array?.ToList(), requiredUnknown, optionalUnknown, requiredInt8Array?.ToList(), optionalInt8Array?.ToList(), requiredNullableIntList?.ToList(), requiredNullableStringList?.ToList(), nonRequiredNullableIntList?.ToList(), nonRequiredNullableStringList?.ToList()); } - /// Initializes a new instance of . - /// Optional properties on base. - /// A new instance for mocking. - public static BaseModelWithProperties BaseModelWithProperties(string optionalPropertyOnBase = null) - { - return new BaseModelWithProperties(optionalPropertyOnBase, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Optional properties on base. - /// Required collection. - /// A new instance for mocking. - public static DerivedModelWithProperties DerivedModelWithProperties(string optionalPropertyOnBase = null, IEnumerable requiredList = null) + /// Initializes a new instance of . + /// Required string, illustrating a reference type property. + /// Required int, illustrating a value type property. + /// Required int64, illustrating a value type property. + /// Required safeint, illustrating a value type property. + /// Required float, illustrating a value type property. + /// Required double, illustrating a value type property. + /// Required bolean, illustrating a value type property. + /// Required date time offset, illustrating a reference type property. + /// Required time span, illustrating a value type property. + /// Required collection of which the element is a nullable float. + /// A new instance for mocking. + public static RoundTripPrimitiveModel RoundTripPrimitiveModel(string requiredString = null, int requiredInt = default, long requiredInt64 = default, long requiredSafeInt = default, float requiredFloat = default, double requiredDouble = default, bool requiredBoolean = default, DateTimeOffset requiredDateTimeOffset = default, TimeSpan requiredTimeSpan = default, IEnumerable requiredCollectionWithNullableFloatElement = null) { - requiredList ??= new List(); + requiredCollectionWithNullableFloatElement ??= new List(); - return new DerivedModelWithProperties(optionalPropertyOnBase, serializedAdditionalRawData: null, requiredList?.ToList()); + return new RoundTripPrimitiveModel(serializedAdditionalRawData: null, requiredString, requiredInt, requiredInt64, requiredSafeInt, requiredFloat, requiredDouble, requiredBoolean, requiredDateTimeOffset, requiredTimeSpan, requiredCollectionWithNullableFloatElement?.ToList()); } /// Initializes a new instance of . @@ -233,14 +216,6 @@ public static ErrorModel ErrorModel(string message = null, ErrorModel innerError return new ErrorModel(message, innerError, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// base model property. - /// A new instance for mocking. - public static NoUseBase NoUseBase(string baseModelProp = null) - { - return new NoUseBase(baseModelProp, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Discriminator. /// @@ -250,26 +225,6 @@ public static SingleBase SingleBase(string kind = null, int size = default) return new UnknownSingleBase(kind, size, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// A field to facet by, where the field is attributed as 'facetable'. - /// A new instance for mocking. - public static Facet Facet(string field = null) - { - return new Facet(field, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// A field to facet by, where the field is attributed as 'facetable'. - /// The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher. - /// - /// A new instance for mocking. - public static NumericValuesFacetint32 NumericValuesFacetint32(string field = null, IEnumerable values = null, int value = default) - { - values ??= new List(); - - return new NumericValuesFacetint32(field, serializedAdditionalRawData: null, values?.ToList(), value); - } - /// Initializes a new instance of . /// A field to facet by, where the field is attributed as 'facetable'. /// The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher. @@ -283,16 +238,6 @@ public static Int32ValuesFacet Int32ValuesFacet(string field = null, IEnumerable return new Int32ValuesFacet(field, serializedAdditionalRawData: null, values?.ToList(), value, kind); } - /// Initializes a new instance of . - /// Optional string. - /// Required string. - /// Optional int. - /// A new instance for mocking. - public static DerivedWithDiscriminatorDefinedOnBase DerivedWithDiscriminatorDefinedOnBase(string optionalString = null, string requiredString = null, int? optionalInt = null) - { - return new DerivedWithDiscriminatorDefinedOnBase("A", serializedAdditionalRawData: null, optionalString, requiredString, optionalInt); - } - /// Initializes a new instance of . /// /// A new instance for mocking. diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index 5aeebc1c5ce..349a4ad91ed 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -10,6 +10,8 @@ "$id": "2", "Kind": "Enum", "Name": "FixedStringEnum", + "Namespace": "ModelsTypeSpec", + "Description": "Fixed string enum", "EnumValueType": "String", "AllowedValues": [ { @@ -28,8 +30,6 @@ "Value": "4" } ], - "Namespace": "ModelsTypeSpec", - "Description": "Fixed string enum", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -38,7 +38,10 @@ "$id": "6", "Kind": "Enum", "Name": "FixedIntEnum", - "EnumValueType": "Float32", + "Namespace": "ModelsTypeSpec", + "Deprecated": "deprecated for test", + "Description": "Fixed int enum", + "EnumValueType": "String", "AllowedValues": [ { "$id": "7", @@ -56,9 +59,6 @@ "Value": 4 } ], - "Namespace": "ModelsTypeSpec", - "Deprecated": "deprecated for test", - "Description": "Fixed int enum", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -67,6 +67,9 @@ "$id": "10", "Kind": "Enum", "Name": "ExtensibleEnum", + "Namespace": "ModelsTypeSpec", + "Deprecated": "deprecated for test", + "Description": "Extensible enum", "EnumValueType": "String", "AllowedValues": [ { @@ -85,9 +88,6 @@ "Value": "4" } ], - "Namespace": "ModelsTypeSpec", - "Deprecated": "deprecated for test", - "Description": "Extensible enum", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -96,6 +96,9 @@ "$id": "14", "Kind": "Enum", "Name": "FixedFloatEnum", + "Namespace": "ModelsTypeSpec", + "Deprecated": "should be replaced by cadl-ranch", + "Description": "Fixed float enum", "EnumValueType": "Float32", "AllowedValues": [ { @@ -114,9 +117,6 @@ "Value": 4 } ], - "Namespace": "ModelsTypeSpec", - "Deprecated": "should be replaced by cadl-ranch", - "Description": "Fixed float enum", "IsExtensible": false, "IsNullable": false, "Usage": "Input" @@ -125,7 +125,10 @@ "$id": "18", "Kind": "Enum", "Name": "ExtensibleIntEnum", - "EnumValueType": "Float32", + "Namespace": "ModelsTypeSpec", + "Deprecated": "should be replaced by cadl-ranch", + "Description": "Extensible int enum", + "EnumValueType": "String", "AllowedValues": [ { "$id": "19", @@ -143,9 +146,6 @@ "Value": 4 } ], - "Namespace": "ModelsTypeSpec", - "Deprecated": "should be replaced by cadl-ranch", - "Description": "Extensible int enum", "IsExtensible": true, "IsNullable": false, "Usage": "Input" @@ -192,31 +192,6 @@ { "$id": "26", "Kind": "Model", - "Name": "BaseModelWithARequiredProperty", - "Namespace": "ModelsTypeSpec", - "Description": "A base model with a required property", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "27", - "Name": "kind", - "SerializedName": "kind", - "Description": "Required kind", - "Type": { - "$id": "28", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "29", - "Kind": "Model", "Name": "BaseModelWithDiscriminatorDefinedOnBase", "Namespace": "ModelsTypeSpec", "Description": "A base model in the discriminated set inheriting from a base with the predefined discriminator property", @@ -224,7 +199,30 @@ "DiscriminatorPropertyName": "kind", "Usage": "RoundTrip", "BaseModel": { - "$ref": "26" + "$id": "27", + "Kind": "Model", + "Name": "BaseModelWithARequiredProperty", + "Namespace": "ModelsTypeSpec", + "Description": "A base model with a required property", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "28", + "Name": "kind", + "SerializedName": "kind", + "Description": "Required kind", + "Type": { + "$id": "29", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] }, "Properties": [ { @@ -232,14 +230,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "31", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { @@ -254,10 +252,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, + { + "$ref": "27" + }, { "$id": "34", "Kind": "Model", @@ -273,14 +275,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "36", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true } ] @@ -306,7 +308,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "40", @@ -320,7 +323,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "42", @@ -334,7 +338,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "44", @@ -348,7 +353,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "46", @@ -362,7 +368,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "48", @@ -376,7 +383,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "50", @@ -390,11 +398,12 @@ "Namespace": "ModelsTypeSpec", "Description": "Base model", "IsNullable": false, - "Usage": "Input", + "Usage": "RoundTrip", "Properties": [] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "52", @@ -405,7 +414,8 @@ "$ref": "51" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "53", @@ -425,7 +435,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "56", @@ -445,7 +456,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "59", @@ -515,7 +527,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -524,14 +537,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "69", @@ -554,7 +569,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "72", @@ -574,7 +590,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "75", @@ -594,7 +611,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "78", @@ -611,7 +629,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "80", @@ -631,7 +650,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "83", @@ -651,7 +671,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "86", @@ -668,7 +689,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "88", @@ -688,7 +710,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "91", @@ -708,7 +731,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "94", @@ -725,7 +749,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "96", @@ -745,7 +770,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "99", @@ -765,7 +791,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -776,10 +803,10 @@ "$ref": "61" }, { - "$ref": "66" + "$ref": "65" }, { - "$ref": "65" + "$ref": "66" }, { "$id": "102", @@ -805,7 +832,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "105", @@ -819,7 +847,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "107", @@ -833,7 +862,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "109", @@ -847,7 +877,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "111", @@ -861,7 +892,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "113", @@ -875,7 +907,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "115", @@ -889,7 +922,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "117", @@ -903,7 +937,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "119", @@ -917,7 +952,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "121", @@ -931,7 +967,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "123", @@ -953,14 +990,14 @@ "Name": "discriminatorProperty", "SerializedName": "discriminatorProperty", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { @@ -975,7 +1012,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "129", @@ -989,12 +1027,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "131", @@ -1005,7 +1045,8 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "132", @@ -1016,7 +1057,8 @@ "$ref": "6" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "133", @@ -1027,7 +1069,8 @@ "$ref": "10" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "134", @@ -1044,7 +1087,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "136", @@ -1070,7 +1114,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "140", @@ -1096,7 +1141,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "144", @@ -1119,7 +1165,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "147", @@ -1133,7 +1180,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "149", @@ -1147,7 +1195,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "151", @@ -1167,7 +1216,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "154", @@ -1187,7 +1237,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "157", @@ -1201,7 +1252,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "159", @@ -1215,7 +1267,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "161", @@ -1235,7 +1288,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "164", @@ -1255,7 +1309,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "167", @@ -1275,7 +1330,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "170", @@ -1295,7 +1351,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "173", @@ -1315,7 +1372,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "176", @@ -1335,7 +1393,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1349,7 +1408,7 @@ "Namespace": "ModelsTypeSpec", "Description": "Model used both as input and output with primitive types", "IsNullable": false, - "Usage": "RoundTrip", + "Usage": "Output", "BaseModel": { "$ref": "51" }, @@ -1366,7 +1425,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "182", @@ -1380,7 +1440,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "184", @@ -1394,7 +1455,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "186", @@ -1408,7 +1470,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "188", @@ -1422,7 +1485,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "190", @@ -1436,7 +1500,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "192", @@ -1450,7 +1515,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "194", @@ -1460,11 +1526,12 @@ "Type": { "$id": "195", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "196", @@ -1478,7 +1545,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "198", @@ -1498,7 +1566,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1524,7 +1593,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "204", @@ -1538,7 +1608,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "206", @@ -1558,7 +1629,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "209", @@ -1578,7 +1650,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "212", @@ -1595,7 +1668,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "214", @@ -1606,7 +1680,8 @@ "$ref": "66" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "215", @@ -1628,7 +1703,7 @@ "Namespace": "ModelsTypeSpec", "Description": "Base model with properties", "IsNullable": false, - "Usage": "None", + "Usage": "RoundTrip", "Properties": [ { "$id": "218", @@ -1642,7 +1717,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1662,12 +1738,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "222", @@ -1678,7 +1756,8 @@ "$ref": "2" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "223", @@ -1689,7 +1768,8 @@ "$ref": "10" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "224", @@ -1715,7 +1795,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "228", @@ -1741,7 +1822,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "232", @@ -1764,7 +1846,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "235", @@ -1778,7 +1861,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "237", @@ -1792,7 +1876,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "239", @@ -1812,15 +1897,16 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "217" + "$ref": "216" }, { - "$ref": "216" + "$ref": "217" }, { "$id": "242", @@ -1843,7 +1929,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "245", @@ -1857,7 +1944,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "247", @@ -1871,7 +1959,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "249", @@ -1885,7 +1974,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "251", @@ -1896,7 +1986,8 @@ "$ref": "66" }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "252", @@ -1907,7 +1998,8 @@ "$ref": "66" }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "253", @@ -1918,7 +2010,8 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "254", @@ -1929,7 +2022,8 @@ "$ref": "10" }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "255", @@ -1940,7 +2034,8 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "256", @@ -1951,7 +2046,8 @@ "$ref": "10" }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "257", @@ -1971,7 +2067,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "260", @@ -1991,7 +2088,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "263", @@ -2008,7 +2106,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "265", @@ -2034,7 +2133,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "269", @@ -2060,7 +2160,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "273", @@ -2083,7 +2184,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "276", @@ -2103,7 +2205,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "279", @@ -2123,7 +2226,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "282", @@ -2140,7 +2244,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "284", @@ -2166,7 +2271,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "288", @@ -2192,7 +2298,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "292", @@ -2215,7 +2322,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "295", @@ -2235,7 +2343,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "298", @@ -2255,7 +2364,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2280,7 +2390,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "304", @@ -2294,7 +2405,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "306", @@ -2305,7 +2417,8 @@ "$ref": "66" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "307", @@ -2322,7 +2435,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "309", @@ -2345,7 +2459,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "312", @@ -2362,7 +2477,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "314", @@ -2379,7 +2495,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "316", @@ -2402,7 +2519,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "319", @@ -2425,7 +2543,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2450,7 +2569,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "325", @@ -2461,7 +2581,8 @@ "$ref": "322" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2486,7 +2607,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "329", @@ -2497,7 +2619,8 @@ "$ref": "326" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2522,7 +2645,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "333", @@ -2533,45 +2657,44 @@ "$ref": "330" }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, { "$id": "334", "Kind": "Model", - "Name": "NoUseBase", - "Namespace": "ModelsTypeSpec", - "Description": "Base model", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "335", - "Name": "baseModelProp", - "SerializedName": "baseModelProp", - "Description": "base model property", - "Type": { - "$id": "336", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "337", - "Kind": "Model", "Name": "RoundTripOnNoUse", "Namespace": "ModelsTypeSpec", "Description": "Derived model", "IsNullable": false, "Usage": "RoundTrip", "BaseModel": { - "$ref": "334" + "$id": "335", + "Kind": "Model", + "Name": "NoUseBase", + "Namespace": "ModelsTypeSpec", + "Description": "Base model", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "336", + "Name": "baseModelProp", + "SerializedName": "baseModelProp", + "Description": "base model property", + "Type": { + "$id": "337", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] }, "Properties": [ { @@ -2589,10 +2712,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, + { + "$ref": "335" + }, { "$id": "340", "Kind": "Model", @@ -2608,14 +2735,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "342", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { @@ -2630,92 +2757,90 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { "$id": "345", "Kind": "Model", - "Name": "Facet", - "Namespace": "ModelsTypeSpec", - "Description": "Facet", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "346", - "Name": "field", - "SerializedName": "field", - "Description": "A field to facet by, where the field is attributed as 'facetable'", - "Type": { - "$id": "347", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "348", - "Kind": "Model", - "Name": "NumericValuesFacetint32", + "Name": "Int32ValuesFacet", "Namespace": "ModelsTypeSpec", + "Description": "Facets an int32 field by the specified value ranges.", "IsNullable": false, - "Usage": "None", + "Usage": "Input", "BaseModel": { - "$ref": "345" - }, - "Properties": [ - { - "$id": "349", - "Name": "values", - "SerializedName": "values", - "Description": "The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher.", - "Type": { + "$id": "346", + "Kind": "Model", + "Name": "NumericValuesFacet", + "Namespace": "ModelsTypeSpec", + "IsNullable": false, + "Usage": "Input", + "BaseModel": { + "$id": "347", + "Kind": "Model", + "Name": "Facet", + "Namespace": "ModelsTypeSpec", + "Description": "Facet", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "348", + "Name": "field", + "SerializedName": "field", + "Description": "A field to facet by, where the field is attributed as 'facetable'", + "Type": { + "$id": "349", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] + }, + "Properties": [ + { "$id": "350", - "Kind": "Array", - "Name": "Array", - "ElementType": { + "Name": "values", + "SerializedName": "values", + "Description": "The facet ranges to produce. The values must be listed in ascending order to get the expected results. For example, values=10,20 produces three buckets: one for base rate 0 up to but not including 10, one for 10 up to but not including 20, and one for 20 and higher.", + "Type": { "$id": "351", - "Kind": "Primitive", - "Name": "Int32", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$id": "352", + "Kind": "Primitive", + "Name": "Int32", + "IsNullable": false + }, "IsNullable": false }, - "IsNullable": false + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "352", - "Name": "value", - "SerializedName": "value", - "Description": "", - "Type": { + { "$id": "353", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "354", - "Kind": "Model", - "Name": "Int32ValuesFacet", - "Namespace": "ModelsTypeSpec", - "Description": "Facets an int32 field by the specified value ranges.", - "IsNullable": false, - "Usage": "Input", - "BaseModel": { - "$ref": "348" + "Name": "value", + "SerializedName": "value", + "Description": "", + "Type": { + "$id": "354", + "Kind": "Primitive", + "Name": "Int32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] }, "Properties": [ { @@ -2734,10 +2859,17 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, + { + "$ref": "346" + }, + { + "$ref": "347" + }, { "$id": "357", "Kind": "Model", @@ -2748,7 +2880,7 @@ "DiscriminatorValue": "A", "Usage": "RoundTrip", "BaseModel": { - "$ref": "29" + "$ref": "26" }, "Properties": [ { @@ -2763,7 +2895,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "360", @@ -2777,7 +2910,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2806,7 +2940,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2835,7 +2970,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2864,7 +3000,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -2893,67 +3030,29 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "374", - "Kind": "Model", - "Name": "Foo", - "Namespace": "ModelsTypeSpec", - "Description": "This is a model.", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "375", - "Name": "id", - "SerializedName": "id", - "Description": "id of Foo", - "Type": { - "$id": "376", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "377", - "Name": "name", - "SerializedName": "name", - "Description": "name of Foo", - "Type": { - "$id": "378", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } ], "Clients": [ { - "$id": "379", + "$id": "374", "Name": "ModelsTypeSpecClient", "Description": "CADL project to test various types of models.", "Operations": [ { - "$id": "380", + "$id": "375", "Name": "putBaseModelWithDiscriminatorDefinedOnBase", "ResourceName": "ModelsTypeSpec", "Parameters": [ { - "$id": "381", + "$id": "376", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "382", + "$id": "377", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2969,11 +3068,11 @@ "Kind": "Client" }, { - "$id": "383", + "$id": "378", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "29" + "$ref": "26" }, "Location": "Body", "IsRequired": true, @@ -2986,11 +3085,11 @@ "Kind": "Method" }, { - "$id": "384", + "$id": "379", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "385", + "$id": "380", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3005,19 +3104,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "386", + "$id": "381", "Type": { - "$ref": "385" + "$ref": "380" }, "Value": "application/json" } }, { - "$id": "387", + "$id": "382", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "388", + "$id": "383", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3032,9 +3131,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "389", + "$id": "384", "Type": { - "$ref": "388" + "$ref": "383" }, "Value": "application/json" } @@ -3042,12 +3141,12 @@ ], "Responses": [ { - "$id": "390", + "$id": "385", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "29" + "$ref": "26" }, "BodyMediaType": "Json", "Headers": [], @@ -3069,19 +3168,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "391", + "$id": "386", "Name": "getOutputDiscriminatorModel", "ResourceName": "ModelsTypeSpec", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "392", + "$id": "387", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "393", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3096,9 +3195,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "394", + "$id": "389", "Type": { - "$ref": "393" + "$ref": "388" }, "Value": "application/json" } @@ -3106,7 +3205,7 @@ ], "Responses": [ { - "$id": "395", + "$id": "390", "StatusCodes": [ 200 ], @@ -3130,16 +3229,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "396", + "$id": "391", "Name": "inputToRoundTrip", "ResourceName": "ModelsTypeSpec", "Description": "Input model that has property of its own type", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "397", + "$id": "392", "Name": "input", "NameInRequest": "input", "Type": { @@ -3156,11 +3255,11 @@ "Kind": "Method" }, { - "$id": "398", + "$id": "393", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "399", + "$id": "394", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3175,19 +3274,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "400", + "$id": "395", "Type": { - "$ref": "399" + "$ref": "394" }, "Value": "application/json" } }, { - "$id": "401", + "$id": "396", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "402", + "$id": "397", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3202,9 +3301,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "403", + "$id": "398", "Type": { - "$ref": "402" + "$ref": "397" }, "Value": "application/json" } @@ -3212,7 +3311,7 @@ ], "Responses": [ { - "$id": "404", + "$id": "399", "StatusCodes": [ 200 ], @@ -3239,16 +3338,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "405", + "$id": "400", "Name": "inputToRoundTripPrimitive", "ResourceName": "ModelsTypeSpec", "Description": "Input to RoundTripPrimitive", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "406", + "$id": "401", "Name": "input", "NameInRequest": "input", "Type": { @@ -3265,11 +3364,11 @@ "Kind": "Method" }, { - "$id": "407", + "$id": "402", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "408", + "$id": "403", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3284,19 +3383,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "409", + "$id": "404", "Type": { - "$ref": "408" + "$ref": "403" }, "Value": "application/json" } }, { - "$id": "410", + "$id": "405", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "411", + "$id": "406", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3311,9 +3410,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "412", + "$id": "407", "Type": { - "$ref": "411" + "$ref": "406" }, "Value": "application/json" } @@ -3321,7 +3420,7 @@ ], "Responses": [ { - "$id": "413", + "$id": "408", "StatusCodes": [ 200 ], @@ -3348,16 +3447,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "414", + "$id": "409", "Name": "inputToRoundTripOptional", "ResourceName": "ModelsTypeSpec", "Description": "Input to RoundTripOptional", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "415", + "$id": "410", "Name": "input", "NameInRequest": "input", "Type": { @@ -3374,11 +3473,11 @@ "Kind": "Method" }, { - "$id": "416", + "$id": "411", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "417", + "$id": "412", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3393,19 +3492,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "418", + "$id": "413", "Type": { - "$ref": "417" + "$ref": "412" }, "Value": "application/json" } }, { - "$id": "419", + "$id": "414", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "420", + "$id": "415", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3420,9 +3519,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "421", + "$id": "416", "Type": { - "$ref": "420" + "$ref": "415" }, "Value": "application/json" } @@ -3430,7 +3529,7 @@ ], "Responses": [ { - "$id": "422", + "$id": "417", "StatusCodes": [ 200 ], @@ -3457,17 +3556,17 @@ "GenerateConvenienceMethod": true }, { - "$id": "423", + "$id": "418", "Name": "inputToRoundTripReadOnly", "ResourceName": "ModelsTypeSpec", "Deprecated": "deprecated for test", "Description": "Input to RoundTripReadOnly", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "424", + "$id": "419", "Name": "input", "NameInRequest": "input", "Type": { @@ -3484,11 +3583,11 @@ "Kind": "Method" }, { - "$id": "425", + "$id": "420", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "426", + "$id": "421", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3503,19 +3602,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "427", + "$id": "422", "Type": { - "$ref": "426" + "$ref": "421" }, "Value": "application/json" } }, { - "$id": "428", + "$id": "423", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "429", + "$id": "424", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3530,9 +3629,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "430", + "$id": "425", "Type": { - "$ref": "429" + "$ref": "424" }, "Value": "application/json" } @@ -3540,7 +3639,7 @@ ], "Responses": [ { - "$id": "431", + "$id": "426", "StatusCodes": [ 200 ], @@ -3567,16 +3666,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "432", + "$id": "427", "Name": "roundTripToOutput", "ResourceName": "ModelsTypeSpec", "Description": "RoundTrip to Output", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "433", + "$id": "428", "Name": "input", "NameInRequest": "input", "Type": { @@ -3593,11 +3692,11 @@ "Kind": "Method" }, { - "$id": "434", + "$id": "429", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "435", + "$id": "430", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3612,19 +3711,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "436", + "$id": "431", "Type": { - "$ref": "435" + "$ref": "430" }, "Value": "application/json" } }, { - "$id": "437", + "$id": "432", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "438", + "$id": "433", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3639,9 +3738,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "439", + "$id": "434", "Type": { - "$ref": "438" + "$ref": "433" }, "Value": "application/json" } @@ -3649,7 +3748,7 @@ ], "Responses": [ { - "$id": "440", + "$id": "435", "StatusCodes": [ 200 ], @@ -3676,16 +3775,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "441", + "$id": "436", "Name": "InputRecursive", "ResourceName": "ModelsTypeSpec", "Description": "Input recursive model", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "442", + "$id": "437", "Name": "input", "NameInRequest": "input", "Type": { @@ -3702,11 +3801,11 @@ "Kind": "Method" }, { - "$id": "443", + "$id": "438", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "444", + "$id": "439", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3721,19 +3820,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "445", + "$id": "440", "Type": { - "$ref": "444" + "$ref": "439" }, "Value": "application/json" } }, { - "$id": "446", + "$id": "441", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "447", + "$id": "442", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3748,9 +3847,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "448", + "$id": "443", "Type": { - "$ref": "447" + "$ref": "442" }, "Value": "application/json" } @@ -3758,7 +3857,7 @@ ], "Responses": [ { - "$id": "449", + "$id": "444", "StatusCodes": [ 200 ], @@ -3779,16 +3878,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "450", + "$id": "445", "Name": "roundTripRecursive", "ResourceName": "ModelsTypeSpec", "Description": "RoundTrip recursive model", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "451", + "$id": "446", "Name": "input", "NameInRequest": "input", "Type": { @@ -3805,11 +3904,11 @@ "Kind": "Method" }, { - "$id": "452", + "$id": "447", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "453", + "$id": "448", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3824,19 +3923,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "454", + "$id": "449", "Type": { - "$ref": "453" + "$ref": "448" }, "Value": "application/json" } }, { - "$id": "455", + "$id": "450", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "456", + "$id": "451", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3851,9 +3950,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "457", + "$id": "452", "Type": { - "$ref": "456" + "$ref": "451" }, "Value": "application/json" } @@ -3861,7 +3960,7 @@ ], "Responses": [ { - "$id": "458", + "$id": "453", "StatusCodes": [ 200 ], @@ -3888,20 +3987,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "459", + "$id": "454", "Name": "selfReference", "ResourceName": "ModelsTypeSpec", "Description": "Returns model that has property of its own type", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "460", + "$id": "455", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "461", + "$id": "456", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3916,9 +4015,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "462", + "$id": "457", "Type": { - "$ref": "461" + "$ref": "456" }, "Value": "application/json" } @@ -3926,7 +4025,7 @@ ], "Responses": [ { - "$id": "463", + "$id": "458", "StatusCodes": [ 200 ], @@ -3950,16 +4049,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "464", + "$id": "459", "Name": "fixedFloatEnum", "ResourceName": "ModelsTypeSpec", "Description": "Returns model that has property of its own type", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "465", + "$id": "460", "Name": "input", "NameInRequest": "input", "Type": { @@ -3976,11 +4075,11 @@ "Kind": "Method" }, { - "$id": "466", + "$id": "461", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "467", + "$id": "462", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3995,9 +4094,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "468", + "$id": "463", "Type": { - "$ref": "467" + "$ref": "462" }, "Value": "application/json" } @@ -4005,7 +4104,7 @@ ], "Responses": [ { - "$id": "469", + "$id": "464", "StatusCodes": [ 200 ], @@ -4029,16 +4128,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "470", + "$id": "465", "Name": "extenisbleIntEnum", "ResourceName": "ModelsTypeSpec", "Description": "Returns model that has property of its own type", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "471", + "$id": "466", "Name": "input", "NameInRequest": "input", "Type": { @@ -4055,11 +4154,11 @@ "Kind": "Method" }, { - "$id": "472", + "$id": "467", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "473", + "$id": "468", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4074,9 +4173,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "474", + "$id": "469", "Type": { - "$ref": "473" + "$ref": "468" }, "Value": "application/json" } @@ -4084,7 +4183,7 @@ ], "Responses": [ { - "$id": "475", + "$id": "470", "StatusCodes": [ 200 ], @@ -4108,20 +4207,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "476", + "$id": "471", "Name": "roundTripToOutputWithNoUseBase", "ResourceName": "ModelsTypeSpec", "Description": "Returns RoundTripOnNoUse", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "477", + "$id": "472", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "337" + "$ref": "334" }, "Location": "Body", "IsRequired": true, @@ -4134,11 +4233,11 @@ "Kind": "Method" }, { - "$id": "478", + "$id": "473", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "479", + "$id": "474", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4153,19 +4252,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "480", + "$id": "475", "Type": { - "$ref": "479" + "$ref": "474" }, "Value": "application/json" } }, { - "$id": "481", + "$id": "476", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "482", + "$id": "477", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4180,9 +4279,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "483", + "$id": "478", "Type": { - "$ref": "482" + "$ref": "477" }, "Value": "application/json" } @@ -4190,12 +4289,12 @@ ], "Responses": [ { - "$id": "484", + "$id": "479", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "337" + "$ref": "334" }, "BodyMediaType": "Json", "Headers": [], @@ -4217,30 +4316,30 @@ "GenerateConvenienceMethod": true }, { - "$id": "485", + "$id": "480", "Name": "analyzeConversation", "ResourceName": "ModelsTypeSpec", "Description": "Resource collection action operation template.", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "486", + "$id": "481", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "487", + "$id": "482", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "488", + "$id": "483", "Type": { - "$id": "489", + "$id": "484", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4257,11 +4356,11 @@ "Kind": "Client" }, { - "$id": "490", + "$id": "485", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "491", + "$id": "486", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4276,9 +4375,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "492", + "$id": "487", "Type": { - "$ref": "491" + "$ref": "486" }, "Value": "application/json" } @@ -4286,7 +4385,7 @@ ], "Responses": [ { - "$id": "493", + "$id": "488", "StatusCodes": [ 200 ], @@ -4310,19 +4409,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "494", + "$id": "489", "Name": "getSingleBase", "ResourceName": "ModelsTypeSpec", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "495", + "$id": "490", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "496", + "$id": "491", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4337,9 +4436,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "497", + "$id": "492", "Type": { - "$ref": "496" + "$ref": "491" }, "Value": "application/json" } @@ -4347,7 +4446,7 @@ ], "Responses": [ { - "$id": "498", + "$id": "493", "StatusCodes": [ 200 ], @@ -4371,19 +4470,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "499", + "$id": "494", "Name": "genericType", "ResourceName": "ModelsTypeSpec", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "500", + "$id": "495", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "354" + "$ref": "345" }, "Location": "Body", "IsRequired": true, @@ -4396,11 +4495,11 @@ "Kind": "Method" }, { - "$id": "501", + "$id": "496", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "502", + "$id": "497", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4415,19 +4514,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "503", + "$id": "498", "Type": { - "$ref": "502" + "$ref": "497" }, "Value": "application/json" } }, { - "$id": "504", + "$id": "499", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "505", + "$id": "500", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4442,9 +4541,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "506", + "$id": "501", "Type": { - "$ref": "505" + "$ref": "500" }, "Value": "application/json" } @@ -4452,7 +4551,7 @@ ], "Responses": [ { - "$id": "507", + "$id": "502", "StatusCodes": [ 204 ], @@ -4474,7 +4573,7 @@ } ], "Protocol": { - "$id": "508" + "$id": "503" }, "Creatable": true } diff --git a/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs b/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs index 09a89d6440e..dc6b913cf8c 100644 --- a/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs +++ b/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs @@ -65,7 +65,10 @@ public void Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_Sh Uri endpoint = new Uri(""); ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); - BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase(""); + BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase("") + { + Kind = "A", + }; Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(body); } @@ -76,7 +79,10 @@ public async Task Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnB Uri endpoint = new Uri(""); ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); - BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase(""); + BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase("") + { + Kind = "A", + }; Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(body); } @@ -135,6 +141,7 @@ public void Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_Al { OptionalInt = 1234, OptionalString = "", + Kind = "A", }; Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(body); } @@ -150,6 +157,7 @@ public async Task Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnB { OptionalInt = 1234, OptionalString = "", + Kind = "A", }; Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(body); } @@ -1501,7 +1509,10 @@ public void Example_ModelsTypeSpec_InputToRoundTripOptional_AllParameters_Conven OptionalModelWithPropertiesOnBase = new DerivedModelWithProperties(new CollectionItem[] { default - }), + }) + { + OptionalPropertyOnBase = "", + }, OptionalFixedStringEnum = FixedStringEnum.One, OptionalExtensibleEnum = ExtensibleEnum.One, OptionalIntRecord = @@ -1550,7 +1561,10 @@ public async Task Example_ModelsTypeSpec_InputToRoundTripOptional_AllParameters_ OptionalModelWithPropertiesOnBase = new DerivedModelWithProperties(new CollectionItem[] { default - }), + }) + { + OptionalPropertyOnBase = "", + }, OptionalFixedStringEnum = FixedStringEnum.One, OptionalExtensibleEnum = ExtensibleEnum.One, OptionalIntRecord = diff --git a/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs b/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs index c5b1b41ea3c..d6c94802e02 100644 --- a/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs +++ b/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs @@ -45,7 +45,10 @@ public async Task ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_Shor Uri endpoint = new Uri(""); ModelsTypeSpecClient client = CreateModelsTypeSpecClient(endpoint); - BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase(""); + BaseModelWithDiscriminatorDefinedOnBase body = new DerivedWithDiscriminatorDefinedOnBase("") + { + Kind = "A", + }; Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(body); } @@ -77,6 +80,7 @@ public async Task ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_AllP { OptionalInt = 1234, OptionalString = "", + Kind = "A", }; Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(body); } @@ -669,7 +673,10 @@ public async Task ModelsTypeSpec_InputToRoundTripOptional_AllParameters_Convenie OptionalModelWithPropertiesOnBase = new DerivedModelWithProperties(new CollectionItem[] { default - }), + }) + { + OptionalPropertyOnBase = "", + }, OptionalFixedStringEnum = FixedStringEnum.One, OptionalExtensibleEnum = ExtensibleEnum.One, OptionalIntRecord = diff --git a/test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/tspCodeModel.json index 778f47485e8..f4b5eb074f6 100644 --- a/test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/tspCodeModel.json @@ -141,7 +141,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "17", @@ -181,7 +182,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "23", @@ -199,7 +201,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "25", @@ -217,7 +220,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "27", @@ -235,7 +239,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "29", @@ -256,7 +261,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "32", @@ -274,7 +280,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "34", @@ -292,7 +299,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "36", @@ -310,7 +318,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "38", @@ -331,7 +340,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "41", @@ -345,7 +355,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "43", @@ -365,7 +376,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "46", @@ -385,7 +397,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } From fe2de0e8aafb29c49d7f4c3c96d3230caed6e7e5 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 13 Mar 2024 11:32:21 +0800 Subject: [PATCH 05/60] improve debug --- .../LowLevel/Output/OperationMethodChainBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs index 0834b405b06..3d3c5411995 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -653,7 +653,7 @@ private ReferenceOrConstant CreateReference(InputParameter operationParameter, P var field = operationParameter.IsEndpoint ? _fields.EndpointField : _fields.GetFieldByParameter(parameter); if (field == null) { - throw new InvalidOperationException($"Parameter {parameter.Name} should have matching field"); + throw new InvalidOperationException($"Parameter '{parameter.Name}' should have matching field"); } return new Reference(field.Name, field.Type); From 41be80d356a125bb8b8a9cdfec5b271a9e752fc9 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 13 Mar 2024 11:47:14 +0800 Subject: [PATCH 06/60] add workaround for client parameter type `client` type mismatch --- .../Common/Output/Models/RestClientBuilder.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs b/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs index 056c07e1b30..08ad1a4a404 100644 --- a/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs +++ b/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs @@ -355,7 +355,7 @@ private ReferenceOrConstant CreateReference(InputParameter operationParameter, P return (ReferenceOrConstant)_parameters[operationParameter.Name]; } - if (operationParameter is { Kind:InputOperationParameterKind.Constant } && parameter.DefaultValue is not null) + if (operationParameter is { Kind: InputOperationParameterKind.Constant } && parameter.DefaultValue is not null) { return (ReferenceOrConstant)parameter.DefaultValue; } @@ -366,7 +366,7 @@ private ReferenceOrConstant CreateReference(InputParameter operationParameter, P return parameter; } - var groupModel = (SchemaObjectType)_typeFactory.CreateType(groupedByParameter.Type with {IsNullable = false}).Implementation; + var groupModel = (SchemaObjectType)_typeFactory.CreateType(groupedByParameter.Type with { IsNullable = false }).Implementation; var property = groupModel.GetPropertyForGroupedParameter(operationParameter.Name); return new Reference($"{groupedByParameter.Name.ToVariableName()}.{property.Declaration.Name}", property.Declaration.Type); @@ -460,7 +460,7 @@ private static IEnumerable GetPathSegments(string httpRequestUri, I public virtual Parameter BuildConstructorParameter(InputParameter operationParameter) { - var parameter = BuildParameter(operationParameter); + var parameter = BuildParameter(operationParameter, operationParameter is { Kind: InputOperationParameterKind.Client, Type: InputEnumType enumType } ? _typeFactory.CreateType(enumType.EnumValueType).FrameworkType : null); if (!operationParameter.IsEndpoint) { return parameter; @@ -471,7 +471,7 @@ public virtual Parameter BuildConstructorParameter(InputParameter operationParam var location = parameter.RequestLocation; return defaultValue != null - ? KnownParameters.Endpoint with { Description = description, RequestLocation = location, DefaultValue = Constant.Default(new CSharpType(typeof(Uri), true)), Initializer = $"new {typeof(Uri)}({defaultValue.Value.GetConstantFormattable()})"} + ? KnownParameters.Endpoint with { Description = description, RequestLocation = location, DefaultValue = Constant.Default(new CSharpType(typeof(Uri), true)), Initializer = $"new {typeof(Uri)}({defaultValue.Value.GetConstantFormattable()})" } : KnownParameters.Endpoint with { Description = description, RequestLocation = location, Validation = parameter.Validation }; } From 965e20d0982c16fbde5d37a8a3f673ce51d67bd1 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 13 Mar 2024 11:47:25 +0800 Subject: [PATCH 07/60] regen --- .../src/Generated/ServiceClient.cs | 6 +- .../src/Generated/ServiceRestClient.cs | 16 +- .../src/Generated/TableInternalClient.cs | 6 +- .../src/Generated/TableInternalRestClient.cs | 30 +- test/CadlRanchProjects.Tests/type-union.cs | 19 +- .../src/Generated/tspCodeModel.json | 5 +- .../src/Generated/tspCodeModel.json | 5 +- ...se64urlArrayBytesProperty.Serialization.cs | 4 +- .../Base64urlBytesProperty.Serialization.cs | 4 +- .../bytes/src/Generated/tspCodeModel.json | 16 +- .../datetime/src/Generated/Docs/Property.xml | 16 +- .../datetime/src/Generated/tspCodeModel.json | 17 +- .../Generated/Samples/Samples_Property.cs | 16 +- .../duration/src/Generated/Docs/Property.xml | 48 +- ...ondsDurationArrayProperty.Serialization.cs | 4 +- ...atSecondsDurationProperty.Serialization.cs | 4 +- ...32SecondsDurationProperty.Serialization.cs | 4 +- .../duration/src/Generated/tspCodeModel.json | 21 +- .../Generated/Samples/Samples_Property.cs | 48 +- .../src/Generated/tspCodeModel.json | 3 +- .../spread/src/Generated/tspCodeModel.json | 27 +- .../src/Generated/tspCodeModel.json | 9 +- .../pageable/src/Generated/tspCodeModel.json | 11 +- .../src/Generated/tspCodeModel.json | 18 +- .../json/src/Generated/tspCodeModel.json | 3 +- .../multiple/src/Generated/tspCodeModel.json | 4 +- .../src/Generated/tspCodeModel.json | 105 +- .../array/src/Generated/tspCodeModel.json | 6 +- .../src/Generated/tspCodeModel.json | 6 +- .../fixed/src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 8 +- .../src/Generated/Models/Cat.cs | 6 +- .../src/Generated/Models/Pet.cs | 6 +- ...InheritanceNotDiscriminatedModelFactory.cs | 30 - .../src/Generated/tspCodeModel.json | 121 +- .../src/Generated/Docs/RecursiveClient.xml | 10 +- .../Generated/Models/Element.Serialization.cs | 2 +- .../recursive/src/Generated/Models/Element.cs | 6 +- .../Models/Extension.Serialization.cs | 2 +- .../src/Generated/Models/Extension.cs | 2 +- ...peModelInheritanceRecursiveModelFactory.cs | 37 - .../recursive/src/Generated/tspCodeModel.json | 84 +- .../Samples/Samples_RecursiveClient.cs | 10 +- .../src/Generated/Models/Bird.cs | 4 +- .../src/Generated/Models/Eagle.cs | 2 +- .../src/Generated/Models/Goose.cs | 2 +- .../src/Generated/Models/SeaGull.cs | 2 +- .../src/Generated/Models/Sparrow.cs | 2 +- .../src/Generated/Models/UnknownBird.cs | 2 +- .../src/Generated/tspCodeModel.json | 21 +- .../usage/src/Generated/tspCodeModel.json | 9 +- .../Docs/ExtendsUnknownDiscriminated.xml | 16 +- .../Generated/Docs/IsUnknownDiscriminated.xml | 16 +- ...FloatAdditionalProperties.Serialization.cs | 29 +- .../ExtendsFloatAdditionalProperties.cs | 43 +- ...ModelAdditionalProperties.Serialization.cs | 29 +- .../ExtendsModelAdditionalProperties.cs | 44 +- ...ArrayAdditionalProperties.Serialization.cs | 31 +- .../ExtendsModelArrayAdditionalProperties.cs | 44 +- ...tringAdditionalProperties.Serialization.cs | 29 +- .../ExtendsStringAdditionalProperties.cs | 42 +- ...knownAdditionalProperties.Serialization.cs | 26 +- .../ExtendsUnknownAdditionalProperties.cs | 59 +- ...ditionalPropertiesDerived.Serialization.cs | 26 +- ...tendsUnknownAdditionalPropertiesDerived.cs | 4 +- ...alPropertiesDiscriminated.Serialization.cs | 19 +- ...nknownAdditionalPropertiesDiscriminated.cs | 67 +- ...rtiesDiscriminatedDerived.Serialization.cs | 38 +- ...dditionalPropertiesDiscriminatedDerived.cs | 6 +- ...FloatAdditionalProperties.Serialization.cs | 29 +- .../Models/IsFloatAdditionalProperties.cs | 43 +- ...ModelAdditionalProperties.Serialization.cs | 29 +- .../Models/IsModelAdditionalProperties.cs | 44 +- ...ArrayAdditionalProperties.Serialization.cs | 31 +- .../IsModelArrayAdditionalProperties.cs | 44 +- ...tringAdditionalProperties.Serialization.cs | 29 +- .../Models/IsStringAdditionalProperties.cs | 42 +- ...knownAdditionalProperties.Serialization.cs | 26 +- .../Models/IsUnknownAdditionalProperties.cs | 59 +- ...ditionalPropertiesDerived.Serialization.cs | 26 +- .../IsUnknownAdditionalPropertiesDerived.cs | 4 +- ...alPropertiesDiscriminated.Serialization.cs | 19 +- ...nknownAdditionalPropertiesDiscriminated.cs | 67 +- ...rtiesDiscriminatedDerived.Serialization.cs | 38 +- ...dditionalPropertiesDiscriminatedDerived.cs | 6 +- .../Models/ModelForRecord.Serialization.cs | 137 -- .../src/Generated/Models/ModelForRecord.cs | 76 - ...alPropertiesDiscriminated.Serialization.cs | 38 +- ...nknownAdditionalPropertiesDiscriminated.cs | 6 +- ...alPropertiesDiscriminated.Serialization.cs | 38 +- ...nknownAdditionalPropertiesDiscriminated.cs | 6 +- .../src/Generated/tspCodeModel.json | 1101 +++++------ .../Samples_ExtendsUnknownDiscriminated.cs | 16 +- .../Samples/Samples_IsUnknownDiscriminated.cs | 16 +- .../nullable/src/Generated/Docs/Datetime.xml | 16 +- .../src/Generated/Models/BytesProperty.cs | 6 +- .../CollectionsByteProperty.Serialization.cs | 2 +- .../Models/CollectionsByteProperty.cs | 8 +- .../CollectionsModelProperty.Serialization.cs | 2 +- .../Models/CollectionsModelProperty.cs | 8 +- .../Models/DatetimeProperty.Serialization.cs | 18 +- .../src/Generated/Models/DatetimeProperty.cs | 8 +- .../src/Generated/Models/DurationProperty.cs | 6 +- .../src/Generated/Models/InnerModel.cs | 4 +- .../src/Generated/Models/StringProperty.cs | 6 +- .../TypePropertyNullableModelFactory.cs | 83 - .../nullable/src/Generated/tspCodeModel.json | 57 +- .../Generated/Samples/Samples_Datetime.cs | 16 +- .../src/Generated/Docs/Datetime.xml | 16 +- .../src/Generated/Docs/UnionFloatLiteral.xml | 16 +- .../src/Generated/Docs/UnionIntLiteral.xml | 8 +- ...UnionFloatLiteralProperty.Serialization.cs | 13 +- .../Models/UnionFloatLiteralProperty.cs | 46 +- ...atLiteralPropertyProperty.Serialization.cs | 28 + .../UnionFloatLiteralPropertyProperty.cs | 18 + .../UnionIntLiteralProperty.Serialization.cs | 13 +- .../Models/UnionIntLiteralProperty.cs | 46 +- ...ntLiteralPropertyProperty.Serialization.cs | 21 + .../Models/UnionIntLiteralPropertyProperty.cs | 18 + ...nionStringLiteralProperty.Serialization.cs | 4 +- ...ngLiteralPropertyProperty.Serialization.cs | 28 + .../UnionStringLiteralPropertyProperty.cs | 41 +- .../src/Generated/tspCodeModel.json | 1542 ++++++++------- .../Generated/Samples/Samples_Datetime.cs | 16 +- .../Samples/Samples_UnionFloatLiteral.cs | 16 +- .../Samples/Samples_UnionIntLiteral.cs | 8 +- .../src/Generated/Docs/Datetime.xml | 16 +- .../src/Generated/Docs/UnionFloatLiteral.xml | 16 +- .../src/Generated/Docs/UnionIntLiteral.xml | 8 +- ...UnionFloatLiteralProperty.Serialization.cs | 13 +- .../Models/UnionFloatLiteralProperty.cs | 52 +- ...atLiteralPropertyProperty.Serialization.cs | 28 + .../UnionFloatLiteralPropertyProperty.cs | 18 + .../UnionIntLiteralProperty.Serialization.cs | 13 +- .../Models/UnionIntLiteralProperty.cs | 52 +- ...ntLiteralPropertyProperty.Serialization.cs | 21 + .../Models/UnionIntLiteralPropertyProperty.cs | 18 + ...nionStringLiteralProperty.Serialization.cs | 4 +- ...ngLiteralPropertyProperty.Serialization.cs | 28 + .../UnionStringLiteralPropertyProperty.cs | 41 +- .../src/Generated/tspCodeModel.json | 1723 +++++++++-------- .../Generated/Samples/Samples_Datetime.cs | 16 +- .../Samples/Samples_UnionFloatLiteral.cs | 16 +- .../Samples/Samples_UnionIntLiteral.cs | 8 +- .../custom/src/Generated/tspCodeModel.json | 3 +- .../Generated/MultipleInputFilesClient.cs | 23 +- .../Generated/MultipleInputFilesRestClient.cs | 15 +- .../Models/ModelWithFormat.Serialization.cs | 6 +- .../src/Generated/Models/ModelWithFormat.cs | 6 +- .../src/Generated/tspCodeModel.json | 131 +- 150 files changed, 3853 insertions(+), 3949 deletions(-) delete mode 100644 test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/TypeModelInheritanceNotDiscriminatedModelFactory.cs delete mode 100644 test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/TypeModelInheritanceRecursiveModelFactory.cs delete mode 100644 test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs delete mode 100644 test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs delete mode 100644 test/CadlRanchProjects/type/property/nullable/src/Generated/TypePropertyNullableModelFactory.cs create mode 100644 test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.Serialization.cs create mode 100644 test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs create mode 100644 test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.Serialization.cs create mode 100644 test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.cs create mode 100644 test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.Serialization.cs create mode 100644 test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralPropertyProperty.Serialization.cs create mode 100644 test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs create mode 100644 test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralPropertyProperty.Serialization.cs create mode 100644 test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralPropertyProperty.cs create mode 100644 test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralPropertyProperty.Serialization.cs diff --git a/samples/Azure.Storage.Tables/src/Generated/ServiceClient.cs b/samples/Azure.Storage.Tables/src/Generated/ServiceClient.cs index 11d443c1f1b..feb5f8880c7 100644 --- a/samples/Azure.Storage.Tables/src/Generated/ServiceClient.cs +++ b/samples/Azure.Storage.Tables/src/Generated/ServiceClient.cs @@ -30,9 +30,9 @@ protected ServiceClient() /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The URL of the service account or table that is the targe of the desired operation. - /// Specifies the version of the operation to use for this request. - /// , or is null. - internal ServiceClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, Enum0 version) + /// Specifies the version of the operation to use for this request. Allowed values: "2018-10-10". + /// , , or is null. + internal ServiceClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version) { RestClient = new ServiceRestClient(clientDiagnostics, pipeline, url, version); _clientDiagnostics = clientDiagnostics; diff --git a/samples/Azure.Storage.Tables/src/Generated/ServiceRestClient.cs b/samples/Azure.Storage.Tables/src/Generated/ServiceRestClient.cs index 68aaa2bb442..00e23b3bf7e 100644 --- a/samples/Azure.Storage.Tables/src/Generated/ServiceRestClient.cs +++ b/samples/Azure.Storage.Tables/src/Generated/ServiceRestClient.cs @@ -20,7 +20,7 @@ internal partial class ServiceRestClient { private readonly HttpPipeline _pipeline; private readonly string _url; - private readonly Enum0 _version; + private readonly string _version; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -29,14 +29,14 @@ internal partial class ServiceRestClient /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The URL of the service account or table that is the targe of the desired operation. - /// Specifies the version of the operation to use for this request. - /// , or is null. - public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, Enum0 version) + /// Specifies the version of the operation to use for this request. Allowed values: "2018-10-10". + /// , , or is null. + public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version) { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _url = url ?? throw new ArgumentNullException(nameof(url)); - _version = version; + _version = version ?? throw new ArgumentNullException(nameof(version)); } internal HttpMessage CreateSetPropertiesRequest(Enum4 restype, Enum5 comp, StorageServiceProperties storageServiceProperties, int? timeout) @@ -54,7 +54,7 @@ internal HttpMessage CreateSetPropertiesRequest(Enum4 restype, Enum5 comp, Stora uri.AppendQuery("timeout", timeout.Value, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("Accept", "application/xml"); request.Headers.Add("Content-Type", "application/xml"); var content = new XmlWriterContent(); @@ -130,7 +130,7 @@ internal HttpMessage CreateGetPropertiesRequest(Enum4 restype, Enum5 comp, int? uri.AppendQuery("timeout", timeout.Value, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("Accept", "application/xml"); return message; } @@ -204,7 +204,7 @@ internal HttpMessage CreateGetStatisticsRequest(Enum4 restype, Enum6 comp, int? uri.AppendQuery("timeout", timeout.Value, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("Accept", "application/xml"); return message; } diff --git a/samples/Azure.Storage.Tables/src/Generated/TableInternalClient.cs b/samples/Azure.Storage.Tables/src/Generated/TableInternalClient.cs index e4de2490296..45a3b2ffb40 100644 --- a/samples/Azure.Storage.Tables/src/Generated/TableInternalClient.cs +++ b/samples/Azure.Storage.Tables/src/Generated/TableInternalClient.cs @@ -31,9 +31,9 @@ protected TableInternalClient() /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The URL of the service account or table that is the targe of the desired operation. - /// Specifies the version of the operation to use for this request. - /// , or is null. - internal TableInternalClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, Enum0 version) + /// Specifies the version of the operation to use for this request. Allowed values: "2018-10-10". + /// , , or is null. + internal TableInternalClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version) { RestClient = new TableInternalRestClient(clientDiagnostics, pipeline, url, version); _clientDiagnostics = clientDiagnostics; diff --git a/samples/Azure.Storage.Tables/src/Generated/TableInternalRestClient.cs b/samples/Azure.Storage.Tables/src/Generated/TableInternalRestClient.cs index 4751377f030..abac1c88b2d 100644 --- a/samples/Azure.Storage.Tables/src/Generated/TableInternalRestClient.cs +++ b/samples/Azure.Storage.Tables/src/Generated/TableInternalRestClient.cs @@ -22,7 +22,7 @@ internal partial class TableInternalRestClient { private readonly HttpPipeline _pipeline; private readonly string _url; - private readonly Enum0 _version; + private readonly string _version; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -31,14 +31,14 @@ internal partial class TableInternalRestClient /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The URL of the service account or table that is the targe of the desired operation. - /// Specifies the version of the operation to use for this request. - /// , or is null. - public TableInternalRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, Enum0 version) + /// Specifies the version of the operation to use for this request. Allowed values: "2018-10-10". + /// , , or is null. + public TableInternalRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version) { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _url = url ?? throw new ArgumentNullException(nameof(url)); - _version = version; + _version = version ?? throw new ArgumentNullException(nameof(version)); } internal HttpMessage CreateQueryRequest(Enum1 dataServiceVersion, QueryOptions queryOptions) @@ -66,7 +66,7 @@ internal HttpMessage CreateQueryRequest(Enum1 dataServiceVersion, QueryOptions q uri.AppendQuery("$filter", queryOptions.Filter, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; @@ -131,7 +131,7 @@ internal HttpMessage CreateCreateRequest(Enum1 dataServiceVersion, TableProperti uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); request.Headers.Add("Content-Type", "application/json;odata=nometadata"); @@ -216,7 +216,7 @@ internal HttpMessage CreateDeleteRequest(string table) uri.AppendPath(table, true); uri.AppendPath("')", false); request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; } @@ -298,7 +298,7 @@ internal HttpMessage CreateQueryEntitiesRequest(Enum1 dataServiceVersion, string uri.AppendQuery("$filter", queryOptions.Filter, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; @@ -397,7 +397,7 @@ internal HttpMessage CreateQueryEntitiesWithPartitionAndRowKeyRequest(Enum1 data uri.AppendQuery("$filter", queryOptions.Filter, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; @@ -508,7 +508,7 @@ internal HttpMessage CreateUpdateEntityRequest(Enum1 dataServiceVersion, string uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); if (tableEntityProperties != null) @@ -629,7 +629,7 @@ internal HttpMessage CreateDeleteEntityRequest(Enum1 dataServiceVersion, string uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; @@ -725,7 +725,7 @@ internal HttpMessage CreateInsertEntityRequest(Enum1 dataServiceVersion, string uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); if (tableEntityProperties != null) @@ -852,7 +852,7 @@ internal HttpMessage CreateGetAccessPolicyRequest(string table, Enum3 comp, int? } uri.AppendQuery("comp", comp.ToString(), true); request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("Accept", "application/xml"); return message; } @@ -948,7 +948,7 @@ internal HttpMessage CreateSetAccessPolicyRequest(string table, Enum3 comp, int? } uri.AppendQuery("comp", comp.ToString(), true); request.Uri = uri; - request.Headers.Add("x-ms-version", _version.ToString()); + request.Headers.Add("x-ms-version", _version); request.Headers.Add("Accept", "application/xml"); if (tableAcl != null) { diff --git a/test/CadlRanchProjects.Tests/type-union.cs b/test/CadlRanchProjects.Tests/type-union.cs index 4ef77057cfc..570d6a160c7 100644 --- a/test/CadlRanchProjects.Tests/type-union.cs +++ b/test/CadlRanchProjects.Tests/type-union.cs @@ -20,13 +20,13 @@ public Task GetStringsOnly() => Test(async (host) => { var response = await new UnionClient(host, null).GetStringsOnlyClient().GetStringsOnlyAsync(); Assert.AreEqual(200, response.GetRawResponse().Status); - Assert.AreEqual(GetResponseProp.B, response.Value.Prop); + Assert.AreEqual(GetResponseProp5.B, response.Value.Prop); }); [Test] public Task SendStringsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetStringsOnlyClient().SendAsync(SendRequestProp.B); + var response = await new UnionClient(host, null).GetStringsOnlyClient().SendAsync(GetResponseProp5.B); Assert.AreEqual(204, response.Status); }); @@ -35,13 +35,13 @@ public Task GetStringExtensibleOnly() => Test(async (host) => { var response = await new UnionClient(host, null).GetStringExtensibleClient().GetStringExtensibleAsync(); Assert.AreEqual(200, response.GetRawResponse().Status); - Assert.AreEqual(new GetResponseProp1("custom"), response.Value.Prop); + Assert.AreEqual(new GetResponseProp4("custom"), response.Value.Prop); }); [Test] public Task SendStringExtensibleOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetStringExtensibleClient().SendAsync(new GetResponseProp1("custom")); + var response = await new UnionClient(host, null).GetStringExtensibleClient().SendAsync(new GetResponseProp4("custom")); Assert.AreEqual(204, response.Status); }); @@ -65,7 +65,7 @@ public Task GetIntsOnly() => Test(async (host) => { var response = await new UnionClient(host, null).GetIntsOnlyClient().GetIntsOnlyAsync(); Assert.AreEqual(200, response.GetRawResponse().Status); - AssertEqual(BinaryData.FromObjectAsJson(2), response.Value.Prop); + Assert.AreEqual(GetResponseProp3._2, response.Value.Prop); }); [Test] @@ -80,7 +80,7 @@ public Task GetFloatsOnly() => Test(async (host) => { var response = await new UnionClient(host, null).GetFloatsOnlyClient().GetFloatsOnlyAsync(); Assert.AreEqual(200, response.GetRawResponse().Status); - AssertEqual(BinaryData.FromObjectAsJson(2.2), response.Value.Prop); + Assert.AreEqual(GetResponseProp2._22, response.Value.Prop); }); [Test] @@ -111,15 +111,14 @@ public Task GetEnumsOnly() => Test(async (host) => { var response = await new UnionClient(host, null).GetEnumsOnlyClient().GetEnumsOnlyAsync(); Assert.AreEqual(200, response.GetRawResponse().Status); - AssertEqual(BinaryData.FromObjectAsJson(LR.Right.ToString()), response.Value.Prop.Lr); - AssertEqual(BinaryData.FromObjectAsJson(UD.Up.ToString()), response.Value.Prop.Ud); + Assert.AreEqual(EnumsOnlyCasesLr.Right, response.Value.Prop.Lr); + Assert.AreEqual(EnumsOnlyCasesUd.Up, response.Value.Prop.Ud); }); [Test] public Task SendEnumsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetEnumsOnlyClient().SendAsync(new EnumsOnlyCases(BinaryData.FromObjectAsJson(LR.Right.ToString()), - BinaryData.FromObjectAsJson(UD.Up.ToString()))); + var response = await new UnionClient(host, null).GetEnumsOnlyClient().SendAsync(new EnumsOnlyCases(EnumsOnlyCasesLr.Right, EnumsOnlyCasesUd.Up)); Assert.AreEqual(204, response.Status); }); diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json index d140ed62515..a69a685a32f 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ClientType", - "EnumValueType": "String", + "EnumValueType": "string", "AllowedValues": [ { "$id": "3", @@ -32,10 +32,9 @@ } ], "Namespace": "Client.Structure.Service", - "Description": "", "IsExtensible": true, "IsNullable": false, - "Usage": "None" + "Usage": "Input" } ], "Models": [], diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json index 5bf078532ca..b247a3621fc 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ClientType", - "EnumValueType": "String", + "EnumValueType": "string", "AllowedValues": [ { "$id": "3", @@ -32,10 +32,9 @@ } ], "Namespace": "Client.Structure.Service", - "Description": "", "IsExtensible": true, "IsNullable": false, - "Usage": "None" + "Usage": "Input" } ], "Models": [], diff --git a/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlArrayBytesProperty.Serialization.cs b/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlArrayBytesProperty.Serialization.cs index f0e41521e48..0c80a16dcac 100644 --- a/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlArrayBytesProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlArrayBytesProperty.Serialization.cs @@ -37,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNullValue(); continue; } - writer.WriteBase64StringValue(item.ToArray(), "U"); + writer.WriteBase64StringValue(item.ToArray(), "D"); } writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -94,7 +94,7 @@ internal static Base64urlArrayBytesProperty DeserializeBase64urlArrayBytesProper } else { - array.Add(BinaryData.FromBytes(item.GetBytesFromBase64("U"))); + array.Add(BinaryData.FromBytes(item.GetBytesFromBase64("D"))); } } value = array; diff --git a/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlBytesProperty.Serialization.cs b/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlBytesProperty.Serialization.cs index 7effd6c236a..3f6add01895 100644 --- a/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlBytesProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlBytesProperty.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStartObject(); writer.WritePropertyName("value"u8); - writer.WriteBase64StringValue(Value.ToArray(), "U"); + writer.WriteBase64StringValue(Value.ToArray(), "D"); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,7 +75,7 @@ internal static Base64urlBytesProperty DeserializeBase64urlBytesProperty(JsonEle { if (property.NameEquals("value"u8)) { - value = BinaryData.FromBytes(property.Value.GetBytesFromBase64("U")); + value = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json index c5802aa1a31..ff54ab7b281 100644 --- a/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -49,7 +50,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -69,11 +71,12 @@ "Type": { "$id": "10", "Kind": "Primitive", - "Name": "BytesBase64Url", + "Name": "Bytes", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -97,13 +100,14 @@ "ElementType": { "$id": "14", "Kind": "Primitive", - "Name": "BytesBase64Url", + "Name": "Bytes", "IsNullable": false }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/encode/datetime/src/Generated/Docs/Property.xml b/test/CadlRanchProjects/encode/datetime/src/Generated/Docs/Property.xml index 337b7e9b50f..27a4a6542b1 100644 --- a/test/CadlRanchProjects/encode/datetime/src/Generated/Docs/Property.xml +++ b/test/CadlRanchProjects/encode/datetime/src/Generated/Docs/Property.xml @@ -7,14 +7,14 @@ This sample shows how to call DefaultAsync. response = await client.DefaultAsync(body); ]]> This sample shows how to call DefaultAsync with all parameters. response = await client.DefaultAsync(body); ]]> @@ -24,14 +24,14 @@ This sample shows how to call Default. response = client.Default(body); ]]> This sample shows how to call Default with all parameters. response = client.Default(body); ]]> @@ -43,7 +43,7 @@ Property client = new DatetimeClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "2022-05-10T14:57:31.2311892-04:00", + value = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.DefaultAsync(content); @@ -56,7 +56,7 @@ Property client = new DatetimeClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "2022-05-10T14:57:31.2311892-04:00", + value = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.DefaultAsync(content); @@ -72,7 +72,7 @@ Property client = new DatetimeClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "2022-05-10T14:57:31.2311892-04:00", + value = "2022-05-10T18:57:31.2311892Z", }); Response response = client.Default(content); @@ -85,7 +85,7 @@ Property client = new DatetimeClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "2022-05-10T14:57:31.2311892-04:00", + value = "2022-05-10T18:57:31.2311892Z", }); Response response = client.Default(content); diff --git a/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json index e444526122c..09ad7052ff8 100644 --- a/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json @@ -21,11 +21,12 @@ "Type": { "$id": "4", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -49,7 +50,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -73,7 +75,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -97,7 +100,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -127,7 +131,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, diff --git a/test/CadlRanchProjects/encode/datetime/tests/Generated/Samples/Samples_Property.cs b/test/CadlRanchProjects/encode/datetime/tests/Generated/Samples/Samples_Property.cs index 3fa6426ca10..e08621f0601 100644 --- a/test/CadlRanchProjects/encode/datetime/tests/Generated/Samples/Samples_Property.cs +++ b/test/CadlRanchProjects/encode/datetime/tests/Generated/Samples/Samples_Property.cs @@ -27,7 +27,7 @@ public void Example_Property_Default_ShortVersion() using RequestContent content = RequestContent.Create(new { - value = "2022-05-10T14:57:31.2311892-04:00", + value = "2022-05-10T18:57:31.2311892Z", }); Response response = client.Default(content); @@ -43,7 +43,7 @@ public async Task Example_Property_Default_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - value = "2022-05-10T14:57:31.2311892-04:00", + value = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.DefaultAsync(content); @@ -57,7 +57,7 @@ public void Example_Property_Default_ShortVersion_Convenience() { Property client = new DatetimeClient().GetPropertyClient(); - DefaultDatetimeProperty body = new DefaultDatetimeProperty(DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + DefaultDatetimeProperty body = new DefaultDatetimeProperty(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.Default(body); } @@ -67,7 +67,7 @@ public async Task Example_Property_Default_ShortVersion_Convenience_Async() { Property client = new DatetimeClient().GetPropertyClient(); - DefaultDatetimeProperty body = new DefaultDatetimeProperty(DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + DefaultDatetimeProperty body = new DefaultDatetimeProperty(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.DefaultAsync(body); } @@ -79,7 +79,7 @@ public void Example_Property_Default_AllParameters() using RequestContent content = RequestContent.Create(new { - value = "2022-05-10T14:57:31.2311892-04:00", + value = "2022-05-10T18:57:31.2311892Z", }); Response response = client.Default(content); @@ -95,7 +95,7 @@ public async Task Example_Property_Default_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - value = "2022-05-10T14:57:31.2311892-04:00", + value = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.DefaultAsync(content); @@ -109,7 +109,7 @@ public void Example_Property_Default_AllParameters_Convenience() { Property client = new DatetimeClient().GetPropertyClient(); - DefaultDatetimeProperty body = new DefaultDatetimeProperty(DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + DefaultDatetimeProperty body = new DefaultDatetimeProperty(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.Default(body); } @@ -119,7 +119,7 @@ public async Task Example_Property_Default_AllParameters_Convenience_Async() { Property client = new DatetimeClient().GetPropertyClient(); - DefaultDatetimeProperty body = new DefaultDatetimeProperty(DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + DefaultDatetimeProperty body = new DefaultDatetimeProperty(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.DefaultAsync(body); } diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/Docs/Property.xml b/test/CadlRanchProjects/encode/duration/src/Generated/Docs/Property.xml index b8595b0cdb5..215a112a18c 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/Docs/Property.xml +++ b/test/CadlRanchProjects/encode/duration/src/Generated/Docs/Property.xml @@ -191,14 +191,14 @@ This sample shows how to call Int32SecondsAsync. response = await client.Int32SecondsAsync(body); ]]> This sample shows how to call Int32SecondsAsync with all parameters. response = await client.Int32SecondsAsync(body); ]]> @@ -208,14 +208,14 @@ This sample shows how to call Int32Seconds. response = client.Int32Seconds(body); ]]> This sample shows how to call Int32Seconds with all parameters. response = client.Int32Seconds(body); ]]> @@ -227,7 +227,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = 10, + value = "PT1H23M45S", }); Response response = await client.Int32SecondsAsync(content); @@ -240,7 +240,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = 10, + value = "PT1H23M45S", }); Response response = await client.Int32SecondsAsync(content); @@ -256,7 +256,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = 10, + value = "PT1H23M45S", }); Response response = client.Int32Seconds(content); @@ -269,7 +269,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = 10, + value = "PT1H23M45S", }); Response response = client.Int32Seconds(content); @@ -283,14 +283,14 @@ This sample shows how to call FloatSecondsAsync. response = await client.FloatSecondsAsync(body); ]]> This sample shows how to call FloatSecondsAsync with all parameters. response = await client.FloatSecondsAsync(body); ]]> @@ -300,14 +300,14 @@ This sample shows how to call FloatSeconds. response = client.FloatSeconds(body); ]]> This sample shows how to call FloatSeconds with all parameters. response = client.FloatSeconds(body); ]]> @@ -319,7 +319,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = 10F, + value = "PT1H23M45S", }); Response response = await client.FloatSecondsAsync(content); @@ -332,7 +332,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = 10F, + value = "PT1H23M45S", }); Response response = await client.FloatSecondsAsync(content); @@ -348,7 +348,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = 10F, + value = "PT1H23M45S", }); Response response = client.FloatSeconds(content); @@ -361,7 +361,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = 10F, + value = "PT1H23M45S", }); Response response = client.FloatSeconds(content); @@ -375,14 +375,14 @@ This sample shows how to call FloatSecondsArrayAsync. response = await client.FloatSecondsArrayAsync(body); ]]> This sample shows how to call FloatSecondsArrayAsync with all parameters. response = await client.FloatSecondsArrayAsync(body); ]]> @@ -392,14 +392,14 @@ This sample shows how to call FloatSecondsArray. response = client.FloatSecondsArray(body); ]]> This sample shows how to call FloatSecondsArray with all parameters. response = client.FloatSecondsArray(body); ]]> @@ -413,7 +413,7 @@ using RequestContent content = RequestContent.Create(new { value = new object[] { - 10F + "PT1H23M45S" }, }); Response response = await client.FloatSecondsArrayAsync(content); @@ -429,7 +429,7 @@ using RequestContent content = RequestContent.Create(new { value = new object[] { - 10F + "PT1H23M45S" }, }); Response response = await client.FloatSecondsArrayAsync(content); @@ -448,7 +448,7 @@ using RequestContent content = RequestContent.Create(new { value = new object[] { - 10F + "PT1H23M45S" }, }); Response response = client.FloatSecondsArray(content); @@ -464,7 +464,7 @@ using RequestContent content = RequestContent.Create(new { value = new object[] { - 10F + "PT1H23M45S" }, }); Response response = client.FloatSecondsArray(content); diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationArrayProperty.Serialization.cs b/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationArrayProperty.Serialization.cs index 8d1fe8512f8..dc473b5050c 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationArrayProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationArrayProperty.Serialization.cs @@ -32,7 +32,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStartArray(); foreach (var item in Value) { - writer.WriteNumberValue(Convert.ToDouble(item.ToString("s\\.fff"))); + writer.WriteStringValue(item, "P"); } writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -83,7 +83,7 @@ internal static FloatSecondsDurationArrayProperty DeserializeFloatSecondsDuratio List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(TimeSpan.FromSeconds(item.GetDouble())); + array.Add(item.GetTimeSpan("P")); } value = array; continue; diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationProperty.Serialization.cs b/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationProperty.Serialization.cs index f5204596d04..40e71851b6a 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationProperty.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStartObject(); writer.WritePropertyName("value"u8); - writer.WriteNumberValue(Convert.ToDouble(Value.ToString("s\\.fff"))); + writer.WriteStringValue(Value, "P"); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,7 +75,7 @@ internal static FloatSecondsDurationProperty DeserializeFloatSecondsDurationProp { if (property.NameEquals("value"u8)) { - value = TimeSpan.FromSeconds(property.Value.GetDouble()); + value = property.Value.GetTimeSpan("P"); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/Models/Int32SecondsDurationProperty.Serialization.cs b/test/CadlRanchProjects/encode/duration/src/Generated/Models/Int32SecondsDurationProperty.Serialization.cs index 0607dea080c..711f759982e 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/Models/Int32SecondsDurationProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/duration/src/Generated/Models/Int32SecondsDurationProperty.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStartObject(); writer.WritePropertyName("value"u8); - writer.WriteNumberValue(Convert.ToInt32(Value.ToString("%s"))); + writer.WriteStringValue(Value, "P"); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,7 +75,7 @@ internal static Int32SecondsDurationProperty DeserializeInt32SecondsDurationProp { if (property.NameEquals("value"u8)) { - value = TimeSpan.FromSeconds(property.Value.GetInt32()); + value = property.Value.GetTimeSpan("P"); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json index 9e84e0f2d71..cff046a673e 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -49,7 +50,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -69,11 +71,12 @@ "Type": { "$id": "10", "Kind": "Primitive", - "Name": "DurationSeconds", + "Name": "DurationISO8601", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -93,11 +96,12 @@ "Type": { "$id": "13", "Kind": "Primitive", - "Name": "DurationSecondsFloat", + "Name": "DurationISO8601", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -121,13 +125,14 @@ "ElementType": { "$id": "17", "Kind": "Primitive", - "Name": "DurationSecondsFloat", + "Name": "DurationISO8601", "IsNullable": false }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/encode/duration/tests/Generated/Samples/Samples_Property.cs b/test/CadlRanchProjects/encode/duration/tests/Generated/Samples/Samples_Property.cs index 489b64384c1..0950e4f95be 100644 --- a/test/CadlRanchProjects/encode/duration/tests/Generated/Samples/Samples_Property.cs +++ b/test/CadlRanchProjects/encode/duration/tests/Generated/Samples/Samples_Property.cs @@ -236,7 +236,7 @@ public void Example_Property_Int32Seconds_ShortVersion() using RequestContent content = RequestContent.Create(new { - value = 10, + value = "PT1H23M45S", }); Response response = client.Int32Seconds(content); @@ -252,7 +252,7 @@ public async Task Example_Property_Int32Seconds_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - value = 10, + value = "PT1H23M45S", }); Response response = await client.Int32SecondsAsync(content); @@ -266,7 +266,7 @@ public void Example_Property_Int32Seconds_ShortVersion_Convenience() { Property client = new DurationClient().GetPropertyClient(); - Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(TimeSpan.FromSeconds(10)); + Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); Response response = client.Int32Seconds(body); } @@ -276,7 +276,7 @@ public async Task Example_Property_Int32Seconds_ShortVersion_Convenience_Async() { Property client = new DurationClient().GetPropertyClient(); - Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(TimeSpan.FromSeconds(10)); + Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); Response response = await client.Int32SecondsAsync(body); } @@ -288,7 +288,7 @@ public void Example_Property_Int32Seconds_AllParameters() using RequestContent content = RequestContent.Create(new { - value = 10, + value = "PT1H23M45S", }); Response response = client.Int32Seconds(content); @@ -304,7 +304,7 @@ public async Task Example_Property_Int32Seconds_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - value = 10, + value = "PT1H23M45S", }); Response response = await client.Int32SecondsAsync(content); @@ -318,7 +318,7 @@ public void Example_Property_Int32Seconds_AllParameters_Convenience() { Property client = new DurationClient().GetPropertyClient(); - Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(TimeSpan.FromSeconds(10)); + Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); Response response = client.Int32Seconds(body); } @@ -328,7 +328,7 @@ public async Task Example_Property_Int32Seconds_AllParameters_Convenience_Async( { Property client = new DurationClient().GetPropertyClient(); - Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(TimeSpan.FromSeconds(10)); + Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); Response response = await client.Int32SecondsAsync(body); } @@ -340,7 +340,7 @@ public void Example_Property_FloatSeconds_ShortVersion() using RequestContent content = RequestContent.Create(new { - value = 10F, + value = "PT1H23M45S", }); Response response = client.FloatSeconds(content); @@ -356,7 +356,7 @@ public async Task Example_Property_FloatSeconds_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - value = 10F, + value = "PT1H23M45S", }); Response response = await client.FloatSecondsAsync(content); @@ -370,7 +370,7 @@ public void Example_Property_FloatSeconds_ShortVersion_Convenience() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(TimeSpan.FromSeconds(10F)); + FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); Response response = client.FloatSeconds(body); } @@ -380,7 +380,7 @@ public async Task Example_Property_FloatSeconds_ShortVersion_Convenience_Async() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(TimeSpan.FromSeconds(10F)); + FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); Response response = await client.FloatSecondsAsync(body); } @@ -392,7 +392,7 @@ public void Example_Property_FloatSeconds_AllParameters() using RequestContent content = RequestContent.Create(new { - value = 10F, + value = "PT1H23M45S", }); Response response = client.FloatSeconds(content); @@ -408,7 +408,7 @@ public async Task Example_Property_FloatSeconds_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - value = 10F, + value = "PT1H23M45S", }); Response response = await client.FloatSecondsAsync(content); @@ -422,7 +422,7 @@ public void Example_Property_FloatSeconds_AllParameters_Convenience() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(TimeSpan.FromSeconds(10F)); + FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); Response response = client.FloatSeconds(body); } @@ -432,7 +432,7 @@ public async Task Example_Property_FloatSeconds_AllParameters_Convenience_Async( { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(TimeSpan.FromSeconds(10F)); + FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); Response response = await client.FloatSecondsAsync(body); } @@ -446,7 +446,7 @@ public void Example_Property_FloatSecondsArray_ShortVersion() { value = new object[] { -10F +"PT1H23M45S" }, }); Response response = client.FloatSecondsArray(content); @@ -465,7 +465,7 @@ public async Task Example_Property_FloatSecondsArray_ShortVersion_Async() { value = new object[] { -10F +"PT1H23M45S" }, }); Response response = await client.FloatSecondsArrayAsync(content); @@ -480,7 +480,7 @@ public void Example_Property_FloatSecondsArray_ShortVersion_Convenience() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { TimeSpan.FromSeconds(10F) }); + FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { XmlConvert.ToTimeSpan("PT1H23M45S") }); Response response = client.FloatSecondsArray(body); } @@ -490,7 +490,7 @@ public async Task Example_Property_FloatSecondsArray_ShortVersion_Convenience_As { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { TimeSpan.FromSeconds(10F) }); + FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { XmlConvert.ToTimeSpan("PT1H23M45S") }); Response response = await client.FloatSecondsArrayAsync(body); } @@ -504,7 +504,7 @@ public void Example_Property_FloatSecondsArray_AllParameters() { value = new object[] { -10F +"PT1H23M45S" }, }); Response response = client.FloatSecondsArray(content); @@ -523,7 +523,7 @@ public async Task Example_Property_FloatSecondsArray_AllParameters_Async() { value = new object[] { -10F +"PT1H23M45S" }, }); Response response = await client.FloatSecondsArrayAsync(content); @@ -538,7 +538,7 @@ public void Example_Property_FloatSecondsArray_AllParameters_Convenience() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { TimeSpan.FromSeconds(10F) }); + FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { XmlConvert.ToTimeSpan("PT1H23M45S") }); Response response = client.FloatSecondsArray(body); } @@ -548,7 +548,7 @@ public async Task Example_Property_FloatSecondsArray_AllParameters_Convenience_A { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { TimeSpan.FromSeconds(10F) }); + FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { XmlConvert.ToTimeSpan("PT1H23M45S") }); Response response = await client.FloatSecondsArrayAsync(body); } } diff --git a/test/CadlRanchProjects/parameters/body-optionality/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/parameters/body-optionality/src/Generated/tspCodeModel.json index 24277e1237a..79f5d1eeb0b 100644 --- a/test/CadlRanchProjects/parameters/body-optionality/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/parameters/body-optionality/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/parameters/spread/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/parameters/spread/src/Generated/tspCodeModel.json index 9cedec2d7fe..d7c5a25ac67 100644 --- a/test/CadlRanchProjects/parameters/spread/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/parameters/spread/src/Generated/tspCodeModel.json @@ -26,7 +26,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -50,7 +51,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -74,7 +76,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -98,7 +101,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "14", @@ -112,7 +116,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "16", @@ -126,7 +131,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "18", @@ -140,7 +146,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "20", @@ -154,7 +161,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "22", @@ -168,7 +176,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json index ad47a5405c7..b9624f00f6e 100644 --- a/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -49,7 +50,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -73,7 +75,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/payload/pageable/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/payload/pageable/src/Generated/tspCodeModel.json index a8162d7483b..420689b8a68 100644 --- a/test/CadlRanchProjects/payload/pageable/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/payload/pageable/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ { "$id": "2", "Kind": "Model", - "Name": "PagedUser", + "Name": "PagedUserUser", "Namespace": "Azure.Core", "Description": "Paged collection of User items", "IsNullable": false, @@ -44,14 +44,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "8", @@ -65,7 +67,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false } ] }, diff --git a/test/CadlRanchProjects/projection/projected-name/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/projection/projected-name/src/Generated/tspCodeModel.json index 12f4aafe8c6..1874a2cdc4a 100644 --- a/test/CadlRanchProjects/projection/projected-name/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/projection/projected-name/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -49,7 +50,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -73,7 +75,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -97,7 +100,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -121,7 +125,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -145,7 +150,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/serialization/encoded-name/json/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/serialization/encoded-name/json/src/Generated/tspCodeModel.json index 3e970e7d794..356dc841a9e 100644 --- a/test/CadlRanchProjects/serialization/encoded-name/json/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/serialization/encoded-name/json/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/server/path/multiple/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/server/path/multiple/src/Generated/tspCodeModel.json index 4a299111154..bde06fe1d55 100644 --- a/test/CadlRanchProjects/server/path/multiple/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/server/path/multiple/src/Generated/tspCodeModel.json @@ -9,7 +9,7 @@ "$id": "2", "Kind": "Enum", "Name": "Versions", - "EnumValueType": "String", + "EnumValueType": "string", "AllowedValues": [ { "$id": "3", @@ -22,7 +22,7 @@ "Description": "Service versions", "IsExtensible": true, "IsNullable": false, - "Usage": "None" + "Usage": "Input" } ], "Models": [], diff --git a/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json index 295c4906623..c45ecf7d70d 100644 --- a/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -49,7 +50,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -73,7 +75,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -97,7 +100,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -121,7 +125,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -145,7 +150,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -169,7 +175,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -193,7 +200,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -217,7 +225,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -241,7 +250,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -265,7 +275,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -289,7 +300,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -313,7 +325,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -337,7 +350,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -361,7 +375,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -385,7 +400,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -409,7 +425,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -433,7 +450,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -457,7 +475,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -481,7 +500,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -505,7 +525,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -529,7 +550,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -553,7 +575,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -577,7 +600,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -601,7 +625,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -625,7 +650,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -649,7 +675,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -673,7 +700,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -697,7 +725,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -721,7 +750,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -745,7 +775,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -769,7 +800,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -793,7 +825,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -817,7 +850,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -841,7 +875,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/type/array/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/array/src/Generated/tspCodeModel.json index eb4357e2427..894ebcf8450 100644 --- a/test/CadlRanchProjects/type/array/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/array/src/Generated/tspCodeModel.json @@ -26,7 +26,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "5", @@ -43,7 +44,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/type/dictionary/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/dictionary/src/Generated/tspCodeModel.json index a058167a4b2..d1779a6e606 100644 --- a/test/CadlRanchProjects/type/dictionary/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/dictionary/src/Generated/tspCodeModel.json @@ -26,7 +26,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "5", @@ -49,7 +50,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/type/enum/fixed/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/enum/fixed/src/Generated/tspCodeModel.json index e1e8623f1d1..78902ec49f0 100644 --- a/test/CadlRanchProjects/type/enum/fixed/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/enum/fixed/src/Generated/tspCodeModel.json @@ -7,7 +7,7 @@ "$id": "2", "Kind": "Enum", "Name": "DaysOfWeekEnum", - "EnumValueType": "String", + "EnumValueType": "string", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json index 8a5eabaa578..3bb70d56255 100644 --- a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json @@ -27,7 +27,7 @@ "$id": "4", "Kind": "Enum", "Name": "SnakeKind", - "EnumValueType": "String", + "EnumValueType": "string", "AllowedValues": [ { "$id": "5", @@ -78,7 +78,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -116,7 +117,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, diff --git a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/Models/Cat.cs b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/Models/Cat.cs index 0a44625fdfa..c347cde7734 100644 --- a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/Models/Cat.cs +++ b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/Models/Cat.cs @@ -18,7 +18,7 @@ public partial class Cat : Pet /// /// /// is null. - internal Cat(string name, int age) : base(name) + public Cat(string name, int age) : base(name) { Argument.AssertNotNull(name, nameof(name)); @@ -39,7 +39,7 @@ internal Cat() { } - /// Gets the age. - public int Age { get; } + /// Gets or sets the age. + public int Age { get; set; } } } diff --git a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/Models/Pet.cs b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/Models/Pet.cs index c1698dc9be4..cdf963e2478 100644 --- a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/Models/Pet.cs +++ b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/Models/Pet.cs @@ -49,7 +49,7 @@ public partial class Pet /// Initializes a new instance of . /// /// is null. - internal Pet(string name) + public Pet(string name) { Argument.AssertNotNull(name, nameof(name)); @@ -70,7 +70,7 @@ internal Pet() { } - /// Gets the name. - public string Name { get; } + /// Gets or sets the name. + public string Name { get; set; } } } diff --git a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/TypeModelInheritanceNotDiscriminatedModelFactory.cs b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/TypeModelInheritanceNotDiscriminatedModelFactory.cs deleted file mode 100644 index 13e4c900646..00000000000 --- a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/TypeModelInheritanceNotDiscriminatedModelFactory.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace _Type.Model.Inheritance.NotDiscriminated.Models -{ - /// Model factory for models. - public static partial class TypeModelInheritanceNotDiscriminatedModelFactory - { - /// Initializes a new instance of . - /// - /// A new instance for mocking. - public static Pet Pet(string name = null) - { - return new Pet(name, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static Cat Cat(string name = null, int age = default) - { - return new Cat(name, serializedAdditionalRawData: null, age); - } - } -} diff --git a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/tspCodeModel.json index b8fd28c63d0..7ffd533979f 100644 --- a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/tspCodeModel.json @@ -8,66 +8,62 @@ { "$id": "2", "Kind": "Model", - "Name": "Pet", - "Namespace": "Type.Model.Inheritance.NotDiscriminated", - "Description": "This is base model for not-discriminated normal multiple levels inheritance.", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "3", - "Name": "name", - "SerializedName": "name", - "Description": "", - "Type": { - "$id": "4", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "5", - "Kind": "Model", - "Name": "Cat", - "Namespace": "Type.Model.Inheritance.NotDiscriminated", - "Description": "The second level model in the normal multiple levels inheritance.", - "IsNullable": false, - "Usage": "None", - "BaseModel": { - "$ref": "2" - }, - "Properties": [ - { - "$id": "6", - "Name": "age", - "SerializedName": "age", - "Description": "", - "Type": { - "$id": "7", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "8", - "Kind": "Model", "Name": "Siamese", "Namespace": "Type.Model.Inheritance.NotDiscriminated", "Description": "The third level model in the normal multiple levels inheritance.", "IsNullable": false, "Usage": "RoundTrip", "BaseModel": { - "$ref": "5" + "$id": "3", + "Kind": "Model", + "Name": "Cat", + "Namespace": "Type.Model.Inheritance.NotDiscriminated", + "Description": "The second level model in the normal multiple levels inheritance.", + "IsNullable": false, + "Usage": "RoundTrip", + "BaseModel": { + "$id": "4", + "Kind": "Model", + "Name": "Pet", + "Namespace": "Type.Model.Inheritance.NotDiscriminated", + "Description": "This is base model for not-discriminated normal multiple levels inheritance.", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "5", + "Name": "name", + "SerializedName": "name", + "Description": "", + "Type": { + "$id": "6", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] + }, + "Properties": [ + { + "$id": "7", + "Name": "age", + "SerializedName": "age", + "Description": "", + "Type": { + "$id": "8", + "Kind": "Primitive", + "Name": "Int32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] }, "Properties": [ { @@ -82,9 +78,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] + }, + { + "$ref": "3" + }, + { + "$ref": "4" } ], "Clients": [ @@ -134,7 +137,7 @@ "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "8" + "$ref": "2" }, "Location": "Body", "IsRequired": true, @@ -266,7 +269,7 @@ 200 ], "BodyType": { - "$ref": "8" + "$ref": "2" }, "BodyMediaType": "Json", "Headers": [], @@ -297,7 +300,7 @@ "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "8" + "$ref": "2" }, "Location": "Body", "IsRequired": true, @@ -371,7 +374,7 @@ 200 ], "BodyType": { - "$ref": "8" + "$ref": "2" }, "BodyMediaType": "Json", "Headers": [], diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Docs/RecursiveClient.xml b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Docs/RecursiveClient.xml index 6725d640e50..834d54bc62d 100644 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Docs/RecursiveClient.xml +++ b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Docs/RecursiveClient.xml @@ -14,7 +14,10 @@ This sample shows how to call PutAsync with all parameters. @@ -31,7 +34,10 @@ This sample shows how to call Put with all parameters. diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Element.Serialization.cs b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Element.Serialization.cs index 6996e696b3f..08d1cdcfc75 100644 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Element.Serialization.cs +++ b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Element.Serialization.cs @@ -76,7 +76,7 @@ internal static Element DeserializeElement(JsonElement element, ModelReaderWrite { return null; } - IReadOnlyList extension = default; + IList extension = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Element.cs b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Element.cs index 4d3802fc24b..f26e723a015 100644 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Element.cs +++ b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Element.cs @@ -47,7 +47,7 @@ public partial class Element private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal Element() + public Element() { Extension = new ChangeTrackingList(); } @@ -55,13 +55,13 @@ internal Element() /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal Element(IReadOnlyList extension, IDictionary serializedAdditionalRawData) + internal Element(IList extension, IDictionary serializedAdditionalRawData) { Extension = extension; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets the extension. - public IReadOnlyList Extension { get; } + public IList Extension { get; } } } diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Extension.Serialization.cs b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Extension.Serialization.cs index aa5f8d4c3b3..2e52f62ea5a 100644 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Extension.Serialization.cs +++ b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Extension.Serialization.cs @@ -79,7 +79,7 @@ internal static Extension DeserializeExtension(JsonElement element, ModelReaderW return null; } sbyte level = default; - IReadOnlyList extension = default; + IList extension = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Extension.cs b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Extension.cs index 2ea2a8438b8..138db5e4b1d 100644 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Extension.cs +++ b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/Models/Extension.cs @@ -24,7 +24,7 @@ public Extension(sbyte level) /// /// Keeps track of any properties unknown to the library. /// - internal Extension(IReadOnlyList extension, IDictionary serializedAdditionalRawData, sbyte level) : base(extension, serializedAdditionalRawData) + internal Extension(IList extension, IDictionary serializedAdditionalRawData, sbyte level) : base(extension, serializedAdditionalRawData) { Level = level; } diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/TypeModelInheritanceRecursiveModelFactory.cs b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/TypeModelInheritanceRecursiveModelFactory.cs deleted file mode 100644 index 1923fc94ca5..00000000000 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/TypeModelInheritanceRecursiveModelFactory.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Linq; - -namespace _Type.Model.Inheritance.Recursive.Models -{ - /// Model factory for models. - public static partial class TypeModelInheritanceRecursiveModelFactory - { - /// Initializes a new instance of . - /// - /// A new instance for mocking. - public static Element Element(IEnumerable extension = null) - { - extension ??= new List(); - - return new Element(extension?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static Extension Extension(IEnumerable extension = null, sbyte level = default) - { - extension ??= new List(); - - return new Extension(extension?.ToList(), serializedAdditionalRawData: null, level); - } - } -} diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/tspCodeModel.json index 11b200c5e2c..aca00ba698d 100644 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/tspCodeModel.json @@ -8,58 +8,60 @@ { "$id": "2", "Kind": "Model", - "Name": "Element", + "Name": "Extension", "Namespace": "Type.Model.Inheritance.Recursive", - "Description": "element", + "Description": "extension", "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "3", - "Name": "extension", - "SerializedName": "extension", - "Description": "", - "Type": { + "Usage": "RoundTrip", + "BaseModel": { + "$id": "3", + "Kind": "Model", + "Name": "Element", + "Namespace": "Type.Model.Inheritance.Recursive", + "Description": "element", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { "$id": "4", - "Kind": "Array", - "Name": "Array", - "ElementType": { + "Name": "extension", + "SerializedName": "extension", + "Description": "", + "Type": { "$id": "5", - "Kind": "Model", - "Name": "Extension", - "Namespace": "Type.Model.Inheritance.Recursive", - "Description": "extension", - "IsNullable": false, - "Usage": "RoundTrip", - "BaseModel": { + "Kind": "Array", + "Name": "Array", + "ElementType": { "$ref": "2" }, - "Properties": [ - { - "$id": "6", - "Name": "level", - "SerializedName": "level", - "Description": "", - "Type": { - "$id": "7", - "Kind": "Primitive", - "Name": "SByte", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] + "IsNullable": false }, + "IsRequired": false, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] + }, + "Properties": [ + { + "$id": "6", + "Name": "level", + "SerializedName": "level", + "Description": "", + "Type": { + "$id": "7", + "Kind": "Primitive", + "Name": "SByte", "IsNullable": false }, - "IsRequired": false, - "IsReadOnly": false + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "5" + "$ref": "3" } ], "Clients": [ @@ -109,7 +111,7 @@ "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "5" + "$ref": "2" }, "Location": "Body", "IsRequired": true, @@ -241,7 +243,7 @@ 200 ], "BodyType": { - "$ref": "5" + "$ref": "2" }, "BodyMediaType": "Json", "Headers": [], diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/tests/Generated/Samples/Samples_RecursiveClient.cs b/test/CadlRanchProjects/type/model/inheritance/recursive/tests/Generated/Samples/Samples_RecursiveClient.cs index f970dbefbe1..33a4aac1c3b 100644 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/tests/Generated/Samples/Samples_RecursiveClient.cs +++ b/test/CadlRanchProjects/type/model/inheritance/recursive/tests/Generated/Samples/Samples_RecursiveClient.cs @@ -113,7 +113,10 @@ public void Example_Recursive_Put_AllParameters_Convenience() { RecursiveClient client = new RecursiveClient(); - Extension input = new Extension(123); + Extension input = new Extension(123) + { + Extension = { default }, + }; Response response = client.Put(input); } @@ -123,7 +126,10 @@ public async Task Example_Recursive_Put_AllParameters_Convenience_Async() { RecursiveClient client = new RecursiveClient(); - Extension input = new Extension(123); + Extension input = new Extension(123) + { + Extension = { default }, + }; Response response = await client.PutAsync(input); } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Bird.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Bird.cs index 79cb7e3b7c9..f39c8a6145b 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Bird.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Bird.cs @@ -57,7 +57,7 @@ protected Bird(int wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal Bird(string kind, int wingspan, IDictionary serializedAdditionalRawData) @@ -72,7 +72,7 @@ internal Bird() { } - /// Gets or sets the kind. + /// Discriminator. internal string Kind { get; set; } /// Gets or sets the wingspan. public int Wingspan { get; set; } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs index 6499f6c9b6b..79fe82d13b7 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs @@ -25,7 +25,7 @@ public Eagle(int wingspan) : base(wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. /// diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs index faf99c48645..ad60567c201 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs @@ -21,7 +21,7 @@ public Goose(int wingspan) : base(wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal Goose(string kind, int wingspan, IDictionary serializedAdditionalRawData) : base(kind, wingspan, serializedAdditionalRawData) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs index 4941de135e5..89974ed0bc3 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs @@ -21,7 +21,7 @@ public SeaGull(int wingspan) : base(wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal SeaGull(string kind, int wingspan, IDictionary serializedAdditionalRawData) : base(kind, wingspan, serializedAdditionalRawData) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs index 09f384ca97a..f00dd68a156 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs @@ -21,7 +21,7 @@ public Sparrow(int wingspan) : base(wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal Sparrow(string kind, int wingspan, IDictionary serializedAdditionalRawData) : base(kind, wingspan, serializedAdditionalRawData) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownBird.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownBird.cs index 80620917ae3..15dd5680d7d 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownBird.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownBird.cs @@ -14,7 +14,7 @@ namespace _Type.Model.Inheritance.SingleDiscriminator.Models internal partial class UnknownBird : Bird { /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal UnknownBird(string kind, int wingspan, IDictionary serializedAdditionalRawData) : base(kind, wingspan, serializedAdditionalRawData) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json index 83c6297775e..31a88c1f21d 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json @@ -19,7 +19,7 @@ "$id": "3", "Name": "kind", "SerializedName": "kind", - "Description": "", + "Description": "Discriminator", "Type": { "$id": "4", "Kind": "Primitive", @@ -42,7 +42,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -61,14 +62,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "9", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { @@ -83,7 +84,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -157,7 +159,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "18", @@ -180,7 +183,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "21", @@ -191,7 +195,8 @@ "$ref": "2" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, diff --git a/test/CadlRanchProjects/type/model/usage/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/usage/src/Generated/tspCodeModel.json index 57228e1c0a8..6ea1e5e245a 100644 --- a/test/CadlRanchProjects/type/model/usage/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/usage/src/Generated/tspCodeModel.json @@ -26,7 +26,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -51,7 +52,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -76,7 +78,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsUnknownDiscriminated.xml b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsUnknownDiscriminated.xml index b69d85a4fe2..18d739b79d4 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsUnknownDiscriminated.xml +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsUnknownDiscriminated.xml @@ -40,8 +40,8 @@ ExtendsUnknownDiscriminated client = new AdditionalPropertiesClient().GetExtends Response response = await client.GetExtendsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); ]]> This sample shows how to call GetExtendsUnknownDiscriminatedAsync with all parameters and parse the result. @@ -63,8 +63,8 @@ ExtendsUnknownDiscriminated client = new AdditionalPropertiesClient().GetExtends Response response = client.GetExtendsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); ]]> This sample shows how to call GetExtendsUnknownDiscriminated with all parameters and parse the result. @@ -126,8 +126,8 @@ ExtendsUnknownDiscriminated client = new AdditionalPropertiesClient().GetExtends using RequestContent content = RequestContent.Create(new { index = 1234, - name = "", kind = "derived", + name = "", }); Response response = await client.PutAsync(content); @@ -141,8 +141,8 @@ using RequestContent content = RequestContent.Create(new { index = 1234, age = 123.45F, - name = "", kind = "derived", + name = "", }); Response response = await client.PutAsync(content); @@ -158,8 +158,8 @@ ExtendsUnknownDiscriminated client = new AdditionalPropertiesClient().GetExtends using RequestContent content = RequestContent.Create(new { index = 1234, - name = "", kind = "derived", + name = "", }); Response response = client.Put(content); @@ -173,8 +173,8 @@ using RequestContent content = RequestContent.Create(new { index = 1234, age = 123.45F, - name = "", kind = "derived", + name = "", }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/IsUnknownDiscriminated.xml b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/IsUnknownDiscriminated.xml index 289592c440f..340ee0a474e 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/IsUnknownDiscriminated.xml +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/IsUnknownDiscriminated.xml @@ -40,8 +40,8 @@ IsUnknownDiscriminated client = new AdditionalPropertiesClient().GetIsUnknownDis Response response = await client.GetIsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); ]]> This sample shows how to call GetIsUnknownDiscriminatedAsync with all parameters and parse the result. @@ -63,8 +63,8 @@ IsUnknownDiscriminated client = new AdditionalPropertiesClient().GetIsUnknownDis Response response = client.GetIsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); ]]> This sample shows how to call GetIsUnknownDiscriminated with all parameters and parse the result. @@ -126,8 +126,8 @@ IsUnknownDiscriminated client = new AdditionalPropertiesClient().GetIsUnknownDis using RequestContent content = RequestContent.Create(new { index = 1234, - name = "", kind = "derived", + name = "", }); Response response = await client.PutAsync(content); @@ -141,8 +141,8 @@ using RequestContent content = RequestContent.Create(new { index = 1234, age = 123.45F, - name = "", kind = "derived", + name = "", }); Response response = await client.PutAsync(content); @@ -158,8 +158,8 @@ IsUnknownDiscriminated client = new AdditionalPropertiesClient().GetIsUnknownDis using RequestContent content = RequestContent.Create(new { index = 1234, - name = "", kind = "derived", + name = "", }); Response response = client.Put(content); @@ -173,8 +173,8 @@ using RequestContent content = RequestContent.Create(new { index = 1234, age = 123.45F, - name = "", kind = "derived", + name = "", }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs index bfa7d7d4816..9b0fc53c90f 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs @@ -30,10 +30,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteNumberValue(Id); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); - writer.WriteNumberValue(item.Value); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } writer.WriteEndObject(); } @@ -59,8 +69,8 @@ internal static ExtendsFloatAdditionalProperties DeserializeExtendsFloatAddition return null; } float id = default; - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -68,10 +78,13 @@ internal static ExtendsFloatAdditionalProperties DeserializeExtendsFloatAddition id = property.Value.GetSingle(); continue; } - additionalPropertiesDictionary.Add(property.Name, property.Value.GetSingle()); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new ExtendsFloatAdditionalProperties(id, additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ExtendsFloatAdditionalProperties(id, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs index a5c8cbaa7e6..6e8b9708dc1 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs @@ -5,29 +5,60 @@ #nullable disable +using System; using System.Collections.Generic; -using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model extends from Record<float32> type. public partial class ExtendsFloatAdditionalProperties { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . /// The id property. public ExtendsFloatAdditionalProperties(float id) { Id = id; - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The id property. - /// Additional Properties. - internal ExtendsFloatAdditionalProperties(float id, IDictionary additionalProperties) + /// Keeps track of any properties unknown to the library. + internal ExtendsFloatAdditionalProperties(float id, IDictionary serializedAdditionalRawData) { Id = id; - AdditionalProperties = additionalProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; } /// Initializes a new instance of for deserialization. @@ -37,7 +68,5 @@ internal ExtendsFloatAdditionalProperties() /// The id property. public float Id { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs index 7811c219f66..49f32a2ffef 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs @@ -28,10 +28,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } writer.WriteEndObject(); } @@ -56,14 +66,17 @@ internal static ExtendsModelAdditionalProperties DeserializeExtendsModelAddition { return null; } - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - additionalPropertiesDictionary.Add(property.Name, ModelForRecord.DeserializeModelForRecord(property.Value, options)); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new ExtendsModelAdditionalProperties(additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ExtendsModelAdditionalProperties(serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs index 708b96ac626..305c77ed353 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs @@ -5,28 +5,56 @@ #nullable disable +using System; using System.Collections.Generic; -using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model extends from Record<ModelForRecord> type. public partial class ExtendsModelAdditionalProperties { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . public ExtendsModelAdditionalProperties() { - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Additional Properties. - internal ExtendsModelAdditionalProperties(IDictionary additionalProperties) + /// Keeps track of any properties unknown to the library. + internal ExtendsModelAdditionalProperties(IDictionary serializedAdditionalRawData) { - AdditionalProperties = additionalProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; } - - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs index d535fdecea8..02d04a32bd0 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs @@ -28,15 +28,20 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WriteStartObject(); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); - writer.WriteStartArray(); - foreach (var item0 in item.Value) + foreach (var item in _serializedAdditionalRawData) { - writer.WriteObjectValue(item0); + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } - writer.WriteEndArray(); } writer.WriteEndObject(); } @@ -61,19 +66,17 @@ internal static ExtendsModelArrayAdditionalProperties DeserializeExtendsModelArr { return null; } - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + if (options.Format != "W") { - array.Add(ModelForRecord.DeserializeModelForRecord(item, options)); + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalPropertiesDictionary.Add(property.Name, array); } - additionalProperties = additionalPropertiesDictionary; - return new ExtendsModelArrayAdditionalProperties(additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ExtendsModelArrayAdditionalProperties(serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs index 641688e03ba..31dc0559047 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs @@ -5,28 +5,56 @@ #nullable disable +using System; using System.Collections.Generic; -using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model extends from Record<ModelForRecord[]> type. public partial class ExtendsModelArrayAdditionalProperties { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . public ExtendsModelArrayAdditionalProperties() { - AdditionalProperties = new ChangeTrackingDictionary>(); } /// Initializes a new instance of . - /// Additional Properties. - internal ExtendsModelArrayAdditionalProperties(IDictionary> additionalProperties) + /// Keeps track of any properties unknown to the library. + internal ExtendsModelArrayAdditionalProperties(IDictionary serializedAdditionalRawData) { - AdditionalProperties = additionalProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; } - - /// Additional Properties. - public IDictionary> AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs index 6fef2a8ee34..d60c4f760f5 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs @@ -30,10 +30,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } writer.WriteEndObject(); } @@ -59,8 +69,8 @@ internal static ExtendsStringAdditionalProperties DeserializeExtendsStringAdditi return null; } string name = default; - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -68,10 +78,13 @@ internal static ExtendsStringAdditionalProperties DeserializeExtendsStringAdditi name = property.Value.GetString(); continue; } - additionalPropertiesDictionary.Add(property.Name, property.Value.GetString()); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new ExtendsStringAdditionalProperties(name, additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ExtendsStringAdditionalProperties(name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs index bdd4746bb48..9ca20c0ca31 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -15,6 +14,38 @@ namespace _Type.Property.AdditionalProperties.Models /// The model extends from Record<string> type. public partial class ExtendsStringAdditionalProperties { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . /// The name property. /// is null. @@ -23,16 +54,15 @@ public ExtendsStringAdditionalProperties(string name) Argument.AssertNotNull(name, nameof(name)); Name = name; - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The name property. - /// Additional Properties. - internal ExtendsStringAdditionalProperties(string name, IDictionary additionalProperties) + /// Keeps track of any properties unknown to the library. + internal ExtendsStringAdditionalProperties(string name, IDictionary serializedAdditionalRawData) { Name = name; - AdditionalProperties = additionalProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; } /// Initializes a new instance of for deserialization. @@ -42,7 +72,5 @@ internal ExtendsStringAdditionalProperties() /// The name property. public string Name { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs index f62548d6e90..b60af814563 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs @@ -30,17 +30,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } @@ -66,7 +69,7 @@ internal static ExtendsUnknownAdditionalProperties DeserializeExtendsUnknownAddi return null; } string name = default; - IDictionary additionalProperties = default; + IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -75,10 +78,13 @@ internal static ExtendsUnknownAdditionalProperties DeserializeExtendsUnknownAddi name = property.Value.GetString(); continue; } - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new ExtendsUnknownAdditionalProperties(name, additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ExtendsUnknownAdditionalProperties(name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs index 0551dec8461..6b38715eedb 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -15,35 +14,8 @@ namespace _Type.Property.AdditionalProperties.Models /// The model extends from Record<unknown> type. public partial class ExtendsUnknownAdditionalProperties { - /// Initializes a new instance of . - /// The name property. - /// is null. - public ExtendsUnknownAdditionalProperties(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - AdditionalProperties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The name property. - /// Additional Properties. - internal ExtendsUnknownAdditionalProperties(string name, IDictionary additionalProperties) - { - Name = name; - AdditionalProperties = additionalProperties; - } - - /// Initializes a new instance of for deserialization. - internal ExtendsUnknownAdditionalProperties() - { - } - - /// The name property. - public string Name { get; set; } /// - /// Additional Properties + /// Keeps track of any properties unknown to the library. /// /// To assign an object to the value of this property use . /// @@ -72,6 +44,33 @@ internal ExtendsUnknownAdditionalProperties() /// /// /// - public IDictionary AdditionalProperties { get; } + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name property. + /// is null. + public ExtendsUnknownAdditionalProperties(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The name property. + /// Keeps track of any properties unknown to the library. + internal ExtendsUnknownAdditionalProperties(string name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExtendsUnknownAdditionalProperties() + { + } + + /// The name property. + public string Name { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs index fa36c46f279..f751833a709 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs @@ -37,17 +37,20 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } @@ -75,7 +78,7 @@ internal static ExtendsUnknownAdditionalPropertiesDerived DeserializeExtendsUnkn int index = default; float? age = default; string name = default; - IDictionary additionalProperties = default; + IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -98,10 +101,13 @@ internal static ExtendsUnknownAdditionalPropertiesDerived DeserializeExtendsUnkn name = property.Value.GetString(); continue; } - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new ExtendsUnknownAdditionalPropertiesDerived(name, additionalProperties, index, age); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ExtendsUnknownAdditionalPropertiesDerived(name, serializedAdditionalRawData, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs index b9c10cd9e2d..8d820e09e4f 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs @@ -27,10 +27,10 @@ public ExtendsUnknownAdditionalPropertiesDerived(string name, int index) : base( /// Initializes a new instance of . /// The name property. - /// Additional Properties. + /// Keeps track of any properties unknown to the library. /// The index property. /// The age property. - internal ExtendsUnknownAdditionalPropertiesDerived(string name, IDictionary additionalProperties, int index, float? age) : base(name, additionalProperties) + internal ExtendsUnknownAdditionalPropertiesDerived(string name, IDictionary serializedAdditionalRawData, int index, float? age) : base(name, serializedAdditionalRawData) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index 3553815bfef..8f87205cf67 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -28,21 +28,24 @@ void IJsonModel.Write(Utf8JsonW } writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); - foreach (var item in AdditionalProperties) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs index a032fd6d65f..bf094c34752 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -19,39 +18,8 @@ namespace _Type.Property.AdditionalProperties.Models /// public abstract partial class ExtendsUnknownAdditionalPropertiesDiscriminated { - /// Initializes a new instance of . - /// The name property. - /// is null. - protected ExtendsUnknownAdditionalPropertiesDiscriminated(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - AdditionalProperties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The name property. - /// The discriminator. - /// Additional Properties. - internal ExtendsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) - { - Name = name; - Kind = kind; - AdditionalProperties = additionalProperties; - } - - /// Initializes a new instance of for deserialization. - internal ExtendsUnknownAdditionalPropertiesDiscriminated() - { - } - - /// The name property. - public string Name { get; set; } - /// The discriminator. - internal string Kind { get; set; } /// - /// Additional Properties + /// Keeps track of any properties unknown to the library. /// /// To assign an object to the value of this property use . /// @@ -80,6 +48,37 @@ internal ExtendsUnknownAdditionalPropertiesDiscriminated() /// /// /// - public IDictionary AdditionalProperties { get; } + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name property. + /// is null. + protected ExtendsUnknownAdditionalPropertiesDiscriminated(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The discriminator. + /// The name property. + /// Keeps track of any properties unknown to the library. + internal ExtendsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary serializedAdditionalRawData) + { + Kind = kind; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExtendsUnknownAdditionalPropertiesDiscriminated() + { + } + + /// The discriminator. + internal string Kind { get; set; } + /// The name property. + public string Name { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs index dd643c3f297..fb61fad3376 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs @@ -35,21 +35,24 @@ void IJsonModel.Write(Ut writer.WritePropertyName("age"u8); writer.WriteNumberValue(Age.Value); } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); - foreach (var item in AdditionalProperties) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } @@ -76,9 +79,9 @@ internal static ExtendsUnknownAdditionalPropertiesDiscriminatedDerived Deseriali } int index = default; float? age = default; - string name = default; string kind = default; - IDictionary additionalProperties = default; + string name = default; + IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -96,20 +99,23 @@ internal static ExtendsUnknownAdditionalPropertiesDiscriminatedDerived Deseriali age = property.Value.GetSingle(); continue; } + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (options.Format != "W") { - kind = property.Value.GetString(); - continue; + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalProperties = additionalPropertiesDictionary; - return new ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(name, kind, additionalProperties, index, age); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(kind, name, serializedAdditionalRawData, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs index 6c1724109f3..3c6206076bd 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs @@ -27,12 +27,12 @@ public ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string name, int i } /// Initializes a new instance of . - /// The name property. /// The discriminator. - /// Additional Properties. + /// The name property. + /// Keeps track of any properties unknown to the library. /// The index property. /// The age property. - internal ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string name, string kind, IDictionary additionalProperties, int index, float? age) : base(name, kind, additionalProperties) + internal ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string kind, string name, IDictionary serializedAdditionalRawData, int index, float? age) : base(kind, name, serializedAdditionalRawData) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs index 56619a88257..acae1425316 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs @@ -30,10 +30,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteNumberValue(Id); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); - writer.WriteNumberValue(item.Value); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } writer.WriteEndObject(); } @@ -59,8 +69,8 @@ internal static IsFloatAdditionalProperties DeserializeIsFloatAdditionalProperti return null; } float id = default; - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -68,10 +78,13 @@ internal static IsFloatAdditionalProperties DeserializeIsFloatAdditionalProperti id = property.Value.GetSingle(); continue; } - additionalPropertiesDictionary.Add(property.Name, property.Value.GetSingle()); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new IsFloatAdditionalProperties(id, additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new IsFloatAdditionalProperties(id, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs index a39222c5472..5fceac0c8ee 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs @@ -5,29 +5,60 @@ #nullable disable +using System; using System.Collections.Generic; -using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model is from Record<float32> type. public partial class IsFloatAdditionalProperties { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . /// The id property. public IsFloatAdditionalProperties(float id) { Id = id; - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The id property. - /// Additional Properties. - internal IsFloatAdditionalProperties(float id, IDictionary additionalProperties) + /// Keeps track of any properties unknown to the library. + internal IsFloatAdditionalProperties(float id, IDictionary serializedAdditionalRawData) { Id = id; - AdditionalProperties = additionalProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; } /// Initializes a new instance of for deserialization. @@ -37,7 +68,5 @@ internal IsFloatAdditionalProperties() /// The id property. public float Id { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs index 80168f4706a..8faeb7fae11 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs @@ -28,10 +28,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteStartObject(); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } writer.WriteEndObject(); } @@ -56,14 +66,17 @@ internal static IsModelAdditionalProperties DeserializeIsModelAdditionalProperti { return null; } - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - additionalPropertiesDictionary.Add(property.Name, ModelForRecord.DeserializeModelForRecord(property.Value, options)); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new IsModelAdditionalProperties(additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new IsModelAdditionalProperties(serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs index e58d82841e9..0722b388ab9 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs @@ -5,28 +5,56 @@ #nullable disable +using System; using System.Collections.Generic; -using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model is from Record<ModelForRecord> type. public partial class IsModelAdditionalProperties { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . public IsModelAdditionalProperties() { - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Additional Properties. - internal IsModelAdditionalProperties(IDictionary additionalProperties) + /// Keeps track of any properties unknown to the library. + internal IsModelAdditionalProperties(IDictionary serializedAdditionalRawData) { - AdditionalProperties = additionalProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; } - - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs index d93bf7d79c8..7cfac97d9d7 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs @@ -28,15 +28,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); - writer.WriteStartArray(); - foreach (var item0 in item.Value) + foreach (var item in _serializedAdditionalRawData) { - writer.WriteObjectValue(item0); + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif } - writer.WriteEndArray(); } writer.WriteEndObject(); } @@ -61,19 +66,17 @@ internal static IsModelArrayAdditionalProperties DeserializeIsModelArrayAddition { return null; } - IDictionary> additionalProperties = default; - Dictionary> additionalPropertiesDictionary = new Dictionary>(); + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + if (options.Format != "W") { - array.Add(ModelForRecord.DeserializeModelForRecord(item, options)); + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalPropertiesDictionary.Add(property.Name, array); } - additionalProperties = additionalPropertiesDictionary; - return new IsModelArrayAdditionalProperties(additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new IsModelArrayAdditionalProperties(serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs index 4e0350f3e66..f001c2ec360 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs @@ -5,28 +5,56 @@ #nullable disable +using System; using System.Collections.Generic; -using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model is from Record<ModelForRecord[]> type. public partial class IsModelArrayAdditionalProperties { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . public IsModelArrayAdditionalProperties() { - AdditionalProperties = new ChangeTrackingDictionary>(); } /// Initializes a new instance of . - /// Additional Properties. - internal IsModelArrayAdditionalProperties(IDictionary> additionalProperties) + /// Keeps track of any properties unknown to the library. + internal IsModelArrayAdditionalProperties(IDictionary serializedAdditionalRawData) { - AdditionalProperties = additionalProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; } - - /// Additional Properties. - public IDictionary> AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs index 5739fde736c..36d6af60841 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs @@ -30,10 +30,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } } writer.WriteEndObject(); } @@ -59,8 +69,8 @@ internal static IsStringAdditionalProperties DeserializeIsStringAdditionalProper return null; } string name = default; - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -68,10 +78,13 @@ internal static IsStringAdditionalProperties DeserializeIsStringAdditionalProper name = property.Value.GetString(); continue; } - additionalPropertiesDictionary.Add(property.Name, property.Value.GetString()); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new IsStringAdditionalProperties(name, additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new IsStringAdditionalProperties(name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs index 56f8cfe55a0..cfc60c804f5 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -15,6 +14,38 @@ namespace _Type.Property.AdditionalProperties.Models /// The model is from Record<string> type. public partial class IsStringAdditionalProperties { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + /// Initializes a new instance of . /// The name property. /// is null. @@ -23,16 +54,15 @@ public IsStringAdditionalProperties(string name) Argument.AssertNotNull(name, nameof(name)); Name = name; - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The name property. - /// Additional Properties. - internal IsStringAdditionalProperties(string name, IDictionary additionalProperties) + /// Keeps track of any properties unknown to the library. + internal IsStringAdditionalProperties(string name, IDictionary serializedAdditionalRawData) { Name = name; - AdditionalProperties = additionalProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; } /// Initializes a new instance of for deserialization. @@ -42,7 +72,5 @@ internal IsStringAdditionalProperties() /// The name property. public string Name { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs index e127bd823d9..da09ae734fc 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs @@ -30,17 +30,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } @@ -66,7 +69,7 @@ internal static IsUnknownAdditionalProperties DeserializeIsUnknownAdditionalProp return null; } string name = default; - IDictionary additionalProperties = default; + IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -75,10 +78,13 @@ internal static IsUnknownAdditionalProperties DeserializeIsUnknownAdditionalProp name = property.Value.GetString(); continue; } - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new IsUnknownAdditionalProperties(name, additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new IsUnknownAdditionalProperties(name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs index df416f77d54..de6af4c905e 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -15,35 +14,8 @@ namespace _Type.Property.AdditionalProperties.Models /// The model is from Record<unknown> type. public partial class IsUnknownAdditionalProperties { - /// Initializes a new instance of . - /// The name property. - /// is null. - public IsUnknownAdditionalProperties(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - AdditionalProperties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The name property. - /// Additional Properties. - internal IsUnknownAdditionalProperties(string name, IDictionary additionalProperties) - { - Name = name; - AdditionalProperties = additionalProperties; - } - - /// Initializes a new instance of for deserialization. - internal IsUnknownAdditionalProperties() - { - } - - /// The name property. - public string Name { get; set; } /// - /// Additional Properties + /// Keeps track of any properties unknown to the library. /// /// To assign an object to the value of this property use . /// @@ -72,6 +44,33 @@ internal IsUnknownAdditionalProperties() /// /// /// - public IDictionary AdditionalProperties { get; } + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name property. + /// is null. + public IsUnknownAdditionalProperties(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The name property. + /// Keeps track of any properties unknown to the library. + internal IsUnknownAdditionalProperties(string name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IsUnknownAdditionalProperties() + { + } + + /// The name property. + public string Name { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs index a59d1e78375..14a152fb9f6 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs @@ -37,17 +37,20 @@ void IJsonModel.Write(Utf8JsonWriter write } writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - foreach (var item in AdditionalProperties) + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } @@ -75,7 +78,7 @@ internal static IsUnknownAdditionalPropertiesDerived DeserializeIsUnknownAdditio int index = default; float? age = default; string name = default; - IDictionary additionalProperties = default; + IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -98,10 +101,13 @@ internal static IsUnknownAdditionalPropertiesDerived DeserializeIsUnknownAdditio name = property.Value.GetString(); continue; } - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } } - additionalProperties = additionalPropertiesDictionary; - return new IsUnknownAdditionalPropertiesDerived(name, additionalProperties, index, age); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new IsUnknownAdditionalPropertiesDerived(name, serializedAdditionalRawData, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs index 211e5b2c57b..5cbc25764f0 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs @@ -27,10 +27,10 @@ public IsUnknownAdditionalPropertiesDerived(string name, int index) : base(name) /// Initializes a new instance of . /// The name property. - /// Additional Properties. + /// Keeps track of any properties unknown to the library. /// The index property. /// The age property. - internal IsUnknownAdditionalPropertiesDerived(string name, IDictionary additionalProperties, int index, float? age) : base(name, additionalProperties) + internal IsUnknownAdditionalPropertiesDerived(string name, IDictionary serializedAdditionalRawData, int index, float? age) : base(name, serializedAdditionalRawData) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index 0173d1aaa59..941655fbf6a 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -28,21 +28,24 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); - foreach (var item in AdditionalProperties) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs index d4205cbe87b..6d2438a1d75 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -19,39 +18,8 @@ namespace _Type.Property.AdditionalProperties.Models /// public abstract partial class IsUnknownAdditionalPropertiesDiscriminated { - /// Initializes a new instance of . - /// The name property. - /// is null. - protected IsUnknownAdditionalPropertiesDiscriminated(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - AdditionalProperties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The name property. - /// The discriminator. - /// Additional Properties. - internal IsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) - { - Name = name; - Kind = kind; - AdditionalProperties = additionalProperties; - } - - /// Initializes a new instance of for deserialization. - internal IsUnknownAdditionalPropertiesDiscriminated() - { - } - - /// The name property. - public string Name { get; set; } - /// The discriminator. - internal string Kind { get; set; } /// - /// Additional Properties + /// Keeps track of any properties unknown to the library. /// /// To assign an object to the value of this property use . /// @@ -80,6 +48,37 @@ internal IsUnknownAdditionalPropertiesDiscriminated() /// /// /// - public IDictionary AdditionalProperties { get; } + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name property. + /// is null. + protected IsUnknownAdditionalPropertiesDiscriminated(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The discriminator. + /// The name property. + /// Keeps track of any properties unknown to the library. + internal IsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary serializedAdditionalRawData) + { + Kind = kind; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal IsUnknownAdditionalPropertiesDiscriminated() + { + } + + /// The discriminator. + internal string Kind { get; set; } + /// The name property. + public string Name { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs index f6f16b23b59..200638260b3 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs @@ -35,21 +35,24 @@ void IJsonModel.Write(Utf8Jso writer.WritePropertyName("age"u8); writer.WriteNumberValue(Age.Value); } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); - foreach (var item in AdditionalProperties) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } @@ -76,9 +79,9 @@ internal static IsUnknownAdditionalPropertiesDiscriminatedDerived DeserializeIsU } int index = default; float? age = default; - string name = default; string kind = default; - IDictionary additionalProperties = default; + string name = default; + IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -96,20 +99,23 @@ internal static IsUnknownAdditionalPropertiesDiscriminatedDerived DeserializeIsU age = property.Value.GetSingle(); continue; } + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (options.Format != "W") { - kind = property.Value.GetString(); - continue; + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalProperties = additionalPropertiesDictionary; - return new IsUnknownAdditionalPropertiesDiscriminatedDerived(name, kind, additionalProperties, index, age); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new IsUnknownAdditionalPropertiesDiscriminatedDerived(kind, name, serializedAdditionalRawData, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs index 37a6e6a62c7..46ad168b919 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs @@ -27,12 +27,12 @@ public IsUnknownAdditionalPropertiesDiscriminatedDerived(string name, int index) } /// Initializes a new instance of . - /// The name property. /// The discriminator. - /// Additional Properties. + /// The name property. + /// Keeps track of any properties unknown to the library. /// The index property. /// The age property. - internal IsUnknownAdditionalPropertiesDiscriminatedDerived(string name, string kind, IDictionary additionalProperties, int index, float? age) : base(name, kind, additionalProperties) + internal IsUnknownAdditionalPropertiesDiscriminatedDerived(string kind, string name, IDictionary serializedAdditionalRawData, int index, float? age) : base(kind, name, serializedAdditionalRawData) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs deleted file mode 100644 index 2af08cccf9c..00000000000 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure; -using Azure.Core; -using _Type.Property.AdditionalProperties; - -namespace _Type.Property.AdditionalProperties.Models -{ - public partial class ModelForRecord : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ModelForRecord)} does not support '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ModelForRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ModelForRecord)} does not support '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeModelForRecord(document.RootElement, options); - } - - internal static ModelForRecord DeserializeModelForRecord(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= new ModelReaderWriterOptions("W"); - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string state = default; - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("state"u8)) - { - state = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ModelForRecord(state, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ModelForRecord)} does not support '{options.Format}' format."); - } - } - - ModelForRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeModelForRecord(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ModelForRecord)} does not support '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static ModelForRecord FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeModelForRecord(document.RootElement); - } - - /// Convert into a Utf8JsonRequestContent. - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs deleted file mode 100644 index fb2648570b3..00000000000 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using _Type.Property.AdditionalProperties; - -namespace _Type.Property.AdditionalProperties.Models -{ - /// model for record. - public partial class ModelForRecord - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The state property. - /// is null. - public ModelForRecord(string state) - { - Argument.AssertNotNull(state, nameof(state)); - - State = state; - } - - /// Initializes a new instance of . - /// The state property. - /// Keeps track of any properties unknown to the library. - internal ModelForRecord(string state, IDictionary serializedAdditionalRawData) - { - State = state; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ModelForRecord() - { - } - - /// The state property. - public string State { get; set; } - } -} diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index c555c009d70..6f35d41cfe1 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -28,21 +28,24 @@ void IJsonModel.Write(Utf8JsonW } writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); - foreach (var item in AdditionalProperties) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } @@ -67,26 +70,29 @@ internal static UnknownExtendsUnknownAdditionalPropertiesDiscriminated Deseriali { return null; } - string name = default; string kind = "Unknown"; - IDictionary additionalProperties = default; + string name = default; + IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (options.Format != "W") { - kind = property.Value.GetString(); - continue; + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalProperties = additionalPropertiesDictionary; - return new UnknownExtendsUnknownAdditionalPropertiesDiscriminated(name, kind, additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new UnknownExtendsUnknownAdditionalPropertiesDiscriminated(kind, name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs index 99be480a4d2..22b5eacdca0 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs @@ -14,10 +14,10 @@ namespace _Type.Property.AdditionalProperties.Models internal partial class UnknownExtendsUnknownAdditionalPropertiesDiscriminated : ExtendsUnknownAdditionalPropertiesDiscriminated { /// Initializes a new instance of . - /// The name property. /// The discriminator. - /// Additional Properties. - internal UnknownExtendsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) : base(name, kind, additionalProperties) + /// The name property. + /// Keeps track of any properties unknown to the library. + internal UnknownExtendsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary serializedAdditionalRawData) : base(kind, name, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index b54e8bb9ce9..7a9cc842991 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -28,21 +28,24 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); - foreach (var item in AdditionalProperties) + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) { - writer.WritePropertyName(item.Key); + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } } writer.WriteEndObject(); } @@ -67,26 +70,29 @@ internal static UnknownIsUnknownAdditionalPropertiesDiscriminated DeserializeUnk { return null; } - string name = default; string kind = "Unknown"; - IDictionary additionalProperties = default; + string name = default; + IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (options.Format != "W") { - kind = property.Value.GetString(); - continue; + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - additionalProperties = additionalPropertiesDictionary; - return new UnknownIsUnknownAdditionalPropertiesDiscriminated(name, kind, additionalProperties); + serializedAdditionalRawData = additionalPropertiesDictionary; + return new UnknownIsUnknownAdditionalPropertiesDiscriminated(kind, name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs index a2beac3487c..7236205e2a3 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs @@ -14,10 +14,10 @@ namespace _Type.Property.AdditionalProperties.Models internal partial class UnknownIsUnknownAdditionalPropertiesDiscriminated : IsUnknownAdditionalPropertiesDiscriminated { /// Initializes a new instance of . - /// The name property. /// The discriminator. - /// Additional Properties. - internal UnknownIsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) : base(name, kind, additionalProperties) + /// The name property. + /// Keeps track of any properties unknown to the library. + internal UnknownIsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary serializedAdditionalRawData) : base(kind, name, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json index 98b6ae627dd..4f7e5299fe5 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json @@ -13,43 +13,26 @@ "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "3", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "4", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "5", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [ { - "$id": "6", + "$id": "3", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "7", + "$id": "4", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "8", + "$id": "5", "Kind": "Model", "Name": "ExtendsUnknownAdditionalPropertiesDerived", "Namespace": "Type.Property.AdditionalProperties", @@ -61,37 +44,39 @@ }, "Properties": [ { - "$id": "9", + "$id": "6", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "10", + "$id": "7", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "11", + "$id": "8", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "12", + "$id": "9", "Kind": "Primitive", "Name": "Float32", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "13", + "$id": "10", "Kind": "Model", "Name": "ExtendsUnknownAdditionalPropertiesDiscriminated", "Namespace": "Type.Property.AdditionalProperties", @@ -99,101 +84,67 @@ "IsNullable": false, "DiscriminatorPropertyName": "kind", "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "14", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "15", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "16", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [ { - "$id": "17", - "Name": "name", - "SerializedName": "name", - "Description": "The name property", + "$id": "11", + "Name": "kind", + "SerializedName": "kind", + "Description": "The discriminator", "Type": { - "$id": "18", + "$id": "12", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": true }, { - "$id": "19", - "Name": "kind", - "SerializedName": "kind", - "Description": "The discriminator", + "$id": "13", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", "Type": { - "$id": "20", + "$id": "14", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false } ] }, { - "$id": "21", + "$id": "15", "Kind": "Model", "Name": "IsUnknownAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "22", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "23", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "24", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [ { - "$id": "25", + "$id": "16", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "26", + "$id": "17", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "27", + "$id": "18", "Kind": "Model", "Name": "IsUnknownAdditionalPropertiesDerived", "Namespace": "Type.Property.AdditionalProperties", @@ -201,41 +152,43 @@ "IsNullable": false, "Usage": "RoundTrip", "BaseModel": { - "$ref": "21" + "$ref": "15" }, "Properties": [ { - "$id": "28", + "$id": "19", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "29", + "$id": "20", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "30", + "$id": "21", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "31", + "$id": "22", "Kind": "Primitive", "Name": "Float32", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "32", + "$id": "23", "Kind": "Model", "Name": "IsUnknownAdditionalPropertiesDiscriminated", "Namespace": "Type.Property.AdditionalProperties", @@ -243,367 +196,185 @@ "IsNullable": false, "DiscriminatorPropertyName": "kind", "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "33", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "34", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "35", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [ { - "$id": "36", - "Name": "name", - "SerializedName": "name", - "Description": "The name property", + "$id": "24", + "Name": "kind", + "SerializedName": "kind", + "Description": "The discriminator", "Type": { - "$id": "37", + "$id": "25", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": true }, { - "$id": "38", - "Name": "kind", - "SerializedName": "kind", - "Description": "The discriminator", + "$id": "26", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", "Type": { - "$id": "39", + "$id": "27", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false } ] }, { - "$id": "40", + "$id": "28", "Kind": "Model", "Name": "ExtendsStringAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "41", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "42", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "43", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [ { - "$id": "44", + "$id": "29", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "45", + "$id": "30", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "46", + "$id": "31", "Kind": "Model", "Name": "IsStringAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "47", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "48", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "49", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [ { - "$id": "50", + "$id": "32", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "51", + "$id": "33", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "52", + "$id": "34", "Kind": "Model", "Name": "ExtendsFloatAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "53", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "54", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "55", - "Kind": "Primitive", - "Name": "Float32", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [ { - "$id": "56", + "$id": "35", "Name": "id", "SerializedName": "id", "Description": "The id property", "Type": { - "$id": "57", + "$id": "36", "Kind": "Primitive", "Name": "Float32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "58", + "$id": "37", "Kind": "Model", "Name": "IsFloatAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "59", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "60", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "61", - "Kind": "Primitive", - "Name": "Float32", - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [ { - "$id": "62", + "$id": "38", "Name": "id", "SerializedName": "id", "Description": "The id property", "Type": { - "$id": "63", + "$id": "39", "Kind": "Primitive", "Name": "Float32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "64", - "Kind": "Model", - "Name": "ModelForRecord", - "Namespace": "Type.Property.AdditionalProperties", - "Description": "model for record", - "IsNullable": false, - "Usage": "RoundTrip", - "Properties": [ - { - "$id": "65", - "Name": "state", - "SerializedName": "state", - "Description": "The state property", - "Type": { - "$id": "66", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "67", + "$id": "40", "Kind": "Model", "Name": "ExtendsModelAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "68", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "69", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$ref": "64" - }, - "IsNullable": false - }, "Properties": [] }, { - "$id": "70", + "$id": "41", "Kind": "Model", "Name": "IsModelAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "71", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "72", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$ref": "64" - }, - "IsNullable": false - }, "Properties": [] }, { - "$id": "73", + "$id": "42", "Kind": "Model", "Name": "ExtendsModelArrayAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "74", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "75", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "76", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$ref": "64" - }, - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [] }, { - "$id": "77", + "$id": "43", "Kind": "Model", "Name": "IsModelArrayAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "78", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "79", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "80", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$ref": "64" - }, - "IsNullable": false - }, - "IsNullable": false - }, "Properties": [] }, { - "$id": "81", + "$id": "44", "Kind": "Model", "Name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", "Namespace": "Type.Property.AdditionalProperties", @@ -612,41 +383,43 @@ "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { - "$ref": "13" + "$ref": "10" }, "Properties": [ { - "$id": "82", + "$id": "45", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "83", + "$id": "46", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "84", + "$id": "47", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "85", + "$id": "48", "Kind": "Primitive", "Name": "Float32", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "86", + "$id": "49", "Kind": "Model", "Name": "IsUnknownAdditionalPropertiesDiscriminatedDerived", "Namespace": "Type.Property.AdditionalProperties", @@ -655,69 +428,97 @@ "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { - "$ref": "32" + "$ref": "23" }, "Properties": [ { - "$id": "87", + "$id": "50", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "88", + "$id": "51", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "89", + "$id": "52", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "90", + "$id": "53", "Kind": "Primitive", "Name": "Float32", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false + } + ] + }, + { + "$id": "54", + "Kind": "Model", + "Name": "ModelForRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "model for record", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "55", + "Name": "state", + "SerializedName": "state", + "Description": "The state property", + "Type": { + "$id": "56", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false } ] } ], "Clients": [ { - "$id": "91", + "$id": "57", "Name": "AdditionalPropertiesClient", "Description": "", "Operations": [], "Protocol": { - "$id": "92" + "$id": "58" }, "Creatable": true }, { - "$id": "93", + "$id": "59", "Name": "ExtendsUnknown", "Description": "", "Operations": [ { - "$id": "94", + "$id": "60", "Name": "get", "ResourceName": "ExtendsUnknown", "Description": "Get call", "Parameters": [ { - "$id": "95", + "$id": "61", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "96", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -732,9 +533,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "97", + "$id": "63", "Type": { - "$id": "98", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -743,11 +544,11 @@ } }, { - "$id": "99", + "$id": "65", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "100", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -762,9 +563,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "101", + "$id": "67", "Type": { - "$ref": "100" + "$ref": "66" }, "Value": "application/json" } @@ -772,7 +573,7 @@ ], "Responses": [ { - "$id": "102", + "$id": "68", "StatusCodes": [ 200 ], @@ -796,16 +597,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "103", + "$id": "69", "Name": "put", "ResourceName": "ExtendsUnknown", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "104", + "$id": "70", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -823,11 +624,11 @@ "Kind": "Method" }, { - "$id": "105", + "$id": "71", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "106", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -842,19 +643,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "107", + "$id": "73", "Type": { - "$ref": "106" + "$ref": "72" }, "Value": "application/json" } }, { - "$id": "108", + "$id": "74", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "109", + "$id": "75", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -869,9 +670,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "110", + "$id": "76", "Type": { - "$ref": "109" + "$ref": "75" }, "Value": "application/json" } @@ -879,7 +680,7 @@ ], "Responses": [ { - "$id": "111", + "$id": "77", "StatusCodes": [ 204 ], @@ -901,31 +702,31 @@ } ], "Protocol": { - "$id": "112" + "$id": "78" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "113", + "$id": "79", "Name": "ExtendsUnknownDerived", "Description": "", "Operations": [ { - "$id": "114", + "$id": "80", "Name": "get", "ResourceName": "ExtendsUnknownDerived", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "115", + "$id": "81", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "116", + "$id": "82", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -940,9 +741,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "117", + "$id": "83", "Type": { - "$ref": "116" + "$ref": "82" }, "Value": "application/json" } @@ -950,12 +751,12 @@ ], "Responses": [ { - "$id": "118", + "$id": "84", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "8" + "$ref": "5" }, "BodyMediaType": "Json", "Headers": [], @@ -974,21 +775,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "119", + "$id": "85", "Name": "put", "ResourceName": "ExtendsUnknownDerived", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "120", + "$id": "86", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "8" + "$ref": "5" }, "Location": "Body", "IsRequired": true, @@ -1001,11 +802,11 @@ "Kind": "Method" }, { - "$id": "121", + "$id": "87", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "122", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1020,19 +821,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "123", + "$id": "89", "Type": { - "$ref": "122" + "$ref": "88" }, "Value": "application/json" } }, { - "$id": "124", + "$id": "90", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "125", + "$id": "91", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1047,9 +848,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "126", + "$id": "92", "Type": { - "$ref": "125" + "$ref": "91" }, "Value": "application/json" } @@ -1057,7 +858,7 @@ ], "Responses": [ { - "$id": "127", + "$id": "93", "StatusCodes": [ 204 ], @@ -1079,31 +880,31 @@ } ], "Protocol": { - "$id": "128" + "$id": "94" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "129", + "$id": "95", "Name": "ExtendsUnknownDiscriminated", "Description": "", "Operations": [ { - "$id": "130", + "$id": "96", "Name": "get", "ResourceName": "ExtendsUnknownDiscriminated", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "131", + "$id": "97", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "132", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1118,9 +919,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "133", + "$id": "99", "Type": { - "$ref": "132" + "$ref": "98" }, "Value": "application/json" } @@ -1128,12 +929,12 @@ ], "Responses": [ { - "$id": "134", + "$id": "100", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "13" + "$ref": "10" }, "BodyMediaType": "Json", "Headers": [], @@ -1152,21 +953,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "135", + "$id": "101", "Name": "put", "ResourceName": "ExtendsUnknownDiscriminated", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "136", + "$id": "102", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "13" + "$ref": "10" }, "Location": "Body", "IsRequired": true, @@ -1179,11 +980,11 @@ "Kind": "Method" }, { - "$id": "137", + "$id": "103", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "138", + "$id": "104", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1198,19 +999,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "139", + "$id": "105", "Type": { - "$ref": "138" + "$ref": "104" }, "Value": "application/json" } }, { - "$id": "140", + "$id": "106", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "141", + "$id": "107", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1225,9 +1026,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "142", + "$id": "108", "Type": { - "$ref": "141" + "$ref": "107" }, "Value": "application/json" } @@ -1235,7 +1036,7 @@ ], "Responses": [ { - "$id": "143", + "$id": "109", "StatusCodes": [ 204 ], @@ -1257,31 +1058,31 @@ } ], "Protocol": { - "$id": "144" + "$id": "110" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "145", + "$id": "111", "Name": "IsUnknown", "Description": "", "Operations": [ { - "$id": "146", + "$id": "112", "Name": "get", "ResourceName": "IsUnknown", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "147", + "$id": "113", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "148", + "$id": "114", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1296,9 +1097,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "149", + "$id": "115", "Type": { - "$ref": "148" + "$ref": "114" }, "Value": "application/json" } @@ -1306,12 +1107,12 @@ ], "Responses": [ { - "$id": "150", + "$id": "116", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "21" + "$ref": "15" }, "BodyMediaType": "Json", "Headers": [], @@ -1330,21 +1131,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "151", + "$id": "117", "Name": "put", "ResourceName": "IsUnknown", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "152", + "$id": "118", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "21" + "$ref": "15" }, "Location": "Body", "IsRequired": true, @@ -1357,11 +1158,11 @@ "Kind": "Method" }, { - "$id": "153", + "$id": "119", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "154", + "$id": "120", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1376,19 +1177,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "155", + "$id": "121", "Type": { - "$ref": "154" + "$ref": "120" }, "Value": "application/json" } }, { - "$id": "156", + "$id": "122", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "157", + "$id": "123", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1403,9 +1204,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "158", + "$id": "124", "Type": { - "$ref": "157" + "$ref": "123" }, "Value": "application/json" } @@ -1413,7 +1214,7 @@ ], "Responses": [ { - "$id": "159", + "$id": "125", "StatusCodes": [ 204 ], @@ -1435,31 +1236,31 @@ } ], "Protocol": { - "$id": "160" + "$id": "126" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "161", + "$id": "127", "Name": "IsUnknownDerived", "Description": "", "Operations": [ { - "$id": "162", + "$id": "128", "Name": "get", "ResourceName": "IsUnknownDerived", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "163", + "$id": "129", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "164", + "$id": "130", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1474,9 +1275,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "165", + "$id": "131", "Type": { - "$ref": "164" + "$ref": "130" }, "Value": "application/json" } @@ -1484,12 +1285,12 @@ ], "Responses": [ { - "$id": "166", + "$id": "132", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "27" + "$ref": "18" }, "BodyMediaType": "Json", "Headers": [], @@ -1508,21 +1309,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "167", + "$id": "133", "Name": "put", "ResourceName": "IsUnknownDerived", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "168", + "$id": "134", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "27" + "$ref": "18" }, "Location": "Body", "IsRequired": true, @@ -1535,11 +1336,11 @@ "Kind": "Method" }, { - "$id": "169", + "$id": "135", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "170", + "$id": "136", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1554,19 +1355,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "171", + "$id": "137", "Type": { - "$ref": "170" + "$ref": "136" }, "Value": "application/json" } }, { - "$id": "172", + "$id": "138", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "173", + "$id": "139", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1581,9 +1382,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "174", + "$id": "140", "Type": { - "$ref": "173" + "$ref": "139" }, "Value": "application/json" } @@ -1591,7 +1392,7 @@ ], "Responses": [ { - "$id": "175", + "$id": "141", "StatusCodes": [ 204 ], @@ -1613,31 +1414,31 @@ } ], "Protocol": { - "$id": "176" + "$id": "142" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "177", + "$id": "143", "Name": "IsUnknownDiscriminated", "Description": "", "Operations": [ { - "$id": "178", + "$id": "144", "Name": "get", "ResourceName": "IsUnknownDiscriminated", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "179", + "$id": "145", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "180", + "$id": "146", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1652,9 +1453,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "181", + "$id": "147", "Type": { - "$ref": "180" + "$ref": "146" }, "Value": "application/json" } @@ -1662,12 +1463,12 @@ ], "Responses": [ { - "$id": "182", + "$id": "148", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "23" }, "BodyMediaType": "Json", "Headers": [], @@ -1686,21 +1487,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "183", + "$id": "149", "Name": "put", "ResourceName": "IsUnknownDiscriminated", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "184", + "$id": "150", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "32" + "$ref": "23" }, "Location": "Body", "IsRequired": true, @@ -1713,11 +1514,11 @@ "Kind": "Method" }, { - "$id": "185", + "$id": "151", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "186", + "$id": "152", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1732,19 +1533,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "187", + "$id": "153", "Type": { - "$ref": "186" + "$ref": "152" }, "Value": "application/json" } }, { - "$id": "188", + "$id": "154", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "189", + "$id": "155", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1759,9 +1560,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "190", + "$id": "156", "Type": { - "$ref": "189" + "$ref": "155" }, "Value": "application/json" } @@ -1769,7 +1570,7 @@ ], "Responses": [ { - "$id": "191", + "$id": "157", "StatusCodes": [ 204 ], @@ -1791,31 +1592,31 @@ } ], "Protocol": { - "$id": "192" + "$id": "158" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "193", + "$id": "159", "Name": "ExtendsString", "Description": "", "Operations": [ { - "$id": "194", + "$id": "160", "Name": "get", "ResourceName": "ExtendsString", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "195", + "$id": "161", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "196", + "$id": "162", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1830,9 +1631,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "197", + "$id": "163", "Type": { - "$ref": "196" + "$ref": "162" }, "Value": "application/json" } @@ -1840,12 +1641,12 @@ ], "Responses": [ { - "$id": "198", + "$id": "164", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "40" + "$ref": "28" }, "BodyMediaType": "Json", "Headers": [], @@ -1864,21 +1665,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "199", + "$id": "165", "Name": "put", "ResourceName": "ExtendsString", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "200", + "$id": "166", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "40" + "$ref": "28" }, "Location": "Body", "IsRequired": true, @@ -1891,11 +1692,11 @@ "Kind": "Method" }, { - "$id": "201", + "$id": "167", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "202", + "$id": "168", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1910,19 +1711,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "169", "Type": { - "$ref": "202" + "$ref": "168" }, "Value": "application/json" } }, { - "$id": "204", + "$id": "170", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "205", + "$id": "171", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1937,9 +1738,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "206", + "$id": "172", "Type": { - "$ref": "205" + "$ref": "171" }, "Value": "application/json" } @@ -1947,7 +1748,7 @@ ], "Responses": [ { - "$id": "207", + "$id": "173", "StatusCodes": [ 204 ], @@ -1969,31 +1770,31 @@ } ], "Protocol": { - "$id": "208" + "$id": "174" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "209", + "$id": "175", "Name": "IsString", "Description": "", "Operations": [ { - "$id": "210", + "$id": "176", "Name": "get", "ResourceName": "IsString", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "211", + "$id": "177", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "212", + "$id": "178", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2008,9 +1809,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "213", + "$id": "179", "Type": { - "$ref": "212" + "$ref": "178" }, "Value": "application/json" } @@ -2018,12 +1819,12 @@ ], "Responses": [ { - "$id": "214", + "$id": "180", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "46" + "$ref": "31" }, "BodyMediaType": "Json", "Headers": [], @@ -2042,21 +1843,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "215", + "$id": "181", "Name": "put", "ResourceName": "IsString", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "216", + "$id": "182", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "46" + "$ref": "31" }, "Location": "Body", "IsRequired": true, @@ -2069,11 +1870,11 @@ "Kind": "Method" }, { - "$id": "217", + "$id": "183", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "218", + "$id": "184", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2088,19 +1889,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "219", + "$id": "185", "Type": { - "$ref": "218" + "$ref": "184" }, "Value": "application/json" } }, { - "$id": "220", + "$id": "186", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "221", + "$id": "187", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2115,9 +1916,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "222", + "$id": "188", "Type": { - "$ref": "221" + "$ref": "187" }, "Value": "application/json" } @@ -2125,7 +1926,7 @@ ], "Responses": [ { - "$id": "223", + "$id": "189", "StatusCodes": [ 204 ], @@ -2147,31 +1948,31 @@ } ], "Protocol": { - "$id": "224" + "$id": "190" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "225", + "$id": "191", "Name": "ExtendsFloat", "Description": "", "Operations": [ { - "$id": "226", + "$id": "192", "Name": "get", "ResourceName": "ExtendsFloat", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "227", + "$id": "193", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "228", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2186,9 +1987,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "229", + "$id": "195", "Type": { - "$ref": "228" + "$ref": "194" }, "Value": "application/json" } @@ -2196,12 +1997,12 @@ ], "Responses": [ { - "$id": "230", + "$id": "196", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "52" + "$ref": "34" }, "BodyMediaType": "Json", "Headers": [], @@ -2220,21 +2021,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "231", + "$id": "197", "Name": "put", "ResourceName": "ExtendsFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "232", + "$id": "198", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "52" + "$ref": "34" }, "Location": "Body", "IsRequired": true, @@ -2247,11 +2048,11 @@ "Kind": "Method" }, { - "$id": "233", + "$id": "199", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "234", + "$id": "200", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2266,19 +2067,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "235", + "$id": "201", "Type": { - "$ref": "234" + "$ref": "200" }, "Value": "application/json" } }, { - "$id": "236", + "$id": "202", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "237", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2293,9 +2094,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "238", + "$id": "204", "Type": { - "$ref": "237" + "$ref": "203" }, "Value": "application/json" } @@ -2303,7 +2104,7 @@ ], "Responses": [ { - "$id": "239", + "$id": "205", "StatusCodes": [ 204 ], @@ -2325,31 +2126,31 @@ } ], "Protocol": { - "$id": "240" + "$id": "206" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "241", + "$id": "207", "Name": "IsFloat", "Description": "", "Operations": [ { - "$id": "242", + "$id": "208", "Name": "get", "ResourceName": "IsFloat", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "243", + "$id": "209", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "244", + "$id": "210", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2364,9 +2165,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "245", + "$id": "211", "Type": { - "$ref": "244" + "$ref": "210" }, "Value": "application/json" } @@ -2374,12 +2175,12 @@ ], "Responses": [ { - "$id": "246", + "$id": "212", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "58" + "$ref": "37" }, "BodyMediaType": "Json", "Headers": [], @@ -2398,21 +2199,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "247", + "$id": "213", "Name": "put", "ResourceName": "IsFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "248", + "$id": "214", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "58" + "$ref": "37" }, "Location": "Body", "IsRequired": true, @@ -2425,11 +2226,11 @@ "Kind": "Method" }, { - "$id": "249", + "$id": "215", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "250", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2444,19 +2245,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "251", + "$id": "217", "Type": { - "$ref": "250" + "$ref": "216" }, "Value": "application/json" } }, { - "$id": "252", + "$id": "218", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "253", + "$id": "219", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2471,9 +2272,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "254", + "$id": "220", "Type": { - "$ref": "253" + "$ref": "219" }, "Value": "application/json" } @@ -2481,7 +2282,7 @@ ], "Responses": [ { - "$id": "255", + "$id": "221", "StatusCodes": [ 204 ], @@ -2503,31 +2304,31 @@ } ], "Protocol": { - "$id": "256" + "$id": "222" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "257", + "$id": "223", "Name": "ExtendsModel", "Description": "", "Operations": [ { - "$id": "258", + "$id": "224", "Name": "get", "ResourceName": "ExtendsModel", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "259", + "$id": "225", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "260", + "$id": "226", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2542,9 +2343,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "261", + "$id": "227", "Type": { - "$ref": "260" + "$ref": "226" }, "Value": "application/json" } @@ -2552,12 +2353,12 @@ ], "Responses": [ { - "$id": "262", + "$id": "228", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "67" + "$ref": "40" }, "BodyMediaType": "Json", "Headers": [], @@ -2576,21 +2377,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "263", + "$id": "229", "Name": "put", "ResourceName": "ExtendsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "264", + "$id": "230", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "67" + "$ref": "40" }, "Location": "Body", "IsRequired": true, @@ -2603,11 +2404,11 @@ "Kind": "Method" }, { - "$id": "265", + "$id": "231", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "266", + "$id": "232", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2622,19 +2423,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "267", + "$id": "233", "Type": { - "$ref": "266" + "$ref": "232" }, "Value": "application/json" } }, { - "$id": "268", + "$id": "234", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "269", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2649,9 +2450,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "270", + "$id": "236", "Type": { - "$ref": "269" + "$ref": "235" }, "Value": "application/json" } @@ -2659,7 +2460,7 @@ ], "Responses": [ { - "$id": "271", + "$id": "237", "StatusCodes": [ 204 ], @@ -2681,31 +2482,31 @@ } ], "Protocol": { - "$id": "272" + "$id": "238" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "273", + "$id": "239", "Name": "IsModel", "Description": "", "Operations": [ { - "$id": "274", + "$id": "240", "Name": "get", "ResourceName": "IsModel", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "275", + "$id": "241", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "276", + "$id": "242", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2720,9 +2521,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "277", + "$id": "243", "Type": { - "$ref": "276" + "$ref": "242" }, "Value": "application/json" } @@ -2730,12 +2531,12 @@ ], "Responses": [ { - "$id": "278", + "$id": "244", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "70" + "$ref": "41" }, "BodyMediaType": "Json", "Headers": [], @@ -2754,21 +2555,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "279", + "$id": "245", "Name": "put", "ResourceName": "IsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "280", + "$id": "246", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "70" + "$ref": "41" }, "Location": "Body", "IsRequired": true, @@ -2781,11 +2582,11 @@ "Kind": "Method" }, { - "$id": "281", + "$id": "247", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "282", + "$id": "248", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2800,19 +2601,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "283", + "$id": "249", "Type": { - "$ref": "282" + "$ref": "248" }, "Value": "application/json" } }, { - "$id": "284", + "$id": "250", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "285", + "$id": "251", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2827,9 +2628,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "286", + "$id": "252", "Type": { - "$ref": "285" + "$ref": "251" }, "Value": "application/json" } @@ -2837,7 +2638,7 @@ ], "Responses": [ { - "$id": "287", + "$id": "253", "StatusCodes": [ 204 ], @@ -2859,31 +2660,31 @@ } ], "Protocol": { - "$id": "288" + "$id": "254" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "289", + "$id": "255", "Name": "ExtendsModelArray", "Description": "", "Operations": [ { - "$id": "290", + "$id": "256", "Name": "get", "ResourceName": "ExtendsModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "291", + "$id": "257", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "292", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2898,9 +2699,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "293", + "$id": "259", "Type": { - "$ref": "292" + "$ref": "258" }, "Value": "application/json" } @@ -2908,12 +2709,12 @@ ], "Responses": [ { - "$id": "294", + "$id": "260", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "73" + "$ref": "42" }, "BodyMediaType": "Json", "Headers": [], @@ -2932,21 +2733,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "295", + "$id": "261", "Name": "put", "ResourceName": "ExtendsModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "296", + "$id": "262", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "73" + "$ref": "42" }, "Location": "Body", "IsRequired": true, @@ -2959,11 +2760,11 @@ "Kind": "Method" }, { - "$id": "297", + "$id": "263", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "298", + "$id": "264", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2978,19 +2779,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "299", + "$id": "265", "Type": { - "$ref": "298" + "$ref": "264" }, "Value": "application/json" } }, { - "$id": "300", + "$id": "266", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "301", + "$id": "267", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3005,9 +2806,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "302", + "$id": "268", "Type": { - "$ref": "301" + "$ref": "267" }, "Value": "application/json" } @@ -3015,7 +2816,7 @@ ], "Responses": [ { - "$id": "303", + "$id": "269", "StatusCodes": [ 204 ], @@ -3037,31 +2838,31 @@ } ], "Protocol": { - "$id": "304" + "$id": "270" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "305", + "$id": "271", "Name": "IsModelArray", "Description": "", "Operations": [ { - "$id": "306", + "$id": "272", "Name": "get", "ResourceName": "IsModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "307", + "$id": "273", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "308", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3076,9 +2877,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "309", + "$id": "275", "Type": { - "$ref": "308" + "$ref": "274" }, "Value": "application/json" } @@ -3086,12 +2887,12 @@ ], "Responses": [ { - "$id": "310", + "$id": "276", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "77" + "$ref": "43" }, "BodyMediaType": "Json", "Headers": [], @@ -3110,21 +2911,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "311", + "$id": "277", "Name": "put", "ResourceName": "IsModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "95" + "$ref": "61" }, { - "$id": "312", + "$id": "278", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "77" + "$ref": "43" }, "Location": "Body", "IsRequired": true, @@ -3137,11 +2938,11 @@ "Kind": "Method" }, { - "$id": "313", + "$id": "279", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "314", + "$id": "280", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3156,19 +2957,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "315", + "$id": "281", "Type": { - "$ref": "314" + "$ref": "280" }, "Value": "application/json" } }, { - "$id": "316", + "$id": "282", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "317", + "$id": "283", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3183,9 +2984,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "318", + "$id": "284", "Type": { - "$ref": "317" + "$ref": "283" }, "Value": "application/json" } @@ -3193,7 +2994,7 @@ ], "Responses": [ { - "$id": "319", + "$id": "285", "StatusCodes": [ 204 ], @@ -3215,7 +3016,7 @@ } ], "Protocol": { - "$id": "320" + "$id": "286" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" diff --git a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsUnknownDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsUnknownDiscriminated.cs index 276a9d9df40..d433c1e5c66 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsUnknownDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsUnknownDiscriminated.cs @@ -28,8 +28,8 @@ public void Example_ExtendsUnknownDiscriminated_GetExtendsUnknownDiscriminated_S Response response = client.GetExtendsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -41,8 +41,8 @@ public async Task Example_ExtendsUnknownDiscriminated_GetExtendsUnknownDiscrimin Response response = await client.GetExtendsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -72,8 +72,8 @@ public void Example_ExtendsUnknownDiscriminated_GetExtendsUnknownDiscriminated_A Response response = client.GetExtendsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -85,8 +85,8 @@ public async Task Example_ExtendsUnknownDiscriminated_GetExtendsUnknownDiscrimin Response response = await client.GetExtendsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -116,8 +116,8 @@ public void Example_ExtendsUnknownDiscriminated_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { index = 1234, - name = "", kind = "derived", + name = "", }); Response response = client.Put(content); @@ -133,8 +133,8 @@ public async Task Example_ExtendsUnknownDiscriminated_Put_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { index = 1234, - name = "", kind = "derived", + name = "", }); Response response = await client.PutAsync(content); @@ -171,8 +171,8 @@ public void Example_ExtendsUnknownDiscriminated_Put_AllParameters() { index = 1234, age = 123.45F, - name = "", kind = "derived", + name = "", }); Response response = client.Put(content); @@ -189,8 +189,8 @@ public async Task Example_ExtendsUnknownDiscriminated_Put_AllParameters_Async() { index = 1234, age = 123.45F, - name = "", kind = "derived", + name = "", }); Response response = await client.PutAsync(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_IsUnknownDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_IsUnknownDiscriminated.cs index fb2e4513c14..45b8230332e 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_IsUnknownDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_IsUnknownDiscriminated.cs @@ -28,8 +28,8 @@ public void Example_IsUnknownDiscriminated_GetIsUnknownDiscriminated_ShortVersio Response response = client.GetIsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -41,8 +41,8 @@ public async Task Example_IsUnknownDiscriminated_GetIsUnknownDiscriminated_Short Response response = await client.GetIsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -72,8 +72,8 @@ public void Example_IsUnknownDiscriminated_GetIsUnknownDiscriminated_AllParamete Response response = client.GetIsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -85,8 +85,8 @@ public async Task Example_IsUnknownDiscriminated_GetIsUnknownDiscriminated_AllPa Response response = await client.GetIsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -116,8 +116,8 @@ public void Example_IsUnknownDiscriminated_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { index = 1234, - name = "", kind = "derived", + name = "", }); Response response = client.Put(content); @@ -133,8 +133,8 @@ public async Task Example_IsUnknownDiscriminated_Put_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { index = 1234, - name = "", kind = "derived", + name = "", }); Response response = await client.PutAsync(content); @@ -171,8 +171,8 @@ public void Example_IsUnknownDiscriminated_Put_AllParameters() { index = 1234, age = 123.45F, - name = "", kind = "derived", + name = "", }); Response response = client.Put(content); @@ -189,8 +189,8 @@ public async Task Example_IsUnknownDiscriminated_Put_AllParameters_Async() { index = 1234, age = 123.45F, - name = "", kind = "derived", + name = "", }); Response response = await client.PutAsync(content); diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Docs/Datetime.xml b/test/CadlRanchProjects/type/property/nullable/src/Generated/Docs/Datetime.xml index a9c064692bf..6cc19739504 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Docs/Datetime.xml +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Docs/Datetime.xml @@ -162,7 +162,7 @@ Datetime client = new NullableClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PatchNonNullAsync(content); @@ -175,7 +175,7 @@ Datetime client = new NullableClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PatchNonNullAsync(content); @@ -191,7 +191,7 @@ Datetime client = new NullableClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PatchNonNull(content); @@ -204,7 +204,7 @@ Datetime client = new NullableClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PatchNonNull(content); @@ -220,7 +220,7 @@ Datetime client = new NullableClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PatchNullAsync(content); @@ -233,7 +233,7 @@ Datetime client = new NullableClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PatchNullAsync(content); @@ -249,7 +249,7 @@ Datetime client = new NullableClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PatchNull(content); @@ -262,7 +262,7 @@ Datetime client = new NullableClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PatchNull(content); diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/BytesProperty.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/BytesProperty.cs index d35196f4790..3c6d8d0ccb0 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/BytesProperty.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/BytesProperty.cs @@ -50,7 +50,7 @@ public partial class BytesProperty /// Required property. /// Property. /// is null. - internal BytesProperty(string requiredProperty, BinaryData nullableProperty) + public BytesProperty(string requiredProperty, BinaryData nullableProperty) { Argument.AssertNotNull(requiredProperty, nameof(requiredProperty)); @@ -75,7 +75,7 @@ internal BytesProperty() } /// Required property. - public string RequiredProperty { get; } + public string RequiredProperty { get; set; } /// /// Property /// @@ -92,6 +92,6 @@ internal BytesProperty() /// /// /// - public BinaryData NullableProperty { get; } + public BinaryData NullableProperty { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsByteProperty.Serialization.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsByteProperty.Serialization.cs index 8206d44dd40..aa62a40ad19 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsByteProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsByteProperty.Serialization.cs @@ -88,7 +88,7 @@ internal static CollectionsByteProperty DeserializeCollectionsByteProperty(JsonE return null; } string requiredProperty = default; - IReadOnlyList nullableProperty = default; + IList nullableProperty = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsByteProperty.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsByteProperty.cs index b2793eaaabc..2eab67de709 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsByteProperty.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsByteProperty.cs @@ -51,7 +51,7 @@ public partial class CollectionsByteProperty /// Required property. /// Property. /// is null. - internal CollectionsByteProperty(string requiredProperty, IEnumerable nullableProperty) + public CollectionsByteProperty(string requiredProperty, IEnumerable nullableProperty) { Argument.AssertNotNull(requiredProperty, nameof(requiredProperty)); @@ -63,7 +63,7 @@ internal CollectionsByteProperty(string requiredProperty, IEnumerable Required property. /// Property. /// Keeps track of any properties unknown to the library. - internal CollectionsByteProperty(string requiredProperty, IReadOnlyList nullableProperty, IDictionary serializedAdditionalRawData) + internal CollectionsByteProperty(string requiredProperty, IList nullableProperty, IDictionary serializedAdditionalRawData) { RequiredProperty = requiredProperty; NullableProperty = nullableProperty; @@ -76,7 +76,7 @@ internal CollectionsByteProperty() } /// Required property. - public string RequiredProperty { get; } + public string RequiredProperty { get; set; } /// /// Property /// @@ -93,6 +93,6 @@ internal CollectionsByteProperty() /// /// /// - public IReadOnlyList NullableProperty { get; } + public IList NullableProperty { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsModelProperty.Serialization.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsModelProperty.Serialization.cs index 9c470d1d7d0..303e95cd50e 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsModelProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsModelProperty.Serialization.cs @@ -83,7 +83,7 @@ internal static CollectionsModelProperty DeserializeCollectionsModelProperty(Jso return null; } string requiredProperty = default; - IReadOnlyList nullableProperty = default; + IList nullableProperty = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsModelProperty.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsModelProperty.cs index 9fdebddda2e..07ca17bbd73 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsModelProperty.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/CollectionsModelProperty.cs @@ -51,7 +51,7 @@ public partial class CollectionsModelProperty /// Required property. /// Property. /// is null. - internal CollectionsModelProperty(string requiredProperty, IEnumerable nullableProperty) + public CollectionsModelProperty(string requiredProperty, IEnumerable nullableProperty) { Argument.AssertNotNull(requiredProperty, nameof(requiredProperty)); @@ -63,7 +63,7 @@ internal CollectionsModelProperty(string requiredProperty, IEnumerable Required property. /// Property. /// Keeps track of any properties unknown to the library. - internal CollectionsModelProperty(string requiredProperty, IReadOnlyList nullableProperty, IDictionary serializedAdditionalRawData) + internal CollectionsModelProperty(string requiredProperty, IList nullableProperty, IDictionary serializedAdditionalRawData) { RequiredProperty = requiredProperty; NullableProperty = nullableProperty; @@ -76,8 +76,8 @@ internal CollectionsModelProperty() } /// Required property. - public string RequiredProperty { get; } + public string RequiredProperty { get; set; } /// Property. - public IReadOnlyList NullableProperty { get; } + public IList NullableProperty { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs index 933af48b86f..836694bf896 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs @@ -30,15 +30,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStartObject(); writer.WritePropertyName("requiredProperty"u8); writer.WriteStringValue(RequiredProperty); - if (NullableProperty != null) - { - writer.WritePropertyName("nullableProperty"u8); - writer.WriteStringValue(NullableProperty.Value, "O"); - } - else - { - writer.WriteNull("nullableProperty"); - } + writer.WritePropertyName("nullableProperty"u8); + writer.WriteStringValue(NullableProperty, "O"); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,7 +71,7 @@ internal static DatetimeProperty DeserializeDatetimeProperty(JsonElement element return null; } string requiredProperty = default; - DateTimeOffset? nullableProperty = default; + DateTimeOffset nullableProperty = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,11 +83,6 @@ internal static DatetimeProperty DeserializeDatetimeProperty(JsonElement element } if (property.NameEquals("nullableProperty"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nullableProperty = null; - continue; - } nullableProperty = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.cs index 35007f6b954..f208995ac17 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.cs @@ -50,7 +50,7 @@ public partial class DatetimeProperty /// Required property. /// Property. /// is null. - internal DatetimeProperty(string requiredProperty, DateTimeOffset? nullableProperty) + public DatetimeProperty(string requiredProperty, DateTimeOffset nullableProperty) { Argument.AssertNotNull(requiredProperty, nameof(requiredProperty)); @@ -62,7 +62,7 @@ internal DatetimeProperty(string requiredProperty, DateTimeOffset? nullablePrope /// Required property. /// Property. /// Keeps track of any properties unknown to the library. - internal DatetimeProperty(string requiredProperty, DateTimeOffset? nullableProperty, IDictionary serializedAdditionalRawData) + internal DatetimeProperty(string requiredProperty, DateTimeOffset nullableProperty, IDictionary serializedAdditionalRawData) { RequiredProperty = requiredProperty; NullableProperty = nullableProperty; @@ -75,8 +75,8 @@ internal DatetimeProperty() } /// Required property. - public string RequiredProperty { get; } + public string RequiredProperty { get; set; } /// Property. - public DateTimeOffset? NullableProperty { get; } + public DateTimeOffset NullableProperty { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DurationProperty.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DurationProperty.cs index a97487c3c7c..ff7618da0cc 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DurationProperty.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DurationProperty.cs @@ -50,7 +50,7 @@ public partial class DurationProperty /// Required property. /// Property. /// is null. - internal DurationProperty(string requiredProperty, TimeSpan? nullableProperty) + public DurationProperty(string requiredProperty, TimeSpan? nullableProperty) { Argument.AssertNotNull(requiredProperty, nameof(requiredProperty)); @@ -75,8 +75,8 @@ internal DurationProperty() } /// Required property. - public string RequiredProperty { get; } + public string RequiredProperty { get; set; } /// Property. - public TimeSpan? NullableProperty { get; } + public TimeSpan? NullableProperty { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/InnerModel.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/InnerModel.cs index a5323872e95..57042a7e0c8 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/InnerModel.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/InnerModel.cs @@ -49,7 +49,7 @@ public partial class InnerModel /// Initializes a new instance of . /// Inner model property. /// is null. - internal InnerModel(string property) + public InnerModel(string property) { Argument.AssertNotNull(property, nameof(property)); @@ -71,6 +71,6 @@ internal InnerModel() } /// Inner model property. - public string Property { get; } + public string Property { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/StringProperty.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/StringProperty.cs index 696dec22e42..b378ac91782 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/StringProperty.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/StringProperty.cs @@ -50,7 +50,7 @@ public partial class StringProperty /// Required property. /// Property. /// is null. - internal StringProperty(string requiredProperty, string nullableProperty) + public StringProperty(string requiredProperty, string nullableProperty) { Argument.AssertNotNull(requiredProperty, nameof(requiredProperty)); @@ -75,8 +75,8 @@ internal StringProperty() } /// Required property. - public string RequiredProperty { get; } + public string RequiredProperty { get; set; } /// Property. - public string NullableProperty { get; } + public string NullableProperty { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/TypePropertyNullableModelFactory.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/TypePropertyNullableModelFactory.cs deleted file mode 100644 index 881fd98c85a..00000000000 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/TypePropertyNullableModelFactory.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace _Type.Property.Nullable.Models -{ - /// Model factory for models. - public static partial class TypePropertyNullableModelFactory - { - /// Initializes a new instance of . - /// Required property. - /// Property. - /// A new instance for mocking. - public static StringProperty StringProperty(string requiredProperty = null, string nullableProperty = null) - { - return new StringProperty(requiredProperty, nullableProperty, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Required property. - /// Property. - /// A new instance for mocking. - public static BytesProperty BytesProperty(string requiredProperty = null, BinaryData nullableProperty = null) - { - return new BytesProperty(requiredProperty, nullableProperty, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Required property. - /// Property. - /// A new instance for mocking. - public static DatetimeProperty DatetimeProperty(string requiredProperty = null, DateTimeOffset? nullableProperty = null) - { - return new DatetimeProperty(requiredProperty, nullableProperty, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Required property. - /// Property. - /// A new instance for mocking. - public static DurationProperty DurationProperty(string requiredProperty = null, TimeSpan? nullableProperty = null) - { - return new DurationProperty(requiredProperty, nullableProperty, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Required property. - /// Property. - /// A new instance for mocking. - public static CollectionsByteProperty CollectionsByteProperty(string requiredProperty = null, IEnumerable nullableProperty = null) - { - nullableProperty ??= new List(); - - return new CollectionsByteProperty(requiredProperty, nullableProperty?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Required property. - /// Property. - /// A new instance for mocking. - public static CollectionsModelProperty CollectionsModelProperty(string requiredProperty = null, IEnumerable nullableProperty = null) - { - nullableProperty ??= new List(); - - return new CollectionsModelProperty(requiredProperty, nullableProperty?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Inner model property. - /// A new instance for mocking. - public static InnerModel InnerModel(string property = null) - { - return new InnerModel(property, serializedAdditionalRawData: null); - } - } -} diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json index 9fd3d359dc6..f64e74b16f2 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json @@ -12,7 +12,7 @@ "Namespace": "Type.Property.Nullable", "Description": "Template type for testing models with nullable property. Pass in the type of the property you are looking for", "IsNullable": false, - "Usage": "Output", + "Usage": "RoundTrip", "Properties": [ { "$id": "3", @@ -26,7 +26,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "5", @@ -40,7 +41,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -51,7 +53,7 @@ "Namespace": "Type.Property.Nullable", "Description": "Template type for testing models with nullable property. Pass in the type of the property you are looking for", "IsNullable": false, - "Usage": "Output", + "Usage": "RoundTrip", "Properties": [ { "$id": "8", @@ -65,7 +67,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "10", @@ -79,7 +82,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -90,7 +94,7 @@ "Namespace": "Type.Property.Nullable", "Description": "Model with a datetime property", "IsNullable": false, - "Usage": "Output", + "Usage": "RoundTrip", "Properties": [ { "$id": "13", @@ -104,7 +108,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "15", @@ -114,11 +119,12 @@ "Type": { "$id": "16", "Kind": "Primitive", - "Name": "DateTime", - "IsNullable": true + "Name": "DateTimeRFC3339", + "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -129,7 +135,7 @@ "Namespace": "Type.Property.Nullable", "Description": "Model with a duration property", "IsNullable": false, - "Usage": "Output", + "Usage": "RoundTrip", "Properties": [ { "$id": "18", @@ -143,7 +149,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "20", @@ -157,7 +164,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -168,7 +176,7 @@ "Namespace": "Type.Property.Nullable", "Description": "Model with collection bytes properties", "IsNullable": false, - "Usage": "Output", + "Usage": "RoundTrip", "Properties": [ { "$id": "23", @@ -182,7 +190,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "25", @@ -202,7 +211,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -213,7 +223,7 @@ "Namespace": "Type.Property.Nullable", "Description": "Model with collection models properties", "IsNullable": false, - "Usage": "Output", + "Usage": "RoundTrip", "Properties": [ { "$id": "29", @@ -227,7 +237,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "31", @@ -245,7 +256,7 @@ "Namespace": "Type.Property.Nullable", "Description": "Inner model used in collections model property", "IsNullable": false, - "Usage": "Output", + "Usage": "RoundTrip", "Properties": [ { "$id": "34", @@ -259,14 +270,16 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, diff --git a/test/CadlRanchProjects/type/property/nullable/tests/Generated/Samples/Samples_Datetime.cs b/test/CadlRanchProjects/type/property/nullable/tests/Generated/Samples/Samples_Datetime.cs index cc08f0688fe..2a925ec2d4d 100644 --- a/test/CadlRanchProjects/type/property/nullable/tests/Generated/Samples/Samples_Datetime.cs +++ b/test/CadlRanchProjects/type/property/nullable/tests/Generated/Samples/Samples_Datetime.cs @@ -204,7 +204,7 @@ public void Example_Datetime_PatchNonNull_ShortVersion() using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PatchNonNull(content); @@ -220,7 +220,7 @@ public async Task Example_Datetime_PatchNonNull_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PatchNonNullAsync(content); @@ -236,7 +236,7 @@ public void Example_Datetime_PatchNonNull_AllParameters() using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PatchNonNull(content); @@ -252,7 +252,7 @@ public async Task Example_Datetime_PatchNonNull_AllParameters_Async() using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PatchNonNullAsync(content); @@ -268,7 +268,7 @@ public void Example_Datetime_PatchNull_ShortVersion() using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PatchNull(content); @@ -284,7 +284,7 @@ public async Task Example_Datetime_PatchNull_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PatchNullAsync(content); @@ -300,7 +300,7 @@ public void Example_Datetime_PatchNull_AllParameters() using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PatchNull(content); @@ -316,7 +316,7 @@ public async Task Example_Datetime_PatchNull_AllParameters_Async() using RequestContent content = RequestContent.Create(new { requiredProperty = "", - nullableProperty = "2022-05-10T14:57:31.2311892-04:00", + nullableProperty = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PatchNullAsync(content); diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/Datetime.xml b/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/Datetime.xml index ec0d53da771..55f650f5159 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/Datetime.xml +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/Datetime.xml @@ -160,7 +160,7 @@ Datetime client = new OptionalClient().GetDatetimeClient(); DatetimeProperty body = new DatetimeProperty { - Property = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Property = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }; Response response = await client.PutAllAsync(body); ]]> @@ -180,7 +180,7 @@ Datetime client = new OptionalClient().GetDatetimeClient(); DatetimeProperty body = new DatetimeProperty { - Property = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Property = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }; Response response = client.PutAll(body); ]]> @@ -202,7 +202,7 @@ Datetime client = new OptionalClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PutAllAsync(content); @@ -226,7 +226,7 @@ Datetime client = new OptionalClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PutAll(content); @@ -248,7 +248,7 @@ Datetime client = new OptionalClient().GetDatetimeClient(); DatetimeProperty body = new DatetimeProperty { - Property = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Property = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }; Response response = await client.PutDefaultAsync(body); ]]> @@ -268,7 +268,7 @@ Datetime client = new OptionalClient().GetDatetimeClient(); DatetimeProperty body = new DatetimeProperty { - Property = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Property = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }; Response response = client.PutDefault(body); ]]> @@ -290,7 +290,7 @@ Datetime client = new OptionalClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PutDefaultAsync(content); @@ -314,7 +314,7 @@ Datetime client = new OptionalClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PutDefault(content); diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/UnionFloatLiteral.xml b/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/UnionFloatLiteral.xml index e96ef1013a6..261d06d5e38 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/UnionFloatLiteral.xml +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/UnionFloatLiteral.xml @@ -160,7 +160,7 @@ UnionFloatLiteral client = new OptionalClient().GetUnionFloatLiteralClient(); UnionFloatLiteralProperty body = new UnionFloatLiteralProperty { - Property = BinaryData.FromObjectAsJson(1.25), + Property = UnionFloatLiteralPropertyProperty._125, }; Response response = await client.PutAllAsync(body); ]]> @@ -180,7 +180,7 @@ UnionFloatLiteral client = new OptionalClient().GetUnionFloatLiteralClient(); UnionFloatLiteralProperty body = new UnionFloatLiteralProperty { - Property = BinaryData.FromObjectAsJson(1.25), + Property = UnionFloatLiteralPropertyProperty._125, }; Response response = client.PutAll(body); ]]> @@ -202,7 +202,7 @@ UnionFloatLiteral client = new OptionalClient().GetUnionFloatLiteralClient(); using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = await client.PutAllAsync(content); @@ -226,7 +226,7 @@ UnionFloatLiteral client = new OptionalClient().GetUnionFloatLiteralClient(); using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = client.PutAll(content); @@ -248,7 +248,7 @@ UnionFloatLiteral client = new OptionalClient().GetUnionFloatLiteralClient(); UnionFloatLiteralProperty body = new UnionFloatLiteralProperty { - Property = BinaryData.FromObjectAsJson(1.25), + Property = UnionFloatLiteralPropertyProperty._125, }; Response response = await client.PutDefaultAsync(body); ]]> @@ -268,7 +268,7 @@ UnionFloatLiteral client = new OptionalClient().GetUnionFloatLiteralClient(); UnionFloatLiteralProperty body = new UnionFloatLiteralProperty { - Property = BinaryData.FromObjectAsJson(1.25), + Property = UnionFloatLiteralPropertyProperty._125, }; Response response = client.PutDefault(body); ]]> @@ -290,7 +290,7 @@ UnionFloatLiteral client = new OptionalClient().GetUnionFloatLiteralClient(); using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = await client.PutDefaultAsync(content); @@ -314,7 +314,7 @@ UnionFloatLiteral client = new OptionalClient().GetUnionFloatLiteralClient(); using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = client.PutDefault(content); diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/UnionIntLiteral.xml b/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/UnionIntLiteral.xml index e6d750ce56f..848563ce342 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/UnionIntLiteral.xml +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Docs/UnionIntLiteral.xml @@ -160,7 +160,7 @@ UnionIntLiteral client = new OptionalClient().GetUnionIntLiteralClient(); UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = await client.PutAllAsync(body); ]]> @@ -180,7 +180,7 @@ UnionIntLiteral client = new OptionalClient().GetUnionIntLiteralClient(); UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = client.PutAll(body); ]]> @@ -248,7 +248,7 @@ UnionIntLiteral client = new OptionalClient().GetUnionIntLiteralClient(); UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = await client.PutDefaultAsync(body); ]]> @@ -268,7 +268,7 @@ UnionIntLiteral client = new OptionalClient().GetUnionIntLiteralClient(); UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = client.PutDefault(body); ]]> diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs index 644651d582e..b049cc30acf 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs @@ -31,14 +31,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea if (Optional.IsDefined(Property)) { writer.WritePropertyName("property"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Property); -#else - using (JsonDocument document = JsonDocument.Parse(Property)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue(Property.Value.ToSerialSingle()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -78,7 +71,7 @@ internal static UnionFloatLiteralProperty DeserializeUnionFloatLiteralProperty(J { return null; } - BinaryData property = default; + UnionFloatLiteralPropertyProperty? property = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property0 in element.EnumerateObject()) @@ -89,7 +82,7 @@ internal static UnionFloatLiteralProperty DeserializeUnionFloatLiteralProperty(J { continue; } - property = BinaryData.FromString(property0.Value.GetRawText()); + property = property0.Value.GetSingle().ToUnionFloatLiteralPropertyProperty(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.cs index 2155bae3c76..923af6db57b 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.cs +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralProperty.cs @@ -53,53 +53,13 @@ public UnionFloatLiteralProperty() /// Initializes a new instance of . /// Property. /// Keeps track of any properties unknown to the library. - internal UnionFloatLiteralProperty(BinaryData property, IDictionary serializedAdditionalRawData) + internal UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty? property, IDictionary serializedAdditionalRawData) { Property = property; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Property - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1.25 - /// - /// - /// 2.375 - /// - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Property { get; set; } + /// Property. + public UnionFloatLiteralPropertyProperty? Property { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.Serialization.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.Serialization.cs new file mode 100644 index 00000000000..615d3cadfd4 --- /dev/null +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Property.Optionality.Models +{ + internal static partial class UnionFloatLiteralPropertyPropertyExtensions + { + public static float ToSerialSingle(this UnionFloatLiteralPropertyProperty value) => value switch + { + UnionFloatLiteralPropertyProperty._125 => 1.25F, + UnionFloatLiteralPropertyProperty._2375 => 2.375F, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionFloatLiteralPropertyProperty value.") + }; + + public static UnionFloatLiteralPropertyProperty ToUnionFloatLiteralPropertyProperty(this float value) + { + if (value == 1.25F) return UnionFloatLiteralPropertyProperty._125; + if (value == 2.375F) return UnionFloatLiteralPropertyProperty._2375; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionFloatLiteralPropertyProperty value."); + } + } +} diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs new file mode 100644 index 00000000000..d98824edfd1 --- /dev/null +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Type.Property.Optionality.Models +{ + /// The UnionFloatLiteralPropertyProperty. + public enum UnionFloatLiteralPropertyProperty + { + /// 1.25. + _125, + /// 2.375. + _2375 + } +} diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs index 5c5d635956f..25f86af099a 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs @@ -31,14 +31,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade if (Optional.IsDefined(Property)) { writer.WritePropertyName("property"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Property); -#else - using (JsonDocument document = JsonDocument.Parse(Property)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue((int)Property.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -78,7 +71,7 @@ internal static UnionIntLiteralProperty DeserializeUnionIntLiteralProperty(JsonE { return null; } - BinaryData property = default; + UnionIntLiteralPropertyProperty? property = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property0 in element.EnumerateObject()) @@ -89,7 +82,7 @@ internal static UnionIntLiteralProperty DeserializeUnionIntLiteralProperty(JsonE { continue; } - property = BinaryData.FromString(property0.Value.GetRawText()); + property = property0.Value.GetInt32().ToUnionIntLiteralPropertyProperty(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.cs index d41fb956691..f2b9c2bb76f 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.cs +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralProperty.cs @@ -53,53 +53,13 @@ public UnionIntLiteralProperty() /// Initializes a new instance of . /// Property. /// Keeps track of any properties unknown to the library. - internal UnionIntLiteralProperty(BinaryData property, IDictionary serializedAdditionalRawData) + internal UnionIntLiteralProperty(UnionIntLiteralPropertyProperty? property, IDictionary serializedAdditionalRawData) { Property = property; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Property - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1 - /// - /// - /// 2 - /// - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Property { get; set; } + /// Property. + public UnionIntLiteralPropertyProperty? Property { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.Serialization.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.Serialization.cs new file mode 100644 index 00000000000..9df6c3dfd83 --- /dev/null +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.Serialization.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Property.Optionality.Models +{ + internal static partial class UnionIntLiteralPropertyPropertyExtensions + { + public static UnionIntLiteralPropertyProperty ToUnionIntLiteralPropertyProperty(this int value) + { + if (value == 1) return UnionIntLiteralPropertyProperty._1; + if (value == 2) return UnionIntLiteralPropertyProperty._2; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionIntLiteralPropertyProperty value."); + } + } +} diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.cs new file mode 100644 index 00000000000..a2aca9f9e3b --- /dev/null +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionIntLiteralPropertyProperty.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Type.Property.Optionality.Models +{ + /// The UnionIntLiteralPropertyProperty. + public enum UnionIntLiteralPropertyProperty + { + /// 1. + _1 = 1, + /// 2. + _2 = 2 + } +} diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs index facc082ae3a..253b7a98ff5 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs @@ -31,7 +31,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe if (Optional.IsDefined(Property)) { writer.WritePropertyName("property"u8); - writer.WriteStringValue(Property.Value.ToString()); + writer.WriteStringValue(Property.Value.ToSerialString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -82,7 +82,7 @@ internal static UnionStringLiteralProperty DeserializeUnionStringLiteralProperty { continue; } - property = new UnionStringLiteralPropertyProperty(property0.Value.GetString()); + property = property0.Value.GetString().ToUnionStringLiteralPropertyProperty(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.Serialization.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.Serialization.cs new file mode 100644 index 00000000000..4bea94d59fd --- /dev/null +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Property.Optionality.Models +{ + internal static partial class UnionStringLiteralPropertyPropertyExtensions + { + public static string ToSerialString(this UnionStringLiteralPropertyProperty value) => value switch + { + UnionStringLiteralPropertyProperty.Hello => "hello", + UnionStringLiteralPropertyProperty.World => "world", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionStringLiteralPropertyProperty value.") + }; + + public static UnionStringLiteralPropertyProperty ToUnionStringLiteralPropertyProperty(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "hello")) return UnionStringLiteralPropertyProperty.Hello; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "world")) return UnionStringLiteralPropertyProperty.World; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionStringLiteralPropertyProperty value."); + } + } +} diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.cs b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.cs index 41702c651fd..caba05363ba 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.cs +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/Models/UnionStringLiteralPropertyProperty.cs @@ -5,47 +5,14 @@ #nullable disable -using System; -using System.ComponentModel; - namespace _Type.Property.Optionality.Models { - /// Enum for property in UnionStringLiteralProperty. - public readonly partial struct UnionStringLiteralPropertyProperty : IEquatable + /// The UnionStringLiteralPropertyProperty. + public enum UnionStringLiteralPropertyProperty { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public UnionStringLiteralPropertyProperty(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string HelloValue = "hello"; - private const string WorldValue = "world"; - /// hello. - public static UnionStringLiteralPropertyProperty Hello { get; } = new UnionStringLiteralPropertyProperty(HelloValue); + Hello, /// world. - public static UnionStringLiteralPropertyProperty World { get; } = new UnionStringLiteralPropertyProperty(WorldValue); - /// Determines if two values are the same. - public static bool operator ==(UnionStringLiteralPropertyProperty left, UnionStringLiteralPropertyProperty right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UnionStringLiteralPropertyProperty left, UnionStringLiteralPropertyProperty right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UnionStringLiteralPropertyProperty(string value) => new UnionStringLiteralPropertyProperty(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UnionStringLiteralPropertyProperty other && Equals(other); - /// - public bool Equals(UnionStringLiteralPropertyProperty other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + World } } diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json index 306b4388923..4870b71ba86 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json @@ -60,11 +60,77 @@ "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" + }, + { + "$id": "8", + "Kind": "Enum", + "Name": "UnionStringLiteralPropertyProperty", + "EnumValueType": "string", + "AllowedValues": [ + { + "$id": "9", + "Name": "hello", + "Value": "hello" + }, + { + "$id": "10", + "Name": "world", + "Value": "world" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "11", + "Kind": "Enum", + "Name": "UnionIntLiteralPropertyProperty", + "EnumValueType": "int32", + "AllowedValues": [ + { + "$id": "12", + "Name": "1", + "Value": 1 + }, + { + "$id": "13", + "Name": "2", + "Value": 2 + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "14", + "Kind": "Enum", + "Name": "UnionFloatLiteralPropertyProperty", + "EnumValueType": "float32", + "AllowedValues": [ + { + "$id": "15", + "Name": "1.25", + "Value": 1.25 + }, + { + "$id": "16", + "Name": "2.375", + "Value": 2.375 + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" } ], "Models": [ { - "$id": "8", + "$id": "17", "Kind": "Model", "Name": "StringProperty", "Namespace": "Type.Property.Optional", @@ -73,23 +139,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "9", + "$id": "18", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "10", + "$id": "19", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "11", + "$id": "20", "Kind": "Model", "Name": "BytesProperty", "Namespace": "Type.Property.Optional", @@ -98,23 +165,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "12", + "$id": "21", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "13", + "$id": "22", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "14", + "$id": "23", "Kind": "Model", "Name": "DatetimeProperty", "Namespace": "Type.Property.Optional", @@ -123,23 +191,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "15", + "$id": "24", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "16", + "$id": "25", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "17", + "$id": "26", "Kind": "Model", "Name": "DurationProperty", "Namespace": "Type.Property.Optional", @@ -148,23 +217,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "18", + "$id": "27", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "19", + "$id": "28", "Kind": "Primitive", "Name": "DurationISO8601", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "20", + "$id": "29", "Kind": "Model", "Name": "CollectionsByteProperty", "Namespace": "Type.Property.Optional", @@ -173,16 +243,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "21", + "$id": "30", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "22", + "$id": "31", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "23", + "$id": "32", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -190,12 +260,13 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "24", + "$id": "33", "Kind": "Model", "Name": "CollectionsModelProperty", "Namespace": "Type.Property.Optional", @@ -204,26 +275,27 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "25", + "$id": "34", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "26", + "$id": "35", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "8" + "$ref": "17" }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "27", + "$id": "36", "Kind": "Model", "Name": "StringLiteralProperty", "Namespace": "Type.Property.Optional", @@ -232,12 +304,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "28", + "$id": "37", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "29", + "$id": "38", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -247,12 +319,13 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "30", + "$id": "39", "Kind": "Model", "Name": "IntLiteralProperty", "Namespace": "Type.Property.Optional", @@ -261,12 +334,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "31", + "$id": "40", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "32", + "$id": "41", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -276,12 +349,13 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "33", + "$id": "42", "Kind": "Model", "Name": "FloatLiteralProperty", "Namespace": "Type.Property.Optional", @@ -290,12 +364,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "34", + "$id": "43", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "35", + "$id": "44", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -305,12 +379,13 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "36", + "$id": "45", "Kind": "Model", "Name": "BooleanLiteralProperty", "Namespace": "Type.Property.Optional", @@ -319,16 +394,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "37", + "$id": "46", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "38", + "$id": "47", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "39", + "$id": "48", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -337,12 +412,13 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "40", + "$id": "49", "Kind": "Model", "Name": "UnionStringLiteralProperty", "Namespace": "Type.Property.Optional", @@ -351,51 +427,21 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "41", + "$id": "50", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "42", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "43", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "44", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "hello", - "IsNullable": false - }, - { - "$id": "45", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "46", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "world", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "8" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "47", + "$id": "51", "Kind": "Model", "Name": "UnionIntLiteralProperty", "Namespace": "Type.Property.Optional", @@ -404,51 +450,21 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "48", + "$id": "52", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "49", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "50", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "51", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 1, - "IsNullable": false - }, - { - "$id": "52", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "53", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 2, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "11" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "54", + "$id": "53", "Kind": "Model", "Name": "UnionFloatLiteralProperty", "Namespace": "Type.Property.Optional", @@ -457,51 +473,21 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "55", + "$id": "54", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "56", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "57", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "58", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 1.25, - "IsNullable": false - }, - { - "$id": "59", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "60", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 2.375, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "61", + "$id": "55", "Kind": "Model", "Name": "RequiredAndOptionalProperty", "Namespace": "Type.Property.Optional", @@ -510,65 +496,67 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "62", + "$id": "56", "Name": "optionalProperty", "SerializedName": "optionalProperty", "Description": "optional string property", "Type": { - "$id": "63", + "$id": "57", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { - "$id": "64", + "$id": "58", "Name": "requiredProperty", "SerializedName": "requiredProperty", "Description": "required int property", "Type": { - "$id": "65", + "$id": "59", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } ], "Clients": [ { - "$id": "66", + "$id": "60", "Name": "OptionalClient", "Description": "", "Operations": [], "Protocol": { - "$id": "67" + "$id": "61" }, "Creatable": true }, { - "$id": "68", + "$id": "62", "Name": "String", "Description": "", "Operations": [ { - "$id": "69", + "$id": "63", "Name": "getAll", "ResourceName": "String", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$id": "70", + "$id": "64", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "71", + "$id": "65", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -583,9 +571,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "72", + "$id": "66", "Type": { - "$id": "73", + "$id": "67", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -594,11 +582,11 @@ } }, { - "$id": "74", + "$id": "68", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "75", + "$id": "69", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -613,9 +601,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "76", + "$id": "70", "Type": { - "$ref": "75" + "$ref": "69" }, "Value": "application/json" } @@ -623,12 +611,12 @@ ], "Responses": [ { - "$id": "77", + "$id": "71", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "8" + "$ref": "17" }, "BodyMediaType": "Json", "Headers": [], @@ -647,20 +635,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "78", + "$id": "72", "Name": "getDefault", "ResourceName": "String", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "79", + "$id": "73", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "80", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -675,9 +663,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "81", + "$id": "75", "Type": { - "$ref": "80" + "$ref": "74" }, "Value": "application/json" } @@ -685,12 +673,12 @@ ], "Responses": [ { - "$id": "82", + "$id": "76", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "8" + "$ref": "17" }, "BodyMediaType": "Json", "Headers": [], @@ -709,20 +697,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "83", + "$id": "77", "Name": "putAll", "ResourceName": "String", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "84", + "$id": "78", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "8" + "$ref": "17" }, "Location": "Body", "IsRequired": true, @@ -735,11 +723,11 @@ "Kind": "Method" }, { - "$id": "85", + "$id": "79", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "86", + "$id": "80", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -754,19 +742,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "87", + "$id": "81", "Type": { - "$ref": "86" + "$ref": "80" }, "Value": "application/json" } }, { - "$id": "88", + "$id": "82", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "89", + "$id": "83", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -781,9 +769,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "90", + "$id": "84", "Type": { - "$ref": "89" + "$ref": "83" }, "Value": "application/json" } @@ -791,7 +779,7 @@ ], "Responses": [ { - "$id": "91", + "$id": "85", "StatusCodes": [ 204 ], @@ -812,20 +800,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "92", + "$id": "86", "Name": "putDefault", "ResourceName": "String", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "93", + "$id": "87", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "8" + "$ref": "17" }, "Location": "Body", "IsRequired": true, @@ -838,11 +826,11 @@ "Kind": "Method" }, { - "$id": "94", + "$id": "88", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "95", + "$id": "89", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -857,19 +845,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "96", + "$id": "90", "Type": { - "$ref": "95" + "$ref": "89" }, "Value": "application/json" } }, { - "$id": "97", + "$id": "91", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "98", + "$id": "92", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -884,9 +872,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "99", + "$id": "93", "Type": { - "$ref": "98" + "$ref": "92" }, "Value": "application/json" } @@ -894,7 +882,7 @@ ], "Responses": [ { - "$id": "100", + "$id": "94", "StatusCodes": [ 204 ], @@ -916,31 +904,31 @@ } ], "Protocol": { - "$id": "101" + "$id": "95" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "102", + "$id": "96", "Name": "Bytes", "Description": "", "Operations": [ { - "$id": "103", + "$id": "97", "Name": "getAll", "ResourceName": "Bytes", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "104", + "$id": "98", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "105", + "$id": "99", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -955,9 +943,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "106", + "$id": "100", "Type": { - "$ref": "105" + "$ref": "99" }, "Value": "application/json" } @@ -965,12 +953,12 @@ ], "Responses": [ { - "$id": "107", + "$id": "101", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "11" + "$ref": "20" }, "BodyMediaType": "Json", "Headers": [], @@ -989,20 +977,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "108", + "$id": "102", "Name": "getDefault", "ResourceName": "Bytes", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "109", + "$id": "103", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "110", + "$id": "104", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1017,9 +1005,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "111", + "$id": "105", "Type": { - "$ref": "110" + "$ref": "104" }, "Value": "application/json" } @@ -1027,12 +1015,12 @@ ], "Responses": [ { - "$id": "112", + "$id": "106", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "11" + "$ref": "20" }, "BodyMediaType": "Json", "Headers": [], @@ -1051,20 +1039,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "113", + "$id": "107", "Name": "putAll", "ResourceName": "Bytes", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "114", + "$id": "108", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "11" + "$ref": "20" }, "Location": "Body", "IsRequired": true, @@ -1077,11 +1065,11 @@ "Kind": "Method" }, { - "$id": "115", + "$id": "109", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "116", + "$id": "110", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1096,19 +1084,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "117", + "$id": "111", "Type": { - "$ref": "116" + "$ref": "110" }, "Value": "application/json" } }, { - "$id": "118", + "$id": "112", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "119", + "$id": "113", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1123,9 +1111,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "120", + "$id": "114", "Type": { - "$ref": "119" + "$ref": "113" }, "Value": "application/json" } @@ -1133,7 +1121,7 @@ ], "Responses": [ { - "$id": "121", + "$id": "115", "StatusCodes": [ 204 ], @@ -1154,20 +1142,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "122", + "$id": "116", "Name": "putDefault", "ResourceName": "Bytes", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "123", + "$id": "117", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "11" + "$ref": "20" }, "Location": "Body", "IsRequired": true, @@ -1180,11 +1168,11 @@ "Kind": "Method" }, { - "$id": "124", + "$id": "118", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "125", + "$id": "119", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1199,19 +1187,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "126", + "$id": "120", "Type": { - "$ref": "125" + "$ref": "119" }, "Value": "application/json" } }, { - "$id": "127", + "$id": "121", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "128", + "$id": "122", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1226,9 +1214,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "129", + "$id": "123", "Type": { - "$ref": "128" + "$ref": "122" }, "Value": "application/json" } @@ -1236,7 +1224,7 @@ ], "Responses": [ { - "$id": "130", + "$id": "124", "StatusCodes": [ 204 ], @@ -1258,31 +1246,31 @@ } ], "Protocol": { - "$id": "131" + "$id": "125" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "132", + "$id": "126", "Name": "Datetime", "Description": "", "Operations": [ { - "$id": "133", + "$id": "127", "Name": "getAll", "ResourceName": "Datetime", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "134", + "$id": "128", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "135", + "$id": "129", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1297,9 +1285,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "136", + "$id": "130", "Type": { - "$ref": "135" + "$ref": "129" }, "Value": "application/json" } @@ -1307,12 +1295,12 @@ ], "Responses": [ { - "$id": "137", + "$id": "131", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "14" + "$ref": "23" }, "BodyMediaType": "Json", "Headers": [], @@ -1331,20 +1319,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "138", + "$id": "132", "Name": "getDefault", "ResourceName": "Datetime", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "139", + "$id": "133", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "140", + "$id": "134", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1359,9 +1347,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "141", + "$id": "135", "Type": { - "$ref": "140" + "$ref": "134" }, "Value": "application/json" } @@ -1369,12 +1357,12 @@ ], "Responses": [ { - "$id": "142", + "$id": "136", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "14" + "$ref": "23" }, "BodyMediaType": "Json", "Headers": [], @@ -1393,20 +1381,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "143", + "$id": "137", "Name": "putAll", "ResourceName": "Datetime", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "144", + "$id": "138", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "14" + "$ref": "23" }, "Location": "Body", "IsRequired": true, @@ -1419,11 +1407,11 @@ "Kind": "Method" }, { - "$id": "145", + "$id": "139", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "146", + "$id": "140", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1438,19 +1426,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "147", + "$id": "141", "Type": { - "$ref": "146" + "$ref": "140" }, "Value": "application/json" } }, { - "$id": "148", + "$id": "142", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "149", + "$id": "143", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1465,9 +1453,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "150", + "$id": "144", "Type": { - "$ref": "149" + "$ref": "143" }, "Value": "application/json" } @@ -1475,7 +1463,7 @@ ], "Responses": [ { - "$id": "151", + "$id": "145", "StatusCodes": [ 204 ], @@ -1496,20 +1484,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "152", + "$id": "146", "Name": "putDefault", "ResourceName": "Datetime", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "153", + "$id": "147", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "14" + "$ref": "23" }, "Location": "Body", "IsRequired": true, @@ -1522,11 +1510,11 @@ "Kind": "Method" }, { - "$id": "154", + "$id": "148", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "155", + "$id": "149", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1541,19 +1529,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "156", + "$id": "150", "Type": { - "$ref": "155" + "$ref": "149" }, "Value": "application/json" } }, { - "$id": "157", + "$id": "151", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "158", + "$id": "152", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1568,9 +1556,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "159", + "$id": "153", "Type": { - "$ref": "158" + "$ref": "152" }, "Value": "application/json" } @@ -1578,7 +1566,7 @@ ], "Responses": [ { - "$id": "160", + "$id": "154", "StatusCodes": [ 204 ], @@ -1600,31 +1588,31 @@ } ], "Protocol": { - "$id": "161" + "$id": "155" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "162", + "$id": "156", "Name": "Duration", "Description": "", "Operations": [ { - "$id": "163", + "$id": "157", "Name": "getAll", "ResourceName": "Duration", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "164", + "$id": "158", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "165", + "$id": "159", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1639,9 +1627,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "166", + "$id": "160", "Type": { - "$ref": "165" + "$ref": "159" }, "Value": "application/json" } @@ -1649,12 +1637,12 @@ ], "Responses": [ { - "$id": "167", + "$id": "161", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "26" }, "BodyMediaType": "Json", "Headers": [], @@ -1673,20 +1661,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "168", + "$id": "162", "Name": "getDefault", "ResourceName": "Duration", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "169", + "$id": "163", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "170", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1701,9 +1689,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "171", + "$id": "165", "Type": { - "$ref": "170" + "$ref": "164" }, "Value": "application/json" } @@ -1711,12 +1699,12 @@ ], "Responses": [ { - "$id": "172", + "$id": "166", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "26" }, "BodyMediaType": "Json", "Headers": [], @@ -1735,20 +1723,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "173", + "$id": "167", "Name": "putAll", "ResourceName": "Duration", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "174", + "$id": "168", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "17" + "$ref": "26" }, "Location": "Body", "IsRequired": true, @@ -1761,11 +1749,11 @@ "Kind": "Method" }, { - "$id": "175", + "$id": "169", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "176", + "$id": "170", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1780,19 +1768,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "177", + "$id": "171", "Type": { - "$ref": "176" + "$ref": "170" }, "Value": "application/json" } }, { - "$id": "178", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "179", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1807,9 +1795,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "180", + "$id": "174", "Type": { - "$ref": "179" + "$ref": "173" }, "Value": "application/json" } @@ -1817,7 +1805,7 @@ ], "Responses": [ { - "$id": "181", + "$id": "175", "StatusCodes": [ 204 ], @@ -1838,20 +1826,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "182", + "$id": "176", "Name": "putDefault", "ResourceName": "Duration", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "183", + "$id": "177", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "17" + "$ref": "26" }, "Location": "Body", "IsRequired": true, @@ -1864,11 +1852,11 @@ "Kind": "Method" }, { - "$id": "184", + "$id": "178", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "185", + "$id": "179", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1883,19 +1871,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "186", + "$id": "180", "Type": { - "$ref": "185" + "$ref": "179" }, "Value": "application/json" } }, { - "$id": "187", + "$id": "181", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "188", + "$id": "182", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1910,9 +1898,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "189", + "$id": "183", "Type": { - "$ref": "188" + "$ref": "182" }, "Value": "application/json" } @@ -1920,7 +1908,7 @@ ], "Responses": [ { - "$id": "190", + "$id": "184", "StatusCodes": [ 204 ], @@ -1942,31 +1930,31 @@ } ], "Protocol": { - "$id": "191" + "$id": "185" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "192", + "$id": "186", "Name": "CollectionsByte", "Description": "", "Operations": [ { - "$id": "193", + "$id": "187", "Name": "getAll", "ResourceName": "CollectionsByte", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "194", + "$id": "188", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "195", + "$id": "189", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1981,9 +1969,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "196", + "$id": "190", "Type": { - "$ref": "195" + "$ref": "189" }, "Value": "application/json" } @@ -1991,12 +1979,12 @@ ], "Responses": [ { - "$id": "197", + "$id": "191", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "20" + "$ref": "29" }, "BodyMediaType": "Json", "Headers": [], @@ -2015,20 +2003,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "198", + "$id": "192", "Name": "getDefault", "ResourceName": "CollectionsByte", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "199", + "$id": "193", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "200", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2043,9 +2031,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "201", + "$id": "195", "Type": { - "$ref": "200" + "$ref": "194" }, "Value": "application/json" } @@ -2053,12 +2041,12 @@ ], "Responses": [ { - "$id": "202", + "$id": "196", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "20" + "$ref": "29" }, "BodyMediaType": "Json", "Headers": [], @@ -2077,20 +2065,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "203", + "$id": "197", "Name": "putAll", "ResourceName": "CollectionsByte", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "204", + "$id": "198", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "20" + "$ref": "29" }, "Location": "Body", "IsRequired": true, @@ -2103,11 +2091,11 @@ "Kind": "Method" }, { - "$id": "205", + "$id": "199", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "206", + "$id": "200", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2122,19 +2110,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "207", + "$id": "201", "Type": { - "$ref": "206" + "$ref": "200" }, "Value": "application/json" } }, { - "$id": "208", + "$id": "202", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "209", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2149,9 +2137,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "210", + "$id": "204", "Type": { - "$ref": "209" + "$ref": "203" }, "Value": "application/json" } @@ -2159,7 +2147,7 @@ ], "Responses": [ { - "$id": "211", + "$id": "205", "StatusCodes": [ 204 ], @@ -2180,20 +2168,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "212", + "$id": "206", "Name": "putDefault", "ResourceName": "CollectionsByte", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "213", + "$id": "207", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "20" + "$ref": "29" }, "Location": "Body", "IsRequired": true, @@ -2206,11 +2194,11 @@ "Kind": "Method" }, { - "$id": "214", + "$id": "208", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "215", + "$id": "209", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2225,19 +2213,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "216", + "$id": "210", "Type": { - "$ref": "215" + "$ref": "209" }, "Value": "application/json" } }, { - "$id": "217", + "$id": "211", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "218", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2252,9 +2240,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "219", + "$id": "213", "Type": { - "$ref": "218" + "$ref": "212" }, "Value": "application/json" } @@ -2262,7 +2250,7 @@ ], "Responses": [ { - "$id": "220", + "$id": "214", "StatusCodes": [ 204 ], @@ -2284,31 +2272,31 @@ } ], "Protocol": { - "$id": "221" + "$id": "215" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "222", + "$id": "216", "Name": "CollectionsModel", "Description": "", "Operations": [ { - "$id": "223", + "$id": "217", "Name": "getAll", "ResourceName": "CollectionsModel", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "224", + "$id": "218", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "225", + "$id": "219", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2323,9 +2311,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "220", "Type": { - "$ref": "225" + "$ref": "219" }, "Value": "application/json" } @@ -2333,12 +2321,12 @@ ], "Responses": [ { - "$id": "227", + "$id": "221", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "24" + "$ref": "33" }, "BodyMediaType": "Json", "Headers": [], @@ -2357,20 +2345,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "228", + "$id": "222", "Name": "getDefault", "ResourceName": "CollectionsModel", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "229", + "$id": "223", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "230", + "$id": "224", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2385,9 +2373,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "231", + "$id": "225", "Type": { - "$ref": "230" + "$ref": "224" }, "Value": "application/json" } @@ -2395,12 +2383,12 @@ ], "Responses": [ { - "$id": "232", + "$id": "226", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "24" + "$ref": "33" }, "BodyMediaType": "Json", "Headers": [], @@ -2419,20 +2407,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "233", + "$id": "227", "Name": "putAll", "ResourceName": "CollectionsModel", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "234", + "$id": "228", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "24" + "$ref": "33" }, "Location": "Body", "IsRequired": true, @@ -2445,11 +2433,11 @@ "Kind": "Method" }, { - "$id": "235", + "$id": "229", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "236", + "$id": "230", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2464,19 +2452,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "237", + "$id": "231", "Type": { - "$ref": "236" + "$ref": "230" }, "Value": "application/json" } }, { - "$id": "238", + "$id": "232", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "239", + "$id": "233", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2491,9 +2479,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "240", + "$id": "234", "Type": { - "$ref": "239" + "$ref": "233" }, "Value": "application/json" } @@ -2501,7 +2489,7 @@ ], "Responses": [ { - "$id": "241", + "$id": "235", "StatusCodes": [ 204 ], @@ -2522,20 +2510,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "242", + "$id": "236", "Name": "putDefault", "ResourceName": "CollectionsModel", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "243", + "$id": "237", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "24" + "$ref": "33" }, "Location": "Body", "IsRequired": true, @@ -2548,11 +2536,11 @@ "Kind": "Method" }, { - "$id": "244", + "$id": "238", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "245", + "$id": "239", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2567,19 +2555,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "246", + "$id": "240", "Type": { - "$ref": "245" + "$ref": "239" }, "Value": "application/json" } }, { - "$id": "247", + "$id": "241", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "248", + "$id": "242", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2594,9 +2582,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "249", + "$id": "243", "Type": { - "$ref": "248" + "$ref": "242" }, "Value": "application/json" } @@ -2604,7 +2592,7 @@ ], "Responses": [ { - "$id": "250", + "$id": "244", "StatusCodes": [ 204 ], @@ -2626,31 +2614,31 @@ } ], "Protocol": { - "$id": "251" + "$id": "245" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "252", + "$id": "246", "Name": "StringLiteral", "Description": "", "Operations": [ { - "$id": "253", + "$id": "247", "Name": "getAll", "ResourceName": "StringLiteral", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "254", + "$id": "248", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "255", + "$id": "249", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2665,9 +2653,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "250", "Type": { - "$ref": "255" + "$ref": "249" }, "Value": "application/json" } @@ -2675,12 +2663,12 @@ ], "Responses": [ { - "$id": "257", + "$id": "251", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "27" + "$ref": "36" }, "BodyMediaType": "Json", "Headers": [], @@ -2699,20 +2687,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "258", + "$id": "252", "Name": "getDefault", "ResourceName": "StringLiteral", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "259", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "260", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2727,9 +2715,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "261", + "$id": "255", "Type": { - "$ref": "260" + "$ref": "254" }, "Value": "application/json" } @@ -2737,12 +2725,12 @@ ], "Responses": [ { - "$id": "262", + "$id": "256", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "27" + "$ref": "36" }, "BodyMediaType": "Json", "Headers": [], @@ -2761,20 +2749,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "263", + "$id": "257", "Name": "putAll", "ResourceName": "StringLiteral", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "264", + "$id": "258", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "27" + "$ref": "36" }, "Location": "Body", "IsRequired": true, @@ -2787,11 +2775,11 @@ "Kind": "Method" }, { - "$id": "265", + "$id": "259", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "266", + "$id": "260", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2806,19 +2794,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "267", + "$id": "261", "Type": { - "$ref": "266" + "$ref": "260" }, "Value": "application/json" } }, { - "$id": "268", + "$id": "262", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "269", + "$id": "263", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2833,9 +2821,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "270", + "$id": "264", "Type": { - "$ref": "269" + "$ref": "263" }, "Value": "application/json" } @@ -2843,7 +2831,7 @@ ], "Responses": [ { - "$id": "271", + "$id": "265", "StatusCodes": [ 204 ], @@ -2864,20 +2852,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "272", + "$id": "266", "Name": "putDefault", "ResourceName": "StringLiteral", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "273", + "$id": "267", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "27" + "$ref": "36" }, "Location": "Body", "IsRequired": true, @@ -2890,11 +2878,11 @@ "Kind": "Method" }, { - "$id": "274", + "$id": "268", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "275", + "$id": "269", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2909,19 +2897,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "276", + "$id": "270", "Type": { - "$ref": "275" + "$ref": "269" }, "Value": "application/json" } }, { - "$id": "277", + "$id": "271", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "278", + "$id": "272", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2936,9 +2924,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "279", + "$id": "273", "Type": { - "$ref": "278" + "$ref": "272" }, "Value": "application/json" } @@ -2946,7 +2934,7 @@ ], "Responses": [ { - "$id": "280", + "$id": "274", "StatusCodes": [ 204 ], @@ -2968,31 +2956,31 @@ } ], "Protocol": { - "$id": "281" + "$id": "275" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "282", + "$id": "276", "Name": "IntLiteral", "Description": "", "Operations": [ { - "$id": "283", + "$id": "277", "Name": "getAll", "ResourceName": "IntLiteral", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "284", + "$id": "278", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "285", + "$id": "279", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3007,9 +2995,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "286", + "$id": "280", "Type": { - "$ref": "285" + "$ref": "279" }, "Value": "application/json" } @@ -3017,12 +3005,12 @@ ], "Responses": [ { - "$id": "287", + "$id": "281", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "39" }, "BodyMediaType": "Json", "Headers": [], @@ -3041,20 +3029,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "288", + "$id": "282", "Name": "getDefault", "ResourceName": "IntLiteral", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "289", + "$id": "283", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "290", + "$id": "284", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3069,9 +3057,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "291", + "$id": "285", "Type": { - "$ref": "290" + "$ref": "284" }, "Value": "application/json" } @@ -3079,12 +3067,12 @@ ], "Responses": [ { - "$id": "292", + "$id": "286", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "39" }, "BodyMediaType": "Json", "Headers": [], @@ -3103,20 +3091,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "293", + "$id": "287", "Name": "putAll", "ResourceName": "IntLiteral", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "294", + "$id": "288", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "30" + "$ref": "39" }, "Location": "Body", "IsRequired": true, @@ -3129,11 +3117,11 @@ "Kind": "Method" }, { - "$id": "295", + "$id": "289", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "296", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3148,19 +3136,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "297", + "$id": "291", "Type": { - "$ref": "296" + "$ref": "290" }, "Value": "application/json" } }, { - "$id": "298", + "$id": "292", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "299", + "$id": "293", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3175,9 +3163,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "300", + "$id": "294", "Type": { - "$ref": "299" + "$ref": "293" }, "Value": "application/json" } @@ -3185,7 +3173,7 @@ ], "Responses": [ { - "$id": "301", + "$id": "295", "StatusCodes": [ 204 ], @@ -3206,20 +3194,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "302", + "$id": "296", "Name": "putDefault", "ResourceName": "IntLiteral", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "303", + "$id": "297", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "30" + "$ref": "39" }, "Location": "Body", "IsRequired": true, @@ -3232,11 +3220,11 @@ "Kind": "Method" }, { - "$id": "304", + "$id": "298", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "305", + "$id": "299", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3251,19 +3239,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "306", + "$id": "300", "Type": { - "$ref": "305" + "$ref": "299" }, "Value": "application/json" } }, { - "$id": "307", + "$id": "301", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "308", + "$id": "302", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3278,9 +3266,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "309", + "$id": "303", "Type": { - "$ref": "308" + "$ref": "302" }, "Value": "application/json" } @@ -3288,7 +3276,7 @@ ], "Responses": [ { - "$id": "310", + "$id": "304", "StatusCodes": [ 204 ], @@ -3310,31 +3298,31 @@ } ], "Protocol": { - "$id": "311" + "$id": "305" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "312", + "$id": "306", "Name": "FloatLiteral", "Description": "", "Operations": [ { - "$id": "313", + "$id": "307", "Name": "getAll", "ResourceName": "FloatLiteral", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "314", + "$id": "308", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "315", + "$id": "309", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3349,9 +3337,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "316", + "$id": "310", "Type": { - "$ref": "315" + "$ref": "309" }, "Value": "application/json" } @@ -3359,12 +3347,12 @@ ], "Responses": [ { - "$id": "317", + "$id": "311", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "33" + "$ref": "42" }, "BodyMediaType": "Json", "Headers": [], @@ -3383,20 +3371,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "318", + "$id": "312", "Name": "getDefault", "ResourceName": "FloatLiteral", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "319", + "$id": "313", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "320", + "$id": "314", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3411,9 +3399,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "321", + "$id": "315", "Type": { - "$ref": "320" + "$ref": "314" }, "Value": "application/json" } @@ -3421,12 +3409,12 @@ ], "Responses": [ { - "$id": "322", + "$id": "316", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "33" + "$ref": "42" }, "BodyMediaType": "Json", "Headers": [], @@ -3445,20 +3433,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "323", + "$id": "317", "Name": "putAll", "ResourceName": "FloatLiteral", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "324", + "$id": "318", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "33" + "$ref": "42" }, "Location": "Body", "IsRequired": true, @@ -3471,11 +3459,11 @@ "Kind": "Method" }, { - "$id": "325", + "$id": "319", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "326", + "$id": "320", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3490,19 +3478,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "327", + "$id": "321", "Type": { - "$ref": "326" + "$ref": "320" }, "Value": "application/json" } }, { - "$id": "328", + "$id": "322", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "329", + "$id": "323", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3517,9 +3505,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "330", + "$id": "324", "Type": { - "$ref": "329" + "$ref": "323" }, "Value": "application/json" } @@ -3527,7 +3515,7 @@ ], "Responses": [ { - "$id": "331", + "$id": "325", "StatusCodes": [ 204 ], @@ -3548,20 +3536,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "332", + "$id": "326", "Name": "putDefault", "ResourceName": "FloatLiteral", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "333", + "$id": "327", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "33" + "$ref": "42" }, "Location": "Body", "IsRequired": true, @@ -3574,11 +3562,11 @@ "Kind": "Method" }, { - "$id": "334", + "$id": "328", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "335", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3593,19 +3581,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "336", + "$id": "330", "Type": { - "$ref": "335" + "$ref": "329" }, "Value": "application/json" } }, { - "$id": "337", + "$id": "331", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "338", + "$id": "332", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3620,9 +3608,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "339", + "$id": "333", "Type": { - "$ref": "338" + "$ref": "332" }, "Value": "application/json" } @@ -3630,7 +3618,7 @@ ], "Responses": [ { - "$id": "340", + "$id": "334", "StatusCodes": [ 204 ], @@ -3652,31 +3640,31 @@ } ], "Protocol": { - "$id": "341" + "$id": "335" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "342", + "$id": "336", "Name": "BooleanLiteral", "Description": "", "Operations": [ { - "$id": "343", + "$id": "337", "Name": "getAll", "ResourceName": "BooleanLiteral", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "344", + "$id": "338", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "345", + "$id": "339", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3691,9 +3679,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "346", + "$id": "340", "Type": { - "$ref": "345" + "$ref": "339" }, "Value": "application/json" } @@ -3701,12 +3689,12 @@ ], "Responses": [ { - "$id": "347", + "$id": "341", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "36" + "$ref": "45" }, "BodyMediaType": "Json", "Headers": [], @@ -3725,20 +3713,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "348", + "$id": "342", "Name": "getDefault", "ResourceName": "BooleanLiteral", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "349", + "$id": "343", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "350", + "$id": "344", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3753,9 +3741,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "351", + "$id": "345", "Type": { - "$ref": "350" + "$ref": "344" }, "Value": "application/json" } @@ -3763,12 +3751,12 @@ ], "Responses": [ { - "$id": "352", + "$id": "346", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "36" + "$ref": "45" }, "BodyMediaType": "Json", "Headers": [], @@ -3787,20 +3775,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "353", + "$id": "347", "Name": "putAll", "ResourceName": "BooleanLiteral", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "354", + "$id": "348", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "36" + "$ref": "45" }, "Location": "Body", "IsRequired": true, @@ -3813,11 +3801,11 @@ "Kind": "Method" }, { - "$id": "355", + "$id": "349", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "356", + "$id": "350", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3832,19 +3820,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "357", + "$id": "351", "Type": { - "$ref": "356" + "$ref": "350" }, "Value": "application/json" } }, { - "$id": "358", + "$id": "352", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "359", + "$id": "353", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3859,9 +3847,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "360", + "$id": "354", "Type": { - "$ref": "359" + "$ref": "353" }, "Value": "application/json" } @@ -3869,7 +3857,7 @@ ], "Responses": [ { - "$id": "361", + "$id": "355", "StatusCodes": [ 204 ], @@ -3890,20 +3878,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "362", + "$id": "356", "Name": "putDefault", "ResourceName": "BooleanLiteral", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "363", + "$id": "357", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "36" + "$ref": "45" }, "Location": "Body", "IsRequired": true, @@ -3916,11 +3904,11 @@ "Kind": "Method" }, { - "$id": "364", + "$id": "358", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "365", + "$id": "359", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3935,19 +3923,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "366", + "$id": "360", "Type": { - "$ref": "365" + "$ref": "359" }, "Value": "application/json" } }, { - "$id": "367", + "$id": "361", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "368", + "$id": "362", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3962,9 +3950,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "369", + "$id": "363", "Type": { - "$ref": "368" + "$ref": "362" }, "Value": "application/json" } @@ -3972,7 +3960,7 @@ ], "Responses": [ { - "$id": "370", + "$id": "364", "StatusCodes": [ 204 ], @@ -3994,31 +3982,31 @@ } ], "Protocol": { - "$id": "371" + "$id": "365" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "372", + "$id": "366", "Name": "UnionStringLiteral", "Description": "", "Operations": [ { - "$id": "373", + "$id": "367", "Name": "getAll", "ResourceName": "UnionStringLiteral", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "374", + "$id": "368", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "375", + "$id": "369", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4033,9 +4021,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "376", + "$id": "370", "Type": { - "$ref": "375" + "$ref": "369" }, "Value": "application/json" } @@ -4043,12 +4031,12 @@ ], "Responses": [ { - "$id": "377", + "$id": "371", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "40" + "$ref": "49" }, "BodyMediaType": "Json", "Headers": [], @@ -4067,20 +4055,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "378", + "$id": "372", "Name": "getDefault", "ResourceName": "UnionStringLiteral", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "379", + "$id": "373", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "380", + "$id": "374", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4095,9 +4083,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "381", + "$id": "375", "Type": { - "$ref": "380" + "$ref": "374" }, "Value": "application/json" } @@ -4105,12 +4093,12 @@ ], "Responses": [ { - "$id": "382", + "$id": "376", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "40" + "$ref": "49" }, "BodyMediaType": "Json", "Headers": [], @@ -4129,20 +4117,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "383", + "$id": "377", "Name": "putAll", "ResourceName": "UnionStringLiteral", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "384", + "$id": "378", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "40" + "$ref": "49" }, "Location": "Body", "IsRequired": true, @@ -4155,11 +4143,11 @@ "Kind": "Method" }, { - "$id": "385", + "$id": "379", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "386", + "$id": "380", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4174,19 +4162,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "387", + "$id": "381", "Type": { - "$ref": "386" + "$ref": "380" }, "Value": "application/json" } }, { - "$id": "388", + "$id": "382", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "389", + "$id": "383", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4201,9 +4189,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "390", + "$id": "384", "Type": { - "$ref": "389" + "$ref": "383" }, "Value": "application/json" } @@ -4211,7 +4199,7 @@ ], "Responses": [ { - "$id": "391", + "$id": "385", "StatusCodes": [ 204 ], @@ -4232,20 +4220,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "392", + "$id": "386", "Name": "putDefault", "ResourceName": "UnionStringLiteral", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "393", + "$id": "387", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "40" + "$ref": "49" }, "Location": "Body", "IsRequired": true, @@ -4258,11 +4246,11 @@ "Kind": "Method" }, { - "$id": "394", + "$id": "388", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "395", + "$id": "389", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4277,19 +4265,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "396", + "$id": "390", "Type": { - "$ref": "395" + "$ref": "389" }, "Value": "application/json" } }, { - "$id": "397", + "$id": "391", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "398", + "$id": "392", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4304,9 +4292,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "399", + "$id": "393", "Type": { - "$ref": "398" + "$ref": "392" }, "Value": "application/json" } @@ -4314,7 +4302,7 @@ ], "Responses": [ { - "$id": "400", + "$id": "394", "StatusCodes": [ 204 ], @@ -4336,31 +4324,31 @@ } ], "Protocol": { - "$id": "401" + "$id": "395" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "402", + "$id": "396", "Name": "UnionIntLiteral", "Description": "", "Operations": [ { - "$id": "403", + "$id": "397", "Name": "getAll", "ResourceName": "UnionIntLiteral", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "404", + "$id": "398", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "405", + "$id": "399", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4375,9 +4363,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "406", + "$id": "400", "Type": { - "$ref": "405" + "$ref": "399" }, "Value": "application/json" } @@ -4385,12 +4373,12 @@ ], "Responses": [ { - "$id": "407", + "$id": "401", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "47" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -4409,20 +4397,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "408", + "$id": "402", "Name": "getDefault", "ResourceName": "UnionIntLiteral", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "409", + "$id": "403", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "410", + "$id": "404", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4437,9 +4425,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "411", + "$id": "405", "Type": { - "$ref": "410" + "$ref": "404" }, "Value": "application/json" } @@ -4447,12 +4435,12 @@ ], "Responses": [ { - "$id": "412", + "$id": "406", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "47" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -4471,20 +4459,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "413", + "$id": "407", "Name": "putAll", "ResourceName": "UnionIntLiteral", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "414", + "$id": "408", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "47" + "$ref": "51" }, "Location": "Body", "IsRequired": true, @@ -4497,11 +4485,11 @@ "Kind": "Method" }, { - "$id": "415", + "$id": "409", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "416", + "$id": "410", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4516,19 +4504,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "417", + "$id": "411", "Type": { - "$ref": "416" + "$ref": "410" }, "Value": "application/json" } }, { - "$id": "418", + "$id": "412", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "419", + "$id": "413", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4543,9 +4531,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "420", + "$id": "414", "Type": { - "$ref": "419" + "$ref": "413" }, "Value": "application/json" } @@ -4553,7 +4541,7 @@ ], "Responses": [ { - "$id": "421", + "$id": "415", "StatusCodes": [ 204 ], @@ -4574,20 +4562,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "422", + "$id": "416", "Name": "putDefault", "ResourceName": "UnionIntLiteral", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "423", + "$id": "417", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "47" + "$ref": "51" }, "Location": "Body", "IsRequired": true, @@ -4600,11 +4588,11 @@ "Kind": "Method" }, { - "$id": "424", + "$id": "418", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "425", + "$id": "419", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4619,19 +4607,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "426", + "$id": "420", "Type": { - "$ref": "425" + "$ref": "419" }, "Value": "application/json" } }, { - "$id": "427", + "$id": "421", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "428", + "$id": "422", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4646,9 +4634,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "429", + "$id": "423", "Type": { - "$ref": "428" + "$ref": "422" }, "Value": "application/json" } @@ -4656,7 +4644,7 @@ ], "Responses": [ { - "$id": "430", + "$id": "424", "StatusCodes": [ 204 ], @@ -4678,31 +4666,31 @@ } ], "Protocol": { - "$id": "431" + "$id": "425" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "432", + "$id": "426", "Name": "UnionFloatLiteral", "Description": "", "Operations": [ { - "$id": "433", + "$id": "427", "Name": "getAll", "ResourceName": "UnionFloatLiteral", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "434", + "$id": "428", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "435", + "$id": "429", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4717,9 +4705,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "436", + "$id": "430", "Type": { - "$ref": "435" + "$ref": "429" }, "Value": "application/json" } @@ -4727,12 +4715,12 @@ ], "Responses": [ { - "$id": "437", + "$id": "431", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "54" + "$ref": "53" }, "BodyMediaType": "Json", "Headers": [], @@ -4751,20 +4739,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "438", + "$id": "432", "Name": "getDefault", "ResourceName": "UnionFloatLiteral", "Description": "Get models that will return the default object", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "439", + "$id": "433", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "440", + "$id": "434", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4779,9 +4767,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "441", + "$id": "435", "Type": { - "$ref": "440" + "$ref": "434" }, "Value": "application/json" } @@ -4789,12 +4777,12 @@ ], "Responses": [ { - "$id": "442", + "$id": "436", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "54" + "$ref": "53" }, "BodyMediaType": "Json", "Headers": [], @@ -4813,20 +4801,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "443", + "$id": "437", "Name": "putAll", "ResourceName": "UnionFloatLiteral", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "444", + "$id": "438", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "54" + "$ref": "53" }, "Location": "Body", "IsRequired": true, @@ -4839,11 +4827,11 @@ "Kind": "Method" }, { - "$id": "445", + "$id": "439", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "446", + "$id": "440", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4858,19 +4846,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "447", + "$id": "441", "Type": { - "$ref": "446" + "$ref": "440" }, "Value": "application/json" } }, { - "$id": "448", + "$id": "442", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "449", + "$id": "443", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4885,9 +4873,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "450", + "$id": "444", "Type": { - "$ref": "449" + "$ref": "443" }, "Value": "application/json" } @@ -4895,7 +4883,7 @@ ], "Responses": [ { - "$id": "451", + "$id": "445", "StatusCodes": [ 204 ], @@ -4916,20 +4904,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "452", + "$id": "446", "Name": "putDefault", "ResourceName": "UnionFloatLiteral", "Description": "Put a body with default properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "453", + "$id": "447", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "54" + "$ref": "53" }, "Location": "Body", "IsRequired": true, @@ -4942,11 +4930,11 @@ "Kind": "Method" }, { - "$id": "454", + "$id": "448", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "455", + "$id": "449", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4961,19 +4949,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "456", + "$id": "450", "Type": { - "$ref": "455" + "$ref": "449" }, "Value": "application/json" } }, { - "$id": "457", + "$id": "451", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "458", + "$id": "452", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4988,9 +4976,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "459", + "$id": "453", "Type": { - "$ref": "458" + "$ref": "452" }, "Value": "application/json" } @@ -4998,7 +4986,7 @@ ], "Responses": [ { - "$id": "460", + "$id": "454", "StatusCodes": [ 204 ], @@ -5020,31 +5008,31 @@ } ], "Protocol": { - "$id": "461" + "$id": "455" }, "Creatable": false, "Parent": "OptionalClient" }, { - "$id": "462", + "$id": "456", "Name": "RequiredAndOptional", "Description": "Test optional and required properties", "Operations": [ { - "$id": "463", + "$id": "457", "Name": "getAll", "ResourceName": "RequiredAndOptional", "Description": "Get models that will return all properties in the model", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "464", + "$id": "458", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "465", + "$id": "459", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5059,9 +5047,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "466", + "$id": "460", "Type": { - "$ref": "465" + "$ref": "459" }, "Value": "application/json" } @@ -5069,12 +5057,12 @@ ], "Responses": [ { - "$id": "467", + "$id": "461", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "61" + "$ref": "55" }, "BodyMediaType": "Json", "Headers": [], @@ -5093,20 +5081,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "468", + "$id": "462", "Name": "getRequiredOnly", "ResourceName": "RequiredAndOptional", "Description": "Get models that will return only the required properties", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "469", + "$id": "463", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "470", + "$id": "464", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5121,9 +5109,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "471", + "$id": "465", "Type": { - "$ref": "470" + "$ref": "464" }, "Value": "application/json" } @@ -5131,12 +5119,12 @@ ], "Responses": [ { - "$id": "472", + "$id": "466", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "61" + "$ref": "55" }, "BodyMediaType": "Json", "Headers": [], @@ -5155,20 +5143,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "473", + "$id": "467", "Name": "putAll", "ResourceName": "RequiredAndOptional", "Description": "Put a body with all properties present.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "474", + "$id": "468", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "61" + "$ref": "55" }, "Location": "Body", "IsRequired": true, @@ -5181,11 +5169,11 @@ "Kind": "Method" }, { - "$id": "475", + "$id": "469", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "476", + "$id": "470", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5200,19 +5188,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "477", + "$id": "471", "Type": { - "$ref": "476" + "$ref": "470" }, "Value": "application/json" } }, { - "$id": "478", + "$id": "472", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "479", + "$id": "473", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5227,9 +5215,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "480", + "$id": "474", "Type": { - "$ref": "479" + "$ref": "473" }, "Value": "application/json" } @@ -5237,7 +5225,7 @@ ], "Responses": [ { - "$id": "481", + "$id": "475", "StatusCodes": [ 204 ], @@ -5258,20 +5246,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "482", + "$id": "476", "Name": "putRequiredOnly", "ResourceName": "RequiredAndOptional", "Description": "Put a body with only required properties.", "Parameters": [ { - "$ref": "70" + "$ref": "64" }, { - "$id": "483", + "$id": "477", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "61" + "$ref": "55" }, "Location": "Body", "IsRequired": true, @@ -5284,11 +5272,11 @@ "Kind": "Method" }, { - "$id": "484", + "$id": "478", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "485", + "$id": "479", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5303,19 +5291,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "486", + "$id": "480", "Type": { - "$ref": "485" + "$ref": "479" }, "Value": "application/json" } }, { - "$id": "487", + "$id": "481", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "488", + "$id": "482", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5330,9 +5318,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "489", + "$id": "483", "Type": { - "$ref": "488" + "$ref": "482" }, "Value": "application/json" } @@ -5340,7 +5328,7 @@ ], "Responses": [ { - "$id": "490", + "$id": "484", "StatusCodes": [ 204 ], @@ -5362,7 +5350,7 @@ } ], "Protocol": { - "$id": "491" + "$id": "485" }, "Creatable": false, "Parent": "OptionalClient" diff --git a/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_Datetime.cs b/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_Datetime.cs index 24880788a89..f7bde6888ef 100644 --- a/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_Datetime.cs +++ b/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_Datetime.cs @@ -239,7 +239,7 @@ public void Example_Datetime_PutAll_AllParameters() using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PutAll(content); @@ -254,7 +254,7 @@ public async Task Example_Datetime_PutAll_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PutAllAsync(content); @@ -269,7 +269,7 @@ public void Example_Datetime_PutAll_AllParameters_Convenience() DatetimeProperty body = new DatetimeProperty { - Property = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Property = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }; Response response = client.PutAll(body); } @@ -282,7 +282,7 @@ public async Task Example_Datetime_PutAll_AllParameters_Convenience_Async() DatetimeProperty body = new DatetimeProperty { - Property = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Property = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }; Response response = await client.PutAllAsync(body); } @@ -339,7 +339,7 @@ public void Example_Datetime_PutDefault_AllParameters() using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = client.PutDefault(content); @@ -354,7 +354,7 @@ public async Task Example_Datetime_PutDefault_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PutDefaultAsync(content); @@ -369,7 +369,7 @@ public void Example_Datetime_PutDefault_AllParameters_Convenience() DatetimeProperty body = new DatetimeProperty { - Property = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Property = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }; Response response = client.PutDefault(body); } @@ -382,7 +382,7 @@ public async Task Example_Datetime_PutDefault_AllParameters_Convenience_Async() DatetimeProperty body = new DatetimeProperty { - Property = DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00"), + Property = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), }; Response response = await client.PutDefaultAsync(body); } diff --git a/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_UnionFloatLiteral.cs b/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_UnionFloatLiteral.cs index 761f44de7b0..08941584a56 100644 --- a/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_UnionFloatLiteral.cs +++ b/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_UnionFloatLiteral.cs @@ -239,7 +239,7 @@ public void Example_UnionFloatLiteral_PutAll_AllParameters() using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = client.PutAll(content); @@ -254,7 +254,7 @@ public async Task Example_UnionFloatLiteral_PutAll_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = await client.PutAllAsync(content); @@ -269,7 +269,7 @@ public void Example_UnionFloatLiteral_PutAll_AllParameters_Convenience() UnionFloatLiteralProperty body = new UnionFloatLiteralProperty { - Property = BinaryData.FromObjectAsJson(1.25), + Property = UnionFloatLiteralPropertyProperty._125, }; Response response = client.PutAll(body); } @@ -282,7 +282,7 @@ public async Task Example_UnionFloatLiteral_PutAll_AllParameters_Convenience_Asy UnionFloatLiteralProperty body = new UnionFloatLiteralProperty { - Property = BinaryData.FromObjectAsJson(1.25), + Property = UnionFloatLiteralPropertyProperty._125, }; Response response = await client.PutAllAsync(body); } @@ -339,7 +339,7 @@ public void Example_UnionFloatLiteral_PutDefault_AllParameters() using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = client.PutDefault(content); @@ -354,7 +354,7 @@ public async Task Example_UnionFloatLiteral_PutDefault_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = await client.PutDefaultAsync(content); @@ -369,7 +369,7 @@ public void Example_UnionFloatLiteral_PutDefault_AllParameters_Convenience() UnionFloatLiteralProperty body = new UnionFloatLiteralProperty { - Property = BinaryData.FromObjectAsJson(1.25), + Property = UnionFloatLiteralPropertyProperty._125, }; Response response = client.PutDefault(body); } @@ -382,7 +382,7 @@ public async Task Example_UnionFloatLiteral_PutDefault_AllParameters_Convenience UnionFloatLiteralProperty body = new UnionFloatLiteralProperty { - Property = BinaryData.FromObjectAsJson(1.25), + Property = UnionFloatLiteralPropertyProperty._125, }; Response response = await client.PutDefaultAsync(body); } diff --git a/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_UnionIntLiteral.cs b/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_UnionIntLiteral.cs index 56053b83641..4f40af81d66 100644 --- a/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_UnionIntLiteral.cs +++ b/test/CadlRanchProjects/type/property/optionality/tests/Generated/Samples/Samples_UnionIntLiteral.cs @@ -269,7 +269,7 @@ public void Example_UnionIntLiteral_PutAll_AllParameters_Convenience() UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = client.PutAll(body); } @@ -282,7 +282,7 @@ public async Task Example_UnionIntLiteral_PutAll_AllParameters_Convenience_Async UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = await client.PutAllAsync(body); } @@ -369,7 +369,7 @@ public void Example_UnionIntLiteral_PutDefault_AllParameters_Convenience() UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = client.PutDefault(body); } @@ -382,7 +382,7 @@ public async Task Example_UnionIntLiteral_PutDefault_AllParameters_Convenience_A UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = await client.PutDefaultAsync(body); } diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/Datetime.xml b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/Datetime.xml index 419ca15a677..4021979a01d 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/Datetime.xml +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/Datetime.xml @@ -79,14 +79,14 @@ This sample shows how to call PutAsync. This sample shows how to call PutAsync with all parameters. @@ -96,14 +96,14 @@ This sample shows how to call Put. This sample shows how to call Put with all parameters. @@ -115,7 +115,7 @@ Datetime client = new ValueTypesClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PutAsync(content); @@ -127,7 +127,7 @@ Datetime client = new ValueTypesClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PutAsync(content); @@ -142,7 +142,7 @@ Datetime client = new ValueTypesClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = client.Put(content); @@ -154,7 +154,7 @@ Datetime client = new ValueTypesClient().GetDatetimeClient(); using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionFloatLiteral.xml b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionFloatLiteral.xml index 32aa50813ed..50d11d57ebb 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionFloatLiteral.xml +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionFloatLiteral.xml @@ -79,14 +79,14 @@ This sample shows how to call PutAsync. This sample shows how to call PutAsync with all parameters. @@ -96,14 +96,14 @@ This sample shows how to call Put. This sample shows how to call Put with all parameters. @@ -115,7 +115,7 @@ UnionFloatLiteral client = new ValueTypesClient().GetUnionFloatLiteralClient(); using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = await client.PutAsync(content); @@ -127,7 +127,7 @@ UnionFloatLiteral client = new ValueTypesClient().GetUnionFloatLiteralClient(); using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = await client.PutAsync(content); @@ -142,7 +142,7 @@ UnionFloatLiteral client = new ValueTypesClient().GetUnionFloatLiteralClient(); using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = client.Put(content); @@ -154,7 +154,7 @@ UnionFloatLiteral client = new ValueTypesClient().GetUnionFloatLiteralClient(); using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionIntLiteral.xml b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionIntLiteral.xml index d302b78062d..c4c91e0f628 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionIntLiteral.xml +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionIntLiteral.xml @@ -79,14 +79,14 @@ This sample shows how to call PutAsync. This sample shows how to call PutAsync with all parameters. @@ -96,14 +96,14 @@ This sample shows how to call Put. This sample shows how to call Put with all parameters. diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs index 67c355a913d..3ec64cd0755 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs @@ -29,14 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteStartObject(); writer.WritePropertyName("property"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Property); -#else - using (JsonDocument document = JsonDocument.Parse(Property)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue(Property.ToSerialSingle()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,14 +68,14 @@ internal static UnionFloatLiteralProperty DeserializeUnionFloatLiteralProperty(J { return null; } - BinaryData property = default; + UnionFloatLiteralPropertyProperty property = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property0 in element.EnumerateObject()) { if (property0.NameEquals("property"u8)) { - property = BinaryData.FromString(property0.Value.GetRawText()); + property = property0.Value.GetSingle().ToUnionFloatLiteralPropertyProperty(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.cs index 4a1e2bacb8c..aef18006637 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Property.ValueTypes; namespace _Type.Property.ValueTypes.Models { @@ -48,18 +47,15 @@ public partial class UnionFloatLiteralProperty /// Initializes a new instance of . /// Property. - /// is null. - public UnionFloatLiteralProperty(BinaryData property) + public UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty property) { - Argument.AssertNotNull(property, nameof(property)); - Property = property; } /// Initializes a new instance of . /// Property. /// Keeps track of any properties unknown to the library. - internal UnionFloatLiteralProperty(BinaryData property, IDictionary serializedAdditionalRawData) + internal UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty property, IDictionary serializedAdditionalRawData) { Property = property; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -70,47 +66,7 @@ internal UnionFloatLiteralProperty() { } - /// - /// Property - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 43.125 - /// - /// - /// 46.875 - /// - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Property { get; set; } + /// Property. + public UnionFloatLiteralPropertyProperty Property { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralPropertyProperty.Serialization.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralPropertyProperty.Serialization.cs new file mode 100644 index 00000000000..eb467022896 --- /dev/null +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralPropertyProperty.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Property.ValueTypes.Models +{ + internal static partial class UnionFloatLiteralPropertyPropertyExtensions + { + public static float ToSerialSingle(this UnionFloatLiteralPropertyProperty value) => value switch + { + UnionFloatLiteralPropertyProperty._43125 => 43.125F, + UnionFloatLiteralPropertyProperty._46875 => 46.875F, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionFloatLiteralPropertyProperty value.") + }; + + public static UnionFloatLiteralPropertyProperty ToUnionFloatLiteralPropertyProperty(this float value) + { + if (value == 43.125F) return UnionFloatLiteralPropertyProperty._43125; + if (value == 46.875F) return UnionFloatLiteralPropertyProperty._46875; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionFloatLiteralPropertyProperty value."); + } + } +} diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs new file mode 100644 index 00000000000..caee1d7a2c1 --- /dev/null +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralPropertyProperty.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Type.Property.ValueTypes.Models +{ + /// The UnionFloatLiteralPropertyProperty. + public enum UnionFloatLiteralPropertyProperty + { + /// 43.125. + _43125, + /// 46.875. + _46875 + } +} diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs index a29e21f0dde..05d815a1cfa 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralProperty.Serialization.cs @@ -29,14 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteStartObject(); writer.WritePropertyName("property"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Property); -#else - using (JsonDocument document = JsonDocument.Parse(Property)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue((int)Property); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,14 +68,14 @@ internal static UnionIntLiteralProperty DeserializeUnionIntLiteralProperty(JsonE { return null; } - BinaryData property = default; + UnionIntLiteralPropertyProperty property = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property0 in element.EnumerateObject()) { if (property0.NameEquals("property"u8)) { - property = BinaryData.FromString(property0.Value.GetRawText()); + property = property0.Value.GetInt32().ToUnionIntLiteralPropertyProperty(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralProperty.cs index c7db07877a0..f912f4ab210 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralProperty.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralProperty.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Property.ValueTypes; namespace _Type.Property.ValueTypes.Models { @@ -48,18 +47,15 @@ public partial class UnionIntLiteralProperty /// Initializes a new instance of . /// Property. - /// is null. - public UnionIntLiteralProperty(BinaryData property) + public UnionIntLiteralProperty(UnionIntLiteralPropertyProperty property) { - Argument.AssertNotNull(property, nameof(property)); - Property = property; } /// Initializes a new instance of . /// Property. /// Keeps track of any properties unknown to the library. - internal UnionIntLiteralProperty(BinaryData property, IDictionary serializedAdditionalRawData) + internal UnionIntLiteralProperty(UnionIntLiteralPropertyProperty property, IDictionary serializedAdditionalRawData) { Property = property; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -70,47 +66,7 @@ internal UnionIntLiteralProperty() { } - /// - /// Property - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 42 - /// - /// - /// 43 - /// - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - public BinaryData Property { get; set; } + /// Property. + public UnionIntLiteralPropertyProperty Property { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralPropertyProperty.Serialization.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralPropertyProperty.Serialization.cs new file mode 100644 index 00000000000..3ef502aed76 --- /dev/null +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralPropertyProperty.Serialization.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Property.ValueTypes.Models +{ + internal static partial class UnionIntLiteralPropertyPropertyExtensions + { + public static UnionIntLiteralPropertyProperty ToUnionIntLiteralPropertyProperty(this int value) + { + if (value == 42) return UnionIntLiteralPropertyProperty._42; + if (value == 43) return UnionIntLiteralPropertyProperty._43; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionIntLiteralPropertyProperty value."); + } + } +} diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralPropertyProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralPropertyProperty.cs new file mode 100644 index 00000000000..08d477efff1 --- /dev/null +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionIntLiteralPropertyProperty.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Type.Property.ValueTypes.Models +{ + /// The UnionIntLiteralPropertyProperty. + public enum UnionIntLiteralPropertyProperty + { + /// 42. + _42 = 42, + /// 43. + _43 = 43 + } +} diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs index 69b3c351d4b..d31a0fcf7c8 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralProperty.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteStartObject(); writer.WritePropertyName("property"u8); - writer.WriteStringValue(Property.ToString()); + writer.WriteStringValue(Property.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,7 +75,7 @@ internal static UnionStringLiteralProperty DeserializeUnionStringLiteralProperty { if (property0.NameEquals("property"u8)) { - property = new UnionStringLiteralPropertyProperty(property0.Value.GetString()); + property = property0.Value.GetString().ToUnionStringLiteralPropertyProperty(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralPropertyProperty.Serialization.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralPropertyProperty.Serialization.cs new file mode 100644 index 00000000000..1db07677ef3 --- /dev/null +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralPropertyProperty.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Property.ValueTypes.Models +{ + internal static partial class UnionStringLiteralPropertyPropertyExtensions + { + public static string ToSerialString(this UnionStringLiteralPropertyProperty value) => value switch + { + UnionStringLiteralPropertyProperty.Hello => "hello", + UnionStringLiteralPropertyProperty.World => "world", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionStringLiteralPropertyProperty value.") + }; + + public static UnionStringLiteralPropertyProperty ToUnionStringLiteralPropertyProperty(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "hello")) return UnionStringLiteralPropertyProperty.Hello; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "world")) return UnionStringLiteralPropertyProperty.World; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UnionStringLiteralPropertyProperty value."); + } + } +} diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralPropertyProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralPropertyProperty.cs index ee90de5762e..9d03f1410fb 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralPropertyProperty.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionStringLiteralPropertyProperty.cs @@ -5,47 +5,14 @@ #nullable disable -using System; -using System.ComponentModel; - namespace _Type.Property.ValueTypes.Models { - /// Enum for property in UnionStringLiteralProperty. - public readonly partial struct UnionStringLiteralPropertyProperty : IEquatable + /// The UnionStringLiteralPropertyProperty. + public enum UnionStringLiteralPropertyProperty { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public UnionStringLiteralPropertyProperty(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string HelloValue = "hello"; - private const string WorldValue = "world"; - /// hello. - public static UnionStringLiteralPropertyProperty Hello { get; } = new UnionStringLiteralPropertyProperty(HelloValue); + Hello, /// world. - public static UnionStringLiteralPropertyProperty World { get; } = new UnionStringLiteralPropertyProperty(WorldValue); - /// Determines if two values are the same. - public static bool operator ==(UnionStringLiteralPropertyProperty left, UnionStringLiteralPropertyProperty right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UnionStringLiteralPropertyProperty left, UnionStringLiteralPropertyProperty right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UnionStringLiteralPropertyProperty(string value) => new UnionStringLiteralPropertyProperty(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UnionStringLiteralPropertyProperty other && Equals(other); - /// - public bool Equals(UnionStringLiteralPropertyProperty other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + World } } diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json index ca92d558c3c..bfcb800a5d8 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "FixedInnerEnum", - "EnumValueType": "String", + "EnumValueType": "string", "AllowedValues": [ { "$id": "3", @@ -110,11 +110,77 @@ "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" + }, + { + "$id": "14", + "Kind": "Enum", + "Name": "UnionStringLiteralPropertyProperty", + "EnumValueType": "string", + "AllowedValues": [ + { + "$id": "15", + "Name": "hello", + "Value": "hello" + }, + { + "$id": "16", + "Name": "world", + "Value": "world" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "17", + "Kind": "Enum", + "Name": "UnionIntLiteralPropertyProperty", + "EnumValueType": "int32", + "AllowedValues": [ + { + "$id": "18", + "Name": "42", + "Value": 42 + }, + { + "$id": "19", + "Name": "43", + "Value": 43 + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "20", + "Kind": "Enum", + "Name": "UnionFloatLiteralPropertyProperty", + "EnumValueType": "float32", + "AllowedValues": [ + { + "$id": "21", + "Name": "43.125", + "Value": 43.125 + }, + { + "$id": "22", + "Name": "46.875", + "Value": 46.875 + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" } ], "Models": [ { - "$id": "14", + "$id": "23", "Kind": "Model", "Name": "BooleanProperty", "Namespace": "Type.Property.ValueTypes", @@ -123,23 +189,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "15", + "$id": "24", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "16", + "$id": "25", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "17", + "$id": "26", "Kind": "Model", "Name": "StringProperty", "Namespace": "Type.Property.ValueTypes", @@ -148,23 +215,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "18", + "$id": "27", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "19", + "$id": "28", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "20", + "$id": "29", "Kind": "Model", "Name": "BytesProperty", "Namespace": "Type.Property.ValueTypes", @@ -173,23 +241,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "21", + "$id": "30", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "22", + "$id": "31", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "23", + "$id": "32", "Kind": "Model", "Name": "IntProperty", "Namespace": "Type.Property.ValueTypes", @@ -198,23 +267,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "24", + "$id": "33", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "25", + "$id": "34", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "26", + "$id": "35", "Kind": "Model", "Name": "FloatProperty", "Namespace": "Type.Property.ValueTypes", @@ -223,23 +293,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "27", + "$id": "36", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "28", + "$id": "37", "Kind": "Primitive", "Name": "Float32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "29", + "$id": "38", "Kind": "Model", "Name": "DecimalProperty", "Namespace": "Type.Property.ValueTypes", @@ -248,23 +319,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "30", + "$id": "39", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "31", + "$id": "40", "Kind": "Primitive", "Name": "Decimal", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "32", + "$id": "41", "Kind": "Model", "Name": "Decimal128Property", "Namespace": "Type.Property.ValueTypes", @@ -273,23 +345,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "33", + "$id": "42", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "34", + "$id": "43", "Kind": "Primitive", "Name": "Decimal128", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "35", + "$id": "44", "Kind": "Model", "Name": "DatetimeProperty", "Namespace": "Type.Property.ValueTypes", @@ -298,23 +371,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "36", + "$id": "45", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "37", + "$id": "46", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "38", + "$id": "47", "Kind": "Model", "Name": "DurationProperty", "Namespace": "Type.Property.ValueTypes", @@ -323,23 +397,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "39", + "$id": "48", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "40", + "$id": "49", "Kind": "Primitive", "Name": "DurationISO8601", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "41", + "$id": "50", "Kind": "Model", "Name": "EnumProperty", "Namespace": "Type.Property.ValueTypes", @@ -348,7 +423,7 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "42", + "$id": "51", "Name": "property", "SerializedName": "property", "Description": "Property", @@ -356,12 +431,13 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "43", + "$id": "52", "Kind": "Model", "Name": "ExtensibleEnumProperty", "Namespace": "Type.Property.ValueTypes", @@ -370,7 +446,7 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "44", + "$id": "53", "Name": "property", "SerializedName": "property", "Description": "Property", @@ -378,12 +454,13 @@ "$ref": "5" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "45", + "$id": "54", "Kind": "Model", "Name": "ModelProperty", "Namespace": "Type.Property.ValueTypes", @@ -392,12 +469,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "46", + "$id": "55", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "47", + "$id": "56", "Kind": "Model", "Name": "InnerModel", "Namespace": "Type.Property.ValueTypes", @@ -406,31 +483,33 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "48", + "$id": "57", "Name": "property", "SerializedName": "property", "Description": "Required string property", "Type": { - "$id": "49", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$ref": "47" + "$ref": "56" }, { - "$id": "50", + "$id": "59", "Kind": "Model", "Name": "CollectionsStringProperty", "Namespace": "Type.Property.ValueTypes", @@ -439,16 +518,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "51", + "$id": "60", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "52", + "$id": "61", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "53", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -456,12 +535,13 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "54", + "$id": "63", "Kind": "Model", "Name": "CollectionsIntProperty", "Namespace": "Type.Property.ValueTypes", @@ -470,16 +550,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "55", + "$id": "64", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "56", + "$id": "65", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "57", + "$id": "66", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -487,12 +567,13 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "58", + "$id": "67", "Kind": "Model", "Name": "CollectionsModelProperty", "Namespace": "Type.Property.ValueTypes", @@ -501,26 +582,27 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "59", + "$id": "68", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "60", + "$id": "69", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "47" + "$ref": "56" }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "61", + "$id": "70", "Kind": "Model", "Name": "DictionaryStringProperty", "Namespace": "Type.Property.ValueTypes", @@ -529,22 +611,22 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "62", + "$id": "71", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "63", + "$id": "72", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "64", + "$id": "73", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "65", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -552,12 +634,13 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "66", + "$id": "75", "Kind": "Model", "Name": "NeverProperty", "Namespace": "Type.Property.ValueTypes", @@ -567,7 +650,7 @@ "Properties": [] }, { - "$id": "67", + "$id": "76", "Kind": "Model", "Name": "UnknownStringProperty", "Namespace": "Type.Property.ValueTypes", @@ -576,23 +659,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "68", + "$id": "77", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "69", + "$id": "78", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "70", + "$id": "79", "Kind": "Model", "Name": "UnknownIntProperty", "Namespace": "Type.Property.ValueTypes", @@ -601,23 +685,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "71", + "$id": "80", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "72", + "$id": "81", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "73", + "$id": "82", "Kind": "Model", "Name": "UnknownDictProperty", "Namespace": "Type.Property.ValueTypes", @@ -626,23 +711,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "74", + "$id": "83", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "75", + "$id": "84", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "76", + "$id": "85", "Kind": "Model", "Name": "UnknownArrayProperty", "Namespace": "Type.Property.ValueTypes", @@ -651,23 +737,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "77", + "$id": "86", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "78", + "$id": "87", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "79", + "$id": "88", "Kind": "Model", "Name": "StringLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -676,12 +763,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "80", + "$id": "89", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "81", + "$id": "90", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -691,12 +778,13 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "82", + "$id": "91", "Kind": "Model", "Name": "IntLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -705,12 +793,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "83", + "$id": "92", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "84", + "$id": "93", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -720,12 +808,13 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "85", + "$id": "94", "Kind": "Model", "Name": "FloatLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -734,12 +823,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "86", + "$id": "95", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "87", + "$id": "96", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -749,12 +838,13 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "88", + "$id": "97", "Kind": "Model", "Name": "BooleanLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -763,16 +853,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "89", + "$id": "98", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "90", + "$id": "99", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "91", + "$id": "100", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -781,12 +871,13 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "92", + "$id": "101", "Kind": "Model", "Name": "UnionStringLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -795,51 +886,21 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "93", + "$id": "102", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "94", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "95", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "96", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "hello", - "IsNullable": false - }, - { - "$id": "97", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "98", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "world", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "14" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "99", + "$id": "103", "Kind": "Model", "Name": "UnionIntLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -848,51 +909,21 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "100", + "$id": "104", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "101", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "102", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "103", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 42, - "IsNullable": false - }, - { - "$id": "104", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "105", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 43, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "17" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, { - "$id": "106", + "$id": "105", "Kind": "Model", "Name": "UnionFloatLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -901,79 +932,49 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "107", + "$id": "106", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "108", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "109", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "110", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 43.125, - "IsNullable": false - }, - { - "$id": "111", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "112", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 46.875, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "20" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } ], "Clients": [ { - "$id": "113", + "$id": "107", "Name": "ValueTypesClient", "Description": "", "Operations": [], "Protocol": { - "$id": "114" + "$id": "108" }, "Creatable": true }, { - "$id": "115", + "$id": "109", "Name": "Boolean", "Description": "", "Operations": [ { - "$id": "116", + "$id": "110", "Name": "get", "ResourceName": "Boolean", "Description": "Get call", "Parameters": [ { - "$id": "117", + "$id": "111", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "118", + "$id": "112", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -988,9 +989,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "119", + "$id": "113", "Type": { - "$id": "120", + "$id": "114", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -999,11 +1000,11 @@ } }, { - "$id": "121", + "$id": "115", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "122", + "$id": "116", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1018,9 +1019,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "123", + "$id": "117", "Type": { - "$ref": "122" + "$ref": "116" }, "Value": "application/json" } @@ -1028,12 +1029,12 @@ ], "Responses": [ { - "$id": "124", + "$id": "118", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "14" + "$ref": "23" }, "BodyMediaType": "Json", "Headers": [], @@ -1052,21 +1053,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "125", + "$id": "119", "Name": "put", "ResourceName": "Boolean", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "126", + "$id": "120", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "14" + "$ref": "23" }, "Location": "Body", "IsRequired": true, @@ -1079,11 +1080,11 @@ "Kind": "Method" }, { - "$id": "127", + "$id": "121", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "128", + "$id": "122", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1098,19 +1099,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "129", + "$id": "123", "Type": { - "$ref": "128" + "$ref": "122" }, "Value": "application/json" } }, { - "$id": "130", + "$id": "124", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "131", + "$id": "125", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1125,9 +1126,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "132", + "$id": "126", "Type": { - "$ref": "131" + "$ref": "125" }, "Value": "application/json" } @@ -1135,7 +1136,7 @@ ], "Responses": [ { - "$id": "133", + "$id": "127", "StatusCodes": [ 204 ], @@ -1157,31 +1158,31 @@ } ], "Protocol": { - "$id": "134" + "$id": "128" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "135", + "$id": "129", "Name": "String", "Description": "", "Operations": [ { - "$id": "136", + "$id": "130", "Name": "get", "ResourceName": "String", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "137", + "$id": "131", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "138", + "$id": "132", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1196,9 +1197,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "139", + "$id": "133", "Type": { - "$ref": "138" + "$ref": "132" }, "Value": "application/json" } @@ -1206,12 +1207,12 @@ ], "Responses": [ { - "$id": "140", + "$id": "134", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "26" }, "BodyMediaType": "Json", "Headers": [], @@ -1230,21 +1231,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "141", + "$id": "135", "Name": "put", "ResourceName": "String", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "142", + "$id": "136", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "17" + "$ref": "26" }, "Location": "Body", "IsRequired": true, @@ -1257,11 +1258,11 @@ "Kind": "Method" }, { - "$id": "143", + "$id": "137", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "144", + "$id": "138", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1276,19 +1277,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "145", + "$id": "139", "Type": { - "$ref": "144" + "$ref": "138" }, "Value": "application/json" } }, { - "$id": "146", + "$id": "140", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "147", + "$id": "141", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1303,9 +1304,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "148", + "$id": "142", "Type": { - "$ref": "147" + "$ref": "141" }, "Value": "application/json" } @@ -1313,7 +1314,7 @@ ], "Responses": [ { - "$id": "149", + "$id": "143", "StatusCodes": [ 204 ], @@ -1335,31 +1336,31 @@ } ], "Protocol": { - "$id": "150" + "$id": "144" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "151", + "$id": "145", "Name": "Bytes", "Description": "", "Operations": [ { - "$id": "152", + "$id": "146", "Name": "get", "ResourceName": "Bytes", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "153", + "$id": "147", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "154", + "$id": "148", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1374,9 +1375,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "155", + "$id": "149", "Type": { - "$ref": "154" + "$ref": "148" }, "Value": "application/json" } @@ -1384,12 +1385,12 @@ ], "Responses": [ { - "$id": "156", + "$id": "150", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "20" + "$ref": "29" }, "BodyMediaType": "Json", "Headers": [], @@ -1408,21 +1409,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "157", + "$id": "151", "Name": "put", "ResourceName": "Bytes", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "158", + "$id": "152", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "20" + "$ref": "29" }, "Location": "Body", "IsRequired": true, @@ -1435,11 +1436,11 @@ "Kind": "Method" }, { - "$id": "159", + "$id": "153", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "160", + "$id": "154", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1454,19 +1455,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "161", + "$id": "155", "Type": { - "$ref": "160" + "$ref": "154" }, "Value": "application/json" } }, { - "$id": "162", + "$id": "156", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "163", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1481,9 +1482,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "164", + "$id": "158", "Type": { - "$ref": "163" + "$ref": "157" }, "Value": "application/json" } @@ -1491,7 +1492,7 @@ ], "Responses": [ { - "$id": "165", + "$id": "159", "StatusCodes": [ 204 ], @@ -1513,31 +1514,31 @@ } ], "Protocol": { - "$id": "166" + "$id": "160" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "167", + "$id": "161", "Name": "Int", "Description": "", "Operations": [ { - "$id": "168", + "$id": "162", "Name": "get", "ResourceName": "Int", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "169", + "$id": "163", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "170", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1552,9 +1553,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "171", + "$id": "165", "Type": { - "$ref": "170" + "$ref": "164" }, "Value": "application/json" } @@ -1562,12 +1563,12 @@ ], "Responses": [ { - "$id": "172", + "$id": "166", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "23" + "$ref": "32" }, "BodyMediaType": "Json", "Headers": [], @@ -1586,21 +1587,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "173", + "$id": "167", "Name": "put", "ResourceName": "Int", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "174", + "$id": "168", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "23" + "$ref": "32" }, "Location": "Body", "IsRequired": true, @@ -1613,11 +1614,11 @@ "Kind": "Method" }, { - "$id": "175", + "$id": "169", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "176", + "$id": "170", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1632,19 +1633,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "177", + "$id": "171", "Type": { - "$ref": "176" + "$ref": "170" }, "Value": "application/json" } }, { - "$id": "178", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "179", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1659,9 +1660,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "180", + "$id": "174", "Type": { - "$ref": "179" + "$ref": "173" }, "Value": "application/json" } @@ -1669,7 +1670,7 @@ ], "Responses": [ { - "$id": "181", + "$id": "175", "StatusCodes": [ 204 ], @@ -1691,31 +1692,31 @@ } ], "Protocol": { - "$id": "182" + "$id": "176" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "183", + "$id": "177", "Name": "Float", "Description": "", "Operations": [ { - "$id": "184", + "$id": "178", "Name": "get", "ResourceName": "Float", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "185", + "$id": "179", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "186", + "$id": "180", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1730,9 +1731,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "187", + "$id": "181", "Type": { - "$ref": "186" + "$ref": "180" }, "Value": "application/json" } @@ -1740,12 +1741,12 @@ ], "Responses": [ { - "$id": "188", + "$id": "182", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "26" + "$ref": "35" }, "BodyMediaType": "Json", "Headers": [], @@ -1764,21 +1765,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "189", + "$id": "183", "Name": "put", "ResourceName": "Float", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "190", + "$id": "184", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "26" + "$ref": "35" }, "Location": "Body", "IsRequired": true, @@ -1791,11 +1792,11 @@ "Kind": "Method" }, { - "$id": "191", + "$id": "185", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "192", + "$id": "186", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1810,19 +1811,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "193", + "$id": "187", "Type": { - "$ref": "192" + "$ref": "186" }, "Value": "application/json" } }, { - "$id": "194", + "$id": "188", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "195", + "$id": "189", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1837,9 +1838,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "196", + "$id": "190", "Type": { - "$ref": "195" + "$ref": "189" }, "Value": "application/json" } @@ -1847,7 +1848,7 @@ ], "Responses": [ { - "$id": "197", + "$id": "191", "StatusCodes": [ 204 ], @@ -1869,31 +1870,31 @@ } ], "Protocol": { - "$id": "198" + "$id": "192" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "199", + "$id": "193", "Name": "Decimal", "Description": "", "Operations": [ { - "$id": "200", + "$id": "194", "Name": "get", "ResourceName": "Decimal", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "201", + "$id": "195", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "196", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1908,9 +1909,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "197", "Type": { - "$ref": "202" + "$ref": "196" }, "Value": "application/json" } @@ -1918,12 +1919,12 @@ ], "Responses": [ { - "$id": "204", + "$id": "198", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "29" + "$ref": "38" }, "BodyMediaType": "Json", "Headers": [], @@ -1942,21 +1943,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "205", + "$id": "199", "Name": "put", "ResourceName": "Decimal", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "206", + "$id": "200", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "29" + "$ref": "38" }, "Location": "Body", "IsRequired": true, @@ -1969,11 +1970,11 @@ "Kind": "Method" }, { - "$id": "207", + "$id": "201", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "208", + "$id": "202", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1988,19 +1989,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "209", + "$id": "203", "Type": { - "$ref": "208" + "$ref": "202" }, "Value": "application/json" } }, { - "$id": "210", + "$id": "204", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "211", + "$id": "205", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2015,9 +2016,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "212", + "$id": "206", "Type": { - "$ref": "211" + "$ref": "205" }, "Value": "application/json" } @@ -2025,7 +2026,7 @@ ], "Responses": [ { - "$id": "213", + "$id": "207", "StatusCodes": [ 204 ], @@ -2047,31 +2048,31 @@ } ], "Protocol": { - "$id": "214" + "$id": "208" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "215", + "$id": "209", "Name": "Decimal128", "Description": "", "Operations": [ { - "$id": "216", + "$id": "210", "Name": "get", "ResourceName": "Decimal128", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "217", + "$id": "211", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "218", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2086,9 +2087,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "219", + "$id": "213", "Type": { - "$ref": "218" + "$ref": "212" }, "Value": "application/json" } @@ -2096,12 +2097,12 @@ ], "Responses": [ { - "$id": "220", + "$id": "214", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "41" }, "BodyMediaType": "Json", "Headers": [], @@ -2120,21 +2121,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "221", + "$id": "215", "Name": "put", "ResourceName": "Decimal128", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "222", + "$id": "216", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "32" + "$ref": "41" }, "Location": "Body", "IsRequired": true, @@ -2147,11 +2148,11 @@ "Kind": "Method" }, { - "$id": "223", + "$id": "217", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "224", + "$id": "218", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2166,19 +2167,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "225", + "$id": "219", "Type": { - "$ref": "224" + "$ref": "218" }, "Value": "application/json" } }, { - "$id": "226", + "$id": "220", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "227", + "$id": "221", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2193,9 +2194,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "228", + "$id": "222", "Type": { - "$ref": "227" + "$ref": "221" }, "Value": "application/json" } @@ -2203,7 +2204,7 @@ ], "Responses": [ { - "$id": "229", + "$id": "223", "StatusCodes": [ 204 ], @@ -2225,31 +2226,31 @@ } ], "Protocol": { - "$id": "230" + "$id": "224" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "231", + "$id": "225", "Name": "Datetime", "Description": "", "Operations": [ { - "$id": "232", + "$id": "226", "Name": "get", "ResourceName": "Datetime", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "233", + "$id": "227", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "234", + "$id": "228", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2264,9 +2265,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "235", + "$id": "229", "Type": { - "$ref": "234" + "$ref": "228" }, "Value": "application/json" } @@ -2274,12 +2275,12 @@ ], "Responses": [ { - "$id": "236", + "$id": "230", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "35" + "$ref": "44" }, "BodyMediaType": "Json", "Headers": [], @@ -2298,21 +2299,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "237", + "$id": "231", "Name": "put", "ResourceName": "Datetime", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "238", + "$id": "232", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "35" + "$ref": "44" }, "Location": "Body", "IsRequired": true, @@ -2325,11 +2326,11 @@ "Kind": "Method" }, { - "$id": "239", + "$id": "233", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "240", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2344,19 +2345,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "241", + "$id": "235", "Type": { - "$ref": "240" + "$ref": "234" }, "Value": "application/json" } }, { - "$id": "242", + "$id": "236", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "243", + "$id": "237", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2371,9 +2372,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "244", + "$id": "238", "Type": { - "$ref": "243" + "$ref": "237" }, "Value": "application/json" } @@ -2381,7 +2382,7 @@ ], "Responses": [ { - "$id": "245", + "$id": "239", "StatusCodes": [ 204 ], @@ -2403,31 +2404,31 @@ } ], "Protocol": { - "$id": "246" + "$id": "240" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "247", + "$id": "241", "Name": "Duration", "Description": "", "Operations": [ { - "$id": "248", + "$id": "242", "Name": "get", "ResourceName": "Duration", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "249", + "$id": "243", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "250", + "$id": "244", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2442,9 +2443,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "251", + "$id": "245", "Type": { - "$ref": "250" + "$ref": "244" }, "Value": "application/json" } @@ -2452,12 +2453,12 @@ ], "Responses": [ { - "$id": "252", + "$id": "246", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "38" + "$ref": "47" }, "BodyMediaType": "Json", "Headers": [], @@ -2476,21 +2477,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "253", + "$id": "247", "Name": "put", "ResourceName": "Duration", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "254", + "$id": "248", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "38" + "$ref": "47" }, "Location": "Body", "IsRequired": true, @@ -2503,11 +2504,11 @@ "Kind": "Method" }, { - "$id": "255", + "$id": "249", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "256", + "$id": "250", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2522,19 +2523,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "257", + "$id": "251", "Type": { - "$ref": "256" + "$ref": "250" }, "Value": "application/json" } }, { - "$id": "258", + "$id": "252", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "259", + "$id": "253", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2549,9 +2550,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "260", + "$id": "254", "Type": { - "$ref": "259" + "$ref": "253" }, "Value": "application/json" } @@ -2559,7 +2560,7 @@ ], "Responses": [ { - "$id": "261", + "$id": "255", "StatusCodes": [ 204 ], @@ -2581,31 +2582,31 @@ } ], "Protocol": { - "$id": "262" + "$id": "256" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "263", + "$id": "257", "Name": "Enum", "Description": "", "Operations": [ { - "$id": "264", + "$id": "258", "Name": "get", "ResourceName": "Enum", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "265", + "$id": "259", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "266", + "$id": "260", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2620,9 +2621,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "267", + "$id": "261", "Type": { - "$ref": "266" + "$ref": "260" }, "Value": "application/json" } @@ -2630,12 +2631,12 @@ ], "Responses": [ { - "$id": "268", + "$id": "262", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "41" + "$ref": "50" }, "BodyMediaType": "Json", "Headers": [], @@ -2654,21 +2655,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "269", + "$id": "263", "Name": "put", "ResourceName": "Enum", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "270", + "$id": "264", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "41" + "$ref": "50" }, "Location": "Body", "IsRequired": true, @@ -2681,11 +2682,11 @@ "Kind": "Method" }, { - "$id": "271", + "$id": "265", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "272", + "$id": "266", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2700,19 +2701,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "267", "Type": { - "$ref": "272" + "$ref": "266" }, "Value": "application/json" } }, { - "$id": "274", + "$id": "268", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "275", + "$id": "269", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2727,9 +2728,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "276", + "$id": "270", "Type": { - "$ref": "275" + "$ref": "269" }, "Value": "application/json" } @@ -2737,7 +2738,7 @@ ], "Responses": [ { - "$id": "277", + "$id": "271", "StatusCodes": [ 204 ], @@ -2759,31 +2760,31 @@ } ], "Protocol": { - "$id": "278" + "$id": "272" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "279", + "$id": "273", "Name": "ExtensibleEnum", "Description": "", "Operations": [ { - "$id": "280", + "$id": "274", "Name": "get", "ResourceName": "ExtensibleEnum", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "281", + "$id": "275", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "282", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2798,9 +2799,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "283", + "$id": "277", "Type": { - "$ref": "282" + "$ref": "276" }, "Value": "application/json" } @@ -2808,12 +2809,12 @@ ], "Responses": [ { - "$id": "284", + "$id": "278", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "43" + "$ref": "52" }, "BodyMediaType": "Json", "Headers": [], @@ -2832,21 +2833,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "285", + "$id": "279", "Name": "put", "ResourceName": "ExtensibleEnum", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "286", + "$id": "280", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "43" + "$ref": "52" }, "Location": "Body", "IsRequired": true, @@ -2859,11 +2860,11 @@ "Kind": "Method" }, { - "$id": "287", + "$id": "281", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "288", + "$id": "282", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2878,19 +2879,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "289", + "$id": "283", "Type": { - "$ref": "288" + "$ref": "282" }, "Value": "application/json" } }, { - "$id": "290", + "$id": "284", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "291", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2905,9 +2906,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "286", "Type": { - "$ref": "291" + "$ref": "285" }, "Value": "application/json" } @@ -2915,7 +2916,7 @@ ], "Responses": [ { - "$id": "293", + "$id": "287", "StatusCodes": [ 204 ], @@ -2937,31 +2938,31 @@ } ], "Protocol": { - "$id": "294" + "$id": "288" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "295", + "$id": "289", "Name": "Model", "Description": "", "Operations": [ { - "$id": "296", + "$id": "290", "Name": "get", "ResourceName": "Model", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "297", + "$id": "291", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "298", + "$id": "292", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2976,9 +2977,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "299", + "$id": "293", "Type": { - "$ref": "298" + "$ref": "292" }, "Value": "application/json" } @@ -2986,12 +2987,12 @@ ], "Responses": [ { - "$id": "300", + "$id": "294", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "45" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -3010,21 +3011,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "301", + "$id": "295", "Name": "put", "ResourceName": "Model", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "302", + "$id": "296", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "45" + "$ref": "54" }, "Location": "Body", "IsRequired": true, @@ -3037,11 +3038,11 @@ "Kind": "Method" }, { - "$id": "303", + "$id": "297", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "304", + "$id": "298", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3056,19 +3057,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "305", + "$id": "299", "Type": { - "$ref": "304" + "$ref": "298" }, "Value": "application/json" } }, { - "$id": "306", + "$id": "300", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "307", + "$id": "301", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3083,9 +3084,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "308", + "$id": "302", "Type": { - "$ref": "307" + "$ref": "301" }, "Value": "application/json" } @@ -3093,7 +3094,7 @@ ], "Responses": [ { - "$id": "309", + "$id": "303", "StatusCodes": [ 204 ], @@ -3115,31 +3116,31 @@ } ], "Protocol": { - "$id": "310" + "$id": "304" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "311", + "$id": "305", "Name": "CollectionsString", "Description": "", "Operations": [ { - "$id": "312", + "$id": "306", "Name": "get", "ResourceName": "CollectionsString", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "313", + "$id": "307", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "314", + "$id": "308", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3154,9 +3155,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "315", + "$id": "309", "Type": { - "$ref": "314" + "$ref": "308" }, "Value": "application/json" } @@ -3164,12 +3165,12 @@ ], "Responses": [ { - "$id": "316", + "$id": "310", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "50" + "$ref": "59" }, "BodyMediaType": "Json", "Headers": [], @@ -3188,21 +3189,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "317", + "$id": "311", "Name": "put", "ResourceName": "CollectionsString", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "318", + "$id": "312", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "50" + "$ref": "59" }, "Location": "Body", "IsRequired": true, @@ -3215,11 +3216,11 @@ "Kind": "Method" }, { - "$id": "319", + "$id": "313", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "320", + "$id": "314", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3234,19 +3235,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "321", + "$id": "315", "Type": { - "$ref": "320" + "$ref": "314" }, "Value": "application/json" } }, { - "$id": "322", + "$id": "316", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "323", + "$id": "317", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3261,9 +3262,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "324", + "$id": "318", "Type": { - "$ref": "323" + "$ref": "317" }, "Value": "application/json" } @@ -3271,7 +3272,7 @@ ], "Responses": [ { - "$id": "325", + "$id": "319", "StatusCodes": [ 204 ], @@ -3293,31 +3294,31 @@ } ], "Protocol": { - "$id": "326" + "$id": "320" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "327", + "$id": "321", "Name": "CollectionsInt", "Description": "", "Operations": [ { - "$id": "328", + "$id": "322", "Name": "get", "ResourceName": "CollectionsInt", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "329", + "$id": "323", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "330", + "$id": "324", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3332,9 +3333,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "331", + "$id": "325", "Type": { - "$ref": "330" + "$ref": "324" }, "Value": "application/json" } @@ -3342,12 +3343,12 @@ ], "Responses": [ { - "$id": "332", + "$id": "326", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "54" + "$ref": "63" }, "BodyMediaType": "Json", "Headers": [], @@ -3366,21 +3367,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "333", + "$id": "327", "Name": "put", "ResourceName": "CollectionsInt", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "334", + "$id": "328", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "54" + "$ref": "63" }, "Location": "Body", "IsRequired": true, @@ -3393,11 +3394,11 @@ "Kind": "Method" }, { - "$id": "335", + "$id": "329", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "336", + "$id": "330", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3412,19 +3413,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "337", + "$id": "331", "Type": { - "$ref": "336" + "$ref": "330" }, "Value": "application/json" } }, { - "$id": "338", + "$id": "332", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "339", + "$id": "333", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3439,9 +3440,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "340", + "$id": "334", "Type": { - "$ref": "339" + "$ref": "333" }, "Value": "application/json" } @@ -3449,7 +3450,7 @@ ], "Responses": [ { - "$id": "341", + "$id": "335", "StatusCodes": [ 204 ], @@ -3471,31 +3472,31 @@ } ], "Protocol": { - "$id": "342" + "$id": "336" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "343", + "$id": "337", "Name": "CollectionsModel", "Description": "", "Operations": [ { - "$id": "344", + "$id": "338", "Name": "get", "ResourceName": "CollectionsModel", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "345", + "$id": "339", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "346", + "$id": "340", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3510,9 +3511,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "347", + "$id": "341", "Type": { - "$ref": "346" + "$ref": "340" }, "Value": "application/json" } @@ -3520,12 +3521,12 @@ ], "Responses": [ { - "$id": "348", + "$id": "342", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "58" + "$ref": "67" }, "BodyMediaType": "Json", "Headers": [], @@ -3544,21 +3545,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "349", + "$id": "343", "Name": "put", "ResourceName": "CollectionsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "350", + "$id": "344", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "58" + "$ref": "67" }, "Location": "Body", "IsRequired": true, @@ -3571,11 +3572,11 @@ "Kind": "Method" }, { - "$id": "351", + "$id": "345", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "352", + "$id": "346", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3590,19 +3591,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "353", + "$id": "347", "Type": { - "$ref": "352" + "$ref": "346" }, "Value": "application/json" } }, { - "$id": "354", + "$id": "348", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "355", + "$id": "349", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3617,9 +3618,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "356", + "$id": "350", "Type": { - "$ref": "355" + "$ref": "349" }, "Value": "application/json" } @@ -3627,7 +3628,7 @@ ], "Responses": [ { - "$id": "357", + "$id": "351", "StatusCodes": [ 204 ], @@ -3649,31 +3650,31 @@ } ], "Protocol": { - "$id": "358" + "$id": "352" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "359", + "$id": "353", "Name": "DictionaryString", "Description": "", "Operations": [ { - "$id": "360", + "$id": "354", "Name": "get", "ResourceName": "DictionaryString", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "361", + "$id": "355", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "362", + "$id": "356", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3688,9 +3689,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "363", + "$id": "357", "Type": { - "$ref": "362" + "$ref": "356" }, "Value": "application/json" } @@ -3698,12 +3699,12 @@ ], "Responses": [ { - "$id": "364", + "$id": "358", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "61" + "$ref": "70" }, "BodyMediaType": "Json", "Headers": [], @@ -3722,21 +3723,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "365", + "$id": "359", "Name": "put", "ResourceName": "DictionaryString", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "366", + "$id": "360", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "61" + "$ref": "70" }, "Location": "Body", "IsRequired": true, @@ -3749,11 +3750,11 @@ "Kind": "Method" }, { - "$id": "367", + "$id": "361", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "368", + "$id": "362", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3768,19 +3769,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "369", + "$id": "363", "Type": { - "$ref": "368" + "$ref": "362" }, "Value": "application/json" } }, { - "$id": "370", + "$id": "364", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "371", + "$id": "365", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3795,9 +3796,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "372", + "$id": "366", "Type": { - "$ref": "371" + "$ref": "365" }, "Value": "application/json" } @@ -3805,7 +3806,7 @@ ], "Responses": [ { - "$id": "373", + "$id": "367", "StatusCodes": [ 204 ], @@ -3827,31 +3828,31 @@ } ], "Protocol": { - "$id": "374" + "$id": "368" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "375", + "$id": "369", "Name": "Never", "Description": "", "Operations": [ { - "$id": "376", + "$id": "370", "Name": "get", "ResourceName": "Never", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "377", + "$id": "371", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "378", + "$id": "372", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3866,9 +3867,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "379", + "$id": "373", "Type": { - "$ref": "378" + "$ref": "372" }, "Value": "application/json" } @@ -3876,12 +3877,12 @@ ], "Responses": [ { - "$id": "380", + "$id": "374", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "66" + "$ref": "75" }, "BodyMediaType": "Json", "Headers": [], @@ -3900,21 +3901,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "381", + "$id": "375", "Name": "put", "ResourceName": "Never", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "382", + "$id": "376", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "66" + "$ref": "75" }, "Location": "Body", "IsRequired": true, @@ -3927,11 +3928,11 @@ "Kind": "Method" }, { - "$id": "383", + "$id": "377", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "384", + "$id": "378", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3946,19 +3947,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "385", + "$id": "379", "Type": { - "$ref": "384" + "$ref": "378" }, "Value": "application/json" } }, { - "$id": "386", + "$id": "380", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "387", + "$id": "381", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3973,9 +3974,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "388", + "$id": "382", "Type": { - "$ref": "387" + "$ref": "381" }, "Value": "application/json" } @@ -3983,7 +3984,7 @@ ], "Responses": [ { - "$id": "389", + "$id": "383", "StatusCodes": [ 204 ], @@ -4005,31 +4006,31 @@ } ], "Protocol": { - "$id": "390" + "$id": "384" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "391", + "$id": "385", "Name": "UnknownString", "Description": "", "Operations": [ { - "$id": "392", + "$id": "386", "Name": "get", "ResourceName": "UnknownString", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "393", + "$id": "387", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "394", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4044,9 +4045,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "395", + "$id": "389", "Type": { - "$ref": "394" + "$ref": "388" }, "Value": "application/json" } @@ -4054,12 +4055,12 @@ ], "Responses": [ { - "$id": "396", + "$id": "390", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "67" + "$ref": "76" }, "BodyMediaType": "Json", "Headers": [], @@ -4078,21 +4079,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "397", + "$id": "391", "Name": "put", "ResourceName": "UnknownString", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "398", + "$id": "392", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "67" + "$ref": "76" }, "Location": "Body", "IsRequired": true, @@ -4105,11 +4106,11 @@ "Kind": "Method" }, { - "$id": "399", + "$id": "393", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "400", + "$id": "394", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4124,19 +4125,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "401", + "$id": "395", "Type": { - "$ref": "400" + "$ref": "394" }, "Value": "application/json" } }, { - "$id": "402", + "$id": "396", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "403", + "$id": "397", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4151,9 +4152,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "404", + "$id": "398", "Type": { - "$ref": "403" + "$ref": "397" }, "Value": "application/json" } @@ -4161,7 +4162,7 @@ ], "Responses": [ { - "$id": "405", + "$id": "399", "StatusCodes": [ 204 ], @@ -4183,31 +4184,31 @@ } ], "Protocol": { - "$id": "406" + "$id": "400" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "407", + "$id": "401", "Name": "UnknownInt", "Description": "", "Operations": [ { - "$id": "408", + "$id": "402", "Name": "get", "ResourceName": "UnknownInt", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "409", + "$id": "403", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "410", + "$id": "404", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4222,9 +4223,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "411", + "$id": "405", "Type": { - "$ref": "410" + "$ref": "404" }, "Value": "application/json" } @@ -4232,12 +4233,12 @@ ], "Responses": [ { - "$id": "412", + "$id": "406", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "70" + "$ref": "79" }, "BodyMediaType": "Json", "Headers": [], @@ -4256,21 +4257,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "413", + "$id": "407", "Name": "put", "ResourceName": "UnknownInt", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "414", + "$id": "408", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "70" + "$ref": "79" }, "Location": "Body", "IsRequired": true, @@ -4283,11 +4284,11 @@ "Kind": "Method" }, { - "$id": "415", + "$id": "409", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "416", + "$id": "410", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4302,19 +4303,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "417", + "$id": "411", "Type": { - "$ref": "416" + "$ref": "410" }, "Value": "application/json" } }, { - "$id": "418", + "$id": "412", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "419", + "$id": "413", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4329,9 +4330,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "420", + "$id": "414", "Type": { - "$ref": "419" + "$ref": "413" }, "Value": "application/json" } @@ -4339,7 +4340,7 @@ ], "Responses": [ { - "$id": "421", + "$id": "415", "StatusCodes": [ 204 ], @@ -4361,31 +4362,31 @@ } ], "Protocol": { - "$id": "422" + "$id": "416" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "423", + "$id": "417", "Name": "UnknownDict", "Description": "", "Operations": [ { - "$id": "424", + "$id": "418", "Name": "get", "ResourceName": "UnknownDict", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "425", + "$id": "419", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "426", + "$id": "420", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4400,9 +4401,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "427", + "$id": "421", "Type": { - "$ref": "426" + "$ref": "420" }, "Value": "application/json" } @@ -4410,12 +4411,12 @@ ], "Responses": [ { - "$id": "428", + "$id": "422", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "73" + "$ref": "82" }, "BodyMediaType": "Json", "Headers": [], @@ -4434,21 +4435,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "429", + "$id": "423", "Name": "put", "ResourceName": "UnknownDict", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "430", + "$id": "424", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "73" + "$ref": "82" }, "Location": "Body", "IsRequired": true, @@ -4461,11 +4462,11 @@ "Kind": "Method" }, { - "$id": "431", + "$id": "425", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "432", + "$id": "426", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4480,19 +4481,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "433", + "$id": "427", "Type": { - "$ref": "432" + "$ref": "426" }, "Value": "application/json" } }, { - "$id": "434", + "$id": "428", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "435", + "$id": "429", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4507,9 +4508,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "436", + "$id": "430", "Type": { - "$ref": "435" + "$ref": "429" }, "Value": "application/json" } @@ -4517,7 +4518,7 @@ ], "Responses": [ { - "$id": "437", + "$id": "431", "StatusCodes": [ 204 ], @@ -4539,31 +4540,31 @@ } ], "Protocol": { - "$id": "438" + "$id": "432" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "439", + "$id": "433", "Name": "UnknownArray", "Description": "", "Operations": [ { - "$id": "440", + "$id": "434", "Name": "get", "ResourceName": "UnknownArray", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "441", + "$id": "435", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "442", + "$id": "436", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4578,9 +4579,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "443", + "$id": "437", "Type": { - "$ref": "442" + "$ref": "436" }, "Value": "application/json" } @@ -4588,12 +4589,12 @@ ], "Responses": [ { - "$id": "444", + "$id": "438", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "76" + "$ref": "85" }, "BodyMediaType": "Json", "Headers": [], @@ -4612,21 +4613,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "445", + "$id": "439", "Name": "put", "ResourceName": "UnknownArray", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "446", + "$id": "440", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "76" + "$ref": "85" }, "Location": "Body", "IsRequired": true, @@ -4639,11 +4640,11 @@ "Kind": "Method" }, { - "$id": "447", + "$id": "441", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "448", + "$id": "442", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4658,19 +4659,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "449", + "$id": "443", "Type": { - "$ref": "448" + "$ref": "442" }, "Value": "application/json" } }, { - "$id": "450", + "$id": "444", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "451", + "$id": "445", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4685,9 +4686,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "452", + "$id": "446", "Type": { - "$ref": "451" + "$ref": "445" }, "Value": "application/json" } @@ -4695,7 +4696,7 @@ ], "Responses": [ { - "$id": "453", + "$id": "447", "StatusCodes": [ 204 ], @@ -4717,31 +4718,31 @@ } ], "Protocol": { - "$id": "454" + "$id": "448" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "455", + "$id": "449", "Name": "StringLiteral", "Description": "", "Operations": [ { - "$id": "456", + "$id": "450", "Name": "get", "ResourceName": "StringLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "457", + "$id": "451", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "458", + "$id": "452", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4756,9 +4757,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "459", + "$id": "453", "Type": { - "$ref": "458" + "$ref": "452" }, "Value": "application/json" } @@ -4766,12 +4767,12 @@ ], "Responses": [ { - "$id": "460", + "$id": "454", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "79" + "$ref": "88" }, "BodyMediaType": "Json", "Headers": [], @@ -4790,21 +4791,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "461", + "$id": "455", "Name": "put", "ResourceName": "StringLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "462", + "$id": "456", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "79" + "$ref": "88" }, "Location": "Body", "IsRequired": true, @@ -4817,11 +4818,11 @@ "Kind": "Method" }, { - "$id": "463", + "$id": "457", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "464", + "$id": "458", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4836,19 +4837,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "465", + "$id": "459", "Type": { - "$ref": "464" + "$ref": "458" }, "Value": "application/json" } }, { - "$id": "466", + "$id": "460", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "467", + "$id": "461", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4863,9 +4864,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "468", + "$id": "462", "Type": { - "$ref": "467" + "$ref": "461" }, "Value": "application/json" } @@ -4873,7 +4874,7 @@ ], "Responses": [ { - "$id": "469", + "$id": "463", "StatusCodes": [ 204 ], @@ -4895,31 +4896,31 @@ } ], "Protocol": { - "$id": "470" + "$id": "464" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "471", + "$id": "465", "Name": "IntLiteral", "Description": "", "Operations": [ { - "$id": "472", + "$id": "466", "Name": "get", "ResourceName": "IntLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "473", + "$id": "467", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "474", + "$id": "468", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4934,9 +4935,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "475", + "$id": "469", "Type": { - "$ref": "474" + "$ref": "468" }, "Value": "application/json" } @@ -4944,12 +4945,12 @@ ], "Responses": [ { - "$id": "476", + "$id": "470", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "82" + "$ref": "91" }, "BodyMediaType": "Json", "Headers": [], @@ -4968,21 +4969,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "477", + "$id": "471", "Name": "put", "ResourceName": "IntLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "478", + "$id": "472", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "82" + "$ref": "91" }, "Location": "Body", "IsRequired": true, @@ -4995,11 +4996,11 @@ "Kind": "Method" }, { - "$id": "479", + "$id": "473", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "480", + "$id": "474", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5014,19 +5015,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "481", + "$id": "475", "Type": { - "$ref": "480" + "$ref": "474" }, "Value": "application/json" } }, { - "$id": "482", + "$id": "476", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "483", + "$id": "477", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5041,9 +5042,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "484", + "$id": "478", "Type": { - "$ref": "483" + "$ref": "477" }, "Value": "application/json" } @@ -5051,7 +5052,7 @@ ], "Responses": [ { - "$id": "485", + "$id": "479", "StatusCodes": [ 204 ], @@ -5073,31 +5074,31 @@ } ], "Protocol": { - "$id": "486" + "$id": "480" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "487", + "$id": "481", "Name": "FloatLiteral", "Description": "", "Operations": [ { - "$id": "488", + "$id": "482", "Name": "get", "ResourceName": "FloatLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "489", + "$id": "483", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "490", + "$id": "484", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5112,9 +5113,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "491", + "$id": "485", "Type": { - "$ref": "490" + "$ref": "484" }, "Value": "application/json" } @@ -5122,12 +5123,12 @@ ], "Responses": [ { - "$id": "492", + "$id": "486", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "85" + "$ref": "94" }, "BodyMediaType": "Json", "Headers": [], @@ -5146,21 +5147,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "493", + "$id": "487", "Name": "put", "ResourceName": "FloatLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "494", + "$id": "488", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "85" + "$ref": "94" }, "Location": "Body", "IsRequired": true, @@ -5173,11 +5174,11 @@ "Kind": "Method" }, { - "$id": "495", + "$id": "489", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "496", + "$id": "490", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5192,19 +5193,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "497", + "$id": "491", "Type": { - "$ref": "496" + "$ref": "490" }, "Value": "application/json" } }, { - "$id": "498", + "$id": "492", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "499", + "$id": "493", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5219,9 +5220,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "500", + "$id": "494", "Type": { - "$ref": "499" + "$ref": "493" }, "Value": "application/json" } @@ -5229,7 +5230,7 @@ ], "Responses": [ { - "$id": "501", + "$id": "495", "StatusCodes": [ 204 ], @@ -5251,31 +5252,31 @@ } ], "Protocol": { - "$id": "502" + "$id": "496" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "503", + "$id": "497", "Name": "BooleanLiteral", "Description": "", "Operations": [ { - "$id": "504", + "$id": "498", "Name": "get", "ResourceName": "BooleanLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "505", + "$id": "499", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "506", + "$id": "500", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5290,9 +5291,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "507", + "$id": "501", "Type": { - "$ref": "506" + "$ref": "500" }, "Value": "application/json" } @@ -5300,12 +5301,12 @@ ], "Responses": [ { - "$id": "508", + "$id": "502", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "88" + "$ref": "97" }, "BodyMediaType": "Json", "Headers": [], @@ -5324,21 +5325,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "509", + "$id": "503", "Name": "put", "ResourceName": "BooleanLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "510", + "$id": "504", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "88" + "$ref": "97" }, "Location": "Body", "IsRequired": true, @@ -5351,11 +5352,11 @@ "Kind": "Method" }, { - "$id": "511", + "$id": "505", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "512", + "$id": "506", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5370,19 +5371,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "513", + "$id": "507", "Type": { - "$ref": "512" + "$ref": "506" }, "Value": "application/json" } }, { - "$id": "514", + "$id": "508", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "515", + "$id": "509", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5397,9 +5398,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "516", + "$id": "510", "Type": { - "$ref": "515" + "$ref": "509" }, "Value": "application/json" } @@ -5407,7 +5408,7 @@ ], "Responses": [ { - "$id": "517", + "$id": "511", "StatusCodes": [ 204 ], @@ -5429,31 +5430,31 @@ } ], "Protocol": { - "$id": "518" + "$id": "512" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "519", + "$id": "513", "Name": "UnionStringLiteral", "Description": "", "Operations": [ { - "$id": "520", + "$id": "514", "Name": "get", "ResourceName": "UnionStringLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "521", + "$id": "515", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "522", + "$id": "516", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5468,9 +5469,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "523", + "$id": "517", "Type": { - "$ref": "522" + "$ref": "516" }, "Value": "application/json" } @@ -5478,12 +5479,12 @@ ], "Responses": [ { - "$id": "524", + "$id": "518", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "92" + "$ref": "101" }, "BodyMediaType": "Json", "Headers": [], @@ -5502,21 +5503,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "525", + "$id": "519", "Name": "put", "ResourceName": "UnionStringLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "526", + "$id": "520", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "92" + "$ref": "101" }, "Location": "Body", "IsRequired": true, @@ -5529,11 +5530,11 @@ "Kind": "Method" }, { - "$id": "527", + "$id": "521", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "528", + "$id": "522", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5548,19 +5549,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "529", + "$id": "523", "Type": { - "$ref": "528" + "$ref": "522" }, "Value": "application/json" } }, { - "$id": "530", + "$id": "524", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "531", + "$id": "525", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5575,9 +5576,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "532", + "$id": "526", "Type": { - "$ref": "531" + "$ref": "525" }, "Value": "application/json" } @@ -5585,7 +5586,7 @@ ], "Responses": [ { - "$id": "533", + "$id": "527", "StatusCodes": [ 204 ], @@ -5607,31 +5608,31 @@ } ], "Protocol": { - "$id": "534" + "$id": "528" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "535", + "$id": "529", "Name": "UnionIntLiteral", "Description": "", "Operations": [ { - "$id": "536", + "$id": "530", "Name": "get", "ResourceName": "UnionIntLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "537", + "$id": "531", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "538", + "$id": "532", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5646,9 +5647,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "539", + "$id": "533", "Type": { - "$ref": "538" + "$ref": "532" }, "Value": "application/json" } @@ -5656,12 +5657,12 @@ ], "Responses": [ { - "$id": "540", + "$id": "534", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "99" + "$ref": "103" }, "BodyMediaType": "Json", "Headers": [], @@ -5680,21 +5681,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "541", + "$id": "535", "Name": "put", "ResourceName": "UnionIntLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "542", + "$id": "536", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "99" + "$ref": "103" }, "Location": "Body", "IsRequired": true, @@ -5707,11 +5708,11 @@ "Kind": "Method" }, { - "$id": "543", + "$id": "537", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "544", + "$id": "538", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5726,19 +5727,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "545", + "$id": "539", "Type": { - "$ref": "544" + "$ref": "538" }, "Value": "application/json" } }, { - "$id": "546", + "$id": "540", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "547", + "$id": "541", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5753,9 +5754,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "548", + "$id": "542", "Type": { - "$ref": "547" + "$ref": "541" }, "Value": "application/json" } @@ -5763,7 +5764,7 @@ ], "Responses": [ { - "$id": "549", + "$id": "543", "StatusCodes": [ 204 ], @@ -5785,31 +5786,31 @@ } ], "Protocol": { - "$id": "550" + "$id": "544" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "551", + "$id": "545", "Name": "UnionFloatLiteral", "Description": "", "Operations": [ { - "$id": "552", + "$id": "546", "Name": "get", "ResourceName": "UnionFloatLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "553", + "$id": "547", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "554", + "$id": "548", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5824,9 +5825,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "555", + "$id": "549", "Type": { - "$ref": "554" + "$ref": "548" }, "Value": "application/json" } @@ -5834,12 +5835,12 @@ ], "Responses": [ { - "$id": "556", + "$id": "550", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "106" + "$ref": "105" }, "BodyMediaType": "Json", "Headers": [], @@ -5858,21 +5859,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "557", + "$id": "551", "Name": "put", "ResourceName": "UnionFloatLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "117" + "$ref": "111" }, { - "$id": "558", + "$id": "552", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "106" + "$ref": "105" }, "Location": "Body", "IsRequired": true, @@ -5885,11 +5886,11 @@ "Kind": "Method" }, { - "$id": "559", + "$id": "553", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "560", + "$id": "554", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5904,19 +5905,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "561", + "$id": "555", "Type": { - "$ref": "560" + "$ref": "554" }, "Value": "application/json" } }, { - "$id": "562", + "$id": "556", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "563", + "$id": "557", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5931,9 +5932,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "564", + "$id": "558", "Type": { - "$ref": "563" + "$ref": "557" }, "Value": "application/json" } @@ -5941,7 +5942,7 @@ ], "Responses": [ { - "$id": "565", + "$id": "559", "StatusCodes": [ 204 ], @@ -5963,7 +5964,7 @@ } ], "Protocol": { - "$id": "566" + "$id": "560" }, "Creatable": false, "Parent": "ValueTypesClient" diff --git a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_Datetime.cs b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_Datetime.cs index 475beb57241..e5bc830f41a 100644 --- a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_Datetime.cs +++ b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_Datetime.cs @@ -111,7 +111,7 @@ public void Example_Datetime_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = client.Put(content); @@ -126,7 +126,7 @@ public async Task Example_Datetime_Put_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PutAsync(content); @@ -139,7 +139,7 @@ public void Example_Datetime_Put_ShortVersion_Convenience() { Datetime client = new ValueTypesClient().GetDatetimeClient(); - DatetimeProperty body = new DatetimeProperty(DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + DatetimeProperty body = new DatetimeProperty(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.Put(body); } @@ -149,7 +149,7 @@ public async Task Example_Datetime_Put_ShortVersion_Convenience_Async() { Datetime client = new ValueTypesClient().GetDatetimeClient(); - DatetimeProperty body = new DatetimeProperty(DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + DatetimeProperty body = new DatetimeProperty(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.PutAsync(body); } @@ -161,7 +161,7 @@ public void Example_Datetime_Put_AllParameters() using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = client.Put(content); @@ -176,7 +176,7 @@ public async Task Example_Datetime_Put_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - property = "2022-05-10T14:57:31.2311892-04:00", + property = "2022-05-10T18:57:31.2311892Z", }); Response response = await client.PutAsync(content); @@ -189,7 +189,7 @@ public void Example_Datetime_Put_AllParameters_Convenience() { Datetime client = new ValueTypesClient().GetDatetimeClient(); - DatetimeProperty body = new DatetimeProperty(DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + DatetimeProperty body = new DatetimeProperty(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = client.Put(body); } @@ -199,7 +199,7 @@ public async Task Example_Datetime_Put_AllParameters_Convenience_Async() { Datetime client = new ValueTypesClient().GetDatetimeClient(); - DatetimeProperty body = new DatetimeProperty(DateTimeOffset.Parse("2022-05-10T14:57:31.2311892-04:00")); + DatetimeProperty body = new DatetimeProperty(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); Response response = await client.PutAsync(body); } } diff --git a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionFloatLiteral.cs b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionFloatLiteral.cs index b16bd00e3bc..2db7bc5611a 100644 --- a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionFloatLiteral.cs +++ b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionFloatLiteral.cs @@ -111,7 +111,7 @@ public void Example_UnionFloatLiteral_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = client.Put(content); @@ -126,7 +126,7 @@ public async Task Example_UnionFloatLiteral_Put_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = await client.PutAsync(content); @@ -139,7 +139,7 @@ public void Example_UnionFloatLiteral_Put_ShortVersion_Convenience() { UnionFloatLiteral client = new ValueTypesClient().GetUnionFloatLiteralClient(); - UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(BinaryData.FromObjectAsJson(43.125)); + UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty._43125); Response response = client.Put(body); } @@ -149,7 +149,7 @@ public async Task Example_UnionFloatLiteral_Put_ShortVersion_Convenience_Async() { UnionFloatLiteral client = new ValueTypesClient().GetUnionFloatLiteralClient(); - UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(BinaryData.FromObjectAsJson(43.125)); + UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty._43125); Response response = await client.PutAsync(body); } @@ -161,7 +161,7 @@ public void Example_UnionFloatLiteral_Put_AllParameters() using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = client.Put(content); @@ -176,7 +176,7 @@ public async Task Example_UnionFloatLiteral_Put_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = await client.PutAsync(content); @@ -189,7 +189,7 @@ public void Example_UnionFloatLiteral_Put_AllParameters_Convenience() { UnionFloatLiteral client = new ValueTypesClient().GetUnionFloatLiteralClient(); - UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(BinaryData.FromObjectAsJson(43.125)); + UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty._43125); Response response = client.Put(body); } @@ -199,7 +199,7 @@ public async Task Example_UnionFloatLiteral_Put_AllParameters_Convenience_Async( { UnionFloatLiteral client = new ValueTypesClient().GetUnionFloatLiteralClient(); - UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(BinaryData.FromObjectAsJson(43.125)); + UnionFloatLiteralProperty body = new UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty._43125); Response response = await client.PutAsync(body); } } diff --git a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionIntLiteral.cs b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionIntLiteral.cs index 30f6bdb3077..ea2b4a14df2 100644 --- a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionIntLiteral.cs +++ b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionIntLiteral.cs @@ -139,7 +139,7 @@ public void Example_UnionIntLiteral_Put_ShortVersion_Convenience() { UnionIntLiteral client = new ValueTypesClient().GetUnionIntLiteralClient(); - UnionIntLiteralProperty body = new UnionIntLiteralProperty(BinaryData.FromObjectAsJson(42)); + UnionIntLiteralProperty body = new UnionIntLiteralProperty(UnionIntLiteralPropertyProperty._42); Response response = client.Put(body); } @@ -149,7 +149,7 @@ public async Task Example_UnionIntLiteral_Put_ShortVersion_Convenience_Async() { UnionIntLiteral client = new ValueTypesClient().GetUnionIntLiteralClient(); - UnionIntLiteralProperty body = new UnionIntLiteralProperty(BinaryData.FromObjectAsJson(42)); + UnionIntLiteralProperty body = new UnionIntLiteralProperty(UnionIntLiteralPropertyProperty._42); Response response = await client.PutAsync(body); } @@ -189,7 +189,7 @@ public void Example_UnionIntLiteral_Put_AllParameters_Convenience() { UnionIntLiteral client = new ValueTypesClient().GetUnionIntLiteralClient(); - UnionIntLiteralProperty body = new UnionIntLiteralProperty(BinaryData.FromObjectAsJson(42)); + UnionIntLiteralProperty body = new UnionIntLiteralProperty(UnionIntLiteralPropertyProperty._42); Response response = client.Put(body); } @@ -199,7 +199,7 @@ public async Task Example_UnionIntLiteral_Put_AllParameters_Convenience_Async() { UnionIntLiteral client = new ValueTypesClient().GetUnionIntLiteralClient(); - UnionIntLiteralProperty body = new UnionIntLiteralProperty(BinaryData.FromObjectAsJson(42)); + UnionIntLiteralProperty body = new UnionIntLiteralProperty(UnionIntLiteralPropertyProperty._42); Response response = await client.PutAsync(body); } } diff --git a/test/CadlRanchProjectsNonAzure/authentication/http/custom/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/authentication/http/custom/src/Generated/tspCodeModel.json index 6800ba4b25b..ad6da3b5028 100644 --- a/test/CadlRanchProjectsNonAzure/authentication/http/custom/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/authentication/http/custom/src/Generated/tspCodeModel.json @@ -25,7 +25,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] } diff --git a/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesClient.cs b/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesClient.cs index 8b72211caf9..fbcb8d591d9 100644 --- a/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesClient.cs +++ b/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesClient.cs @@ -28,11 +28,15 @@ protected MultipleInputFilesClient() } /// Initializes a new instance of MultipleInputFilesClient. - /// source - server parameter. The default value is "value1". + /// source - server parameter. The default value is "value1". Allowed values: "us" | "eu". /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public MultipleInputFilesClient(Source source, AzureKeyCredential credential, MultipleInputFilesClientOptions options = null) + public MultipleInputFilesClient(string source, AzureKeyCredential credential, MultipleInputFilesClientOptions options = null) { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } if (credential == null) { throw new ArgumentNullException(nameof(credential)); @@ -45,11 +49,15 @@ public MultipleInputFilesClient(Source source, AzureKeyCredential credential, Mu } /// Initializes a new instance of MultipleInputFilesClient. - /// source - server parameter. The default value is "value1". + /// source - server parameter. The default value is "value1". Allowed values: "us" | "eu". /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public MultipleInputFilesClient(Source source, TokenCredential credential, MultipleInputFilesClientOptions options = null) + public MultipleInputFilesClient(string source, TokenCredential credential, MultipleInputFilesClientOptions options = null) { + if (source == null) + { + throw new ArgumentNullException(nameof(source)); + } if (credential == null) { throw new ArgumentNullException(nameof(credential)); @@ -65,9 +73,10 @@ public MultipleInputFilesClient(Source source, TokenCredential credential, Multi /// Initializes a new instance of MultipleInputFilesClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// source - server parameter. The default value is "value1". - /// or is null. - internal MultipleInputFilesClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Source source) + /// source - server parameter. The default value is "value1". Allowed values: "us" | "eu". + /// , or is null. + /// is an empty string, and was expected to be non-empty. + internal MultipleInputFilesClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string source) { RestClient = new MultipleInputFilesRestClient(clientDiagnostics, pipeline, source); _clientDiagnostics = clientDiagnostics; diff --git a/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesRestClient.cs b/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesRestClient.cs index 30cd61b09dc..a3e27c35d6a 100644 --- a/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesRestClient.cs +++ b/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesRestClient.cs @@ -18,7 +18,7 @@ namespace MultipleInputFiles internal partial class MultipleInputFilesRestClient { private readonly HttpPipeline _pipeline; - private readonly Source _source; + private readonly string _source; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -26,13 +26,14 @@ internal partial class MultipleInputFilesRestClient /// Initializes a new instance of MultipleInputFilesRestClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// source - server parameter. The default value is "value1". - /// or is null. - public MultipleInputFilesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Source source) + /// source - server parameter. The default value is "value1". Allowed values: "us" | "eu". + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public MultipleInputFilesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string source) { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _source = source; + _source = source ?? throw new ArgumentNullException(nameof(source)); } internal HttpMessage CreateOperation1Request(TestModel value) @@ -42,7 +43,7 @@ internal HttpMessage CreateOperation1Request(TestModel value) request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.AppendRaw("https://", false); - uri.AppendRaw(_source.ToString(), true); + uri.AppendRaw(_source, true); uri.AppendRaw(".fakeendpoint.azure.com", false); uri.AppendPath("/operation1", false); request.Uri = uri; @@ -102,7 +103,7 @@ internal HttpMessage CreateOperation2Request(TestModel value) request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.AppendRaw("https://", false); - uri.AppendRaw(_source.ToString(), true); + uri.AppendRaw(_source, true); uri.AppendRaw(".fakeendpoint.azure.com", false); uri.AppendPath("/operation2", false); request.Uri = uri; diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs index cc0e37f82bd..5ae2cad44ce 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs @@ -25,7 +25,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStartObject(); writer.WritePropertyName("sourceUrl"u8); - writer.WriteStringValue(SourceUrl.AbsoluteUri); + writer.WriteStringValue(SourceUrl); writer.WritePropertyName("guid"u8); writer.WriteStringValue(Guid); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -66,7 +66,7 @@ internal static ModelWithFormat DeserializeModelWithFormat(JsonElement element, { return null; } - Uri sourceUrl = default; + string sourceUrl = default; Guid guid = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); @@ -74,7 +74,7 @@ internal static ModelWithFormat DeserializeModelWithFormat(JsonElement element, { if (property.NameEquals("sourceUrl"u8)) { - sourceUrl = new Uri(property.Value.GetString()); + sourceUrl = property.Value.GetString(); continue; } if (property.NameEquals("guid"u8)) diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs index 3420fd14ef3..23884397222 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs @@ -47,7 +47,7 @@ public partial class ModelWithFormat /// url format. /// uuid format. /// is null. - public ModelWithFormat(Uri sourceUrl, Guid guid) + public ModelWithFormat(string sourceUrl, Guid guid) { Argument.AssertNotNull(sourceUrl, nameof(sourceUrl)); @@ -59,7 +59,7 @@ public ModelWithFormat(Uri sourceUrl, Guid guid) /// url format. /// uuid format. /// Keeps track of any properties unknown to the library. - internal ModelWithFormat(Uri sourceUrl, Guid guid, IDictionary serializedAdditionalRawData) + internal ModelWithFormat(string sourceUrl, Guid guid, IDictionary serializedAdditionalRawData) { SourceUrl = sourceUrl; Guid = guid; @@ -72,7 +72,7 @@ internal ModelWithFormat() } /// url format. - public Uri SourceUrl { get; } + public string SourceUrl { get; } /// uuid format. public Guid Guid { get; } } diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json index a33e35a5723..61cee68f3dd 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json @@ -122,7 +122,7 @@ "$id": "14", "Kind": "Enum", "Name": "StringFixedEnum", - "EnumValueType": "String", + "EnumValueType": "string", "AllowedValues": [ { "$id": "15", @@ -234,7 +234,7 @@ "$id": "30", "Kind": "Enum", "Name": "FloatFixedEnum", - "EnumValueType": "Float32", + "EnumValueType": "float32", "AllowedValues": [ { "$id": "31", @@ -262,7 +262,7 @@ "$id": "34", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "Float32", + "EnumValueType": "int32", "AllowedValues": [ { "$id": "35", @@ -309,7 +309,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "41", @@ -349,7 +350,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "47", @@ -367,7 +369,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "49", @@ -385,7 +388,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "51", @@ -403,7 +407,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "53", @@ -424,7 +429,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "56", @@ -442,7 +448,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "58", @@ -460,7 +467,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "60", @@ -478,7 +486,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "62", @@ -499,7 +508,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "65", @@ -513,7 +523,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "67", @@ -533,7 +544,8 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "70", @@ -553,7 +565,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -578,7 +591,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "76", @@ -592,7 +606,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "78", @@ -609,7 +624,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "80", @@ -632,7 +648,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "83", @@ -643,7 +660,8 @@ "$ref": "38" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "84", @@ -654,7 +672,8 @@ "$ref": "22" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "85", @@ -671,7 +690,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "87", @@ -682,7 +702,8 @@ "$ref": "26" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "88", @@ -699,7 +720,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "90", @@ -710,7 +732,8 @@ "$ref": "30" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "91", @@ -727,7 +750,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "93", @@ -738,7 +762,8 @@ "$ref": "34" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "94", @@ -755,7 +780,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "96", @@ -766,7 +792,8 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "97", @@ -780,7 +807,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "99", @@ -794,7 +822,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "101", @@ -820,7 +849,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "105", @@ -846,7 +876,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "109", @@ -872,7 +903,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "113", @@ -898,7 +930,8 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true + "IsReadOnly": true, + "IsDiscriminator": false }, { "$id": "117", @@ -926,7 +959,8 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "121", @@ -937,7 +971,8 @@ "$ref": "18" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "122", @@ -948,12 +983,14 @@ "$ref": "14" }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -981,7 +1018,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1001,11 +1039,12 @@ "Type": { "$id": "128", "Kind": "Primitive", - "Name": "Uri", + "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false }, { "$id": "129", @@ -1019,7 +1058,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, @@ -1044,7 +1084,8 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": false } ] }, From 14ed1d8463b638b8f485825b7035af0f0aae1715 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 13 Mar 2024 17:07:11 +0800 Subject: [PATCH 08/60] fix cadl-ranch union test --- test/CadlRanchProjects.Tests/type-union.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CadlRanchProjects.Tests/type-union.cs b/test/CadlRanchProjects.Tests/type-union.cs index 570d6a160c7..89a675d4fef 100644 --- a/test/CadlRanchProjects.Tests/type-union.cs +++ b/test/CadlRanchProjects.Tests/type-union.cs @@ -71,7 +71,7 @@ public Task GetIntsOnly() => Test(async (host) => [Test] public Task SendIntsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetIntsOnlyClient().SendAsync(BinaryData.FromString("2")); + var response = await new UnionClient(host, null).GetIntsOnlyClient().SendAsync(GetResponseProp3._2); Assert.AreEqual(204, response.Status); }); @@ -86,7 +86,7 @@ public Task GetFloatsOnly() => Test(async (host) => [Test] public Task SendFloatsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetFloatsOnlyClient().SendAsync(BinaryData.FromString("2.2")); + var response = await new UnionClient(host, null).GetFloatsOnlyClient().SendAsync(GetResponseProp2._22); Assert.AreEqual(204, response.Status); }); From 241ac9dea0396b6129afc696911a375377cf4049 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 13 Mar 2024 17:07:26 +0800 Subject: [PATCH 09/60] add support fo additional properties --- .../Emitter.Csharp/src/type/converter.ts | 12 + ...FloatAdditionalProperties.Serialization.cs | 29 +- .../ExtendsFloatAdditionalProperties.cs | 43 +- ...ModelAdditionalProperties.Serialization.cs | 29 +- .../ExtendsModelAdditionalProperties.cs | 44 +- ...ArrayAdditionalProperties.Serialization.cs | 31 +- .../ExtendsModelArrayAdditionalProperties.cs | 44 +- ...tringAdditionalProperties.Serialization.cs | 29 +- .../ExtendsStringAdditionalProperties.cs | 42 +- ...knownAdditionalProperties.Serialization.cs | 26 +- .../ExtendsUnknownAdditionalProperties.cs | 59 +- ...ditionalPropertiesDerived.Serialization.cs | 26 +- ...tendsUnknownAdditionalPropertiesDerived.cs | 4 +- ...alPropertiesDiscriminated.Serialization.cs | 15 +- ...nknownAdditionalPropertiesDiscriminated.cs | 67 +- ...rtiesDiscriminatedDerived.Serialization.cs | 26 +- ...dditionalPropertiesDiscriminatedDerived.cs | 4 +- ...FloatAdditionalProperties.Serialization.cs | 29 +- .../Models/IsFloatAdditionalProperties.cs | 43 +- ...ModelAdditionalProperties.Serialization.cs | 29 +- .../Models/IsModelAdditionalProperties.cs | 44 +- ...ArrayAdditionalProperties.Serialization.cs | 31 +- .../IsModelArrayAdditionalProperties.cs | 44 +- ...tringAdditionalProperties.Serialization.cs | 29 +- .../Models/IsStringAdditionalProperties.cs | 42 +- ...knownAdditionalProperties.Serialization.cs | 26 +- .../Models/IsUnknownAdditionalProperties.cs | 59 +- ...ditionalPropertiesDerived.Serialization.cs | 26 +- .../IsUnknownAdditionalPropertiesDerived.cs | 4 +- ...alPropertiesDiscriminated.Serialization.cs | 15 +- ...nknownAdditionalPropertiesDiscriminated.cs | 67 +- ...rtiesDiscriminatedDerived.Serialization.cs | 26 +- ...dditionalPropertiesDiscriminatedDerived.cs | 4 +- .../Models/ModelForRecord.Serialization.cs | 137 +++ .../src/Generated/Models/ModelForRecord.cs | 76 ++ ...alPropertiesDiscriminated.Serialization.cs | 26 +- ...nknownAdditionalPropertiesDiscriminated.cs | 4 +- ...alPropertiesDiscriminated.Serialization.cs | 26 +- ...nknownAdditionalPropertiesDiscriminated.cs | 4 +- .../src/Generated/tspCodeModel.json | 1026 ++++++++++------- 40 files changed, 1214 insertions(+), 1133 deletions(-) create mode 100644 test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs create mode 100644 test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index e981d5a2f34..35cb717c89c 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -124,6 +124,17 @@ export function fromSdkModelType( // ).map((m) => fromSdkModelType(m, program, models, enums)); // } + inputModelType.InheritedDictionaryType = modelType.additionalProperties ? { + Kind: InputTypeKind.Dictionary, + Name: InputTypeKind.Dictionary, + KeyType: { + Kind: InputTypeKind.Primitive, + Name: InputPrimitiveTypeKind.String, + IsNullable: false, + } as InputPrimitiveType, + ValueType: fromSdkType(modelType.additionalProperties, context, models, enums), + IsNullable: false, + } as InputDictionaryType : undefined; inputModelType.Properties = modelType.properties .filter( (p) => @@ -136,6 +147,7 @@ export function fromSdkModelType( Namespace: inputModelType?.Namespace } as LiteralTypeContext) ); + const index = inputModelType.Properties.findIndex( (p) => p.IsDiscriminator ); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs index 9b0fc53c90f..bfa7d7d4816 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.Serialization.cs @@ -30,20 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteNumberValue(Id); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); } writer.WriteEndObject(); } @@ -69,8 +59,8 @@ internal static ExtendsFloatAdditionalProperties DeserializeExtendsFloatAddition return null; } float id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -78,13 +68,10 @@ internal static ExtendsFloatAdditionalProperties DeserializeExtendsFloatAddition id = property.Value.GetSingle(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, property.Value.GetSingle()); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ExtendsFloatAdditionalProperties(id, serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new ExtendsFloatAdditionalProperties(id, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs index 6e8b9708dc1..a5c8cbaa7e6 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsFloatAdditionalProperties.cs @@ -5,60 +5,29 @@ #nullable disable -using System; using System.Collections.Generic; +using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model extends from Record<float32> type. public partial class ExtendsFloatAdditionalProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . /// The id property. public ExtendsFloatAdditionalProperties(float id) { Id = id; + AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The id property. - /// Keeps track of any properties unknown to the library. - internal ExtendsFloatAdditionalProperties(float id, IDictionary serializedAdditionalRawData) + /// Additional Properties. + internal ExtendsFloatAdditionalProperties(float id, IDictionary additionalProperties) { Id = id; - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalProperties = additionalProperties; } /// Initializes a new instance of for deserialization. @@ -68,5 +37,7 @@ internal ExtendsFloatAdditionalProperties() /// The id property. public float Id { get; set; } + /// Additional Properties. + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs index 49f32a2ffef..7811c219f66 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.Serialization.cs @@ -28,20 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); } writer.WriteEndObject(); } @@ -66,17 +56,14 @@ internal static ExtendsModelAdditionalProperties DeserializeExtendsModelAddition { return null; } - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, ModelForRecord.DeserializeModelForRecord(property.Value, options)); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ExtendsModelAdditionalProperties(serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new ExtendsModelAdditionalProperties(additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs index 305c77ed353..708b96ac626 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelAdditionalProperties.cs @@ -5,56 +5,28 @@ #nullable disable -using System; using System.Collections.Generic; +using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model extends from Record<ModelForRecord> type. public partial class ExtendsModelAdditionalProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . public ExtendsModelAdditionalProperties() { + AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Keeps track of any properties unknown to the library. - internal ExtendsModelAdditionalProperties(IDictionary serializedAdditionalRawData) + /// Additional Properties. + internal ExtendsModelAdditionalProperties(IDictionary additionalProperties) { - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalProperties = additionalProperties; } + + /// Additional Properties. + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs index 02d04a32bd0..d535fdecea8 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.Serialization.cs @@ -28,20 +28,15 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WriteStartObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) + writer.WritePropertyName(item.Key); + writer.WriteStartArray(); + foreach (var item0 in item.Value) { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(item0); } + writer.WriteEndArray(); } writer.WriteEndObject(); } @@ -66,17 +61,19 @@ internal static ExtendsModelArrayAdditionalProperties DeserializeExtendsModelArr { return null; } - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary> additionalProperties = default; + Dictionary> additionalPropertiesDictionary = new Dictionary>(); foreach (var property in element.EnumerateObject()) { - if (options.Format != "W") + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + array.Add(ModelForRecord.DeserializeModelForRecord(item, options)); } + additionalPropertiesDictionary.Add(property.Name, array); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ExtendsModelArrayAdditionalProperties(serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new ExtendsModelArrayAdditionalProperties(additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs index 31dc0559047..641688e03ba 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsModelArrayAdditionalProperties.cs @@ -5,56 +5,28 @@ #nullable disable -using System; using System.Collections.Generic; +using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model extends from Record<ModelForRecord[]> type. public partial class ExtendsModelArrayAdditionalProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . public ExtendsModelArrayAdditionalProperties() { + AdditionalProperties = new ChangeTrackingDictionary>(); } /// Initializes a new instance of . - /// Keeps track of any properties unknown to the library. - internal ExtendsModelArrayAdditionalProperties(IDictionary serializedAdditionalRawData) + /// Additional Properties. + internal ExtendsModelArrayAdditionalProperties(IDictionary> additionalProperties) { - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalProperties = additionalProperties; } + + /// Additional Properties. + public IDictionary> AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs index d60c4f760f5..6fef2a8ee34 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.Serialization.cs @@ -30,20 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } @@ -69,8 +59,8 @@ internal static ExtendsStringAdditionalProperties DeserializeExtendsStringAdditi return null; } string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -78,13 +68,10 @@ internal static ExtendsStringAdditionalProperties DeserializeExtendsStringAdditi name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, property.Value.GetString()); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ExtendsStringAdditionalProperties(name, serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new ExtendsStringAdditionalProperties(name, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs index 9ca20c0ca31..bdd4746bb48 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsStringAdditionalProperties.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -14,38 +15,6 @@ namespace _Type.Property.AdditionalProperties.Models /// The model extends from Record<string> type. public partial class ExtendsStringAdditionalProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . /// The name property. /// is null. @@ -54,15 +23,16 @@ public ExtendsStringAdditionalProperties(string name) Argument.AssertNotNull(name, nameof(name)); Name = name; + AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The name property. - /// Keeps track of any properties unknown to the library. - internal ExtendsStringAdditionalProperties(string name, IDictionary serializedAdditionalRawData) + /// Additional Properties. + internal ExtendsStringAdditionalProperties(string name, IDictionary additionalProperties) { Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalProperties = additionalProperties; } /// Initializes a new instance of for deserialization. @@ -72,5 +42,7 @@ internal ExtendsStringAdditionalProperties() /// The name property. public string Name { get; set; } + /// Additional Properties. + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs index b60af814563..f62548d6e90 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.Serialization.cs @@ -30,20 +30,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -69,7 +66,7 @@ internal static ExtendsUnknownAdditionalProperties DeserializeExtendsUnknownAddi return null; } string name = default; - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -78,13 +75,10 @@ internal static ExtendsUnknownAdditionalProperties DeserializeExtendsUnknownAddi name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ExtendsUnknownAdditionalProperties(name, serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new ExtendsUnknownAdditionalProperties(name, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs index 6b38715eedb..0551dec8461 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalProperties.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -14,8 +15,35 @@ namespace _Type.Property.AdditionalProperties.Models /// The model extends from Record<unknown> type. public partial class ExtendsUnknownAdditionalProperties { + /// Initializes a new instance of . + /// The name property. + /// is null. + public ExtendsUnknownAdditionalProperties(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The name property. + /// Additional Properties. + internal ExtendsUnknownAdditionalProperties(string name, IDictionary additionalProperties) + { + Name = name; + AdditionalProperties = additionalProperties; + } + + /// Initializes a new instance of for deserialization. + internal ExtendsUnknownAdditionalProperties() + { + } + + /// The name property. + public string Name { get; set; } /// - /// Keeps track of any properties unknown to the library. + /// Additional Properties /// /// To assign an object to the value of this property use . /// @@ -44,33 +72,6 @@ public partial class ExtendsUnknownAdditionalProperties /// /// /// - private protected IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name property. - /// is null. - public ExtendsUnknownAdditionalProperties(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of . - /// The name property. - /// Keeps track of any properties unknown to the library. - internal ExtendsUnknownAdditionalProperties(string name, IDictionary serializedAdditionalRawData) - { - Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ExtendsUnknownAdditionalProperties() - { - } - - /// The name property. - public string Name { get; set; } + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs index f751833a709..fa36c46f279 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.Serialization.cs @@ -37,20 +37,17 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -78,7 +75,7 @@ internal static ExtendsUnknownAdditionalPropertiesDerived DeserializeExtendsUnkn int index = default; float? age = default; string name = default; - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -101,13 +98,10 @@ internal static ExtendsUnknownAdditionalPropertiesDerived DeserializeExtendsUnkn name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ExtendsUnknownAdditionalPropertiesDerived(name, serializedAdditionalRawData, index, age); + additionalProperties = additionalPropertiesDictionary; + return new ExtendsUnknownAdditionalPropertiesDerived(name, additionalProperties, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs index 8d820e09e4f..b9c10cd9e2d 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDerived.cs @@ -27,10 +27,10 @@ public ExtendsUnknownAdditionalPropertiesDerived(string name, int index) : base( /// Initializes a new instance of . /// The name property. - /// Keeps track of any properties unknown to the library. + /// Additional Properties. /// The index property. /// The age property. - internal ExtendsUnknownAdditionalPropertiesDerived(string name, IDictionary serializedAdditionalRawData, int index, float? age) : base(name, serializedAdditionalRawData) + internal ExtendsUnknownAdditionalPropertiesDerived(string name, IDictionary additionalProperties, int index, float? age) : base(name, additionalProperties) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index 8f87205cf67..b530cc39699 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -32,20 +32,17 @@ void IJsonModel.Write(Utf8JsonW writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs index bf094c34752..dc941970cf6 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -18,8 +19,39 @@ namespace _Type.Property.AdditionalProperties.Models /// public abstract partial class ExtendsUnknownAdditionalPropertiesDiscriminated { + /// Initializes a new instance of . + /// The name property. + /// is null. + protected ExtendsUnknownAdditionalPropertiesDiscriminated(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The discriminator. + /// The name property. + /// Additional Properties. + internal ExtendsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary additionalProperties) + { + Kind = kind; + Name = name; + AdditionalProperties = additionalProperties; + } + + /// Initializes a new instance of for deserialization. + internal ExtendsUnknownAdditionalPropertiesDiscriminated() + { + } + + /// The discriminator. + internal string Kind { get; set; } + /// The name property. + public string Name { get; set; } /// - /// Keeps track of any properties unknown to the library. + /// Additional Properties /// /// To assign an object to the value of this property use . /// @@ -48,37 +80,6 @@ public abstract partial class ExtendsUnknownAdditionalPropertiesDiscriminated /// /// /// - private protected IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name property. - /// is null. - protected ExtendsUnknownAdditionalPropertiesDiscriminated(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of . - /// The discriminator. - /// The name property. - /// Keeps track of any properties unknown to the library. - internal ExtendsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary serializedAdditionalRawData) - { - Kind = kind; - Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ExtendsUnknownAdditionalPropertiesDiscriminated() - { - } - - /// The discriminator. - internal string Kind { get; set; } - /// The name property. - public string Name { get; set; } + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs index fb61fad3376..3d8a2936a2b 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs @@ -39,20 +39,17 @@ void IJsonModel.Write(Ut writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -81,7 +78,7 @@ internal static ExtendsUnknownAdditionalPropertiesDiscriminatedDerived Deseriali float? age = default; string kind = default; string name = default; - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -109,13 +106,10 @@ internal static ExtendsUnknownAdditionalPropertiesDiscriminatedDerived Deseriali name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(kind, name, serializedAdditionalRawData, index, age); + additionalProperties = additionalPropertiesDictionary; + return new ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(kind, name, additionalProperties, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs index 3c6206076bd..93d1590f799 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs @@ -29,10 +29,10 @@ public ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string name, int i /// Initializes a new instance of . /// The discriminator. /// The name property. - /// Keeps track of any properties unknown to the library. + /// Additional Properties. /// The index property. /// The age property. - internal ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string kind, string name, IDictionary serializedAdditionalRawData, int index, float? age) : base(kind, name, serializedAdditionalRawData) + internal ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string kind, string name, IDictionary additionalProperties, int index, float? age) : base(kind, name, additionalProperties) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs index acae1425316..56619a88257 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.Serialization.cs @@ -30,20 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteNumberValue(Id); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); } writer.WriteEndObject(); } @@ -69,8 +59,8 @@ internal static IsFloatAdditionalProperties DeserializeIsFloatAdditionalProperti return null; } float id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id"u8)) @@ -78,13 +68,10 @@ internal static IsFloatAdditionalProperties DeserializeIsFloatAdditionalProperti id = property.Value.GetSingle(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, property.Value.GetSingle()); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new IsFloatAdditionalProperties(id, serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new IsFloatAdditionalProperties(id, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs index 5fceac0c8ee..a39222c5472 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsFloatAdditionalProperties.cs @@ -5,60 +5,29 @@ #nullable disable -using System; using System.Collections.Generic; +using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model is from Record<float32> type. public partial class IsFloatAdditionalProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . /// The id property. public IsFloatAdditionalProperties(float id) { Id = id; + AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The id property. - /// Keeps track of any properties unknown to the library. - internal IsFloatAdditionalProperties(float id, IDictionary serializedAdditionalRawData) + /// Additional Properties. + internal IsFloatAdditionalProperties(float id, IDictionary additionalProperties) { Id = id; - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalProperties = additionalProperties; } /// Initializes a new instance of for deserialization. @@ -68,5 +37,7 @@ internal IsFloatAdditionalProperties() /// The id property. public float Id { get; set; } + /// Additional Properties. + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs index 8faeb7fae11..80168f4706a 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.Serialization.cs @@ -28,20 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteStartObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); } writer.WriteEndObject(); } @@ -66,17 +56,14 @@ internal static IsModelAdditionalProperties DeserializeIsModelAdditionalProperti { return null; } - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, ModelForRecord.DeserializeModelForRecord(property.Value, options)); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new IsModelAdditionalProperties(serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new IsModelAdditionalProperties(additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs index 0722b388ab9..e58d82841e9 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelAdditionalProperties.cs @@ -5,56 +5,28 @@ #nullable disable -using System; using System.Collections.Generic; +using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model is from Record<ModelForRecord> type. public partial class IsModelAdditionalProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . public IsModelAdditionalProperties() { + AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Keeps track of any properties unknown to the library. - internal IsModelAdditionalProperties(IDictionary serializedAdditionalRawData) + /// Additional Properties. + internal IsModelAdditionalProperties(IDictionary additionalProperties) { - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalProperties = additionalProperties; } + + /// Additional Properties. + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs index 7cfac97d9d7..d93bf7d79c8 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.Serialization.cs @@ -28,20 +28,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) + writer.WritePropertyName(item.Key); + writer.WriteStartArray(); + foreach (var item0 in item.Value) { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(item0); } + writer.WriteEndArray(); } writer.WriteEndObject(); } @@ -66,17 +61,19 @@ internal static IsModelArrayAdditionalProperties DeserializeIsModelArrayAddition { return null; } - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary> additionalProperties = default; + Dictionary> additionalPropertiesDictionary = new Dictionary>(); foreach (var property in element.EnumerateObject()) { - if (options.Format != "W") + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + array.Add(ModelForRecord.DeserializeModelForRecord(item, options)); } + additionalPropertiesDictionary.Add(property.Name, array); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new IsModelArrayAdditionalProperties(serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new IsModelArrayAdditionalProperties(additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs index f001c2ec360..4e0350f3e66 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsModelArrayAdditionalProperties.cs @@ -5,56 +5,28 @@ #nullable disable -using System; using System.Collections.Generic; +using Azure.Core; namespace _Type.Property.AdditionalProperties.Models { /// The model is from Record<ModelForRecord[]> type. public partial class IsModelArrayAdditionalProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . public IsModelArrayAdditionalProperties() { + AdditionalProperties = new ChangeTrackingDictionary>(); } /// Initializes a new instance of . - /// Keeps track of any properties unknown to the library. - internal IsModelArrayAdditionalProperties(IDictionary serializedAdditionalRawData) + /// Additional Properties. + internal IsModelArrayAdditionalProperties(IDictionary> additionalProperties) { - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalProperties = additionalProperties; } + + /// Additional Properties. + public IDictionary> AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs index 36d6af60841..5739fde736c 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.Serialization.cs @@ -30,20 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } @@ -69,8 +59,8 @@ internal static IsStringAdditionalProperties DeserializeIsStringAdditionalProper return null; } string name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name"u8)) @@ -78,13 +68,10 @@ internal static IsStringAdditionalProperties DeserializeIsStringAdditionalProper name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, property.Value.GetString()); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new IsStringAdditionalProperties(name, serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new IsStringAdditionalProperties(name, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs index cfc60c804f5..56f8cfe55a0 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsStringAdditionalProperties.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -14,38 +15,6 @@ namespace _Type.Property.AdditionalProperties.Models /// The model is from Record<string> type. public partial class IsStringAdditionalProperties { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . /// The name property. /// is null. @@ -54,15 +23,16 @@ public IsStringAdditionalProperties(string name) Argument.AssertNotNull(name, nameof(name)); Name = name; + AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The name property. - /// Keeps track of any properties unknown to the library. - internal IsStringAdditionalProperties(string name, IDictionary serializedAdditionalRawData) + /// Additional Properties. + internal IsStringAdditionalProperties(string name, IDictionary additionalProperties) { Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalProperties = additionalProperties; } /// Initializes a new instance of for deserialization. @@ -72,5 +42,7 @@ internal IsStringAdditionalProperties() /// The name property. public string Name { get; set; } + /// Additional Properties. + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs index da09ae734fc..e127bd823d9 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.Serialization.cs @@ -30,20 +30,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -69,7 +66,7 @@ internal static IsUnknownAdditionalProperties DeserializeIsUnknownAdditionalProp return null; } string name = default; - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -78,13 +75,10 @@ internal static IsUnknownAdditionalProperties DeserializeIsUnknownAdditionalProp name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new IsUnknownAdditionalProperties(name, serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new IsUnknownAdditionalProperties(name, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs index de6af4c905e..df416f77d54 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalProperties.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -14,8 +15,35 @@ namespace _Type.Property.AdditionalProperties.Models /// The model is from Record<unknown> type. public partial class IsUnknownAdditionalProperties { + /// Initializes a new instance of . + /// The name property. + /// is null. + public IsUnknownAdditionalProperties(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The name property. + /// Additional Properties. + internal IsUnknownAdditionalProperties(string name, IDictionary additionalProperties) + { + Name = name; + AdditionalProperties = additionalProperties; + } + + /// Initializes a new instance of for deserialization. + internal IsUnknownAdditionalProperties() + { + } + + /// The name property. + public string Name { get; set; } /// - /// Keeps track of any properties unknown to the library. + /// Additional Properties /// /// To assign an object to the value of this property use . /// @@ -44,33 +72,6 @@ public partial class IsUnknownAdditionalProperties /// /// /// - private protected IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name property. - /// is null. - public IsUnknownAdditionalProperties(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of . - /// The name property. - /// Keeps track of any properties unknown to the library. - internal IsUnknownAdditionalProperties(string name, IDictionary serializedAdditionalRawData) - { - Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal IsUnknownAdditionalProperties() - { - } - - /// The name property. - public string Name { get; set; } + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs index 14a152fb9f6..a59d1e78375 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.Serialization.cs @@ -37,20 +37,17 @@ void IJsonModel.Write(Utf8JsonWriter write } writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -78,7 +75,7 @@ internal static IsUnknownAdditionalPropertiesDerived DeserializeIsUnknownAdditio int index = default; float? age = default; string name = default; - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -101,13 +98,10 @@ internal static IsUnknownAdditionalPropertiesDerived DeserializeIsUnknownAdditio name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new IsUnknownAdditionalPropertiesDerived(name, serializedAdditionalRawData, index, age); + additionalProperties = additionalPropertiesDictionary; + return new IsUnknownAdditionalPropertiesDerived(name, additionalProperties, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs index 5cbc25764f0..211e5b2c57b 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDerived.cs @@ -27,10 +27,10 @@ public IsUnknownAdditionalPropertiesDerived(string name, int index) : base(name) /// Initializes a new instance of . /// The name property. - /// Keeps track of any properties unknown to the library. + /// Additional Properties. /// The index property. /// The age property. - internal IsUnknownAdditionalPropertiesDerived(string name, IDictionary serializedAdditionalRawData, int index, float? age) : base(name, serializedAdditionalRawData) + internal IsUnknownAdditionalPropertiesDerived(string name, IDictionary additionalProperties, int index, float? age) : base(name, additionalProperties) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index 941655fbf6a..452ccc25dcf 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -32,20 +32,17 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs index 6d2438a1d75..c04f32f5e45 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using Azure.Core; using _Type.Property.AdditionalProperties; namespace _Type.Property.AdditionalProperties.Models @@ -18,8 +19,39 @@ namespace _Type.Property.AdditionalProperties.Models /// public abstract partial class IsUnknownAdditionalPropertiesDiscriminated { + /// Initializes a new instance of . + /// The name property. + /// is null. + protected IsUnknownAdditionalPropertiesDiscriminated(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The discriminator. + /// The name property. + /// Additional Properties. + internal IsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary additionalProperties) + { + Kind = kind; + Name = name; + AdditionalProperties = additionalProperties; + } + + /// Initializes a new instance of for deserialization. + internal IsUnknownAdditionalPropertiesDiscriminated() + { + } + + /// The discriminator. + internal string Kind { get; set; } + /// The name property. + public string Name { get; set; } /// - /// Keeps track of any properties unknown to the library. + /// Additional Properties /// /// To assign an object to the value of this property use . /// @@ -48,37 +80,6 @@ public abstract partial class IsUnknownAdditionalPropertiesDiscriminated /// /// /// - private protected IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name property. - /// is null. - protected IsUnknownAdditionalPropertiesDiscriminated(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of . - /// The discriminator. - /// The name property. - /// Keeps track of any properties unknown to the library. - internal IsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary serializedAdditionalRawData) - { - Kind = kind; - Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal IsUnknownAdditionalPropertiesDiscriminated() - { - } - - /// The discriminator. - internal string Kind { get; set; } - /// The name property. - public string Name { get; set; } + public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs index 200638260b3..f99125be4c2 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs @@ -39,20 +39,17 @@ void IJsonModel.Write(Utf8Jso writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -81,7 +78,7 @@ internal static IsUnknownAdditionalPropertiesDiscriminatedDerived DeserializeIsU float? age = default; string kind = default; string name = default; - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -109,13 +106,10 @@ internal static IsUnknownAdditionalPropertiesDiscriminatedDerived DeserializeIsU name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new IsUnknownAdditionalPropertiesDiscriminatedDerived(kind, name, serializedAdditionalRawData, index, age); + additionalProperties = additionalPropertiesDictionary; + return new IsUnknownAdditionalPropertiesDiscriminatedDerived(kind, name, additionalProperties, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs index 46ad168b919..5b855e6e938 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs @@ -29,10 +29,10 @@ public IsUnknownAdditionalPropertiesDiscriminatedDerived(string name, int index) /// Initializes a new instance of . /// The discriminator. /// The name property. - /// Keeps track of any properties unknown to the library. + /// Additional Properties. /// The index property. /// The age property. - internal IsUnknownAdditionalPropertiesDiscriminatedDerived(string kind, string name, IDictionary serializedAdditionalRawData, int index, float? age) : base(kind, name, serializedAdditionalRawData) + internal IsUnknownAdditionalPropertiesDiscriminatedDerived(string kind, string name, IDictionary additionalProperties, int index, float? age) : base(kind, name, additionalProperties) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs new file mode 100644 index 00000000000..2af08cccf9c --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.Serialization.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; +using _Type.Property.AdditionalProperties; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class ModelForRecord : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModelForRecord)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ModelForRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ModelForRecord)} does not support '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeModelForRecord(document.RootElement, options); + } + + internal static ModelForRecord DeserializeModelForRecord(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= new ModelReaderWriterOptions("W"); + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string state = default; + IDictionary serializedAdditionalRawData = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = additionalPropertiesDictionary; + return new ModelForRecord(state, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ModelForRecord)} does not support '{options.Format}' format."); + } + } + + ModelForRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeModelForRecord(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ModelForRecord)} does not support '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ModelForRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeModelForRecord(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs new file mode 100644 index 00000000000..fb2648570b3 --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ModelForRecord.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using _Type.Property.AdditionalProperties; + +namespace _Type.Property.AdditionalProperties.Models +{ + /// model for record. + public partial class ModelForRecord + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The state property. + /// is null. + public ModelForRecord(string state) + { + Argument.AssertNotNull(state, nameof(state)); + + State = state; + } + + /// Initializes a new instance of . + /// The state property. + /// Keeps track of any properties unknown to the library. + internal ModelForRecord(string state, IDictionary serializedAdditionalRawData) + { + State = state; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ModelForRecord() + { + } + + /// The state property. + public string State { get; set; } + } +} diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index 6f35d41cfe1..0aff08989fa 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -32,20 +32,17 @@ void IJsonModel.Write(Utf8JsonW writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -72,7 +69,7 @@ internal static UnknownExtendsUnknownAdditionalPropertiesDiscriminated Deseriali } string kind = "Unknown"; string name = default; - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -86,13 +83,10 @@ internal static UnknownExtendsUnknownAdditionalPropertiesDiscriminated Deseriali name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownExtendsUnknownAdditionalPropertiesDiscriminated(kind, name, serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new UnknownExtendsUnknownAdditionalPropertiesDiscriminated(kind, name, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs index 22b5eacdca0..d7883a7e0ce 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs @@ -16,8 +16,8 @@ internal partial class UnknownExtendsUnknownAdditionalPropertiesDiscriminated : /// Initializes a new instance of . /// The discriminator. /// The name property. - /// Keeps track of any properties unknown to the library. - internal UnknownExtendsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary serializedAdditionalRawData) : base(kind, name, serializedAdditionalRawData) + /// Additional Properties. + internal UnknownExtendsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary additionalProperties) : base(kind, name, additionalProperties) { } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index 7a9cc842991..c5fe3bc20e7 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -32,20 +32,17 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -72,7 +69,7 @@ internal static UnknownIsUnknownAdditionalPropertiesDiscriminated DeserializeUnk } string kind = "Unknown"; string name = default; - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { @@ -86,13 +83,10 @@ internal static UnknownIsUnknownAdditionalPropertiesDiscriminated DeserializeUnk name = property.Value.GetString(); continue; } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownIsUnknownAdditionalPropertiesDiscriminated(kind, name, serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new UnknownIsUnknownAdditionalPropertiesDiscriminated(kind, name, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs index 7236205e2a3..c66c08d7a0e 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs @@ -16,8 +16,8 @@ internal partial class UnknownIsUnknownAdditionalPropertiesDiscriminated : IsUnk /// Initializes a new instance of . /// The discriminator. /// The name property. - /// Keeps track of any properties unknown to the library. - internal UnknownIsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary serializedAdditionalRawData) : base(kind, name, serializedAdditionalRawData) + /// Additional Properties. + internal UnknownIsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary additionalProperties) : base(kind, name, additionalProperties) { } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json index 4f7e5299fe5..c06d4ed8839 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json @@ -13,14 +13,32 @@ "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "3", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "4", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "5", + "Kind": "Intrinsic", + "Name": "unknown", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [ { - "$id": "3", + "$id": "6", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "4", + "$id": "7", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -32,7 +50,7 @@ ] }, { - "$id": "5", + "$id": "8", "Kind": "Model", "Name": "ExtendsUnknownAdditionalPropertiesDerived", "Namespace": "Type.Property.AdditionalProperties", @@ -44,12 +62,12 @@ }, "Properties": [ { - "$id": "6", + "$id": "9", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "7", + "$id": "10", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -59,12 +77,12 @@ "IsDiscriminator": false }, { - "$id": "8", + "$id": "11", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "9", + "$id": "12", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -76,7 +94,7 @@ ] }, { - "$id": "10", + "$id": "13", "Kind": "Model", "Name": "ExtendsUnknownAdditionalPropertiesDiscriminated", "Namespace": "Type.Property.AdditionalProperties", @@ -84,14 +102,32 @@ "IsNullable": false, "DiscriminatorPropertyName": "kind", "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "14", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "15", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "16", + "Kind": "Intrinsic", + "Name": "unknown", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [ { - "$id": "11", + "$id": "17", "Name": "kind", "SerializedName": "kind", "Description": "The discriminator", "Type": { - "$id": "12", + "$id": "18", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -101,12 +137,12 @@ "IsDiscriminator": true }, { - "$id": "13", + "$id": "19", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "14", + "$id": "20", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -118,21 +154,39 @@ ] }, { - "$id": "15", + "$id": "21", "Kind": "Model", "Name": "IsUnknownAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "22", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "23", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "24", + "Kind": "Intrinsic", + "Name": "unknown", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [ { - "$id": "16", + "$id": "25", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "17", + "$id": "26", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -144,7 +198,7 @@ ] }, { - "$id": "18", + "$id": "27", "Kind": "Model", "Name": "IsUnknownAdditionalPropertiesDerived", "Namespace": "Type.Property.AdditionalProperties", @@ -152,16 +206,16 @@ "IsNullable": false, "Usage": "RoundTrip", "BaseModel": { - "$ref": "15" + "$ref": "21" }, "Properties": [ { - "$id": "19", + "$id": "28", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "20", + "$id": "29", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -171,12 +225,12 @@ "IsDiscriminator": false }, { - "$id": "21", + "$id": "30", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "22", + "$id": "31", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -188,7 +242,7 @@ ] }, { - "$id": "23", + "$id": "32", "Kind": "Model", "Name": "IsUnknownAdditionalPropertiesDiscriminated", "Namespace": "Type.Property.AdditionalProperties", @@ -196,14 +250,32 @@ "IsNullable": false, "DiscriminatorPropertyName": "kind", "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "33", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "34", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "35", + "Kind": "Intrinsic", + "Name": "unknown", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [ { - "$id": "24", + "$id": "36", "Name": "kind", "SerializedName": "kind", "Description": "The discriminator", "Type": { - "$id": "25", + "$id": "37", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -213,12 +285,12 @@ "IsDiscriminator": true }, { - "$id": "26", + "$id": "38", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "27", + "$id": "39", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -230,21 +302,39 @@ ] }, { - "$id": "28", + "$id": "40", "Kind": "Model", "Name": "ExtendsStringAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "41", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "42", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "43", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [ { - "$id": "29", + "$id": "44", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "30", + "$id": "45", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -256,21 +346,39 @@ ] }, { - "$id": "31", + "$id": "46", "Kind": "Model", "Name": "IsStringAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "47", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "48", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "49", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [ { - "$id": "32", + "$id": "50", "Name": "name", "SerializedName": "name", "Description": "The name property", "Type": { - "$id": "33", + "$id": "51", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -282,21 +390,39 @@ ] }, { - "$id": "34", + "$id": "52", "Kind": "Model", "Name": "ExtendsFloatAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "53", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "54", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "55", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [ { - "$id": "35", + "$id": "56", "Name": "id", "SerializedName": "id", "Description": "The id property", "Type": { - "$id": "36", + "$id": "57", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -308,21 +434,39 @@ ] }, { - "$id": "37", + "$id": "58", "Kind": "Model", "Name": "IsFloatAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "59", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "60", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "61", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [ { - "$id": "38", + "$id": "62", "Name": "id", "SerializedName": "id", "Description": "The id property", "Type": { - "$id": "39", + "$id": "63", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -334,47 +478,145 @@ ] }, { - "$id": "40", + "$id": "64", "Kind": "Model", "Name": "ExtendsModelAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "65", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "66", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "67", + "Kind": "Model", + "Name": "ModelForRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "model for record", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "68", + "Name": "state", + "SerializedName": "state", + "Description": "The state property", + "Type": { + "$id": "69", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": false + } + ] + }, + "IsNullable": false + }, "Properties": [] }, { - "$id": "41", + "$ref": "67" + }, + { + "$id": "70", "Kind": "Model", "Name": "IsModelAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "71", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "72", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$ref": "67" + }, + "IsNullable": false + }, "Properties": [] }, { - "$id": "42", + "$id": "73", "Kind": "Model", "Name": "ExtendsModelArrayAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "74", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "75", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "76", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "67" + }, + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [] }, { - "$id": "43", + "$id": "77", "Kind": "Model", "Name": "IsModelArrayAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model is from Record type.", "IsNullable": false, "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "78", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "79", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "80", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "67" + }, + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [] }, { - "$id": "44", + "$id": "81", "Kind": "Model", "Name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", "Namespace": "Type.Property.AdditionalProperties", @@ -383,16 +625,16 @@ "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { - "$ref": "10" + "$ref": "13" }, "Properties": [ { - "$id": "45", + "$id": "82", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "46", + "$id": "83", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -402,12 +644,12 @@ "IsDiscriminator": false }, { - "$id": "47", + "$id": "84", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "48", + "$id": "85", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -419,7 +661,7 @@ ] }, { - "$id": "49", + "$id": "86", "Kind": "Model", "Name": "IsUnknownAdditionalPropertiesDiscriminatedDerived", "Namespace": "Type.Property.AdditionalProperties", @@ -428,16 +670,16 @@ "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { - "$ref": "23" + "$ref": "32" }, "Properties": [ { - "$id": "50", + "$id": "87", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "51", + "$id": "88", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -447,12 +689,12 @@ "IsDiscriminator": false }, { - "$id": "52", + "$id": "89", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "53", + "$id": "90", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -462,63 +704,37 @@ "IsDiscriminator": false } ] - }, - { - "$id": "54", - "Kind": "Model", - "Name": "ModelForRecord", - "Namespace": "Type.Property.AdditionalProperties", - "Description": "model for record", - "IsNullable": false, - "Usage": "RoundTrip", - "Properties": [ - { - "$id": "55", - "Name": "state", - "SerializedName": "state", - "Description": "The state property", - "Type": { - "$id": "56", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false - } - ] } ], "Clients": [ { - "$id": "57", + "$id": "91", "Name": "AdditionalPropertiesClient", "Description": "", "Operations": [], "Protocol": { - "$id": "58" + "$id": "92" }, "Creatable": true }, { - "$id": "59", + "$id": "93", "Name": "ExtendsUnknown", "Description": "", "Operations": [ { - "$id": "60", + "$id": "94", "Name": "get", "ResourceName": "ExtendsUnknown", "Description": "Get call", "Parameters": [ { - "$id": "61", + "$id": "95", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "62", + "$id": "96", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -533,9 +749,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "63", + "$id": "97", "Type": { - "$id": "64", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -544,11 +760,11 @@ } }, { - "$id": "65", + "$id": "99", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "66", + "$id": "100", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -563,9 +779,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "67", + "$id": "101", "Type": { - "$ref": "66" + "$ref": "100" }, "Value": "application/json" } @@ -573,7 +789,7 @@ ], "Responses": [ { - "$id": "68", + "$id": "102", "StatusCodes": [ 200 ], @@ -597,16 +813,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "69", + "$id": "103", "Name": "put", "ResourceName": "ExtendsUnknown", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "70", + "$id": "104", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -624,11 +840,11 @@ "Kind": "Method" }, { - "$id": "71", + "$id": "105", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "72", + "$id": "106", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -643,19 +859,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "73", + "$id": "107", "Type": { - "$ref": "72" + "$ref": "106" }, "Value": "application/json" } }, { - "$id": "74", + "$id": "108", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "75", + "$id": "109", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -670,9 +886,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "76", + "$id": "110", "Type": { - "$ref": "75" + "$ref": "109" }, "Value": "application/json" } @@ -680,7 +896,7 @@ ], "Responses": [ { - "$id": "77", + "$id": "111", "StatusCodes": [ 204 ], @@ -702,31 +918,31 @@ } ], "Protocol": { - "$id": "78" + "$id": "112" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "79", + "$id": "113", "Name": "ExtendsUnknownDerived", "Description": "", "Operations": [ { - "$id": "80", + "$id": "114", "Name": "get", "ResourceName": "ExtendsUnknownDerived", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "81", + "$id": "115", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "82", + "$id": "116", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -741,9 +957,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "83", + "$id": "117", "Type": { - "$ref": "82" + "$ref": "116" }, "Value": "application/json" } @@ -751,12 +967,12 @@ ], "Responses": [ { - "$id": "84", + "$id": "118", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "5" + "$ref": "8" }, "BodyMediaType": "Json", "Headers": [], @@ -775,21 +991,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "85", + "$id": "119", "Name": "put", "ResourceName": "ExtendsUnknownDerived", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "86", + "$id": "120", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "5" + "$ref": "8" }, "Location": "Body", "IsRequired": true, @@ -802,11 +1018,11 @@ "Kind": "Method" }, { - "$id": "87", + "$id": "121", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "88", + "$id": "122", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -821,19 +1037,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "89", + "$id": "123", "Type": { - "$ref": "88" + "$ref": "122" }, "Value": "application/json" } }, { - "$id": "90", + "$id": "124", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "91", + "$id": "125", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -848,9 +1064,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "92", + "$id": "126", "Type": { - "$ref": "91" + "$ref": "125" }, "Value": "application/json" } @@ -858,7 +1074,7 @@ ], "Responses": [ { - "$id": "93", + "$id": "127", "StatusCodes": [ 204 ], @@ -880,31 +1096,31 @@ } ], "Protocol": { - "$id": "94" + "$id": "128" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "95", + "$id": "129", "Name": "ExtendsUnknownDiscriminated", "Description": "", "Operations": [ { - "$id": "96", + "$id": "130", "Name": "get", "ResourceName": "ExtendsUnknownDiscriminated", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "97", + "$id": "131", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "98", + "$id": "132", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -919,9 +1135,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "99", + "$id": "133", "Type": { - "$ref": "98" + "$ref": "132" }, "Value": "application/json" } @@ -929,12 +1145,12 @@ ], "Responses": [ { - "$id": "100", + "$id": "134", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "10" + "$ref": "13" }, "BodyMediaType": "Json", "Headers": [], @@ -953,21 +1169,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "101", + "$id": "135", "Name": "put", "ResourceName": "ExtendsUnknownDiscriminated", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "102", + "$id": "136", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "10" + "$ref": "13" }, "Location": "Body", "IsRequired": true, @@ -980,11 +1196,11 @@ "Kind": "Method" }, { - "$id": "103", + "$id": "137", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "104", + "$id": "138", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -999,19 +1215,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "105", + "$id": "139", "Type": { - "$ref": "104" + "$ref": "138" }, "Value": "application/json" } }, { - "$id": "106", + "$id": "140", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "107", + "$id": "141", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1026,9 +1242,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "108", + "$id": "142", "Type": { - "$ref": "107" + "$ref": "141" }, "Value": "application/json" } @@ -1036,7 +1252,7 @@ ], "Responses": [ { - "$id": "109", + "$id": "143", "StatusCodes": [ 204 ], @@ -1058,31 +1274,31 @@ } ], "Protocol": { - "$id": "110" + "$id": "144" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "111", + "$id": "145", "Name": "IsUnknown", "Description": "", "Operations": [ { - "$id": "112", + "$id": "146", "Name": "get", "ResourceName": "IsUnknown", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "113", + "$id": "147", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "114", + "$id": "148", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1097,9 +1313,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "115", + "$id": "149", "Type": { - "$ref": "114" + "$ref": "148" }, "Value": "application/json" } @@ -1107,12 +1323,12 @@ ], "Responses": [ { - "$id": "116", + "$id": "150", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "15" + "$ref": "21" }, "BodyMediaType": "Json", "Headers": [], @@ -1131,21 +1347,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "117", + "$id": "151", "Name": "put", "ResourceName": "IsUnknown", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "118", + "$id": "152", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "15" + "$ref": "21" }, "Location": "Body", "IsRequired": true, @@ -1158,11 +1374,11 @@ "Kind": "Method" }, { - "$id": "119", + "$id": "153", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "120", + "$id": "154", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1177,19 +1393,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "121", + "$id": "155", "Type": { - "$ref": "120" + "$ref": "154" }, "Value": "application/json" } }, { - "$id": "122", + "$id": "156", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "123", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1204,9 +1420,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "124", + "$id": "158", "Type": { - "$ref": "123" + "$ref": "157" }, "Value": "application/json" } @@ -1214,7 +1430,7 @@ ], "Responses": [ { - "$id": "125", + "$id": "159", "StatusCodes": [ 204 ], @@ -1236,31 +1452,31 @@ } ], "Protocol": { - "$id": "126" + "$id": "160" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "127", + "$id": "161", "Name": "IsUnknownDerived", "Description": "", "Operations": [ { - "$id": "128", + "$id": "162", "Name": "get", "ResourceName": "IsUnknownDerived", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "129", + "$id": "163", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "130", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1275,9 +1491,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "131", + "$id": "165", "Type": { - "$ref": "130" + "$ref": "164" }, "Value": "application/json" } @@ -1285,12 +1501,12 @@ ], "Responses": [ { - "$id": "132", + "$id": "166", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "18" + "$ref": "27" }, "BodyMediaType": "Json", "Headers": [], @@ -1309,21 +1525,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "133", + "$id": "167", "Name": "put", "ResourceName": "IsUnknownDerived", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "134", + "$id": "168", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "18" + "$ref": "27" }, "Location": "Body", "IsRequired": true, @@ -1336,11 +1552,11 @@ "Kind": "Method" }, { - "$id": "135", + "$id": "169", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "136", + "$id": "170", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1355,19 +1571,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "137", + "$id": "171", "Type": { - "$ref": "136" + "$ref": "170" }, "Value": "application/json" } }, { - "$id": "138", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "139", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1382,9 +1598,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "140", + "$id": "174", "Type": { - "$ref": "139" + "$ref": "173" }, "Value": "application/json" } @@ -1392,7 +1608,7 @@ ], "Responses": [ { - "$id": "141", + "$id": "175", "StatusCodes": [ 204 ], @@ -1414,31 +1630,31 @@ } ], "Protocol": { - "$id": "142" + "$id": "176" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "143", + "$id": "177", "Name": "IsUnknownDiscriminated", "Description": "", "Operations": [ { - "$id": "144", + "$id": "178", "Name": "get", "ResourceName": "IsUnknownDiscriminated", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "145", + "$id": "179", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "146", + "$id": "180", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1453,9 +1669,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "147", + "$id": "181", "Type": { - "$ref": "146" + "$ref": "180" }, "Value": "application/json" } @@ -1463,12 +1679,12 @@ ], "Responses": [ { - "$id": "148", + "$id": "182", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "23" + "$ref": "32" }, "BodyMediaType": "Json", "Headers": [], @@ -1487,21 +1703,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "149", + "$id": "183", "Name": "put", "ResourceName": "IsUnknownDiscriminated", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "150", + "$id": "184", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "23" + "$ref": "32" }, "Location": "Body", "IsRequired": true, @@ -1514,11 +1730,11 @@ "Kind": "Method" }, { - "$id": "151", + "$id": "185", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "152", + "$id": "186", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1533,19 +1749,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "153", + "$id": "187", "Type": { - "$ref": "152" + "$ref": "186" }, "Value": "application/json" } }, { - "$id": "154", + "$id": "188", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "155", + "$id": "189", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1560,9 +1776,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "156", + "$id": "190", "Type": { - "$ref": "155" + "$ref": "189" }, "Value": "application/json" } @@ -1570,7 +1786,7 @@ ], "Responses": [ { - "$id": "157", + "$id": "191", "StatusCodes": [ 204 ], @@ -1592,31 +1808,31 @@ } ], "Protocol": { - "$id": "158" + "$id": "192" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "159", + "$id": "193", "Name": "ExtendsString", "Description": "", "Operations": [ { - "$id": "160", + "$id": "194", "Name": "get", "ResourceName": "ExtendsString", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "161", + "$id": "195", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "162", + "$id": "196", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1631,9 +1847,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "163", + "$id": "197", "Type": { - "$ref": "162" + "$ref": "196" }, "Value": "application/json" } @@ -1641,12 +1857,12 @@ ], "Responses": [ { - "$id": "164", + "$id": "198", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "28" + "$ref": "40" }, "BodyMediaType": "Json", "Headers": [], @@ -1665,21 +1881,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "165", + "$id": "199", "Name": "put", "ResourceName": "ExtendsString", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "166", + "$id": "200", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "28" + "$ref": "40" }, "Location": "Body", "IsRequired": true, @@ -1692,11 +1908,11 @@ "Kind": "Method" }, { - "$id": "167", + "$id": "201", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "168", + "$id": "202", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1711,19 +1927,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "169", + "$id": "203", "Type": { - "$ref": "168" + "$ref": "202" }, "Value": "application/json" } }, { - "$id": "170", + "$id": "204", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "171", + "$id": "205", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1738,9 +1954,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "172", + "$id": "206", "Type": { - "$ref": "171" + "$ref": "205" }, "Value": "application/json" } @@ -1748,7 +1964,7 @@ ], "Responses": [ { - "$id": "173", + "$id": "207", "StatusCodes": [ 204 ], @@ -1770,31 +1986,31 @@ } ], "Protocol": { - "$id": "174" + "$id": "208" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "175", + "$id": "209", "Name": "IsString", "Description": "", "Operations": [ { - "$id": "176", + "$id": "210", "Name": "get", "ResourceName": "IsString", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "177", + "$id": "211", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "178", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1809,9 +2025,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "179", + "$id": "213", "Type": { - "$ref": "178" + "$ref": "212" }, "Value": "application/json" } @@ -1819,12 +2035,12 @@ ], "Responses": [ { - "$id": "180", + "$id": "214", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "31" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1843,21 +2059,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "181", + "$id": "215", "Name": "put", "ResourceName": "IsString", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "182", + "$id": "216", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "31" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -1870,11 +2086,11 @@ "Kind": "Method" }, { - "$id": "183", + "$id": "217", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "184", + "$id": "218", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1889,19 +2105,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "185", + "$id": "219", "Type": { - "$ref": "184" + "$ref": "218" }, "Value": "application/json" } }, { - "$id": "186", + "$id": "220", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "187", + "$id": "221", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1916,9 +2132,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "188", + "$id": "222", "Type": { - "$ref": "187" + "$ref": "221" }, "Value": "application/json" } @@ -1926,7 +2142,7 @@ ], "Responses": [ { - "$id": "189", + "$id": "223", "StatusCodes": [ 204 ], @@ -1948,31 +2164,31 @@ } ], "Protocol": { - "$id": "190" + "$id": "224" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "191", + "$id": "225", "Name": "ExtendsFloat", "Description": "", "Operations": [ { - "$id": "192", + "$id": "226", "Name": "get", "ResourceName": "ExtendsFloat", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "193", + "$id": "227", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "194", + "$id": "228", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1987,9 +2203,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "195", + "$id": "229", "Type": { - "$ref": "194" + "$ref": "228" }, "Value": "application/json" } @@ -1997,12 +2213,12 @@ ], "Responses": [ { - "$id": "196", + "$id": "230", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "34" + "$ref": "52" }, "BodyMediaType": "Json", "Headers": [], @@ -2021,21 +2237,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "197", + "$id": "231", "Name": "put", "ResourceName": "ExtendsFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "198", + "$id": "232", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "34" + "$ref": "52" }, "Location": "Body", "IsRequired": true, @@ -2048,11 +2264,11 @@ "Kind": "Method" }, { - "$id": "199", + "$id": "233", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "200", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2067,19 +2283,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "201", + "$id": "235", "Type": { - "$ref": "200" + "$ref": "234" }, "Value": "application/json" } }, { - "$id": "202", + "$id": "236", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "203", + "$id": "237", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2094,9 +2310,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "204", + "$id": "238", "Type": { - "$ref": "203" + "$ref": "237" }, "Value": "application/json" } @@ -2104,7 +2320,7 @@ ], "Responses": [ { - "$id": "205", + "$id": "239", "StatusCodes": [ 204 ], @@ -2126,31 +2342,31 @@ } ], "Protocol": { - "$id": "206" + "$id": "240" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "207", + "$id": "241", "Name": "IsFloat", "Description": "", "Operations": [ { - "$id": "208", + "$id": "242", "Name": "get", "ResourceName": "IsFloat", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "209", + "$id": "243", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "210", + "$id": "244", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2165,9 +2381,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "211", + "$id": "245", "Type": { - "$ref": "210" + "$ref": "244" }, "Value": "application/json" } @@ -2175,12 +2391,12 @@ ], "Responses": [ { - "$id": "212", + "$id": "246", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "37" + "$ref": "58" }, "BodyMediaType": "Json", "Headers": [], @@ -2199,21 +2415,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "213", + "$id": "247", "Name": "put", "ResourceName": "IsFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "214", + "$id": "248", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "37" + "$ref": "58" }, "Location": "Body", "IsRequired": true, @@ -2226,11 +2442,11 @@ "Kind": "Method" }, { - "$id": "215", + "$id": "249", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "216", + "$id": "250", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2245,19 +2461,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "217", + "$id": "251", "Type": { - "$ref": "216" + "$ref": "250" }, "Value": "application/json" } }, { - "$id": "218", + "$id": "252", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "219", + "$id": "253", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2272,9 +2488,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "220", + "$id": "254", "Type": { - "$ref": "219" + "$ref": "253" }, "Value": "application/json" } @@ -2282,7 +2498,7 @@ ], "Responses": [ { - "$id": "221", + "$id": "255", "StatusCodes": [ 204 ], @@ -2304,31 +2520,31 @@ } ], "Protocol": { - "$id": "222" + "$id": "256" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "223", + "$id": "257", "Name": "ExtendsModel", "Description": "", "Operations": [ { - "$id": "224", + "$id": "258", "Name": "get", "ResourceName": "ExtendsModel", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "225", + "$id": "259", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "226", + "$id": "260", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2343,9 +2559,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "227", + "$id": "261", "Type": { - "$ref": "226" + "$ref": "260" }, "Value": "application/json" } @@ -2353,12 +2569,12 @@ ], "Responses": [ { - "$id": "228", + "$id": "262", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "40" + "$ref": "64" }, "BodyMediaType": "Json", "Headers": [], @@ -2377,21 +2593,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "229", + "$id": "263", "Name": "put", "ResourceName": "ExtendsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "230", + "$id": "264", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "40" + "$ref": "64" }, "Location": "Body", "IsRequired": true, @@ -2404,11 +2620,11 @@ "Kind": "Method" }, { - "$id": "231", + "$id": "265", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "232", + "$id": "266", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2423,19 +2639,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "233", + "$id": "267", "Type": { - "$ref": "232" + "$ref": "266" }, "Value": "application/json" } }, { - "$id": "234", + "$id": "268", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "235", + "$id": "269", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2450,9 +2666,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "236", + "$id": "270", "Type": { - "$ref": "235" + "$ref": "269" }, "Value": "application/json" } @@ -2460,7 +2676,7 @@ ], "Responses": [ { - "$id": "237", + "$id": "271", "StatusCodes": [ 204 ], @@ -2482,31 +2698,31 @@ } ], "Protocol": { - "$id": "238" + "$id": "272" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "239", + "$id": "273", "Name": "IsModel", "Description": "", "Operations": [ { - "$id": "240", + "$id": "274", "Name": "get", "ResourceName": "IsModel", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "241", + "$id": "275", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "242", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2521,9 +2737,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "243", + "$id": "277", "Type": { - "$ref": "242" + "$ref": "276" }, "Value": "application/json" } @@ -2531,12 +2747,12 @@ ], "Responses": [ { - "$id": "244", + "$id": "278", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "41" + "$ref": "70" }, "BodyMediaType": "Json", "Headers": [], @@ -2555,21 +2771,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "245", + "$id": "279", "Name": "put", "ResourceName": "IsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "246", + "$id": "280", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "41" + "$ref": "70" }, "Location": "Body", "IsRequired": true, @@ -2582,11 +2798,11 @@ "Kind": "Method" }, { - "$id": "247", + "$id": "281", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "248", + "$id": "282", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2601,19 +2817,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "249", + "$id": "283", "Type": { - "$ref": "248" + "$ref": "282" }, "Value": "application/json" } }, { - "$id": "250", + "$id": "284", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "251", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2628,9 +2844,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "252", + "$id": "286", "Type": { - "$ref": "251" + "$ref": "285" }, "Value": "application/json" } @@ -2638,7 +2854,7 @@ ], "Responses": [ { - "$id": "253", + "$id": "287", "StatusCodes": [ 204 ], @@ -2660,31 +2876,31 @@ } ], "Protocol": { - "$id": "254" + "$id": "288" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "255", + "$id": "289", "Name": "ExtendsModelArray", "Description": "", "Operations": [ { - "$id": "256", + "$id": "290", "Name": "get", "ResourceName": "ExtendsModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "257", + "$id": "291", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "258", + "$id": "292", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2699,9 +2915,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "259", + "$id": "293", "Type": { - "$ref": "258" + "$ref": "292" }, "Value": "application/json" } @@ -2709,12 +2925,12 @@ ], "Responses": [ { - "$id": "260", + "$id": "294", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "42" + "$ref": "73" }, "BodyMediaType": "Json", "Headers": [], @@ -2733,21 +2949,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "261", + "$id": "295", "Name": "put", "ResourceName": "ExtendsModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "262", + "$id": "296", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "42" + "$ref": "73" }, "Location": "Body", "IsRequired": true, @@ -2760,11 +2976,11 @@ "Kind": "Method" }, { - "$id": "263", + "$id": "297", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "264", + "$id": "298", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2779,19 +2995,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "265", + "$id": "299", "Type": { - "$ref": "264" + "$ref": "298" }, "Value": "application/json" } }, { - "$id": "266", + "$id": "300", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "267", + "$id": "301", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2806,9 +3022,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "268", + "$id": "302", "Type": { - "$ref": "267" + "$ref": "301" }, "Value": "application/json" } @@ -2816,7 +3032,7 @@ ], "Responses": [ { - "$id": "269", + "$id": "303", "StatusCodes": [ 204 ], @@ -2838,31 +3054,31 @@ } ], "Protocol": { - "$id": "270" + "$id": "304" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "271", + "$id": "305", "Name": "IsModelArray", "Description": "", "Operations": [ { - "$id": "272", + "$id": "306", "Name": "get", "ResourceName": "IsModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "273", + "$id": "307", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "274", + "$id": "308", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2877,9 +3093,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "275", + "$id": "309", "Type": { - "$ref": "274" + "$ref": "308" }, "Value": "application/json" } @@ -2887,12 +3103,12 @@ ], "Responses": [ { - "$id": "276", + "$id": "310", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "43" + "$ref": "77" }, "BodyMediaType": "Json", "Headers": [], @@ -2911,21 +3127,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "277", + "$id": "311", "Name": "put", "ResourceName": "IsModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "61" + "$ref": "95" }, { - "$id": "278", + "$id": "312", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "43" + "$ref": "77" }, "Location": "Body", "IsRequired": true, @@ -2938,11 +3154,11 @@ "Kind": "Method" }, { - "$id": "279", + "$id": "313", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "280", + "$id": "314", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2957,19 +3173,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "281", + "$id": "315", "Type": { - "$ref": "280" + "$ref": "314" }, "Value": "application/json" } }, { - "$id": "282", + "$id": "316", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "283", + "$id": "317", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2984,9 +3200,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "284", + "$id": "318", "Type": { - "$ref": "283" + "$ref": "317" }, "Value": "application/json" } @@ -2994,7 +3210,7 @@ ], "Responses": [ { - "$id": "285", + "$id": "319", "StatusCodes": [ 204 ], @@ -3016,7 +3232,7 @@ } ], "Protocol": { - "$id": "286" + "$id": "320" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" From 66573733865726e7f89b6eb0345124012c2da0c1 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 13 Mar 2024 23:15:58 +0800 Subject: [PATCH 10/60] fix wrong encoding of bytes and duration --- .../Emitter.Csharp/src/type/converter.ts | 63 ++++++++++++++++++- ...se64urlArrayBytesProperty.Serialization.cs | 4 +- .../Base64urlBytesProperty.Serialization.cs | 4 +- .../bytes/src/Generated/tspCodeModel.json | 4 +- .../duration/src/Generated/Docs/Property.xml | 48 +++++++------- ...ondsDurationArrayProperty.Serialization.cs | 4 +- ...atSecondsDurationProperty.Serialization.cs | 4 +- ...32SecondsDurationProperty.Serialization.cs | 4 +- .../duration/src/Generated/tspCodeModel.json | 6 +- .../Generated/Samples/Samples_Property.cs | 48 +++++++------- 10 files changed, 123 insertions(+), 66 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 35cb717c89c..4346d6d832f 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -7,7 +7,8 @@ import { Type, DateTimeKnownEncoding, Model, - Enum + Enum, + DurationKnownEncoding } from "@typespec/compiler"; import { Usage } from "./usage.js"; import { @@ -25,7 +26,8 @@ import { SdkUnionType, SdkBuiltInKinds, SdkContext, - SdkTupleType + SdkTupleType, + SdkDurationType } from "@azure-tools/typespec-client-generator-core"; import { InputDictionaryType, @@ -51,6 +53,7 @@ import { getFullNamespaceString } from "../lib/utils.js"; import { InputPrimitiveTypeKind } from "./inputPrimitiveTypeKind.js"; import { LiteralTypeContext } from "./literalTypeContext.js"; import { InputIntrinsicTypeKind } from "./inputIntrinsicTypeKind.js"; +import { logger } from "../lib/logger.js"; function fromSdkType( sdkType: SdkType, @@ -74,6 +77,8 @@ function fromSdkType( if (sdkType.kind === "union") return fromUnionType(sdkType, context, models, enums); if (sdkType.kind === "utcDateTime") return fromSdkDatetimeType(sdkType); + if (sdkType.kind === "duration") return fromSdkDurationType(sdkType as SdkDurationType); + if (sdkType.kind === "bytes") return fromBytesType(sdkType as SdkBuiltInType); // TODO: offsetDateTime if (sdkType.kind === "tuple") return fromTupleType(sdkType); if (sdkType.__raw?.kind === "Scalar") return fromScalarType(sdkType); @@ -243,6 +248,35 @@ function fromSdkDatetimeType( } as InputPrimitiveType; } +function fromSdkDurationType( + durationType: SdkDurationType +): InputPrimitiveType { + function fromDurationKnownEncoding( + encode: DurationKnownEncoding, + wireType: SdkBuiltInType + ): InputPrimitiveTypeKind { + switch (encode) { + case "ISO8601": + return InputPrimitiveTypeKind.DurationISO8601; + case "seconds": + if (wireType.kind === "float" || wireType.kind === "float32") { + return InputPrimitiveTypeKind.DurationSecondsFloat; + } + return InputPrimitiveTypeKind.DurationSeconds; + default: + logger.warn( + `invalid encode '${encode}' and wireType '${wireType.kind}' for duration.` + ); + return InputPrimitiveTypeKind.DurationISO8601; + } + } + return { + Kind: InputTypeKind.Primitive, + Name: fromDurationKnownEncoding(durationType.encode, durationType.wireType), + IsNullable: false + } as InputPrimitiveType; +} + function fromTupleType(tupleType: SdkTupleType): InputIntrinsicType { return { Kind: InputTypeKind.Intrinsic, @@ -251,6 +285,29 @@ function fromTupleType(tupleType: SdkTupleType): InputIntrinsicType { } as InputIntrinsicType; } +function fromBytesType(bytesType: SdkBuiltInType): InputPrimitiveType { + function fromBytesEncoding(encode: string) : InputPrimitiveTypeKind { + switch (encode) { + case undefined: + case "base64": + return InputPrimitiveTypeKind.Bytes; + case "base64url": + return InputPrimitiveTypeKind.BytesBase64Url; + default: + logger.warn( + `invalid encode ${encode} for bytes.` + ); + return InputPrimitiveTypeKind.Bytes; + } + } + + return { + Kind: InputTypeKind.Primitive, + Name: fromBytesEncoding(bytesType.encode), + IsNullable: bytesType.nullable + }; +} + export function fromSdkBuiltInType(builtInType: SdkBuiltInType): InputType { const builtInKind: InputPrimitiveTypeKind = mapTypeSpecTypeToCSharpInputTypeKind( @@ -265,7 +322,7 @@ export function fromSdkBuiltInType(builtInType: SdkBuiltInType): InputType { } as InputPrimitiveType; } -export function fromScalarType(scalarType: SdkType): InputPrimitiveType { +function fromScalarType(scalarType: SdkType): InputPrimitiveType { return { Kind: InputTypeKind.Primitive, Name: getCSharpInputTypeKindByPrimitiveModelName( diff --git a/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlArrayBytesProperty.Serialization.cs b/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlArrayBytesProperty.Serialization.cs index 0c80a16dcac..f0e41521e48 100644 --- a/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlArrayBytesProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlArrayBytesProperty.Serialization.cs @@ -37,7 +37,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNullValue(); continue; } - writer.WriteBase64StringValue(item.ToArray(), "D"); + writer.WriteBase64StringValue(item.ToArray(), "U"); } writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -94,7 +94,7 @@ internal static Base64urlArrayBytesProperty DeserializeBase64urlArrayBytesProper } else { - array.Add(BinaryData.FromBytes(item.GetBytesFromBase64("D"))); + array.Add(BinaryData.FromBytes(item.GetBytesFromBase64("U"))); } } value = array; diff --git a/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlBytesProperty.Serialization.cs b/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlBytesProperty.Serialization.cs index 3f6add01895..7effd6c236a 100644 --- a/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlBytesProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/bytes/src/Generated/Models/Base64urlBytesProperty.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStartObject(); writer.WritePropertyName("value"u8); - writer.WriteBase64StringValue(Value.ToArray(), "D"); + writer.WriteBase64StringValue(Value.ToArray(), "U"); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,7 +75,7 @@ internal static Base64urlBytesProperty DeserializeBase64urlBytesProperty(JsonEle { if (property.NameEquals("value"u8)) { - value = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); + value = BinaryData.FromBytes(property.Value.GetBytesFromBase64("U")); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json index ff54ab7b281..7092659c29f 100644 --- a/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json @@ -71,7 +71,7 @@ "Type": { "$id": "10", "Kind": "Primitive", - "Name": "Bytes", + "Name": "BytesBase64Url", "IsNullable": false }, "IsRequired": true, @@ -100,7 +100,7 @@ "ElementType": { "$id": "14", "Kind": "Primitive", - "Name": "Bytes", + "Name": "BytesBase64Url", "IsNullable": false }, "IsNullable": false diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/Docs/Property.xml b/test/CadlRanchProjects/encode/duration/src/Generated/Docs/Property.xml index 215a112a18c..b8595b0cdb5 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/Docs/Property.xml +++ b/test/CadlRanchProjects/encode/duration/src/Generated/Docs/Property.xml @@ -191,14 +191,14 @@ This sample shows how to call Int32SecondsAsync. response = await client.Int32SecondsAsync(body); ]]> This sample shows how to call Int32SecondsAsync with all parameters. response = await client.Int32SecondsAsync(body); ]]> @@ -208,14 +208,14 @@ This sample shows how to call Int32Seconds. response = client.Int32Seconds(body); ]]> This sample shows how to call Int32Seconds with all parameters. response = client.Int32Seconds(body); ]]> @@ -227,7 +227,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10, }); Response response = await client.Int32SecondsAsync(content); @@ -240,7 +240,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10, }); Response response = await client.Int32SecondsAsync(content); @@ -256,7 +256,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10, }); Response response = client.Int32Seconds(content); @@ -269,7 +269,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10, }); Response response = client.Int32Seconds(content); @@ -283,14 +283,14 @@ This sample shows how to call FloatSecondsAsync. response = await client.FloatSecondsAsync(body); ]]> This sample shows how to call FloatSecondsAsync with all parameters. response = await client.FloatSecondsAsync(body); ]]> @@ -300,14 +300,14 @@ This sample shows how to call FloatSeconds. response = client.FloatSeconds(body); ]]> This sample shows how to call FloatSeconds with all parameters. response = client.FloatSeconds(body); ]]> @@ -319,7 +319,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10F, }); Response response = await client.FloatSecondsAsync(content); @@ -332,7 +332,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10F, }); Response response = await client.FloatSecondsAsync(content); @@ -348,7 +348,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10F, }); Response response = client.FloatSeconds(content); @@ -361,7 +361,7 @@ Property client = new DurationClient().GetPropertyClient(); using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10F, }); Response response = client.FloatSeconds(content); @@ -375,14 +375,14 @@ This sample shows how to call FloatSecondsArrayAsync. response = await client.FloatSecondsArrayAsync(body); ]]> This sample shows how to call FloatSecondsArrayAsync with all parameters. response = await client.FloatSecondsArrayAsync(body); ]]> @@ -392,14 +392,14 @@ This sample shows how to call FloatSecondsArray. response = client.FloatSecondsArray(body); ]]> This sample shows how to call FloatSecondsArray with all parameters. response = client.FloatSecondsArray(body); ]]> @@ -413,7 +413,7 @@ using RequestContent content = RequestContent.Create(new { value = new object[] { - "PT1H23M45S" + 10F }, }); Response response = await client.FloatSecondsArrayAsync(content); @@ -429,7 +429,7 @@ using RequestContent content = RequestContent.Create(new { value = new object[] { - "PT1H23M45S" + 10F }, }); Response response = await client.FloatSecondsArrayAsync(content); @@ -448,7 +448,7 @@ using RequestContent content = RequestContent.Create(new { value = new object[] { - "PT1H23M45S" + 10F }, }); Response response = client.FloatSecondsArray(content); @@ -464,7 +464,7 @@ using RequestContent content = RequestContent.Create(new { value = new object[] { - "PT1H23M45S" + 10F }, }); Response response = client.FloatSecondsArray(content); diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationArrayProperty.Serialization.cs b/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationArrayProperty.Serialization.cs index dc473b5050c..8d1fe8512f8 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationArrayProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationArrayProperty.Serialization.cs @@ -32,7 +32,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStartArray(); foreach (var item in Value) { - writer.WriteStringValue(item, "P"); + writer.WriteNumberValue(Convert.ToDouble(item.ToString("s\\.fff"))); } writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -83,7 +83,7 @@ internal static FloatSecondsDurationArrayProperty DeserializeFloatSecondsDuratio List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetTimeSpan("P")); + array.Add(TimeSpan.FromSeconds(item.GetDouble())); } value = array; continue; diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationProperty.Serialization.cs b/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationProperty.Serialization.cs index 40e71851b6a..f5204596d04 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/duration/src/Generated/Models/FloatSecondsDurationProperty.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStartObject(); writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value, "P"); + writer.WriteNumberValue(Convert.ToDouble(Value.ToString("s\\.fff"))); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,7 +75,7 @@ internal static FloatSecondsDurationProperty DeserializeFloatSecondsDurationProp { if (property.NameEquals("value"u8)) { - value = property.Value.GetTimeSpan("P"); + value = TimeSpan.FromSeconds(property.Value.GetDouble()); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/Models/Int32SecondsDurationProperty.Serialization.cs b/test/CadlRanchProjects/encode/duration/src/Generated/Models/Int32SecondsDurationProperty.Serialization.cs index 711f759982e..0607dea080c 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/Models/Int32SecondsDurationProperty.Serialization.cs +++ b/test/CadlRanchProjects/encode/duration/src/Generated/Models/Int32SecondsDurationProperty.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStartObject(); writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value, "P"); + writer.WriteNumberValue(Convert.ToInt32(Value.ToString("%s"))); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,7 +75,7 @@ internal static Int32SecondsDurationProperty DeserializeInt32SecondsDurationProp { if (property.NameEquals("value"u8)) { - value = property.Value.GetTimeSpan("P"); + value = TimeSpan.FromSeconds(property.Value.GetInt32()); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json index cff046a673e..6ef40953aa1 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json @@ -71,7 +71,7 @@ "Type": { "$id": "10", "Kind": "Primitive", - "Name": "DurationISO8601", + "Name": "DurationSeconds", "IsNullable": false }, "IsRequired": true, @@ -96,7 +96,7 @@ "Type": { "$id": "13", "Kind": "Primitive", - "Name": "DurationISO8601", + "Name": "DurationSecondsFloat", "IsNullable": false }, "IsRequired": true, @@ -125,7 +125,7 @@ "ElementType": { "$id": "17", "Kind": "Primitive", - "Name": "DurationISO8601", + "Name": "DurationSecondsFloat", "IsNullable": false }, "IsNullable": false diff --git a/test/CadlRanchProjects/encode/duration/tests/Generated/Samples/Samples_Property.cs b/test/CadlRanchProjects/encode/duration/tests/Generated/Samples/Samples_Property.cs index 0950e4f95be..489b64384c1 100644 --- a/test/CadlRanchProjects/encode/duration/tests/Generated/Samples/Samples_Property.cs +++ b/test/CadlRanchProjects/encode/duration/tests/Generated/Samples/Samples_Property.cs @@ -236,7 +236,7 @@ public void Example_Property_Int32Seconds_ShortVersion() using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10, }); Response response = client.Int32Seconds(content); @@ -252,7 +252,7 @@ public async Task Example_Property_Int32Seconds_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10, }); Response response = await client.Int32SecondsAsync(content); @@ -266,7 +266,7 @@ public void Example_Property_Int32Seconds_ShortVersion_Convenience() { Property client = new DurationClient().GetPropertyClient(); - Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); + Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(TimeSpan.FromSeconds(10)); Response response = client.Int32Seconds(body); } @@ -276,7 +276,7 @@ public async Task Example_Property_Int32Seconds_ShortVersion_Convenience_Async() { Property client = new DurationClient().GetPropertyClient(); - Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); + Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(TimeSpan.FromSeconds(10)); Response response = await client.Int32SecondsAsync(body); } @@ -288,7 +288,7 @@ public void Example_Property_Int32Seconds_AllParameters() using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10, }); Response response = client.Int32Seconds(content); @@ -304,7 +304,7 @@ public async Task Example_Property_Int32Seconds_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10, }); Response response = await client.Int32SecondsAsync(content); @@ -318,7 +318,7 @@ public void Example_Property_Int32Seconds_AllParameters_Convenience() { Property client = new DurationClient().GetPropertyClient(); - Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); + Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(TimeSpan.FromSeconds(10)); Response response = client.Int32Seconds(body); } @@ -328,7 +328,7 @@ public async Task Example_Property_Int32Seconds_AllParameters_Convenience_Async( { Property client = new DurationClient().GetPropertyClient(); - Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); + Int32SecondsDurationProperty body = new Int32SecondsDurationProperty(TimeSpan.FromSeconds(10)); Response response = await client.Int32SecondsAsync(body); } @@ -340,7 +340,7 @@ public void Example_Property_FloatSeconds_ShortVersion() using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10F, }); Response response = client.FloatSeconds(content); @@ -356,7 +356,7 @@ public async Task Example_Property_FloatSeconds_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10F, }); Response response = await client.FloatSecondsAsync(content); @@ -370,7 +370,7 @@ public void Example_Property_FloatSeconds_ShortVersion_Convenience() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); + FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(TimeSpan.FromSeconds(10F)); Response response = client.FloatSeconds(body); } @@ -380,7 +380,7 @@ public async Task Example_Property_FloatSeconds_ShortVersion_Convenience_Async() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); + FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(TimeSpan.FromSeconds(10F)); Response response = await client.FloatSecondsAsync(body); } @@ -392,7 +392,7 @@ public void Example_Property_FloatSeconds_AllParameters() using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10F, }); Response response = client.FloatSeconds(content); @@ -408,7 +408,7 @@ public async Task Example_Property_FloatSeconds_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - value = "PT1H23M45S", + value = 10F, }); Response response = await client.FloatSecondsAsync(content); @@ -422,7 +422,7 @@ public void Example_Property_FloatSeconds_AllParameters_Convenience() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); + FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(TimeSpan.FromSeconds(10F)); Response response = client.FloatSeconds(body); } @@ -432,7 +432,7 @@ public async Task Example_Property_FloatSeconds_AllParameters_Convenience_Async( { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(XmlConvert.ToTimeSpan("PT1H23M45S")); + FloatSecondsDurationProperty body = new FloatSecondsDurationProperty(TimeSpan.FromSeconds(10F)); Response response = await client.FloatSecondsAsync(body); } @@ -446,7 +446,7 @@ public void Example_Property_FloatSecondsArray_ShortVersion() { value = new object[] { -"PT1H23M45S" +10F }, }); Response response = client.FloatSecondsArray(content); @@ -465,7 +465,7 @@ public async Task Example_Property_FloatSecondsArray_ShortVersion_Async() { value = new object[] { -"PT1H23M45S" +10F }, }); Response response = await client.FloatSecondsArrayAsync(content); @@ -480,7 +480,7 @@ public void Example_Property_FloatSecondsArray_ShortVersion_Convenience() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { XmlConvert.ToTimeSpan("PT1H23M45S") }); + FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { TimeSpan.FromSeconds(10F) }); Response response = client.FloatSecondsArray(body); } @@ -490,7 +490,7 @@ public async Task Example_Property_FloatSecondsArray_ShortVersion_Convenience_As { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { XmlConvert.ToTimeSpan("PT1H23M45S") }); + FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { TimeSpan.FromSeconds(10F) }); Response response = await client.FloatSecondsArrayAsync(body); } @@ -504,7 +504,7 @@ public void Example_Property_FloatSecondsArray_AllParameters() { value = new object[] { -"PT1H23M45S" +10F }, }); Response response = client.FloatSecondsArray(content); @@ -523,7 +523,7 @@ public async Task Example_Property_FloatSecondsArray_AllParameters_Async() { value = new object[] { -"PT1H23M45S" +10F }, }); Response response = await client.FloatSecondsArrayAsync(content); @@ -538,7 +538,7 @@ public void Example_Property_FloatSecondsArray_AllParameters_Convenience() { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { XmlConvert.ToTimeSpan("PT1H23M45S") }); + FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { TimeSpan.FromSeconds(10F) }); Response response = client.FloatSecondsArray(body); } @@ -548,7 +548,7 @@ public async Task Example_Property_FloatSecondsArray_AllParameters_Convenience_A { Property client = new DurationClient().GetPropertyClient(); - FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { XmlConvert.ToTimeSpan("PT1H23M45S") }); + FloatSecondsDurationArrayProperty body = new FloatSecondsDurationArrayProperty(new TimeSpan[] { TimeSpan.FromSeconds(10F) }); Response response = await client.FloatSecondsArrayAsync(body); } } From 4747ac18b8eae8f434595e9720070b55cd7428ac Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 13 Mar 2024 23:18:34 +0800 Subject: [PATCH 11/60] fix nullable of datetime and duration --- .../Emitter.Csharp/src/type/converter.ts | 8 ++++---- .../Models/DatetimeProperty.Serialization.cs | 18 +++++++++++++++--- .../src/Generated/Models/DatetimeProperty.cs | 6 +++--- .../nullable/src/Generated/tspCodeModel.json | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 4346d6d832f..1445a84a5f0 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -227,7 +227,7 @@ export function fromSdkEnumType( } function fromSdkDatetimeType( - datetimeType: SdkDatetimeType + dateTimeType: SdkDatetimeType ): InputPrimitiveType { function fromDateTimeKnownEncoding( encoding: DateTimeKnownEncoding @@ -243,8 +243,8 @@ function fromSdkDatetimeType( } return { Kind: InputTypeKind.Primitive, - Name: fromDateTimeKnownEncoding(datetimeType.encode), - IsNullable: false + Name: fromDateTimeKnownEncoding(dateTimeType.encode), + IsNullable: dateTimeType.nullable } as InputPrimitiveType; } @@ -273,7 +273,7 @@ function fromSdkDurationType( return { Kind: InputTypeKind.Primitive, Name: fromDurationKnownEncoding(durationType.encode, durationType.wireType), - IsNullable: false + IsNullable: durationType.nullable } as InputPrimitiveType; } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs index 836694bf896..933af48b86f 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.Serialization.cs @@ -30,8 +30,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStartObject(); writer.WritePropertyName("requiredProperty"u8); writer.WriteStringValue(RequiredProperty); - writer.WritePropertyName("nullableProperty"u8); - writer.WriteStringValue(NullableProperty, "O"); + if (NullableProperty != null) + { + writer.WritePropertyName("nullableProperty"u8); + writer.WriteStringValue(NullableProperty.Value, "O"); + } + else + { + writer.WriteNull("nullableProperty"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -71,7 +78,7 @@ internal static DatetimeProperty DeserializeDatetimeProperty(JsonElement element return null; } string requiredProperty = default; - DateTimeOffset nullableProperty = default; + DateTimeOffset? nullableProperty = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -83,6 +90,11 @@ internal static DatetimeProperty DeserializeDatetimeProperty(JsonElement element } if (property.NameEquals("nullableProperty"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nullableProperty = null; + continue; + } nullableProperty = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.cs b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.cs index f208995ac17..1713f32b264 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.cs +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/Models/DatetimeProperty.cs @@ -50,7 +50,7 @@ public partial class DatetimeProperty /// Required property. /// Property. /// is null. - public DatetimeProperty(string requiredProperty, DateTimeOffset nullableProperty) + public DatetimeProperty(string requiredProperty, DateTimeOffset? nullableProperty) { Argument.AssertNotNull(requiredProperty, nameof(requiredProperty)); @@ -62,7 +62,7 @@ public DatetimeProperty(string requiredProperty, DateTimeOffset nullableProperty /// Required property. /// Property. /// Keeps track of any properties unknown to the library. - internal DatetimeProperty(string requiredProperty, DateTimeOffset nullableProperty, IDictionary serializedAdditionalRawData) + internal DatetimeProperty(string requiredProperty, DateTimeOffset? nullableProperty, IDictionary serializedAdditionalRawData) { RequiredProperty = requiredProperty; NullableProperty = nullableProperty; @@ -77,6 +77,6 @@ internal DatetimeProperty() /// Required property. public string RequiredProperty { get; set; } /// Property. - public DateTimeOffset NullableProperty { get; set; } + public DateTimeOffset? NullableProperty { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json index f64e74b16f2..b73d694cf00 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json @@ -120,7 +120,7 @@ "$id": "16", "Kind": "Primitive", "Name": "DateTimeRFC3339", - "IsNullable": false + "IsNullable": true }, "IsRequired": true, "IsReadOnly": false, From 9a467297f222153eb2e25ba38dbccca4e3e67e36 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 13 Mar 2024 23:43:19 +0800 Subject: [PATCH 12/60] regen --- .../src/Generated/tspCodeModel.json | 906 ++++---- .../src/Generated/tspCodeModel.json | 198 +- ...pletionFunctionParameters.Serialization.cs | 26 +- .../ChatCompletionFunctionParameters.cs | 30 +- .../Models/FineTuningJob.Serialization.cs | 18 +- .../src/Generated/Models/FineTuningJob.cs | 6 +- .../src/Generated/OpenAIModelFactory.cs | 2 +- .../src/Generated/tspCodeModel.json | 1932 +++++++++-------- 8 files changed, 1590 insertions(+), 1528 deletions(-) diff --git a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json index ac6e081800a..b59c1619dda 100644 --- a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json @@ -210,6 +210,24 @@ "Description": "Represents the settings used to define the project behavior.", "IsNullable": false, "Usage": "None", + "InheritedDictionaryType": { + "$id": "30", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "31", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "32", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [] }, "IsRequired": false, @@ -217,12 +235,12 @@ "IsDiscriminator": false }, { - "$id": "30", + "$id": "33", "Name": "multilingual", "SerializedName": "multilingual", "Description": "Whether the project would be used for multiple languages or not.", "Type": { - "$id": "31", + "$id": "34", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -232,12 +250,12 @@ "IsDiscriminator": false }, { - "$id": "32", + "$id": "35", "Name": "description", "SerializedName": "description", "Description": "The project description.", "Type": { - "$id": "33", + "$id": "36", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -247,12 +265,12 @@ "IsDiscriminator": false }, { - "$id": "34", + "$id": "37", "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": "35", + "$id": "38", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -262,12 +280,12 @@ "IsDiscriminator": false }, { - "$id": "36", + "$id": "39", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "Represents the project creation datetime.", "Type": { - "$id": "37", + "$id": "40", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -277,12 +295,12 @@ "IsDiscriminator": false }, { - "$id": "38", + "$id": "41", "Name": "lastModifiedDateTime", "SerializedName": "lastModifiedDateTime", "Description": "Represents the project last modification datetime.", "Type": { - "$id": "39", + "$id": "42", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -292,12 +310,12 @@ "IsDiscriminator": false }, { - "$id": "40", + "$id": "43", "Name": "lastTrainedDateTime", "SerializedName": "lastTrainedDateTime", "Description": "Represents the project last training datetime.", "Type": { - "$id": "41", + "$id": "44", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -307,12 +325,12 @@ "IsDiscriminator": false }, { - "$id": "42", + "$id": "45", "Name": "lastDeployedDateTime", "SerializedName": "lastDeployedDateTime", "Description": "Represents the project last deployment datetime.", "Type": { - "$id": "43", + "$id": "46", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -327,7 +345,7 @@ "$ref": "29" }, { - "$id": "44", + "$id": "47", "Kind": "Model", "Name": "OperationStatusneverError", "Namespace": "Azure.Core.Foundations", @@ -336,12 +354,12 @@ "Usage": "None", "Properties": [ { - "$id": "45", + "$id": "48", "Name": "id", "SerializedName": "id", "Description": "The unique ID of the operation.", "Type": { - "$id": "46", + "$id": "49", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -351,7 +369,7 @@ "IsDiscriminator": false }, { - "$id": "47", + "$id": "50", "Name": "status", "SerializedName": "status", "Description": "The status of the operation", @@ -363,12 +381,12 @@ "IsDiscriminator": false }, { - "$id": "48", + "$id": "51", "Name": "error", "SerializedName": "error", "Description": "Error object that describes the error when status is \"Failed\".", "Type": { - "$id": "49", + "$id": "52", "Kind": "Model", "Name": "Error", "Namespace": "Azure.Core.Foundations", @@ -377,12 +395,12 @@ "Usage": "Output", "Properties": [ { - "$id": "50", + "$id": "53", "Name": "code", "SerializedName": "code", "Description": "One of a server-defined set of error codes.", "Type": { - "$id": "51", + "$id": "54", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -392,12 +410,12 @@ "IsDiscriminator": false }, { - "$id": "52", + "$id": "55", "Name": "message", "SerializedName": "message", "Description": "A human-readable representation of the error.", "Type": { - "$id": "53", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -407,12 +425,12 @@ "IsDiscriminator": false }, { - "$id": "54", + "$id": "57", "Name": "target", "SerializedName": "target", "Description": "The target of the error.", "Type": { - "$id": "55", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -422,16 +440,16 @@ "IsDiscriminator": false }, { - "$id": "56", + "$id": "59", "Name": "details", "SerializedName": "details", "Description": "An array of details about specific errors that led to this reported error.", "Type": { - "$id": "57", + "$id": "60", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "49" + "$ref": "52" }, "IsNullable": false }, @@ -440,12 +458,12 @@ "IsDiscriminator": false }, { - "$id": "58", + "$id": "61", "Name": "innererror", "SerializedName": "innererror", "Description": "An object containing more specific information than the current object about the error.", "Type": { - "$id": "59", + "$id": "62", "Kind": "Model", "Name": "InnerError", "Namespace": "Azure.Core.Foundations", @@ -454,12 +472,12 @@ "Usage": "Output", "Properties": [ { - "$id": "60", + "$id": "63", "Name": "code", "SerializedName": "code", "Description": "One of a server-defined set of error codes.", "Type": { - "$id": "61", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -469,12 +487,12 @@ "IsDiscriminator": false }, { - "$id": "62", + "$id": "65", "Name": "InnerErrorObject", "SerializedName": "innererror", "Description": "Inner error.", "Type": { - "$ref": "59" + "$ref": "62" }, "IsRequired": false, "IsReadOnly": false, @@ -495,13 +513,13 @@ ] }, { - "$ref": "49" + "$ref": "52" }, { - "$ref": "59" + "$ref": "62" }, { - "$id": "63", + "$id": "66", "Kind": "Model", "Name": "PagedProjectProject", "Namespace": "Azure.Core.Foundations", @@ -510,12 +528,12 @@ "Usage": "None", "Properties": [ { - "$id": "64", + "$id": "67", "Name": "value", "SerializedName": "value", "Description": "The Project items on this page", "Type": { - "$id": "65", + "$id": "68", "Kind": "Array", "Name": "Array", "ElementType": { @@ -528,12 +546,12 @@ "IsDiscriminator": false }, { - "$id": "66", + "$id": "69", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "67", + "$id": "70", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -545,7 +563,7 @@ ] }, { - "$id": "68", + "$id": "71", "Kind": "Model", "Name": "TrainingJobOptions", "Namespace": "AuthoringTypeSpec", @@ -554,12 +572,12 @@ "Usage": "None", "Properties": [ { - "$id": "69", + "$id": "72", "Name": "modelLabel", "SerializedName": "modelLabel", "Description": "", "Type": { - "$id": "70", + "$id": "73", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -571,7 +589,7 @@ ] }, { - "$id": "71", + "$id": "74", "Kind": "Model", "Name": "Deployment", "Namespace": "AuthoringTypeSpec", @@ -579,12 +597,12 @@ "Usage": "None", "Properties": [ { - "$id": "72", + "$id": "75", "Name": "name", "SerializedName": "name", "Description": "", "Type": { - "$id": "73", + "$id": "76", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -596,7 +614,7 @@ ] }, { - "$id": "74", + "$id": "77", "Kind": "Model", "Name": "PagedDeploymentDeployment", "Namespace": "Azure.Core.Foundations", @@ -605,16 +623,16 @@ "Usage": "None", "Properties": [ { - "$id": "75", + "$id": "78", "Name": "value", "SerializedName": "value", "Description": "The Deployment items on this page", "Type": { - "$id": "76", + "$id": "79", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "71" + "$ref": "74" }, "IsNullable": false }, @@ -623,12 +641,12 @@ "IsDiscriminator": false }, { - "$id": "77", + "$id": "80", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "78", + "$id": "81", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -640,7 +658,7 @@ ] }, { - "$id": "79", + "$id": "82", "Kind": "Model", "Name": "SwapDeploymentsOptions", "Namespace": "AuthoringTypeSpec", @@ -648,12 +666,12 @@ "Usage": "None", "Properties": [ { - "$id": "80", + "$id": "83", "Name": "firstDeploymentName", "SerializedName": "firstDeploymentName", "Description": "Represents the first deployment name.", "Type": { - "$id": "81", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -663,12 +681,12 @@ "IsDiscriminator": false }, { - "$id": "82", + "$id": "85", "Name": "secondDeploymentName", "SerializedName": "secondDeploymentName", "Description": "Represents the second deployment name.", "Type": { - "$id": "83", + "$id": "86", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -680,7 +698,7 @@ ] }, { - "$id": "84", + "$id": "87", "Kind": "Model", "Name": "DeploymentJob", "Namespace": "AuthoringTypeSpec", @@ -688,12 +706,12 @@ "Usage": "Output", "Properties": [ { - "$id": "85", + "$id": "88", "Name": "jobId", "SerializedName": "jobId", "Description": "The job ID.", "Type": { - "$id": "86", + "$id": "89", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -703,12 +721,12 @@ "IsDiscriminator": false }, { - "$id": "87", + "$id": "90", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The creation date time of the job.", "Type": { - "$id": "88", + "$id": "91", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -718,12 +736,12 @@ "IsDiscriminator": false }, { - "$id": "89", + "$id": "92", "Name": "lastUpdatedDateTime", "SerializedName": "lastUpdatedDateTime", "Description": "The the last date time the job was updated.", "Type": { - "$id": "90", + "$id": "93", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -733,12 +751,12 @@ "IsDiscriminator": false }, { - "$id": "91", + "$id": "94", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The expiration date time of the job.", "Type": { - "$id": "92", + "$id": "95", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -748,7 +766,7 @@ "IsDiscriminator": false }, { - "$id": "93", + "$id": "96", "Name": "status", "SerializedName": "status", "Description": "The job status.", @@ -760,16 +778,16 @@ "IsDiscriminator": false }, { - "$id": "94", + "$id": "97", "Name": "warnings", "SerializedName": "warnings", "Description": "The warnings that were encountered while executing the job.", "Type": { - "$id": "95", + "$id": "98", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "96", + "$id": "99", "Kind": "Model", "Name": "JobWarning", "Namespace": "AuthoringTypeSpec", @@ -778,12 +796,12 @@ "Usage": "Output", "Properties": [ { - "$id": "97", + "$id": "100", "Name": "code", "SerializedName": "code", "Description": "The warning code.", "Type": { - "$id": "98", + "$id": "101", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -793,12 +811,12 @@ "IsDiscriminator": false }, { - "$id": "99", + "$id": "102", "Name": "message", "SerializedName": "message", "Description": "The warning message.", "Type": { - "$id": "100", + "$id": "103", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -816,24 +834,24 @@ "IsDiscriminator": false }, { - "$id": "101", + "$id": "104", "Name": "errors", "SerializedName": "errors", "Description": "The errors encountered while executing the job.", "Type": { - "$ref": "49" + "$ref": "52" }, "IsRequired": true, "IsReadOnly": false, "IsDiscriminator": false }, { - "$id": "102", + "$id": "105", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "103", + "$id": "106", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -845,10 +863,10 @@ ] }, { - "$ref": "96" + "$ref": "99" }, { - "$id": "104", + "$id": "107", "Kind": "Model", "Name": "SwapDeploymentsJob", "Namespace": "AuthoringTypeSpec", @@ -856,12 +874,12 @@ "Usage": "Output", "Properties": [ { - "$id": "105", + "$id": "108", "Name": "jobId", "SerializedName": "jobId", "Description": "The job ID.", "Type": { - "$id": "106", + "$id": "109", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -871,12 +889,12 @@ "IsDiscriminator": false }, { - "$id": "107", + "$id": "110", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The creation date time of the job.", "Type": { - "$id": "108", + "$id": "111", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -886,12 +904,12 @@ "IsDiscriminator": false }, { - "$id": "109", + "$id": "112", "Name": "lastUpdatedDateTime", "SerializedName": "lastUpdatedDateTime", "Description": "The the last date time the job was updated.", "Type": { - "$id": "110", + "$id": "113", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -901,12 +919,12 @@ "IsDiscriminator": false }, { - "$id": "111", + "$id": "114", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The expiration date time of the job.", "Type": { - "$id": "112", + "$id": "115", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -916,7 +934,7 @@ "IsDiscriminator": false }, { - "$id": "113", + "$id": "116", "Name": "status", "SerializedName": "status", "Description": "The job status.", @@ -928,16 +946,16 @@ "IsDiscriminator": false }, { - "$id": "114", + "$id": "117", "Name": "warnings", "SerializedName": "warnings", "Description": "The warnings that were encountered while executing the job.", "Type": { - "$id": "115", + "$id": "118", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "96" + "$ref": "99" }, "IsNullable": false }, @@ -946,24 +964,24 @@ "IsDiscriminator": false }, { - "$id": "116", + "$id": "119", "Name": "errors", "SerializedName": "errors", "Description": "The errors encountered while executing the job.", "Type": { - "$ref": "49" + "$ref": "52" }, "IsRequired": true, "IsReadOnly": false, "IsDiscriminator": false }, { - "$id": "117", + "$id": "120", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "118", + "$id": "121", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -975,7 +993,7 @@ ] }, { - "$id": "119", + "$id": "122", "Kind": "Model", "Name": "PagedSupportedLanguage", "Namespace": "AuthoringTypeSpec", @@ -984,16 +1002,16 @@ "Usage": "None", "Properties": [ { - "$id": "120", + "$id": "123", "Name": "value", "SerializedName": "value", "Description": "The SupportedLanguage items on this page", "Type": { - "$id": "121", + "$id": "124", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "122", + "$id": "125", "Kind": "Model", "Name": "SupportedLanguage", "Namespace": "AuthoringTypeSpec", @@ -1002,12 +1020,12 @@ "Usage": "None", "Properties": [ { - "$id": "123", + "$id": "126", "Name": "languageName", "SerializedName": "languageName", "Description": "The language name.", "Type": { - "$id": "124", + "$id": "127", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1017,12 +1035,12 @@ "IsDiscriminator": false }, { - "$id": "125", + "$id": "128", "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": "126", + "$id": "129", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1040,12 +1058,12 @@ "IsDiscriminator": false }, { - "$id": "127", + "$id": "130", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "128", + "$id": "131", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1057,10 +1075,10 @@ ] }, { - "$ref": "122" + "$ref": "125" }, { - "$id": "129", + "$id": "132", "Kind": "Model", "Name": "PagedTrainingConfigVersion", "Namespace": "AuthoringTypeSpec", @@ -1069,16 +1087,16 @@ "Usage": "None", "Properties": [ { - "$id": "130", + "$id": "133", "Name": "value", "SerializedName": "value", "Description": "The TrainingConfigVersion items on this page", "Type": { - "$id": "131", + "$id": "134", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "132", + "$id": "135", "Kind": "Model", "Name": "TrainingConfigVersion", "Namespace": "AuthoringTypeSpec", @@ -1087,12 +1105,12 @@ "Usage": "None", "Properties": [ { - "$id": "133", + "$id": "136", "Name": "trainingConfigVersionStr", "SerializedName": "trainingConfigVersionStr", "Description": "Represents the version of the config.", "Type": { - "$id": "134", + "$id": "137", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1102,12 +1120,12 @@ "IsDiscriminator": false }, { - "$id": "135", + "$id": "138", "Name": "modelExpirationDate", "SerializedName": "modelExpirationDate", "Description": "Represents the training config version expiration date.", "Type": { - "$id": "136", + "$id": "139", "Kind": "Primitive", "Name": "Date", "IsNullable": false @@ -1125,12 +1143,12 @@ "IsDiscriminator": false }, { - "$id": "137", + "$id": "140", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "138", + "$id": "141", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1142,10 +1160,10 @@ ] }, { - "$ref": "132" + "$ref": "135" }, { - "$id": "139", + "$id": "142", "Kind": "Model", "Name": "Job", "Namespace": "AuthoringTypeSpec", @@ -1153,12 +1171,12 @@ "Usage": "None", "Properties": [ { - "$id": "140", + "$id": "143", "Name": "jobId", "SerializedName": "jobId", "Description": "The job ID.", "Type": { - "$id": "141", + "$id": "144", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1168,12 +1186,12 @@ "IsDiscriminator": false }, { - "$id": "142", + "$id": "145", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The creation date time of the job.", "Type": { - "$id": "143", + "$id": "146", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -1183,12 +1201,12 @@ "IsDiscriminator": false }, { - "$id": "144", + "$id": "147", "Name": "lastUpdatedDateTime", "SerializedName": "lastUpdatedDateTime", "Description": "The the last date time the job was updated.", "Type": { - "$id": "145", + "$id": "148", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -1198,12 +1216,12 @@ "IsDiscriminator": false }, { - "$id": "146", + "$id": "149", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The expiration date time of the job.", "Type": { - "$id": "147", + "$id": "150", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -1213,7 +1231,7 @@ "IsDiscriminator": false }, { - "$id": "148", + "$id": "151", "Name": "status", "SerializedName": "status", "Description": "The job status.", @@ -1225,16 +1243,16 @@ "IsDiscriminator": false }, { - "$id": "149", + "$id": "152", "Name": "warnings", "SerializedName": "warnings", "Description": "The warnings that were encountered while executing the job.", "Type": { - "$id": "150", + "$id": "153", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "96" + "$ref": "99" }, "IsNullable": false }, @@ -1243,12 +1261,12 @@ "IsDiscriminator": false }, { - "$id": "151", + "$id": "154", "Name": "errors", "SerializedName": "errors", "Description": "The errors encountered while executing the job.", "Type": { - "$ref": "49" + "$ref": "52" }, "IsRequired": true, "IsReadOnly": false, @@ -1257,7 +1275,7 @@ ] }, { - "$id": "152", + "$id": "155", "Kind": "Model", "Name": "ExportedProject", "Namespace": "AuthoringTypeSpec", @@ -1266,7 +1284,7 @@ "Properties": [] }, { - "$id": "153", + "$id": "156", "Kind": "Model", "Name": "ListQueryParams", "Namespace": "AuthoringTypeSpec", @@ -1275,7 +1293,7 @@ "Properties": [] }, { - "$id": "154", + "$id": "157", "Kind": "Model", "Name": "ExportParams", "Namespace": "AuthoringTypeSpec", @@ -1284,7 +1302,7 @@ "Properties": [] }, { - "$id": "155", + "$id": "158", "Kind": "Model", "Name": "SwapDeploymentsParams", "Namespace": "AuthoringTypeSpec", @@ -1292,12 +1310,12 @@ "Usage": "None", "Properties": [ { - "$id": "156", + "$id": "159", "Name": "body", "SerializedName": "body", "Description": "The body schema of the operation.", "Type": { - "$ref": "79" + "$ref": "82" }, "IsRequired": true, "IsReadOnly": false, @@ -1308,32 +1326,32 @@ ], "Clients": [ { - "$id": "157", + "$id": "160", "Name": "AuthoringTypeSpecClient", "Description": "", "Operations": [], "Protocol": { - "$id": "158" + "$id": "161" }, "Creatable": true }, { - "$id": "159", + "$id": "162", "Name": "Projects", "Description": "", "Operations": [ { - "$id": "160", + "$id": "163", "Name": "createOrUpdate", "ResourceName": "Project", "Description": "Creates a new project or updates an existing one.", "Parameters": [ { - "$id": "161", + "$id": "164", "Name": "Endpoint", "NameInRequest": "Endpoint", "Type": { - "$id": "162", + "$id": "165", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1349,21 +1367,21 @@ "Kind": "Client" }, { - "$id": "163", + "$id": "166", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "164", + "$id": "167", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "165", + "$id": "168", "Type": { - "$id": "166", + "$id": "169", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1380,11 +1398,11 @@ "Kind": "Client" }, { - "$id": "167", + "$id": "170", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "168", + "$id": "171", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1400,7 +1418,7 @@ "Kind": "Method" }, { - "$id": "169", + "$id": "172", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -1418,11 +1436,11 @@ "Kind": "Method" }, { - "$id": "170", + "$id": "173", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "171", + "$id": "174", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1437,19 +1455,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "172", + "$id": "175", "Type": { - "$ref": "171" + "$ref": "174" }, "Value": "application/json" } }, { - "$id": "173", + "$id": "176", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "174", + "$id": "177", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1464,9 +1482,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "178", "Type": { - "$ref": "174" + "$ref": "177" }, "Value": "application/json" } @@ -1474,7 +1492,7 @@ ], "Responses": [ { - "$id": "176", + "$id": "179", "StatusCodes": [ 201 ], @@ -1484,12 +1502,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "177", + "$id": "180", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "178", + "$id": "181", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1502,7 +1520,7 @@ ] }, { - "$id": "179", + "$id": "182", "StatusCodes": [ 200 ], @@ -1512,12 +1530,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "180", + "$id": "183", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "181", + "$id": "184", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1539,10 +1557,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "182", + "$id": "185", "FinalStateVia": 2, "FinalResponse": { - "$id": "183", + "$id": "186", "StatusCodes": [ 200 ], @@ -1556,28 +1574,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "184", + "$id": "187", "Name": "get", "ResourceName": "Project", "Description": "Gets the details of a project.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "185", + "$id": "188", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "186", + "$id": "189", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -1589,11 +1607,11 @@ "Kind": "Client" }, { - "$id": "187", + "$id": "190", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "188", + "$id": "191", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1609,11 +1627,11 @@ "Kind": "Method" }, { - "$id": "189", + "$id": "192", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "190", + "$id": "193", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1628,9 +1646,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "191", + "$id": "194", "Type": { - "$ref": "190" + "$ref": "193" }, "Value": "application/json" } @@ -1638,7 +1656,7 @@ ], "Responses": [ { - "$id": "192", + "$id": "195", "StatusCodes": [ 200 ], @@ -1662,28 +1680,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "193", + "$id": "196", "Name": "delete", "ResourceName": "Project", "Description": "Deletes a project.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "194", + "$id": "197", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "195", + "$id": "198", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -1695,11 +1713,11 @@ "Kind": "Client" }, { - "$id": "196", + "$id": "199", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "197", + "$id": "200", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1715,11 +1733,11 @@ "Kind": "Method" }, { - "$id": "198", + "$id": "201", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "199", + "$id": "202", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1734,9 +1752,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "200", + "$id": "203", "Type": { - "$ref": "199" + "$ref": "202" }, "Value": "application/json" } @@ -1744,22 +1762,22 @@ ], "Responses": [ { - "$id": "201", + "$id": "204", "StatusCodes": [ 202 ], "BodyType": { - "$ref": "44" + "$ref": "47" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "202", + "$id": "205", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "203", + "$id": "206", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1778,10 +1796,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}", "BufferResponse": true, "LongRunning": { - "$id": "204", + "$id": "207", "FinalStateVia": 3, "FinalResponse": { - "$id": "205", + "$id": "208", "StatusCodes": [ 204 ], @@ -1792,28 +1810,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "206", + "$id": "209", "Name": "list", "ResourceName": "Project", "Description": "Lists the existing projects.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "207", + "$id": "210", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "208", + "$id": "211", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -1825,11 +1843,11 @@ "Kind": "Client" }, { - "$id": "209", + "$id": "212", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "210", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1844,9 +1862,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "211", + "$id": "214", "Type": { - "$ref": "210" + "$ref": "213" }, "Value": "application/json" } @@ -1854,12 +1872,12 @@ ], "Responses": [ { - "$id": "212", + "$id": "215", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "66" }, "BodyMediaType": "Json", "Headers": [], @@ -1875,7 +1893,7 @@ "Path": "/authoring/analyze-text/projects", "BufferResponse": true, "Paging": { - "$id": "213", + "$id": "216", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1883,28 +1901,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "214", + "$id": "217", "Name": "export", "ResourceName": "Projects", "Description": "Triggers a job to export a project's data.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "215", + "$id": "218", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "216", + "$id": "219", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -1916,11 +1934,11 @@ "Kind": "Client" }, { - "$id": "217", + "$id": "220", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "218", + "$id": "221", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1936,11 +1954,11 @@ "Kind": "Method" }, { - "$id": "219", + "$id": "222", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "220", + "$id": "223", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1956,11 +1974,11 @@ "Kind": "Method" }, { - "$id": "221", + "$id": "224", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "222", + "$id": "225", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1975,9 +1993,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "223", + "$id": "226", "Type": { - "$ref": "222" + "$ref": "225" }, "Value": "application/json" } @@ -1985,19 +2003,19 @@ ], "Responses": [ { - "$id": "224", + "$id": "227", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "225", + "$id": "228", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "226", + "$id": "229", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2013,10 +2031,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}:export", "BufferResponse": true, "LongRunning": { - "$id": "227", + "$id": "230", "FinalStateVia": 3, "FinalResponse": { - "$id": "228", + "$id": "231", "StatusCodes": [ 200 ], @@ -2027,28 +2045,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "229", + "$id": "232", "Name": "importx", "ResourceName": "Projects", "Description": "Triggers a job to export a project's data.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "230", + "$id": "233", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "231", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -2060,11 +2078,11 @@ "Kind": "Client" }, { - "$id": "232", + "$id": "235", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "233", + "$id": "236", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2080,11 +2098,11 @@ "Kind": "Method" }, { - "$id": "234", + "$id": "237", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "235", + "$id": "238", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2099,9 +2117,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "236", + "$id": "239", "Type": { - "$ref": "235" + "$ref": "238" }, "Value": "application/json" } @@ -2109,19 +2127,19 @@ ], "Responses": [ { - "$id": "237", + "$id": "240", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "238", + "$id": "241", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "239", + "$id": "242", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2137,10 +2155,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}:importx", "BufferResponse": true, "LongRunning": { - "$id": "240", + "$id": "243", "FinalStateVia": 3, "FinalResponse": { - "$id": "241", + "$id": "244", "StatusCodes": [ 200 ], @@ -2151,28 +2169,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "242", + "$id": "245", "Name": "train", "ResourceName": "Projects", "Description": "Triggers a training job for a project.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "243", + "$id": "246", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "244", + "$id": "247", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -2184,11 +2202,11 @@ "Kind": "Client" }, { - "$id": "245", + "$id": "248", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "246", + "$id": "249", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2204,11 +2222,11 @@ "Kind": "Method" }, { - "$id": "247", + "$id": "250", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "68" + "$ref": "71" }, "Location": "Body", "IsRequired": true, @@ -2221,11 +2239,11 @@ "Kind": "Method" }, { - "$id": "248", + "$id": "251", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "249", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2240,19 +2258,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "250", + "$id": "253", "Type": { - "$ref": "249" + "$ref": "252" }, "Value": "application/json" } }, { - "$id": "251", + "$id": "254", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "252", + "$id": "255", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2267,9 +2285,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "253", + "$id": "256", "Type": { - "$ref": "252" + "$ref": "255" }, "Value": "application/json" } @@ -2277,19 +2295,19 @@ ], "Responses": [ { - "$id": "254", + "$id": "257", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "255", + "$id": "258", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "256", + "$id": "259", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2308,10 +2326,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "257", + "$id": "260", "FinalStateVia": 3, "FinalResponse": { - "$id": "258", + "$id": "261", "StatusCodes": [ 200 ], @@ -2323,39 +2341,39 @@ } ], "Protocol": { - "$id": "259" + "$id": "262" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "260", + "$id": "263", "Name": "Deployments", "Description": "", "Operations": [ { - "$id": "261", + "$id": "264", "Name": "getDeployment", "ResourceName": "Deployment", "Description": "Gets the details of a deployment.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "262", + "$id": "265", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "263", + "$id": "266", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -2367,11 +2385,11 @@ "Kind": "Client" }, { - "$id": "264", + "$id": "267", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "265", + "$id": "268", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2387,11 +2405,11 @@ "Kind": "Method" }, { - "$id": "266", + "$id": "269", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "267", + "$id": "270", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2407,11 +2425,11 @@ "Kind": "Method" }, { - "$id": "268", + "$id": "271", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "269", + "$id": "272", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2426,9 +2444,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "270", + "$id": "273", "Type": { - "$ref": "269" + "$ref": "272" }, "Value": "application/json" } @@ -2436,12 +2454,12 @@ ], "Responses": [ { - "$id": "271", + "$id": "274", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "71" + "$ref": "74" }, "BodyMediaType": "Json", "Headers": [], @@ -2460,28 +2478,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "272", + "$id": "275", "Name": "deployProject", "ResourceName": "Deployment", "Description": "Creates a new deployment or replaces an existing one.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "273", + "$id": "276", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "274", + "$id": "277", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -2493,11 +2511,11 @@ "Kind": "Client" }, { - "$id": "275", + "$id": "278", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "276", + "$id": "279", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2513,11 +2531,11 @@ "Kind": "Method" }, { - "$id": "277", + "$id": "280", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "278", + "$id": "281", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2533,12 +2551,12 @@ "Kind": "Method" }, { - "$id": "279", + "$id": "282", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", "Type": { - "$ref": "71" + "$ref": "74" }, "Location": "Body", "IsRequired": true, @@ -2551,11 +2569,11 @@ "Kind": "Method" }, { - "$id": "280", + "$id": "283", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "281", + "$id": "284", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2570,19 +2588,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "282", + "$id": "285", "Type": { - "$ref": "281" + "$ref": "284" }, "Value": "application/json" } }, { - "$id": "283", + "$id": "286", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "284", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2597,9 +2615,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "285", + "$id": "288", "Type": { - "$ref": "284" + "$ref": "287" }, "Value": "application/json" } @@ -2607,22 +2625,22 @@ ], "Responses": [ { - "$id": "286", + "$id": "289", "StatusCodes": [ 201 ], "BodyType": { - "$ref": "71" + "$ref": "74" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "287", + "$id": "290", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "288", + "$id": "291", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2635,22 +2653,22 @@ ] }, { - "$id": "289", + "$id": "292", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "71" + "$ref": "74" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "290", + "$id": "293", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "291", + "$id": "294", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2672,15 +2690,15 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "292", + "$id": "295", "FinalStateVia": 2, "FinalResponse": { - "$id": "293", + "$id": "296", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "71" + "$ref": "74" }, "BodyMediaType": "Json" } @@ -2689,28 +2707,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "294", + "$id": "297", "Name": "deleteDeployment", "ResourceName": "Deployment", "Description": "Deletes a project deployment.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "295", + "$id": "298", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "296", + "$id": "299", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -2722,11 +2740,11 @@ "Kind": "Client" }, { - "$id": "297", + "$id": "300", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "298", + "$id": "301", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2742,11 +2760,11 @@ "Kind": "Method" }, { - "$id": "299", + "$id": "302", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "300", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2762,11 +2780,11 @@ "Kind": "Method" }, { - "$id": "301", + "$id": "304", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "302", + "$id": "305", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2781,9 +2799,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "303", + "$id": "306", "Type": { - "$ref": "302" + "$ref": "305" }, "Value": "application/json" } @@ -2791,22 +2809,22 @@ ], "Responses": [ { - "$id": "304", + "$id": "307", "StatusCodes": [ 202 ], "BodyType": { - "$ref": "44" + "$ref": "47" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "305", + "$id": "308", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "306", + "$id": "309", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2825,10 +2843,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments/{deploymentName}", "BufferResponse": true, "LongRunning": { - "$id": "307", + "$id": "310", "FinalStateVia": 3, "FinalResponse": { - "$id": "308", + "$id": "311", "StatusCodes": [ 204 ], @@ -2839,28 +2857,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "309", + "$id": "312", "Name": "list", "ResourceName": "Deployment", "Description": "Lists the existing deployments.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "310", + "$id": "313", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "311", + "$id": "314", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -2872,11 +2890,11 @@ "Kind": "Client" }, { - "$id": "312", + "$id": "315", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "313", + "$id": "316", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2892,11 +2910,11 @@ "Kind": "Method" }, { - "$id": "314", + "$id": "317", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "315", + "$id": "318", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2911,9 +2929,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "316", + "$id": "319", "Type": { - "$ref": "315" + "$ref": "318" }, "Value": "application/json" } @@ -2921,12 +2939,12 @@ ], "Responses": [ { - "$id": "317", + "$id": "320", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "74" + "$ref": "77" }, "BodyMediaType": "Json", "Headers": [], @@ -2942,7 +2960,7 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments", "BufferResponse": true, "Paging": { - "$id": "318", + "$id": "321", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -2950,28 +2968,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "319", + "$id": "322", "Name": "swapDeployments", "ResourceName": "Deployments", "Description": "Swaps two existing deployments with each other.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "320", + "$id": "323", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "321", + "$id": "324", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -2983,11 +3001,11 @@ "Kind": "Client" }, { - "$id": "322", + "$id": "325", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "323", + "$id": "326", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3003,12 +3021,12 @@ "Kind": "Method" }, { - "$id": "324", + "$id": "327", "Name": "body", "NameInRequest": "body", "Description": "The body schema of the operation.", "Type": { - "$ref": "79" + "$ref": "82" }, "Location": "Body", "IsRequired": true, @@ -3021,11 +3039,11 @@ "Kind": "Method" }, { - "$id": "325", + "$id": "328", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "326", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3040,19 +3058,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "327", + "$id": "330", "Type": { - "$ref": "326" + "$ref": "329" }, "Value": "application/json" } }, { - "$id": "328", + "$id": "331", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "329", + "$id": "332", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3067,9 +3085,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "330", + "$id": "333", "Type": { - "$ref": "329" + "$ref": "332" }, "Value": "application/json" } @@ -3077,19 +3095,19 @@ ], "Responses": [ { - "$id": "331", + "$id": "334", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "332", + "$id": "335", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "333", + "$id": "336", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -3108,10 +3126,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "334", + "$id": "337", "FinalStateVia": 3, "FinalResponse": { - "$id": "335", + "$id": "338", "StatusCodes": [ 200 ], @@ -3123,39 +3141,39 @@ } ], "Protocol": { - "$id": "336" + "$id": "339" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "337", + "$id": "340", "Name": "Jobs", "Description": "", "Operations": [ { - "$id": "338", + "$id": "341", "Name": "getDeploymentStatus", "ResourceName": "DeploymentJob", "Description": "Gets the status of an existing deployment job.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "339", + "$id": "342", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "340", + "$id": "343", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -3167,11 +3185,11 @@ "Kind": "Client" }, { - "$id": "341", + "$id": "344", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "342", + "$id": "345", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3187,11 +3205,11 @@ "Kind": "Method" }, { - "$id": "343", + "$id": "346", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "344", + "$id": "347", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3207,11 +3225,11 @@ "Kind": "Method" }, { - "$id": "345", + "$id": "348", "Name": "jobId", "NameInRequest": "jobId", "Type": { - "$id": "346", + "$id": "349", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3227,11 +3245,11 @@ "Kind": "Method" }, { - "$id": "347", + "$id": "350", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "348", + "$id": "351", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3246,9 +3264,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "349", + "$id": "352", "Type": { - "$ref": "348" + "$ref": "351" }, "Value": "application/json" } @@ -3256,12 +3274,12 @@ ], "Responses": [ { - "$id": "350", + "$id": "353", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "84" + "$ref": "87" }, "BodyMediaType": "Json", "Headers": [], @@ -3280,28 +3298,28 @@ "GenerateConvenienceMethod": true }, { - "$id": "351", + "$id": "354", "Name": "getSwapDeploymentsStatus", "ResourceName": "SwapDeploymentsJob", "Description": "Gets the status of an existing swap deployment job.", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "352", + "$id": "355", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "353", + "$id": "356", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -3313,11 +3331,11 @@ "Kind": "Client" }, { - "$id": "354", + "$id": "357", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "355", + "$id": "358", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3333,11 +3351,11 @@ "Kind": "Method" }, { - "$id": "356", + "$id": "359", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "357", + "$id": "360", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3353,11 +3371,11 @@ "Kind": "Method" }, { - "$id": "358", + "$id": "361", "Name": "jobId", "NameInRequest": "jobId", "Type": { - "$id": "359", + "$id": "362", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3373,11 +3391,11 @@ "Kind": "Method" }, { - "$id": "360", + "$id": "363", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "361", + "$id": "364", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3392,9 +3410,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "362", + "$id": "365", "Type": { - "$ref": "361" + "$ref": "364" }, "Value": "application/json" } @@ -3402,12 +3420,12 @@ ], "Responses": [ { - "$id": "363", + "$id": "366", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "104" + "$ref": "107" }, "BodyMediaType": "Json", "Headers": [], @@ -3427,30 +3445,30 @@ } ], "Protocol": { - "$id": "364" + "$id": "367" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "365", + "$id": "368", "Name": "Global", "Description": "", "Operations": [ { - "$id": "366", + "$id": "369", "Name": "getSupportedLanguages", "ResourceName": "Global", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "367", + "$id": "370", "Name": "top", "NameInRequest": "top", "Type": { - "$id": "368", + "$id": "371", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3466,11 +3484,11 @@ "Kind": "Method" }, { - "$id": "369", + "$id": "372", "Name": "skip", "NameInRequest": "skip", "Type": { - "$id": "370", + "$id": "373", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3486,11 +3504,11 @@ "Kind": "Method" }, { - "$id": "371", + "$id": "374", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Type": { - "$id": "372", + "$id": "375", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3506,19 +3524,19 @@ "Kind": "Method" }, { - "$id": "373", + "$id": "376", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "374", + "$id": "377", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -3530,11 +3548,11 @@ "Kind": "Client" }, { - "$id": "375", + "$id": "378", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "376", + "$id": "379", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3549,9 +3567,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "377", + "$id": "380", "Type": { - "$ref": "376" + "$ref": "379" }, "Value": "application/json" } @@ -3559,12 +3577,12 @@ ], "Responses": [ { - "$id": "378", + "$id": "381", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "119" + "$ref": "122" }, "BodyMediaType": "Json", "Headers": [], @@ -3580,7 +3598,7 @@ "Path": "/authoring/analyze-text/projects/global/languages", "BufferResponse": true, "Paging": { - "$id": "379", + "$id": "382", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -3588,19 +3606,19 @@ "GenerateConvenienceMethod": false }, { - "$id": "380", + "$id": "383", "Name": "listTrainingConfigVersions", "ResourceName": "Global", "Parameters": [ { - "$ref": "161" + "$ref": "164" }, { - "$id": "381", + "$id": "384", "Name": "top", "NameInRequest": "top", "Type": { - "$id": "382", + "$id": "385", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3616,11 +3634,11 @@ "Kind": "Method" }, { - "$id": "383", + "$id": "386", "Name": "skip", "NameInRequest": "skip", "Type": { - "$id": "384", + "$id": "387", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3636,11 +3654,11 @@ "Kind": "Method" }, { - "$id": "385", + "$id": "388", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Type": { - "$id": "386", + "$id": "389", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3656,19 +3674,19 @@ "Kind": "Method" }, { - "$id": "387", + "$id": "390", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "388", + "$id": "391", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "165" + "$ref": "168" }, "IsRequired": true, "IsApiVersion": true, @@ -3680,11 +3698,11 @@ "Kind": "Client" }, { - "$id": "389", + "$id": "392", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "390", + "$id": "393", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3699,9 +3717,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "391", + "$id": "394", "Type": { - "$ref": "390" + "$ref": "393" }, "Value": "application/json" } @@ -3709,12 +3727,12 @@ ], "Responses": [ { - "$id": "392", + "$id": "395", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "129" + "$ref": "132" }, "BodyMediaType": "Json", "Headers": [], @@ -3730,7 +3748,7 @@ "Path": "/authoring/analyze-text/projects/global/training-config-versions", "BufferResponse": true, "Paging": { - "$id": "393", + "$id": "396", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -3739,7 +3757,7 @@ } ], "Protocol": { - "$id": "394" + "$id": "397" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" diff --git a/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json index 98cf1101673..d8749ae1881 100644 --- a/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json @@ -119,6 +119,24 @@ "Description": "Represents the settings used to define the project behavior.", "IsNullable": false, "Usage": "None", + "InheritedDictionaryType": { + "$id": "16", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "17", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "18", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [] }, "IsRequired": false, @@ -126,12 +144,12 @@ "IsDiscriminator": false }, { - "$id": "16", + "$id": "19", "Name": "multilingual", "SerializedName": "multilingual", "Description": "Whether the project would be used for multiple languages or not.", "Type": { - "$id": "17", + "$id": "20", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -141,12 +159,12 @@ "IsDiscriminator": false }, { - "$id": "18", + "$id": "21", "Name": "description", "SerializedName": "description", "Description": "The project description.", "Type": { - "$id": "19", + "$id": "22", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -156,12 +174,12 @@ "IsDiscriminator": false }, { - "$id": "20", + "$id": "23", "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": "21", + "$id": "24", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -171,12 +189,12 @@ "IsDiscriminator": false }, { - "$id": "22", + "$id": "25", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "Represents the project creation datetime.", "Type": { - "$id": "23", + "$id": "26", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -186,12 +204,12 @@ "IsDiscriminator": false }, { - "$id": "24", + "$id": "27", "Name": "lastModifiedDateTime", "SerializedName": "lastModifiedDateTime", "Description": "Represents the project last modification datetime.", "Type": { - "$id": "25", + "$id": "28", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -201,12 +219,12 @@ "IsDiscriminator": false }, { - "$id": "26", + "$id": "29", "Name": "lastTrainedDateTime", "SerializedName": "lastTrainedDateTime", "Description": "Represents the project last training datetime.", "Type": { - "$id": "27", + "$id": "30", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -216,12 +234,12 @@ "IsDiscriminator": false }, { - "$id": "28", + "$id": "31", "Name": "lastDeployedDateTime", "SerializedName": "lastDeployedDateTime", "Description": "Represents the project last deployment datetime.", "Type": { - "$id": "29", + "$id": "32", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -236,7 +254,7 @@ "$ref": "15" }, { - "$id": "30", + "$id": "33", "Kind": "Model", "Name": "PagedProjectProject", "Namespace": "Azure.Core.Foundations", @@ -245,12 +263,12 @@ "Usage": "None", "Properties": [ { - "$id": "31", + "$id": "34", "Name": "value", "SerializedName": "value", "Description": "The Project items on this page", "Type": { - "$id": "32", + "$id": "35", "Kind": "Array", "Name": "Array", "ElementType": { @@ -263,12 +281,12 @@ "IsDiscriminator": false }, { - "$id": "33", + "$id": "36", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "34", + "$id": "37", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -280,7 +298,7 @@ ] }, { - "$id": "35", + "$id": "38", "Kind": "Model", "Name": "Deployment", "Namespace": "RenameGetList", @@ -288,12 +306,12 @@ "Usage": "None", "Properties": [ { - "$id": "36", + "$id": "39", "Name": "name", "SerializedName": "name", "Description": "", "Type": { - "$id": "37", + "$id": "40", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -305,7 +323,7 @@ ] }, { - "$id": "38", + "$id": "41", "Kind": "Model", "Name": "PagedDeploymentDeployment", "Namespace": "Azure.Core.Foundations", @@ -314,16 +332,16 @@ "Usage": "None", "Properties": [ { - "$id": "39", + "$id": "42", "Name": "value", "SerializedName": "value", "Description": "The Deployment items on this page", "Type": { - "$id": "40", + "$id": "43", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "35" + "$ref": "38" }, "IsNullable": false }, @@ -332,12 +350,12 @@ "IsDiscriminator": false }, { - "$id": "41", + "$id": "44", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "42", + "$id": "45", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -349,7 +367,7 @@ ] }, { - "$id": "43", + "$id": "46", "Kind": "Model", "Name": "ListQueryParams", "Namespace": "RenameGetList", @@ -360,32 +378,32 @@ ], "Clients": [ { - "$id": "44", + "$id": "47", "Name": "RenameGetListClient", "Description": "", "Operations": [], "Protocol": { - "$id": "45" + "$id": "48" }, "Creatable": true }, { - "$id": "46", + "$id": "49", "Name": "Projects", "Description": "", "Operations": [ { - "$id": "47", + "$id": "50", "Name": "get", "ResourceName": "Project", "Description": "Gets the details of a project.", "Parameters": [ { - "$id": "48", + "$id": "51", "Name": "Endpoint", "NameInRequest": "Endpoint", "Type": { - "$id": "49", + "$id": "52", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -401,21 +419,21 @@ "Kind": "Client" }, { - "$id": "50", + "$id": "53", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "51", + "$id": "54", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "52", + "$id": "55", "Type": { - "$id": "53", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -432,11 +450,11 @@ "Kind": "Client" }, { - "$id": "54", + "$id": "57", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "55", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -452,11 +470,11 @@ "Kind": "Method" }, { - "$id": "56", + "$id": "59", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "57", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -471,9 +489,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "58", + "$id": "61", "Type": { - "$ref": "57" + "$ref": "60" }, "Value": "application/json" } @@ -481,7 +499,7 @@ ], "Responses": [ { - "$id": "59", + "$id": "62", "StatusCodes": [ 200 ], @@ -505,28 +523,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "60", + "$id": "63", "Name": "list", "ResourceName": "Project", "Description": "Lists the existing projects.", "Parameters": [ { - "$ref": "48" + "$ref": "51" }, { - "$id": "61", + "$id": "64", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "62", + "$id": "65", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "52" + "$ref": "55" }, "IsRequired": true, "IsApiVersion": true, @@ -538,11 +556,11 @@ "Kind": "Client" }, { - "$id": "63", + "$id": "66", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "64", + "$id": "67", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -557,9 +575,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "65", + "$id": "68", "Type": { - "$ref": "64" + "$ref": "67" }, "Value": "application/json" } @@ -567,12 +585,12 @@ ], "Responses": [ { - "$id": "66", + "$id": "69", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "33" }, "BodyMediaType": "Json", "Headers": [], @@ -588,7 +606,7 @@ "Path": "/authoring/analyze-text/projects", "BufferResponse": true, "Paging": { - "$id": "67", + "$id": "70", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -597,39 +615,39 @@ } ], "Protocol": { - "$id": "68" + "$id": "71" }, "Creatable": false, "Parent": "RenameGetListClient" }, { - "$id": "69", + "$id": "72", "Name": "Deployments", "Description": "", "Operations": [ { - "$id": "70", + "$id": "73", "Name": "get", "ResourceName": "Deployment", "Description": "Gets the details of a deployment.", "Parameters": [ { - "$ref": "48" + "$ref": "51" }, { - "$id": "71", + "$id": "74", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "72", + "$id": "75", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "52" + "$ref": "55" }, "IsRequired": true, "IsApiVersion": true, @@ -641,11 +659,11 @@ "Kind": "Client" }, { - "$id": "73", + "$id": "76", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "74", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -661,11 +679,11 @@ "Kind": "Method" }, { - "$id": "75", + "$id": "78", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "76", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -681,11 +699,11 @@ "Kind": "Method" }, { - "$id": "77", + "$id": "80", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "78", + "$id": "81", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -700,9 +718,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "79", + "$id": "82", "Type": { - "$ref": "78" + "$ref": "81" }, "Value": "application/json" } @@ -710,12 +728,12 @@ ], "Responses": [ { - "$id": "80", + "$id": "83", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "35" + "$ref": "38" }, "BodyMediaType": "Json", "Headers": [], @@ -734,28 +752,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "81", + "$id": "84", "Name": "list", "ResourceName": "Deployment", "Description": "Lists the existing deployments.", "Parameters": [ { - "$ref": "48" + "$ref": "51" }, { - "$id": "82", + "$id": "85", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "83", + "$id": "86", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "52" + "$ref": "55" }, "IsRequired": true, "IsApiVersion": true, @@ -767,11 +785,11 @@ "Kind": "Client" }, { - "$id": "84", + "$id": "87", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "85", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -787,11 +805,11 @@ "Kind": "Method" }, { - "$id": "86", + "$id": "89", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "87", + "$id": "90", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -806,9 +824,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "88", + "$id": "91", "Type": { - "$ref": "87" + "$ref": "90" }, "Value": "application/json" } @@ -816,12 +834,12 @@ ], "Responses": [ { - "$id": "89", + "$id": "92", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "38" + "$ref": "41" }, "BodyMediaType": "Json", "Headers": [], @@ -837,7 +855,7 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments", "BufferResponse": true, "Paging": { - "$id": "90", + "$id": "93", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -846,7 +864,7 @@ } ], "Protocol": { - "$id": "91" + "$id": "94" }, "Creatable": false, "Parent": "RenameGetListClient" diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionFunctionParameters.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionFunctionParameters.Serialization.cs index 4110c42a3b9..df156ed26a1 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionFunctionParameters.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionFunctionParameters.Serialization.cs @@ -24,20 +24,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) + foreach (var item in AdditionalProperties) { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); + writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); } +#endif } writer.WriteEndObject(); } @@ -62,17 +59,14 @@ internal static ChatCompletionFunctionParameters DeserializeChatCompletionFuncti { return null; } - IDictionary serializedAdditionalRawData = default; + IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } + additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new ChatCompletionFunctionParameters(serializedAdditionalRawData); + additionalProperties = additionalPropertiesDictionary; + return new ChatCompletionFunctionParameters(additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionFunctionParameters.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionFunctionParameters.cs index 73f71f4c68b..82940a29b45 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionFunctionParameters.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionFunctionParameters.cs @@ -3,6 +3,7 @@ #nullable disable using System; +using System.ClientModel.Internal; using System.Collections.Generic; namespace OpenAI.Models @@ -10,8 +11,21 @@ namespace OpenAI.Models /// The ChatCompletionFunctionParameters. public partial class ChatCompletionFunctionParameters { + /// Initializes a new instance of . + public ChatCompletionFunctionParameters() + { + AdditionalProperties = new OptionalDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal ChatCompletionFunctionParameters(IDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + /// - /// Keeps track of any properties unknown to the library. + /// Additional Properties /// /// To assign an object to the value of this property use . /// @@ -40,18 +54,6 @@ public partial class ChatCompletionFunctionParameters /// /// /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public ChatCompletionFunctionParameters() - { - } - - /// Initializes a new instance of . - /// Keeps track of any properties unknown to the library. - internal ChatCompletionFunctionParameters(IDictionary serializedAdditionalRawData) - { - _serializedAdditionalRawData = serializedAdditionalRawData; - } + public IDictionary AdditionalProperties { get; } } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJob.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJob.Serialization.cs index 5e51049c096..67a1e05b730 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJob.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJob.Serialization.cs @@ -30,8 +30,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("finished_at"u8); - writer.WriteStringValue(FinishedAt, "O"); + if (FinishedAt != null) + { + writer.WritePropertyName("finished_at"u8); + writer.WriteStringValue(FinishedAt.Value, "O"); + } + else + { + writer.WriteNull("finished_at"); + } writer.WritePropertyName("model"u8); writer.WriteStringValue(Model); if (FineTunedModel != null) @@ -126,7 +133,7 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode string id = default; FineTuningJobObject @object = default; DateTimeOffset createdAt = default; - DateTimeOffset finishedAt = default; + DateTimeOffset? finishedAt = default; string model = default; string fineTunedModel = default; string organizationId = default; @@ -158,6 +165,11 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode } if (property.NameEquals("finished_at"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + finishedAt = null; + continue; + } finishedAt = property.Value.GetDateTimeOffset("O"); continue; } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJob.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJob.cs index 223712ddf67..51e8358fe7b 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJob.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJob.cs @@ -86,7 +86,7 @@ public partial class FineTuningJob /// failure. /// /// , , , , or is null. - internal FineTuningJob(string id, DateTimeOffset createdAt, DateTimeOffset finishedAt, string model, string fineTunedModel, string organizationId, FineTuningJobStatus status, FineTuningJobHyperparameters hyperparameters, string trainingFile, string validationFile, IEnumerable resultFiles, long? trainedTokens, FineTuningJobError error) + internal FineTuningJob(string id, DateTimeOffset createdAt, DateTimeOffset? finishedAt, string model, string fineTunedModel, string organizationId, FineTuningJobStatus status, FineTuningJobHyperparameters hyperparameters, string trainingFile, string validationFile, IEnumerable resultFiles, long? trainedTokens, FineTuningJobError error) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(model, nameof(model)); @@ -153,7 +153,7 @@ internal FineTuningJob(string id, DateTimeOffset createdAt, DateTimeOffset finis /// failure. /// /// Keeps track of any properties unknown to the library. - internal FineTuningJob(string id, FineTuningJobObject @object, DateTimeOffset createdAt, DateTimeOffset finishedAt, string model, string fineTunedModel, string organizationId, FineTuningJobStatus status, FineTuningJobHyperparameters hyperparameters, string trainingFile, string validationFile, IReadOnlyList resultFiles, long? trainedTokens, FineTuningJobError error, IDictionary serializedAdditionalRawData) + internal FineTuningJob(string id, FineTuningJobObject @object, DateTimeOffset createdAt, DateTimeOffset? finishedAt, string model, string fineTunedModel, string organizationId, FineTuningJobStatus status, FineTuningJobHyperparameters hyperparameters, string trainingFile, string validationFile, IReadOnlyList resultFiles, long? trainedTokens, FineTuningJobError error, IDictionary serializedAdditionalRawData) { Id = id; Object = @object; @@ -188,7 +188,7 @@ internal FineTuningJob() /// The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be /// null if the fine-tuning job is still running. /// - public DateTimeOffset FinishedAt { get; } + public DateTimeOffset? FinishedAt { get; } /// The base model that is being fine-tuned. public string Model { get; } /// diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/OpenAIModelFactory.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/OpenAIModelFactory.cs index b0744cef675..686745bb717 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/OpenAIModelFactory.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/OpenAIModelFactory.cs @@ -395,7 +395,7 @@ public static CreateFineTuningJobRequest CreateFineTuningJobRequest(string train /// failure. /// /// A new instance for mocking. - public static FineTuningJob FineTuningJob(string id = null, FineTuningJobObject @object = default, DateTimeOffset createdAt = default, DateTimeOffset finishedAt = default, string model = null, string fineTunedModel = null, string organizationId = null, FineTuningJobStatus status = default, FineTuningJobHyperparameters hyperparameters = null, string trainingFile = null, string validationFile = null, IEnumerable resultFiles = null, long? trainedTokens = null, FineTuningJobError error = null) + public static FineTuningJob FineTuningJob(string id = null, FineTuningJobObject @object = default, DateTimeOffset createdAt = default, DateTimeOffset? finishedAt = null, string model = null, string fineTunedModel = null, string organizationId = null, FineTuningJobStatus status = default, FineTuningJobHyperparameters hyperparameters = null, string trainingFile = null, string validationFile = null, IEnumerable resultFiles = null, long? trainedTokens = null, FineTuningJobError error = null) { resultFiles ??= new List(); diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json index fb4d94f8da0..85eb9cd2507 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json @@ -1273,6 +1273,24 @@ "Namespace": "OpenAI", "IsNullable": false, "Usage": "Input", + "InheritedDictionaryType": { + "$id": "178", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "179", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "180", + "Kind": "Intrinsic", + "Name": "unknown", + "IsNullable": false + }, + "IsNullable": false + }, "Properties": [] }, "IsRequired": true, @@ -1288,21 +1306,21 @@ "IsDiscriminator": false }, { - "$id": "178", + "$id": "181", "Name": "function_call", "SerializedName": "function_call", "Description": "Controls how the model responds to function calls. `none` means the model does not call a\nfunction, and responds to the end-user. `auto` means the model can pick between an end-user or\ncalling a function. Specifying a particular function via `{\\\"name\":\\ \\\"my_function\\\"}` forces the\nmodel to call that function. `none` is the default when no functions are present. `auto` is the\ndefault if functions are present.", "Type": { - "$id": "179", + "$id": "182", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "180", + "$id": "183", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "181", + "$id": "184", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1311,11 +1329,11 @@ "IsNullable": false }, { - "$id": "182", + "$id": "185", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "183", + "$id": "186", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1324,7 +1342,7 @@ "IsNullable": false }, { - "$id": "184", + "$id": "187", "Kind": "Model", "Name": "ChatCompletionFunctionCallOption", "Namespace": "OpenAI", @@ -1332,12 +1350,12 @@ "Usage": "Input", "Properties": [ { - "$id": "185", + "$id": "188", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "186", + "$id": "189", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1356,12 +1374,12 @@ "IsDiscriminator": false }, { - "$id": "187", + "$id": "190", "Name": "temperature", "SerializedName": "temperature", "Description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "Type": { - "$id": "188", + "$id": "191", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1371,12 +1389,12 @@ "IsDiscriminator": false }, { - "$id": "189", + "$id": "192", "Name": "top_p", "SerializedName": "top_p", "Description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers\nthe results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising\nthe top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "Type": { - "$id": "190", + "$id": "193", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1386,12 +1404,12 @@ "IsDiscriminator": false }, { - "$id": "191", + "$id": "194", "Name": "n", "SerializedName": "n", "Description": "How many completions to generate for each prompt.\n**Note:** Because this parameter generates many completions, it can quickly consume your token\nquota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "Type": { - "$id": "192", + "$id": "195", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -1401,12 +1419,12 @@ "IsDiscriminator": false }, { - "$id": "193", + "$id": "196", "Name": "max_tokens", "SerializedName": "max_tokens", "Description": "The maximum number of [tokens](/tokenizer) to generate in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)\nfor counting tokens.", "Type": { - "$id": "194", + "$id": "197", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -1416,27 +1434,27 @@ "IsDiscriminator": false }, { - "$id": "195", + "$id": "198", "Name": "stop", "SerializedName": "stop", "Description": "Up to 4 sequences where the API will stop generating further tokens.", "Type": { - "$id": "196", + "$id": "199", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "197", + "$id": "200", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "198", + "$id": "201", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "199", + "$id": "202", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1451,12 +1469,12 @@ "IsDiscriminator": false }, { - "$id": "200", + "$id": "203", "Name": "presence_penalty", "SerializedName": "presence_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear\nin the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "201", + "$id": "204", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1466,12 +1484,12 @@ "IsDiscriminator": false }, { - "$id": "202", + "$id": "205", "Name": "frequency_penalty", "SerializedName": "frequency_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing\nfrequency in the text so far, decreasing the model's likelihood to repeat the same line\nverbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "203", + "$id": "206", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1481,22 +1499,22 @@ "IsDiscriminator": false }, { - "$id": "204", + "$id": "207", "Name": "logit_bias", "SerializedName": "logit_bias", "Description": "Modify the likelihood of specified tokens appearing in the completion.\nAccepts a json object that maps tokens (specified by their token ID in the tokenizer) to an\nassociated bias value from -100 to 100. Mathematically, the bias is added to the logits\ngenerated by the model prior to sampling. The exact effect will vary per model, but values\nbetween -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.", "Type": { - "$id": "205", + "$id": "208", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "206", + "$id": "209", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "207", + "$id": "210", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1508,12 +1526,12 @@ "IsDiscriminator": false }, { - "$id": "208", + "$id": "211", "Name": "user", "SerializedName": "user", "Description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect\nabuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "Type": { - "$id": "209", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1523,12 +1541,12 @@ "IsDiscriminator": false }, { - "$id": "210", + "$id": "213", "Name": "stream", "SerializedName": "stream", "Description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available, with the stream terminated by a `data: [DONE]` message.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).", "Type": { - "$id": "211", + "$id": "214", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -1552,10 +1570,10 @@ "$ref": "177" }, { - "$ref": "184" + "$ref": "187" }, { - "$id": "212", + "$id": "215", "Kind": "Model", "Name": "CreateChatCompletionResponse", "Namespace": "OpenAI", @@ -1564,12 +1582,12 @@ "Usage": "Output", "Properties": [ { - "$id": "213", + "$id": "216", "Name": "id", "SerializedName": "id", "Description": "A unique identifier for the chat completion.", "Type": { - "$id": "214", + "$id": "217", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1579,12 +1597,12 @@ "IsDiscriminator": false }, { - "$id": "215", + "$id": "218", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `chat.completion`.", "Type": { - "$id": "216", + "$id": "219", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1594,12 +1612,12 @@ "IsDiscriminator": false }, { - "$id": "217", + "$id": "220", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the chat completion was created.", "Type": { - "$id": "218", + "$id": "221", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1609,12 +1627,12 @@ "IsDiscriminator": false }, { - "$id": "219", + "$id": "222", "Name": "model", "SerializedName": "model", "Description": "The model used for the chat completion.", "Type": { - "$id": "220", + "$id": "223", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1624,16 +1642,16 @@ "IsDiscriminator": false }, { - "$id": "221", + "$id": "224", "Name": "choices", "SerializedName": "choices", "Description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "Type": { - "$id": "222", + "$id": "225", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "223", + "$id": "226", "Kind": "Model", "Name": "CreateChatCompletionResponseChoice", "Namespace": "OpenAI", @@ -1641,12 +1659,12 @@ "Usage": "Output", "Properties": [ { - "$id": "224", + "$id": "227", "Name": "index", "SerializedName": "index", "Description": "The index of the choice in the list of choices.", "Type": { - "$id": "225", + "$id": "228", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1656,12 +1674,12 @@ "IsDiscriminator": false }, { - "$id": "226", + "$id": "229", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "227", + "$id": "230", "Kind": "Model", "Name": "ChatCompletionResponseMessage", "Namespace": "OpenAI", @@ -1669,7 +1687,7 @@ "Usage": "Output", "Properties": [ { - "$id": "228", + "$id": "231", "Name": "role", "SerializedName": "role", "Description": "The role of the author of this message.", @@ -1681,12 +1699,12 @@ "IsDiscriminator": false }, { - "$id": "229", + "$id": "232", "Name": "content", "SerializedName": "content", "Description": "The contents of the message.", "Type": { - "$id": "230", + "$id": "233", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1696,12 +1714,12 @@ "IsDiscriminator": false }, { - "$id": "231", + "$id": "234", "Name": "function_call", "SerializedName": "function_call", "Description": "The name and arguments of a function that should be called, as generated by the model.", "Type": { - "$id": "232", + "$id": "235", "Kind": "Model", "Name": "ChatCompletionResponseMessageFunctionCall", "Namespace": "OpenAI", @@ -1709,12 +1727,12 @@ "Usage": "Output", "Properties": [ { - "$id": "233", + "$id": "236", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "234", + "$id": "237", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1724,12 +1742,12 @@ "IsDiscriminator": false }, { - "$id": "235", + "$id": "238", "Name": "arguments", "SerializedName": "arguments", "Description": "The arguments to call the function with, as generated by the model in JSON format. Note that\nthe model does not always generate valid JSON, and may hallucinate parameters not defined by\nyour function schema. Validate the arguments in your code before calling your function.", "Type": { - "$id": "236", + "$id": "239", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1751,7 +1769,7 @@ "IsDiscriminator": false }, { - "$id": "237", + "$id": "240", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, `length` if the maximum number of tokens\nspecified in the request was reached, `content_filter` if the content was omitted due to\na flag from our content filters, or `function_call` if the model called a function.", @@ -1771,12 +1789,12 @@ "IsDiscriminator": false }, { - "$id": "238", + "$id": "241", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$id": "239", + "$id": "242", "Kind": "Model", "Name": "CompletionUsage", "Namespace": "OpenAI", @@ -1785,12 +1803,12 @@ "Usage": "Output", "Properties": [ { - "$id": "240", + "$id": "243", "Name": "prompt_tokens", "SerializedName": "prompt_tokens", "Description": "Number of tokens in the prompt.", "Type": { - "$id": "241", + "$id": "244", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1800,12 +1818,12 @@ "IsDiscriminator": false }, { - "$id": "242", + "$id": "245", "Name": "completion_tokens", "SerializedName": "completion_tokens", "Description": "Number of tokens in the generated completion", "Type": { - "$id": "243", + "$id": "246", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1815,12 +1833,12 @@ "IsDiscriminator": false }, { - "$id": "244", + "$id": "247", "Name": "total_tokens", "SerializedName": "total_tokens", "Description": "Total number of tokens used in the request (prompt + completion).", "Type": { - "$id": "245", + "$id": "248", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1838,19 +1856,19 @@ ] }, { - "$ref": "223" + "$ref": "226" }, { - "$ref": "227" + "$ref": "230" }, { - "$ref": "232" + "$ref": "235" }, { - "$ref": "239" + "$ref": "242" }, { - "$id": "246", + "$id": "249", "Kind": "Model", "Name": "CreateFineTuningJobRequest", "Namespace": "OpenAI", @@ -1858,12 +1876,12 @@ "Usage": "Input", "Properties": [ { - "$id": "247", + "$id": "250", "Name": "training_file", "SerializedName": "training_file", "Description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/upload) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with\nthe purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "248", + "$id": "251", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1873,12 +1891,12 @@ "IsDiscriminator": false }, { - "$id": "249", + "$id": "252", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation metrics periodically during\nfine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should\nnot be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose\n`fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "250", + "$id": "253", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1888,7 +1906,7 @@ "IsDiscriminator": false }, { - "$id": "251", + "$id": "254", "Name": "model", "SerializedName": "model", "Description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/what-models-can-be-fine-tuned).", @@ -1900,12 +1918,12 @@ "IsDiscriminator": false }, { - "$id": "252", + "$id": "255", "Name": "hyperparameters", "SerializedName": "hyperparameters", "Description": "The hyperparameters used for the fine-tuning job.", "Type": { - "$id": "253", + "$id": "256", "Kind": "Model", "Name": "CreateFineTuningJobRequestHyperparameters", "Namespace": "OpenAI", @@ -1913,21 +1931,21 @@ "Usage": "Input", "Properties": [ { - "$id": "254", + "$id": "257", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "255", + "$id": "258", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "256", + "$id": "259", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "257", + "$id": "260", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1936,7 +1954,7 @@ "IsNullable": false }, { - "$id": "258", + "$id": "261", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1955,12 +1973,12 @@ "IsDiscriminator": false }, { - "$id": "259", + "$id": "262", "Name": "suffix", "SerializedName": "suffix", "Description": "A string of up to 18 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like\n`ft:gpt-3.5-turbo:openai:custom-model-name:7p4lURel`.", "Type": { - "$id": "260", + "$id": "263", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1972,10 +1990,10 @@ ] }, { - "$ref": "253" + "$ref": "256" }, { - "$id": "261", + "$id": "264", "Kind": "Model", "Name": "FineTuningJob", "Namespace": "OpenAI", @@ -1983,12 +2001,12 @@ "Usage": "Output", "Properties": [ { - "$id": "262", + "$id": "265", "Name": "id", "SerializedName": "id", "Description": "The object identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "263", + "$id": "266", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1998,12 +2016,12 @@ "IsDiscriminator": false }, { - "$id": "264", + "$id": "267", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"fine_tuning.job\".", "Type": { - "$id": "265", + "$id": "268", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -2017,12 +2035,12 @@ "IsDiscriminator": false }, { - "$id": "266", + "$id": "269", "Name": "created_at", "SerializedName": "created_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "Type": { - "$id": "267", + "$id": "270", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2032,27 +2050,27 @@ "IsDiscriminator": false }, { - "$id": "268", + "$id": "271", "Name": "finished_at", "SerializedName": "finished_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be\nnull if the fine-tuning job is still running.", "Type": { - "$id": "269", + "$id": "272", "Kind": "Primitive", "Name": "DateTimeRFC3339", - "IsNullable": false + "IsNullable": true }, "IsRequired": true, "IsReadOnly": false, "IsDiscriminator": false }, { - "$id": "270", + "$id": "273", "Name": "model", "SerializedName": "model", "Description": "The base model that is being fine-tuned.", "Type": { - "$id": "271", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2062,12 +2080,12 @@ "IsDiscriminator": false }, { - "$id": "272", + "$id": "275", "Name": "fine_tuned_model", "SerializedName": "fine_tuned_model", "Description": "The name of the fine-tuned model that is being created. The value will be null if the\nfine-tuning job is still running.", "Type": { - "$id": "273", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2077,12 +2095,12 @@ "IsDiscriminator": false }, { - "$id": "274", + "$id": "277", "Name": "organization_id", "SerializedName": "organization_id", "Description": "The organization that owns the fine-tuning job.", "Type": { - "$id": "275", + "$id": "278", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2092,7 +2110,7 @@ "IsDiscriminator": false }, { - "$id": "276", + "$id": "279", "Name": "status", "SerializedName": "status", "Description": "The current status of the fine-tuning job, which can be either `created`, `pending`, `running`,\n`succeeded`, `failed`, or `cancelled`.", @@ -2104,12 +2122,12 @@ "IsDiscriminator": false }, { - "$id": "277", + "$id": "280", "Name": "hyperparameters", "SerializedName": "hyperparameters", "Description": "The hyperparameters used for the fine-tuning job. See the\n[fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "278", + "$id": "281", "Kind": "Model", "Name": "FineTuningJobHyperparameters", "Namespace": "OpenAI", @@ -2117,21 +2135,21 @@ "Usage": "Output", "Properties": [ { - "$id": "279", + "$id": "282", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.\n\n\"Auto\" decides the optimal number of epochs based on the size of the dataset. If setting the\nnumber manually, we support any number between 1 and 50 epochs.", "Type": { - "$id": "280", + "$id": "283", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "281", + "$id": "284", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "282", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2140,7 +2158,7 @@ "IsNullable": false }, { - "$id": "283", + "$id": "286", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2159,12 +2177,12 @@ "IsDiscriminator": false }, { - "$id": "284", + "$id": "287", "Name": "training_file", "SerializedName": "training_file", "Description": "The file ID used for training. You can retrieve the training data with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "285", + "$id": "288", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2174,12 +2192,12 @@ "IsDiscriminator": false }, { - "$id": "286", + "$id": "289", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The file ID used for validation. You can retrieve the validation results with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "287", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2189,16 +2207,16 @@ "IsDiscriminator": false }, { - "$id": "288", + "$id": "291", "Name": "result_files", "SerializedName": "result_files", "Description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "289", + "$id": "292", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "290", + "$id": "293", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2210,12 +2228,12 @@ "IsDiscriminator": false }, { - "$id": "291", + "$id": "294", "Name": "trained_tokens", "SerializedName": "trained_tokens", "Description": "The total number of billable tokens processed by this fine tuning job. The value will be null\nif the fine-tuning job is still running.", "Type": { - "$id": "292", + "$id": "295", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2225,12 +2243,12 @@ "IsDiscriminator": false }, { - "$id": "293", + "$id": "296", "Name": "error", "SerializedName": "error", "Description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the\nfailure.", "Type": { - "$id": "294", + "$id": "297", "Kind": "Model", "Name": "FineTuningJobError", "Namespace": "OpenAI", @@ -2238,12 +2256,12 @@ "Usage": "Output", "Properties": [ { - "$id": "295", + "$id": "298", "Name": "message", "SerializedName": "message", "Description": "A human-readable error message.", "Type": { - "$id": "296", + "$id": "299", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2253,12 +2271,12 @@ "IsDiscriminator": false }, { - "$id": "297", + "$id": "300", "Name": "code", "SerializedName": "code", "Description": "A machine-readable error code.", "Type": { - "$id": "298", + "$id": "301", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2268,12 +2286,12 @@ "IsDiscriminator": false }, { - "$id": "299", + "$id": "302", "Name": "param", "SerializedName": "param", "Description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field\nwill be null if the failure was not parameter-specific.", "Type": { - "$id": "300", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2291,13 +2309,13 @@ ] }, { - "$ref": "278" + "$ref": "281" }, { - "$ref": "294" + "$ref": "297" }, { - "$id": "301", + "$id": "304", "Kind": "Model", "Name": "ListPaginatedFineTuningJobsResponse", "Namespace": "OpenAI", @@ -2305,12 +2323,12 @@ "Usage": "Output", "Properties": [ { - "$id": "302", + "$id": "305", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "303", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2320,16 +2338,16 @@ "IsDiscriminator": false }, { - "$id": "304", + "$id": "307", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "305", + "$id": "308", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "261" + "$ref": "264" }, "IsNullable": false }, @@ -2338,12 +2356,12 @@ "IsDiscriminator": false }, { - "$id": "306", + "$id": "309", "Name": "has_more", "SerializedName": "has_more", "Description": "", "Type": { - "$id": "307", + "$id": "310", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2355,7 +2373,7 @@ ] }, { - "$id": "308", + "$id": "311", "Kind": "Model", "Name": "ListFineTuningJobEventsResponse", "Namespace": "OpenAI", @@ -2363,12 +2381,12 @@ "Usage": "Output", "Properties": [ { - "$id": "309", + "$id": "312", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "310", + "$id": "313", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2378,16 +2396,16 @@ "IsDiscriminator": false }, { - "$id": "311", + "$id": "314", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "312", + "$id": "315", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "313", + "$id": "316", "Kind": "Model", "Name": "FineTuningJobEvent", "Namespace": "OpenAI", @@ -2395,12 +2413,12 @@ "Usage": "Output", "Properties": [ { - "$id": "314", + "$id": "317", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "315", + "$id": "318", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2410,12 +2428,12 @@ "IsDiscriminator": false }, { - "$id": "316", + "$id": "319", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "317", + "$id": "320", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2425,12 +2443,12 @@ "IsDiscriminator": false }, { - "$id": "318", + "$id": "321", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "319", + "$id": "322", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2440,7 +2458,7 @@ "IsDiscriminator": false }, { - "$id": "320", + "$id": "323", "Name": "level", "SerializedName": "level", "Description": "", @@ -2452,12 +2470,12 @@ "IsDiscriminator": false }, { - "$id": "321", + "$id": "324", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "322", + "$id": "325", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2477,10 +2495,10 @@ ] }, { - "$ref": "313" + "$ref": "316" }, { - "$id": "323", + "$id": "326", "Kind": "Model", "Name": "CreateCompletionRequest", "Namespace": "OpenAI", @@ -2488,7 +2506,7 @@ "Usage": "Input", "Properties": [ { - "$id": "324", + "$id": "327", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to\nsee all of your available models, or see our [Model overview](/docs/models/overview) for\ndescriptions of them.", @@ -2500,27 +2518,27 @@ "IsDiscriminator": false }, { - "$id": "325", + "$id": "328", "Name": "prompt", "SerializedName": "prompt", "Description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of\ntokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a\nprompt is not specified the model will generate as if from the beginning of a new document.", "Type": { - "$id": "326", + "$id": "329", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "327", + "$id": "330", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "328", + "$id": "331", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "329", + "$id": "332", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2528,11 +2546,11 @@ "IsNullable": false }, { - "$id": "330", + "$id": "333", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "331", + "$id": "334", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2540,15 +2558,15 @@ "IsNullable": false }, { - "$id": "332", + "$id": "335", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "333", + "$id": "336", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "334", + "$id": "337", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2565,12 +2583,12 @@ "IsDiscriminator": false }, { - "$id": "335", + "$id": "338", "Name": "suffix", "SerializedName": "suffix", "Description": "The suffix that comes after a completion of inserted text.", "Type": { - "$id": "336", + "$id": "339", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2580,12 +2598,12 @@ "IsDiscriminator": false }, { - "$id": "337", + "$id": "340", "Name": "temperature", "SerializedName": "temperature", "Description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "Type": { - "$id": "338", + "$id": "341", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2595,12 +2613,12 @@ "IsDiscriminator": false }, { - "$id": "339", + "$id": "342", "Name": "top_p", "SerializedName": "top_p", "Description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers\nthe results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising\nthe top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "Type": { - "$id": "340", + "$id": "343", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2610,12 +2628,12 @@ "IsDiscriminator": false }, { - "$id": "341", + "$id": "344", "Name": "n", "SerializedName": "n", "Description": "How many completions to generate for each prompt.\n**Note:** Because this parameter generates many completions, it can quickly consume your token\nquota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "Type": { - "$id": "342", + "$id": "345", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2625,12 +2643,12 @@ "IsDiscriminator": false }, { - "$id": "343", + "$id": "346", "Name": "max_tokens", "SerializedName": "max_tokens", "Description": "The maximum number of [tokens](/tokenizer) to generate in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)\nfor counting tokens.", "Type": { - "$id": "344", + "$id": "347", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2640,27 +2658,27 @@ "IsDiscriminator": false }, { - "$id": "345", + "$id": "348", "Name": "stop", "SerializedName": "stop", "Description": "Up to 4 sequences where the API will stop generating further tokens.", "Type": { - "$id": "346", + "$id": "349", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "347", + "$id": "350", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "348", + "$id": "351", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "349", + "$id": "352", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2675,12 +2693,12 @@ "IsDiscriminator": false }, { - "$id": "350", + "$id": "353", "Name": "presence_penalty", "SerializedName": "presence_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear\nin the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "351", + "$id": "354", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2690,12 +2708,12 @@ "IsDiscriminator": false }, { - "$id": "352", + "$id": "355", "Name": "frequency_penalty", "SerializedName": "frequency_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing\nfrequency in the text so far, decreasing the model's likelihood to repeat the same line\nverbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "353", + "$id": "356", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2705,22 +2723,22 @@ "IsDiscriminator": false }, { - "$id": "354", + "$id": "357", "Name": "logit_bias", "SerializedName": "logit_bias", "Description": "Modify the likelihood of specified tokens appearing in the completion.\nAccepts a json object that maps tokens (specified by their token ID in the tokenizer) to an\nassociated bias value from -100 to 100. Mathematically, the bias is added to the logits\ngenerated by the model prior to sampling. The exact effect will vary per model, but values\nbetween -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.", "Type": { - "$id": "355", + "$id": "358", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "356", + "$id": "359", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "357", + "$id": "360", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2732,12 +2750,12 @@ "IsDiscriminator": false }, { - "$id": "358", + "$id": "361", "Name": "user", "SerializedName": "user", "Description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect\nabuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "Type": { - "$id": "359", + "$id": "362", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2747,12 +2765,12 @@ "IsDiscriminator": false }, { - "$id": "360", + "$id": "363", "Name": "stream", "SerializedName": "stream", "Description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available, with the stream terminated by a `data: [DONE]` message.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).", "Type": { - "$id": "361", + "$id": "364", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -2762,12 +2780,12 @@ "IsDiscriminator": false }, { - "$id": "362", + "$id": "365", "Name": "logprobs", "SerializedName": "logprobs", "Description": "Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens.\nFor example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The\nAPI will always return the `logprob` of the sampled token, so there may be up to `logprobs+1`\nelements in the response.\n\nThe maximum value for `logprobs` is 5.", "Type": { - "$id": "363", + "$id": "366", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2777,12 +2795,12 @@ "IsDiscriminator": false }, { - "$id": "364", + "$id": "367", "Name": "echo", "SerializedName": "echo", "Description": "Echo back the prompt in addition to the completion", "Type": { - "$id": "365", + "$id": "368", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -2792,12 +2810,12 @@ "IsDiscriminator": false }, { - "$id": "366", + "$id": "369", "Name": "best_of", "SerializedName": "best_of", "Description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest\nlog probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies\nhow many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token\nquota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "Type": { - "$id": "367", + "$id": "370", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2809,7 +2827,7 @@ ] }, { - "$id": "368", + "$id": "371", "Kind": "Model", "Name": "CreateCompletionResponse", "Namespace": "OpenAI", @@ -2818,12 +2836,12 @@ "Usage": "Output", "Properties": [ { - "$id": "369", + "$id": "372", "Name": "id", "SerializedName": "id", "Description": "A unique identifier for the completion.", "Type": { - "$id": "370", + "$id": "373", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2833,12 +2851,12 @@ "IsDiscriminator": false }, { - "$id": "371", + "$id": "374", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `text_completion`.", "Type": { - "$id": "372", + "$id": "375", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2848,12 +2866,12 @@ "IsDiscriminator": false }, { - "$id": "373", + "$id": "376", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the completion was created.", "Type": { - "$id": "374", + "$id": "377", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2863,12 +2881,12 @@ "IsDiscriminator": false }, { - "$id": "375", + "$id": "378", "Name": "model", "SerializedName": "model", "Description": "The model used for the completion.", "Type": { - "$id": "376", + "$id": "379", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2878,16 +2896,16 @@ "IsDiscriminator": false }, { - "$id": "377", + "$id": "380", "Name": "choices", "SerializedName": "choices", "Description": "The list of completion choices the model generated for the input.", "Type": { - "$id": "378", + "$id": "381", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "379", + "$id": "382", "Kind": "Model", "Name": "CreateCompletionResponseChoice", "Namespace": "OpenAI", @@ -2895,12 +2913,12 @@ "Usage": "Output", "Properties": [ { - "$id": "380", + "$id": "383", "Name": "index", "SerializedName": "index", "Description": "", "Type": { - "$id": "381", + "$id": "384", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2910,12 +2928,12 @@ "IsDiscriminator": false }, { - "$id": "382", + "$id": "385", "Name": "text", "SerializedName": "text", "Description": "", "Type": { - "$id": "383", + "$id": "386", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2925,12 +2943,12 @@ "IsDiscriminator": false }, { - "$id": "384", + "$id": "387", "Name": "logprobs", "SerializedName": "logprobs", "Description": "", "Type": { - "$id": "385", + "$id": "388", "Kind": "Model", "Name": "CreateCompletionResponseChoiceLogprobs", "Namespace": "OpenAI", @@ -2938,16 +2956,16 @@ "Usage": "Output", "Properties": [ { - "$id": "386", + "$id": "389", "Name": "tokens", "SerializedName": "tokens", "Description": "", "Type": { - "$id": "387", + "$id": "390", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "388", + "$id": "391", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2959,16 +2977,16 @@ "IsDiscriminator": false }, { - "$id": "389", + "$id": "392", "Name": "token_logprobs", "SerializedName": "token_logprobs", "Description": "", "Type": { - "$id": "390", + "$id": "393", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "391", + "$id": "394", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -2980,26 +2998,26 @@ "IsDiscriminator": false }, { - "$id": "392", + "$id": "395", "Name": "top_logprobs", "SerializedName": "top_logprobs", "Description": "", "Type": { - "$id": "393", + "$id": "396", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "394", + "$id": "397", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "395", + "$id": "398", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "396", + "$id": "399", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3013,16 +3031,16 @@ "IsDiscriminator": false }, { - "$id": "397", + "$id": "400", "Name": "text_offset", "SerializedName": "text_offset", "Description": "", "Type": { - "$id": "398", + "$id": "401", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "399", + "$id": "402", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3040,7 +3058,7 @@ "IsDiscriminator": false }, { - "$id": "400", + "$id": "403", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, or `content_filter` if content was omitted\ndue to a flag from our content filters, `length` if the maximum number of tokens specified\nin the request was reached, or `content_filter` if content was omitted due to a flag from our\ncontent filters.", @@ -3060,12 +3078,12 @@ "IsDiscriminator": false }, { - "$id": "401", + "$id": "404", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$ref": "239" + "$ref": "242" }, "IsRequired": false, "IsReadOnly": false, @@ -3074,13 +3092,13 @@ ] }, { - "$ref": "379" + "$ref": "382" }, { - "$ref": "385" + "$ref": "388" }, { - "$id": "402", + "$id": "405", "Kind": "Model", "Name": "CreateEditRequest", "Namespace": "OpenAI", @@ -3088,7 +3106,7 @@ "Usage": "Input", "Properties": [ { - "$id": "403", + "$id": "406", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the `text-davinci-edit-001` or `code-davinci-edit-001`\nmodel with this endpoint.", @@ -3100,12 +3118,12 @@ "IsDiscriminator": false }, { - "$id": "404", + "$id": "407", "Name": "input", "SerializedName": "input", "Description": "The input text to use as a starting point for the edit.", "Type": { - "$id": "405", + "$id": "408", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3115,12 +3133,12 @@ "IsDiscriminator": false }, { - "$id": "406", + "$id": "409", "Name": "instruction", "SerializedName": "instruction", "Description": "The instruction that tells the model how to edit the prompt.", "Type": { - "$id": "407", + "$id": "410", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3130,12 +3148,12 @@ "IsDiscriminator": false }, { - "$id": "408", + "$id": "411", "Name": "n", "SerializedName": "n", "Description": "How many edits to generate for the input and instruction.", "Type": { - "$id": "409", + "$id": "412", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3145,12 +3163,12 @@ "IsDiscriminator": false }, { - "$id": "410", + "$id": "413", "Name": "temperature", "SerializedName": "temperature", "Description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "Type": { - "$id": "411", + "$id": "414", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3160,12 +3178,12 @@ "IsDiscriminator": false }, { - "$id": "412", + "$id": "415", "Name": "top_p", "SerializedName": "top_p", "Description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers\nthe results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising\nthe top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "Type": { - "$id": "413", + "$id": "416", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3177,7 +3195,7 @@ ] }, { - "$id": "414", + "$id": "417", "Kind": "Model", "Name": "CreateEditResponse", "Namespace": "OpenAI", @@ -3186,12 +3204,12 @@ "Usage": "Output", "Properties": [ { - "$id": "415", + "$id": "418", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `edit`.", "Type": { - "$id": "416", + "$id": "419", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3205,12 +3223,12 @@ "IsDiscriminator": false }, { - "$id": "417", + "$id": "420", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the edit was created.", "Type": { - "$id": "418", + "$id": "421", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3220,16 +3238,16 @@ "IsDiscriminator": false }, { - "$id": "419", + "$id": "422", "Name": "choices", "SerializedName": "choices", "Description": "description: A list of edit choices. Can be more than one if `n` is greater than 1.", "Type": { - "$id": "420", + "$id": "423", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "421", + "$id": "424", "Kind": "Model", "Name": "CreateEditResponseChoice", "Namespace": "OpenAI", @@ -3237,12 +3255,12 @@ "Usage": "Output", "Properties": [ { - "$id": "422", + "$id": "425", "Name": "text", "SerializedName": "text", "Description": "The edited result.", "Type": { - "$id": "423", + "$id": "426", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3252,12 +3270,12 @@ "IsDiscriminator": false }, { - "$id": "424", + "$id": "427", "Name": "index", "SerializedName": "index", "Description": "The index of the choice in the list of choices.", "Type": { - "$id": "425", + "$id": "428", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3267,7 +3285,7 @@ "IsDiscriminator": false }, { - "$id": "426", + "$id": "429", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, or `length` if the maximum number of tokens\nspecified in the request was reached.", @@ -3287,12 +3305,12 @@ "IsDiscriminator": false }, { - "$id": "427", + "$id": "430", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$ref": "239" + "$ref": "242" }, "IsRequired": true, "IsReadOnly": false, @@ -3301,10 +3319,10 @@ ] }, { - "$ref": "421" + "$ref": "424" }, { - "$id": "428", + "$id": "431", "Kind": "Model", "Name": "CreateEmbeddingRequest", "Namespace": "OpenAI", @@ -3312,7 +3330,7 @@ "Usage": "Input", "Properties": [ { - "$id": "429", + "$id": "432", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", @@ -3324,27 +3342,27 @@ "IsDiscriminator": false }, { - "$id": "430", + "$id": "433", "Name": "input", "SerializedName": "input", "Description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a\nsingle request, pass an array of strings or array of token arrays. Each input must not exceed\nthe max input tokens for the model (8191 tokens for `text-embedding-ada-002`) and cannot be an empty string.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)\nfor counting tokens.", "Type": { - "$id": "431", + "$id": "434", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "432", + "$id": "435", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "433", + "$id": "436", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "434", + "$id": "437", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3352,11 +3370,11 @@ "IsNullable": false }, { - "$id": "435", + "$id": "438", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "436", + "$id": "439", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3364,15 +3382,15 @@ "IsNullable": false }, { - "$id": "437", + "$id": "440", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "438", + "$id": "441", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "439", + "$id": "442", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3389,12 +3407,12 @@ "IsDiscriminator": false }, { - "$id": "440", + "$id": "443", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "441", + "$id": "444", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3406,7 +3424,7 @@ ] }, { - "$id": "442", + "$id": "445", "Kind": "Model", "Name": "CreateEmbeddingResponse", "Namespace": "OpenAI", @@ -3414,12 +3432,12 @@ "Usage": "Output", "Properties": [ { - "$id": "443", + "$id": "446", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"embedding\".", "Type": { - "$id": "444", + "$id": "447", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3433,12 +3451,12 @@ "IsDiscriminator": false }, { - "$id": "445", + "$id": "448", "Name": "model", "SerializedName": "model", "Description": "The name of the model used to generate the embedding.", "Type": { - "$id": "446", + "$id": "449", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3448,16 +3466,16 @@ "IsDiscriminator": false }, { - "$id": "447", + "$id": "450", "Name": "data", "SerializedName": "data", "Description": "The list of embeddings generated by the model.", "Type": { - "$id": "448", + "$id": "451", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "449", + "$id": "452", "Kind": "Model", "Name": "Embedding", "Namespace": "OpenAI", @@ -3466,12 +3484,12 @@ "Usage": "Output", "Properties": [ { - "$id": "450", + "$id": "453", "Name": "index", "SerializedName": "index", "Description": "The index of the embedding in the list of embeddings.", "Type": { - "$id": "451", + "$id": "454", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3481,12 +3499,12 @@ "IsDiscriminator": false }, { - "$id": "452", + "$id": "455", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"embedding\".", "Type": { - "$id": "453", + "$id": "456", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3500,16 +3518,16 @@ "IsDiscriminator": false }, { - "$id": "454", + "$id": "457", "Name": "embedding", "SerializedName": "embedding", "Description": "The embedding vector, which is a list of floats. The length of vector depends on the model as\\\nlisted in the [embedding guide](/docs/guides/embeddings).", "Type": { - "$id": "455", + "$id": "458", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "456", + "$id": "459", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -3529,12 +3547,12 @@ "IsDiscriminator": false }, { - "$id": "457", + "$id": "460", "Name": "usage", "SerializedName": "usage", "Description": "The usage information for the request.", "Type": { - "$id": "458", + "$id": "461", "Kind": "Model", "Name": "CreateEmbeddingResponseUsage", "Namespace": "OpenAI", @@ -3542,12 +3560,12 @@ "Usage": "Output", "Properties": [ { - "$id": "459", + "$id": "462", "Name": "prompt_tokens", "SerializedName": "prompt_tokens", "Description": "The number of tokens used by the prompt.", "Type": { - "$id": "460", + "$id": "463", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3557,12 +3575,12 @@ "IsDiscriminator": false }, { - "$id": "461", + "$id": "464", "Name": "total_tokens", "SerializedName": "total_tokens", "Description": "The total number of tokens used by the request.", "Type": { - "$id": "462", + "$id": "465", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3580,13 +3598,13 @@ ] }, { - "$ref": "449" + "$ref": "452" }, { - "$ref": "458" + "$ref": "461" }, { - "$id": "463", + "$id": "466", "Kind": "Model", "Name": "ListFilesResponse", "Namespace": "OpenAI", @@ -3594,12 +3612,12 @@ "Usage": "Output", "Properties": [ { - "$id": "464", + "$id": "467", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "465", + "$id": "468", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3609,16 +3627,16 @@ "IsDiscriminator": false }, { - "$id": "466", + "$id": "469", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "467", + "$id": "470", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "468", + "$id": "471", "Kind": "Model", "Name": "OpenAIFile", "Namespace": "OpenAI", @@ -3627,12 +3645,12 @@ "Usage": "Output", "Properties": [ { - "$id": "469", + "$id": "472", "Name": "id", "SerializedName": "id", "Description": "The file identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "470", + "$id": "473", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3642,12 +3660,12 @@ "IsDiscriminator": false }, { - "$id": "471", + "$id": "474", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"file\".", "Type": { - "$id": "472", + "$id": "475", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3661,12 +3679,12 @@ "IsDiscriminator": false }, { - "$id": "473", + "$id": "476", "Name": "bytes", "SerializedName": "bytes", "Description": "The size of the file in bytes.", "Type": { - "$id": "474", + "$id": "477", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3676,12 +3694,12 @@ "IsDiscriminator": false }, { - "$id": "475", + "$id": "478", "Name": "createdAt", "SerializedName": "createdAt", "Description": "The Unix timestamp (in seconds) for when the file was created.", "Type": { - "$id": "476", + "$id": "479", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3691,12 +3709,12 @@ "IsDiscriminator": false }, { - "$id": "477", + "$id": "480", "Name": "filename", "SerializedName": "filename", "Description": "The name of the file.", "Type": { - "$id": "478", + "$id": "481", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3706,12 +3724,12 @@ "IsDiscriminator": false }, { - "$id": "479", + "$id": "482", "Name": "purpose", "SerializedName": "purpose", "Description": "The intended purpose of the file. Currently, only \"fine-tune\" is supported.", "Type": { - "$id": "480", + "$id": "483", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3721,7 +3739,7 @@ "IsDiscriminator": false }, { - "$id": "481", + "$id": "484", "Name": "status", "SerializedName": "status", "Description": "The current status of the file, which can be either `uploaded`, `processed`, `pending`,\n`error`, `deleting` or `deleted`.", @@ -3733,12 +3751,12 @@ "IsDiscriminator": false }, { - "$id": "482", + "$id": "485", "Name": "status_details", "SerializedName": "status_details", "Description": "Additional details about the status of the file. If the file is in the `error` state, this will\ninclude a message describing the error.", "Type": { - "$id": "483", + "$id": "486", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3758,10 +3776,10 @@ ] }, { - "$ref": "468" + "$ref": "471" }, { - "$id": "484", + "$id": "487", "Kind": "Model", "Name": "CreateFileRequest", "Namespace": "OpenAI", @@ -3769,12 +3787,12 @@ "Usage": "Input", "Properties": [ { - "$id": "485", + "$id": "488", "Name": "file", "SerializedName": "file", "Description": "Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.\n\nIf the `purpose` is set to \"fine-tune\", the file will be used for fine-tuning.", "Type": { - "$id": "486", + "$id": "489", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -3784,12 +3802,12 @@ "IsDiscriminator": false }, { - "$id": "487", + "$id": "490", "Name": "purpose", "SerializedName": "purpose", "Description": "The intended purpose of the uploaded documents. Use \"fine-tune\" for\n[fine-tuning](/docs/api-reference/fine-tuning). This allows us to validate the format of the\nuploaded file.", "Type": { - "$id": "488", + "$id": "491", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3801,7 +3819,7 @@ ] }, { - "$id": "489", + "$id": "492", "Kind": "Model", "Name": "DeleteFileResponse", "Namespace": "OpenAI", @@ -3809,12 +3827,12 @@ "Usage": "Output", "Properties": [ { - "$id": "490", + "$id": "493", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "491", + "$id": "494", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3824,12 +3842,12 @@ "IsDiscriminator": false }, { - "$id": "492", + "$id": "495", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "493", + "$id": "496", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3839,12 +3857,12 @@ "IsDiscriminator": false }, { - "$id": "494", + "$id": "497", "Name": "deleted", "SerializedName": "deleted", "Description": "", "Type": { - "$id": "495", + "$id": "498", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -3856,7 +3874,7 @@ ] }, { - "$id": "496", + "$id": "499", "Kind": "Model", "Name": "CreateFineTuneRequest", "Namespace": "OpenAI", @@ -3864,12 +3882,12 @@ "Usage": "Input", "Properties": [ { - "$id": "497", + "$id": "500", "Name": "training_file", "SerializedName": "training_file", "Description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/upload) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file, where each training example is a JSON object\nwith the keys \"prompt\" and \"completion\". Additionally, you must upload your file with the\npurpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more\ndetails.", "Type": { - "$id": "498", + "$id": "501", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3879,12 +3897,12 @@ "IsDiscriminator": false }, { - "$id": "499", + "$id": "502", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation metrics periodically during\nfine-tuning. These metrics can be viewed in the\n[fine-tuning results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).\nYour train and validation data should be mutually exclusive.\n\nYour dataset must be formatted as a JSONL file, where each validation example is a JSON object\nwith the keys \"prompt\" and \"completion\". Additionally, you must upload your file with the\npurpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more\ndetails.", "Type": { - "$id": "500", + "$id": "503", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3894,7 +3912,7 @@ "IsDiscriminator": false }, { - "$id": "501", + "$id": "504", "Name": "model", "SerializedName": "model", "Description": "The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\",\n\"davinci\", or a fine-tuned model created after 2022-04-21 and before 2023-08-22. To learn more\nabout these models, see the [Models](/docs/models) documentation.", @@ -3906,12 +3924,12 @@ "IsDiscriminator": false }, { - "$id": "502", + "$id": "505", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "503", + "$id": "506", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3921,12 +3939,12 @@ "IsDiscriminator": false }, { - "$id": "504", + "$id": "507", "Name": "batch_size", "SerializedName": "batch_size", "Description": "The batch size to use for training. The batch size is the number of training examples used to\ntrain a single forward and backward pass.\n\nBy default, the batch size will be dynamically configured to be ~0.2% of the number of examples\nin the training set, capped at 256 - in general, we've found that larger batch sizes tend to\nwork better for larger datasets.", "Type": { - "$id": "505", + "$id": "508", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3936,12 +3954,12 @@ "IsDiscriminator": false }, { - "$id": "506", + "$id": "509", "Name": "learning_rate_multiplier", "SerializedName": "learning_rate_multiplier", "Description": "The learning rate multiplier to use for training. The fine-tuning learning rate is the original\nlearning rate used for pretraining multiplied by this value.\n\nBy default, the learning rate multiplier is the 0.05, 0.1, or 0.2 depending on final\n`batch_size` (larger learning rates tend to perform better with larger batch sizes). We\nrecommend experimenting with values in the range 0.02 to 0.2 to see what produces the best\nresults.", "Type": { - "$id": "507", + "$id": "510", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3951,12 +3969,12 @@ "IsDiscriminator": false }, { - "$id": "508", + "$id": "511", "Name": "prompt_loss_rate", "SerializedName": "prompt_loss_rate", "Description": "The weight to use for loss on the prompt tokens. This controls how much the model tries to\nlearn to generate the prompt (as compared to the completion which always has a weight of 1.0),\nand can add a stabilizing effect to training when completions are short.\n\nIf prompts are extremely long (relative to completions), it may make sense to reduce this\nweight so as to avoid over-prioritizing learning the prompt.", "Type": { - "$id": "509", + "$id": "512", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3966,12 +3984,12 @@ "IsDiscriminator": false }, { - "$id": "510", + "$id": "513", "Name": "compute_classification_metrics", "SerializedName": "compute_classification_metrics", "Description": "If set, we calculate classification-specific metrics such as accuracy and F-1 score using the\nvalidation set at the end of every epoch. These metrics can be viewed in the\n[results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).\n\nIn order to compute classification metrics, you must provide a `validation_file`. Additionally,\nyou must specify `classification_n_classes` for multiclass classification or\n`classification_positive_class` for binary classification.", "Type": { - "$id": "511", + "$id": "514", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -3981,12 +3999,12 @@ "IsDiscriminator": false }, { - "$id": "512", + "$id": "515", "Name": "classification_n_classes", "SerializedName": "classification_n_classes", "Description": "The number of classes in a classification task.\n\nThis parameter is required for multiclass classification.", "Type": { - "$id": "513", + "$id": "516", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3996,12 +4014,12 @@ "IsDiscriminator": false }, { - "$id": "514", + "$id": "517", "Name": "classification_positive_class", "SerializedName": "classification_positive_class", "Description": "The positive class in binary classification.\n\nThis parameter is needed to generate precision, recall, and F1 metrics when doing binary\nclassification.", "Type": { - "$id": "515", + "$id": "518", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -4011,16 +4029,16 @@ "IsDiscriminator": false }, { - "$id": "516", + "$id": "519", "Name": "classification_betas", "SerializedName": "classification_betas", "Description": "If this is provided, we calculate F-beta scores at the specified beta values. The F-beta score\nis a generalization of F-1 score. This is only used for binary classification.\n\nWith a beta of 1 (i.e. the F-1 score), precision and recall are given the same weight. A larger\nbeta score puts more weight on recall and less on precision. A smaller beta score puts more\nweight on precision and less on recall.", "Type": { - "$id": "517", + "$id": "520", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "518", + "$id": "521", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4032,12 +4050,12 @@ "IsDiscriminator": false }, { - "$id": "519", + "$id": "522", "Name": "suffix", "SerializedName": "suffix", "Description": "A string of up to 18 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like\n`ada:ft-your-org:custom-model-name-2022-02-15-04-21-04`.", "Type": { - "$id": "520", + "$id": "523", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -4049,7 +4067,7 @@ ] }, { - "$id": "521", + "$id": "524", "Kind": "Model", "Name": "FineTune", "Namespace": "OpenAI", @@ -4059,12 +4077,12 @@ "Usage": "Output", "Properties": [ { - "$id": "522", + "$id": "525", "Name": "id", "SerializedName": "id", "Description": "The object identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "523", + "$id": "526", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4074,12 +4092,12 @@ "IsDiscriminator": false }, { - "$id": "524", + "$id": "527", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"fine-tune\".", "Type": { - "$id": "525", + "$id": "528", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -4093,12 +4111,12 @@ "IsDiscriminator": false }, { - "$id": "526", + "$id": "529", "Name": "created_at", "SerializedName": "created_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "Type": { - "$id": "527", + "$id": "530", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4108,12 +4126,12 @@ "IsDiscriminator": false }, { - "$id": "528", + "$id": "531", "Name": "updated_at", "SerializedName": "updated_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was last updated.", "Type": { - "$id": "529", + "$id": "532", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4123,12 +4141,12 @@ "IsDiscriminator": false }, { - "$id": "530", + "$id": "533", "Name": "model", "SerializedName": "model", "Description": "The base model that is being fine-tuned.", "Type": { - "$id": "531", + "$id": "534", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4138,12 +4156,12 @@ "IsDiscriminator": false }, { - "$id": "532", + "$id": "535", "Name": "fine_tuned_model", "SerializedName": "fine_tuned_model", "Description": "The name of the fine-tuned model that is being created.", "Type": { - "$id": "533", + "$id": "536", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -4153,12 +4171,12 @@ "IsDiscriminator": false }, { - "$id": "534", + "$id": "537", "Name": "organization_id", "SerializedName": "organization_id", "Description": "The organization that owns the fine-tuning job.", "Type": { - "$id": "535", + "$id": "538", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4168,7 +4186,7 @@ "IsDiscriminator": false }, { - "$id": "536", + "$id": "539", "Name": "status", "SerializedName": "status", "Description": "The current status of the fine-tuning job, which can be either `created`, `running`,\n`succeeded`, `failed`, or `cancelled`.", @@ -4180,12 +4198,12 @@ "IsDiscriminator": false }, { - "$id": "537", + "$id": "540", "Name": "hyperparams", "SerializedName": "hyperparams", "Description": "The hyperparameters used for the fine-tuning job. See the\n[fine-tuning guide](/docs/guides/legacy-fine-tuning/hyperparameters) for more details.", "Type": { - "$id": "538", + "$id": "541", "Kind": "Model", "Name": "FineTuneHyperparams", "Namespace": "OpenAI", @@ -4193,12 +4211,12 @@ "Usage": "Output", "Properties": [ { - "$id": "539", + "$id": "542", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "540", + "$id": "543", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4208,12 +4226,12 @@ "IsDiscriminator": false }, { - "$id": "541", + "$id": "544", "Name": "batch_size", "SerializedName": "batch_size", "Description": "The batch size to use for training. The batch size is the number of training examples used to\ntrain a single forward and backward pass.", "Type": { - "$id": "542", + "$id": "545", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4223,12 +4241,12 @@ "IsDiscriminator": false }, { - "$id": "543", + "$id": "546", "Name": "prompt_loss_weight", "SerializedName": "prompt_loss_weight", "Description": "The weight to use for loss on the prompt tokens.", "Type": { - "$id": "544", + "$id": "547", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4238,12 +4256,12 @@ "IsDiscriminator": false }, { - "$id": "545", + "$id": "548", "Name": "learning_rate_multiplier", "SerializedName": "learning_rate_multiplier", "Description": "The learning rate multiplier to use for training.", "Type": { - "$id": "546", + "$id": "549", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4253,12 +4271,12 @@ "IsDiscriminator": false }, { - "$id": "547", + "$id": "550", "Name": "compute_classification_metrics", "SerializedName": "compute_classification_metrics", "Description": "The classification metrics to compute using the validation dataset at the end of every epoch.", "Type": { - "$id": "548", + "$id": "551", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4268,12 +4286,12 @@ "IsDiscriminator": false }, { - "$id": "549", + "$id": "552", "Name": "classification_positive_class", "SerializedName": "classification_positive_class", "Description": "The positive class to use for computing classification metrics.", "Type": { - "$id": "550", + "$id": "553", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4283,12 +4301,12 @@ "IsDiscriminator": false }, { - "$id": "551", + "$id": "554", "Name": "classification_n_classes", "SerializedName": "classification_n_classes", "Description": "The number of classes to use for computing classification metrics.", "Type": { - "$id": "552", + "$id": "555", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4304,16 +4322,16 @@ "IsDiscriminator": false }, { - "$id": "553", + "$id": "556", "Name": "training_files", "SerializedName": "training_files", "Description": "The list of files used for training.", "Type": { - "$id": "554", + "$id": "557", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "468" + "$ref": "471" }, "IsNullable": false }, @@ -4322,16 +4340,16 @@ "IsDiscriminator": false }, { - "$id": "555", + "$id": "558", "Name": "validation_files", "SerializedName": "validation_files", "Description": "The list of files used for validation.", "Type": { - "$id": "556", + "$id": "559", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "468" + "$ref": "471" }, "IsNullable": false }, @@ -4340,16 +4358,16 @@ "IsDiscriminator": false }, { - "$id": "557", + "$id": "560", "Name": "result_files", "SerializedName": "result_files", "Description": "The compiled results files for the fine-tuning job.", "Type": { - "$id": "558", + "$id": "561", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "468" + "$ref": "471" }, "IsNullable": false }, @@ -4358,16 +4376,16 @@ "IsDiscriminator": false }, { - "$id": "559", + "$id": "562", "Name": "events", "SerializedName": "events", "Description": "The list of events that have been observed in the lifecycle of the FineTune job.", "Type": { - "$id": "560", + "$id": "563", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "561", + "$id": "564", "Kind": "Model", "Name": "FineTuneEvent", "Namespace": "OpenAI", @@ -4375,12 +4393,12 @@ "Usage": "Output", "Properties": [ { - "$id": "562", + "$id": "565", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "563", + "$id": "566", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4390,12 +4408,12 @@ "IsDiscriminator": false }, { - "$id": "564", + "$id": "567", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "565", + "$id": "568", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4405,12 +4423,12 @@ "IsDiscriminator": false }, { - "$id": "566", + "$id": "569", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "567", + "$id": "570", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4420,12 +4438,12 @@ "IsDiscriminator": false }, { - "$id": "568", + "$id": "571", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "569", + "$id": "572", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4445,13 +4463,13 @@ ] }, { - "$ref": "538" + "$ref": "541" }, { - "$ref": "561" + "$ref": "564" }, { - "$id": "570", + "$id": "573", "Kind": "Model", "Name": "ListFineTunesResponse", "Namespace": "OpenAI", @@ -4459,12 +4477,12 @@ "Usage": "Output", "Properties": [ { - "$id": "571", + "$id": "574", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "572", + "$id": "575", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4474,16 +4492,16 @@ "IsDiscriminator": false }, { - "$id": "573", + "$id": "576", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "574", + "$id": "577", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "521" + "$ref": "524" }, "IsNullable": false }, @@ -4494,7 +4512,7 @@ ] }, { - "$id": "575", + "$id": "578", "Kind": "Model", "Name": "ListFineTuneEventsResponse", "Namespace": "OpenAI", @@ -4502,12 +4520,12 @@ "Usage": "Output", "Properties": [ { - "$id": "576", + "$id": "579", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "577", + "$id": "580", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4517,16 +4535,16 @@ "IsDiscriminator": false }, { - "$id": "578", + "$id": "581", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "579", + "$id": "582", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "561" + "$ref": "564" }, "IsNullable": false }, @@ -4537,7 +4555,7 @@ ] }, { - "$id": "580", + "$id": "583", "Kind": "Model", "Name": "ListModelsResponse", "Namespace": "OpenAI", @@ -4545,12 +4563,12 @@ "Usage": "Output", "Properties": [ { - "$id": "581", + "$id": "584", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "582", + "$id": "585", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4560,16 +4578,16 @@ "IsDiscriminator": false }, { - "$id": "583", + "$id": "586", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "584", + "$id": "587", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "585", + "$id": "588", "Kind": "Model", "Name": "Model", "Namespace": "OpenAI", @@ -4578,12 +4596,12 @@ "Usage": "Output", "Properties": [ { - "$id": "586", + "$id": "589", "Name": "id", "SerializedName": "id", "Description": "The model identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "587", + "$id": "590", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4593,12 +4611,12 @@ "IsDiscriminator": false }, { - "$id": "588", + "$id": "591", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"model\".", "Type": { - "$id": "589", + "$id": "592", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -4612,12 +4630,12 @@ "IsDiscriminator": false }, { - "$id": "590", + "$id": "593", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) when the model was created.", "Type": { - "$id": "591", + "$id": "594", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4627,12 +4645,12 @@ "IsDiscriminator": false }, { - "$id": "592", + "$id": "595", "Name": "owned_by", "SerializedName": "owned_by", "Description": "The organization that owns the model.", "Type": { - "$id": "593", + "$id": "596", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4652,10 +4670,10 @@ ] }, { - "$ref": "585" + "$ref": "588" }, { - "$id": "594", + "$id": "597", "Kind": "Model", "Name": "DeleteModelResponse", "Namespace": "OpenAI", @@ -4663,12 +4681,12 @@ "Usage": "Output", "Properties": [ { - "$id": "595", + "$id": "598", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "596", + "$id": "599", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4678,12 +4696,12 @@ "IsDiscriminator": false }, { - "$id": "597", + "$id": "600", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "598", + "$id": "601", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4693,12 +4711,12 @@ "IsDiscriminator": false }, { - "$id": "599", + "$id": "602", "Name": "deleted", "SerializedName": "deleted", "Description": "", "Type": { - "$id": "600", + "$id": "603", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4710,7 +4728,7 @@ ] }, { - "$id": "601", + "$id": "604", "Kind": "Model", "Name": "CreateImageRequest", "Namespace": "OpenAI", @@ -4718,12 +4736,12 @@ "Usage": "Input", "Properties": [ { - "$id": "602", + "$id": "605", "Name": "prompt", "SerializedName": "prompt", "Description": "A text description of the desired image(s). The maximum length is 1000 characters.", "Type": { - "$id": "603", + "$id": "606", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4733,12 +4751,12 @@ "IsDiscriminator": false }, { - "$id": "604", + "$id": "607", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "605", + "$id": "608", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4748,7 +4766,7 @@ "IsDiscriminator": false }, { - "$id": "606", + "$id": "609", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -4760,7 +4778,7 @@ "IsDiscriminator": false }, { - "$id": "607", + "$id": "610", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -4772,12 +4790,12 @@ "IsDiscriminator": false }, { - "$id": "608", + "$id": "611", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "609", + "$id": "612", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4789,7 +4807,7 @@ ] }, { - "$id": "610", + "$id": "613", "Kind": "Model", "Name": "ImagesResponse", "Namespace": "OpenAI", @@ -4797,12 +4815,12 @@ "Usage": "Output", "Properties": [ { - "$id": "611", + "$id": "614", "Name": "created", "SerializedName": "created", "Description": "", "Type": { - "$id": "612", + "$id": "615", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4812,16 +4830,16 @@ "IsDiscriminator": false }, { - "$id": "613", + "$id": "616", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "614", + "$id": "617", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "615", + "$id": "618", "Kind": "Model", "Name": "Image", "Namespace": "OpenAI", @@ -4830,12 +4848,12 @@ "Usage": "Output", "Properties": [ { - "$id": "616", + "$id": "619", "Name": "url", "SerializedName": "url", "Description": "The URL of the generated image, if `response_format` is `url` (default).", "Type": { - "$id": "617", + "$id": "620", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -4845,12 +4863,12 @@ "IsDiscriminator": false }, { - "$id": "618", + "$id": "621", "Name": "b64_json", "SerializedName": "b64_json", "Description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", "Type": { - "$id": "619", + "$id": "622", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4870,10 +4888,10 @@ ] }, { - "$ref": "615" + "$ref": "618" }, { - "$id": "620", + "$id": "623", "Kind": "Model", "Name": "CreateImageEditRequest", "Namespace": "OpenAI", @@ -4881,12 +4899,12 @@ "Usage": "Input", "Properties": [ { - "$id": "621", + "$id": "624", "Name": "prompt", "SerializedName": "prompt", "Description": "A text description of the desired image(s). The maximum length is 1000 characters.", "Type": { - "$id": "622", + "$id": "625", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4896,12 +4914,12 @@ "IsDiscriminator": false }, { - "$id": "623", + "$id": "626", "Name": "image", "SerializedName": "image", "Description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not\nprovided, image must have transparency, which will be used as the mask.", "Type": { - "$id": "624", + "$id": "627", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4911,12 +4929,12 @@ "IsDiscriminator": false }, { - "$id": "625", + "$id": "628", "Name": "mask", "SerializedName": "mask", "Description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where\n`image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions\nas `image`.", "Type": { - "$id": "626", + "$id": "629", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4926,12 +4944,12 @@ "IsDiscriminator": false }, { - "$id": "627", + "$id": "630", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "628", + "$id": "631", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4941,7 +4959,7 @@ "IsDiscriminator": false }, { - "$id": "629", + "$id": "632", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -4953,7 +4971,7 @@ "IsDiscriminator": false }, { - "$id": "630", + "$id": "633", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -4965,12 +4983,12 @@ "IsDiscriminator": false }, { - "$id": "631", + "$id": "634", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "632", + "$id": "635", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4982,7 +5000,7 @@ ] }, { - "$id": "633", + "$id": "636", "Kind": "Model", "Name": "CreateImageVariationRequest", "Namespace": "OpenAI", @@ -4990,12 +5008,12 @@ "Usage": "Input", "Properties": [ { - "$id": "634", + "$id": "637", "Name": "image", "SerializedName": "image", "Description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB,\nand square.", "Type": { - "$id": "635", + "$id": "638", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -5005,12 +5023,12 @@ "IsDiscriminator": false }, { - "$id": "636", + "$id": "639", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "637", + "$id": "640", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -5020,7 +5038,7 @@ "IsDiscriminator": false }, { - "$id": "638", + "$id": "641", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -5032,7 +5050,7 @@ "IsDiscriminator": false }, { - "$id": "639", + "$id": "642", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -5044,12 +5062,12 @@ "IsDiscriminator": false }, { - "$id": "640", + "$id": "643", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "641", + "$id": "644", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5061,7 +5079,7 @@ ] }, { - "$id": "642", + "$id": "645", "Kind": "Model", "Name": "CreateModerationRequest", "Namespace": "OpenAI", @@ -5069,27 +5087,27 @@ "Usage": "Input", "Properties": [ { - "$id": "643", + "$id": "646", "Name": "input", "SerializedName": "input", "Description": "The input text to classify", "Type": { - "$id": "644", + "$id": "647", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "645", + "$id": "648", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "646", + "$id": "649", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "647", + "$id": "650", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5104,7 +5122,7 @@ "IsDiscriminator": false }, { - "$id": "648", + "$id": "651", "Name": "model", "SerializedName": "model", "Description": "Two content moderations models are available: `text-moderation-stable` and\n`text-moderation-latest`. The default is `text-moderation-latest` which will be automatically\nupgraded over time. This ensures you are always using our most accurate model. If you use\n`text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy\nof `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", @@ -5118,7 +5136,7 @@ ] }, { - "$id": "649", + "$id": "652", "Kind": "Model", "Name": "CreateModerationResponse", "Namespace": "OpenAI", @@ -5126,12 +5144,12 @@ "Usage": "Output", "Properties": [ { - "$id": "650", + "$id": "653", "Name": "id", "SerializedName": "id", "Description": "The unique identifier for the moderation request.", "Type": { - "$id": "651", + "$id": "654", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5141,12 +5159,12 @@ "IsDiscriminator": false }, { - "$id": "652", + "$id": "655", "Name": "model", "SerializedName": "model", "Description": "The model used to generate the moderation results.", "Type": { - "$id": "653", + "$id": "656", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5156,16 +5174,16 @@ "IsDiscriminator": false }, { - "$id": "654", + "$id": "657", "Name": "results", "SerializedName": "results", "Description": "A list of moderation objects.", "Type": { - "$id": "655", + "$id": "658", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "656", + "$id": "659", "Kind": "Model", "Name": "CreateModerationResponseResult", "Namespace": "OpenAI", @@ -5173,12 +5191,12 @@ "Usage": "Output", "Properties": [ { - "$id": "657", + "$id": "660", "Name": "flagged", "SerializedName": "flagged", "Description": "Whether the content violates [OpenAI's usage policies](/policies/usage-policies).", "Type": { - "$id": "658", + "$id": "661", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5188,12 +5206,12 @@ "IsDiscriminator": false }, { - "$id": "659", + "$id": "662", "Name": "categories", "SerializedName": "categories", "Description": "A list of the categories, and whether they are flagged or not.", "Type": { - "$id": "660", + "$id": "663", "Kind": "Model", "Name": "CreateModerationResponseResultCategories", "Namespace": "OpenAI", @@ -5201,12 +5219,12 @@ "Usage": "Output", "Properties": [ { - "$id": "661", + "$id": "664", "Name": "hate", "SerializedName": "hate", "Description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity,\nreligion, nationality, sexual orientation, disability status, or caste. Hateful content\naimed at non-protected groups (e.g., chess players) is harrassment.", "Type": { - "$id": "662", + "$id": "665", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5216,12 +5234,12 @@ "IsDiscriminator": false }, { - "$id": "663", + "$id": "666", "Name": "hate/threatening", "SerializedName": "hate/threatening", "Description": "Hateful content that also includes violence or serious harm towards the targeted group\nbased on race, gender, ethnicity, religion, nationality, sexual orientation, disability\nstatus, or caste.", "Type": { - "$id": "664", + "$id": "667", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5231,12 +5249,12 @@ "IsDiscriminator": false }, { - "$id": "665", + "$id": "668", "Name": "harassment", "SerializedName": "harassment", "Description": "Content that expresses, incites, or promotes harassing language towards any target.", "Type": { - "$id": "666", + "$id": "669", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5246,12 +5264,12 @@ "IsDiscriminator": false }, { - "$id": "667", + "$id": "670", "Name": "harassment/threatening", "SerializedName": "harassment/threatening", "Description": "Harassment content that also includes violence or serious harm towards any target.", "Type": { - "$id": "668", + "$id": "671", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5261,12 +5279,12 @@ "IsDiscriminator": false }, { - "$id": "669", + "$id": "672", "Name": "self-harm", "SerializedName": "self-harm", "Description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting,\nand eating disorders.", "Type": { - "$id": "670", + "$id": "673", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5276,12 +5294,12 @@ "IsDiscriminator": false }, { - "$id": "671", + "$id": "674", "Name": "self-harm/intent", "SerializedName": "self-harm/intent", "Description": "Content where the speaker expresses that they are engaging or intend to engage in acts of\nself-harm, such as suicide, cutting, and eating disorders.", "Type": { - "$id": "672", + "$id": "675", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5291,12 +5309,12 @@ "IsDiscriminator": false }, { - "$id": "673", + "$id": "676", "Name": "self-harm/instructive", "SerializedName": "self-harm/instructive", "Description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating\ndisorders, or that gives instructions or advice on how to commit such acts.", "Type": { - "$id": "674", + "$id": "677", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5306,12 +5324,12 @@ "IsDiscriminator": false }, { - "$id": "675", + "$id": "678", "Name": "sexual", "SerializedName": "sexual", "Description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or\nthat promotes sexual services (excluding sex education and wellness).", "Type": { - "$id": "676", + "$id": "679", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5321,12 +5339,12 @@ "IsDiscriminator": false }, { - "$id": "677", + "$id": "680", "Name": "sexual/minors", "SerializedName": "sexual/minors", "Description": "Sexual content that includes an individual who is under 18 years old.", "Type": { - "$id": "678", + "$id": "681", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5336,12 +5354,12 @@ "IsDiscriminator": false }, { - "$id": "679", + "$id": "682", "Name": "violence", "SerializedName": "violence", "Description": "Content that depicts death, violence, or physical injury.", "Type": { - "$id": "680", + "$id": "683", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5351,12 +5369,12 @@ "IsDiscriminator": false }, { - "$id": "681", + "$id": "684", "Name": "violence/graphic", "SerializedName": "violence/graphic", "Description": "Content that depicts death, violence, or physical injury in graphic detail.", "Type": { - "$id": "682", + "$id": "685", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5372,12 +5390,12 @@ "IsDiscriminator": false }, { - "$id": "683", + "$id": "686", "Name": "category_scores", "SerializedName": "category_scores", "Description": "A list of the categories along with their scores as predicted by model.", "Type": { - "$id": "684", + "$id": "687", "Kind": "Model", "Name": "CreateModerationResponseResultCategoryScores", "Namespace": "OpenAI", @@ -5385,12 +5403,12 @@ "Usage": "Output", "Properties": [ { - "$id": "685", + "$id": "688", "Name": "hate", "SerializedName": "hate", "Description": "The score for the category 'hate'.", "Type": { - "$id": "686", + "$id": "689", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5400,12 +5418,12 @@ "IsDiscriminator": false }, { - "$id": "687", + "$id": "690", "Name": "hate/threatening", "SerializedName": "hate/threatening", "Description": "The score for the category 'hate/threatening'.", "Type": { - "$id": "688", + "$id": "691", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5415,12 +5433,12 @@ "IsDiscriminator": false }, { - "$id": "689", + "$id": "692", "Name": "harassment", "SerializedName": "harassment", "Description": "The score for the category 'harassment'.", "Type": { - "$id": "690", + "$id": "693", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5430,12 +5448,12 @@ "IsDiscriminator": false }, { - "$id": "691", + "$id": "694", "Name": "harassment/threatening", "SerializedName": "harassment/threatening", "Description": "The score for the category 'harassment/threatening'.", "Type": { - "$id": "692", + "$id": "695", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5445,12 +5463,12 @@ "IsDiscriminator": false }, { - "$id": "693", + "$id": "696", "Name": "self-harm", "SerializedName": "self-harm", "Description": "The score for the category 'self-harm'.", "Type": { - "$id": "694", + "$id": "697", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5460,12 +5478,12 @@ "IsDiscriminator": false }, { - "$id": "695", + "$id": "698", "Name": "self-harm/intent", "SerializedName": "self-harm/intent", "Description": "The score for the category 'self-harm/intent'.", "Type": { - "$id": "696", + "$id": "699", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5475,12 +5493,12 @@ "IsDiscriminator": false }, { - "$id": "697", + "$id": "700", "Name": "self-harm/instructive", "SerializedName": "self-harm/instructive", "Description": "The score for the category 'self-harm/instructive'.", "Type": { - "$id": "698", + "$id": "701", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5490,12 +5508,12 @@ "IsDiscriminator": false }, { - "$id": "699", + "$id": "702", "Name": "sexual", "SerializedName": "sexual", "Description": "The score for the category 'sexual'.", "Type": { - "$id": "700", + "$id": "703", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5505,12 +5523,12 @@ "IsDiscriminator": false }, { - "$id": "701", + "$id": "704", "Name": "sexual/minors", "SerializedName": "sexual/minors", "Description": "The score for the category 'sexual/minors'.", "Type": { - "$id": "702", + "$id": "705", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5520,12 +5538,12 @@ "IsDiscriminator": false }, { - "$id": "703", + "$id": "706", "Name": "violence", "SerializedName": "violence", "Description": "The score for the category 'violence'.", "Type": { - "$id": "704", + "$id": "707", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5535,12 +5553,12 @@ "IsDiscriminator": false }, { - "$id": "705", + "$id": "708", "Name": "violence/graphic", "SerializedName": "violence/graphic", "Description": "The score for the category 'violence/graphic'.", "Type": { - "$id": "706", + "$id": "709", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5566,16 +5584,16 @@ ] }, { - "$ref": "656" + "$ref": "659" }, { - "$ref": "660" + "$ref": "663" }, { - "$ref": "684" + "$ref": "687" }, { - "$id": "707", + "$id": "710", "Kind": "Model", "Name": "ErrorResponse", "Namespace": "OpenAI", @@ -5583,12 +5601,12 @@ "Usage": "Output", "Properties": [ { - "$id": "708", + "$id": "711", "Name": "error", "SerializedName": "error", "Description": "", "Type": { - "$id": "709", + "$id": "712", "Kind": "Model", "Name": "Error", "Namespace": "OpenAI", @@ -5596,12 +5614,12 @@ "Usage": "Output", "Properties": [ { - "$id": "710", + "$id": "713", "Name": "type", "SerializedName": "type", "Description": "", "Type": { - "$id": "711", + "$id": "714", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5611,12 +5629,12 @@ "IsDiscriminator": false }, { - "$id": "712", + "$id": "715", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "713", + "$id": "716", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5626,12 +5644,12 @@ "IsDiscriminator": false }, { - "$id": "714", + "$id": "717", "Name": "param", "SerializedName": "param", "Description": "", "Type": { - "$id": "715", + "$id": "718", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -5641,12 +5659,12 @@ "IsDiscriminator": false }, { - "$id": "716", + "$id": "719", "Name": "code", "SerializedName": "code", "Description": "", "Type": { - "$id": "717", + "$id": "720", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -5664,10 +5682,10 @@ ] }, { - "$ref": "709" + "$ref": "712" }, { - "$id": "718", + "$id": "721", "Kind": "Model", "Name": "FineTuningEvent", "Namespace": "OpenAI", @@ -5675,12 +5693,12 @@ "Usage": "None", "Properties": [ { - "$id": "719", + "$id": "722", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "720", + "$id": "723", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5690,12 +5708,12 @@ "IsDiscriminator": false }, { - "$id": "721", + "$id": "724", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "722", + "$id": "725", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -5705,12 +5723,12 @@ "IsDiscriminator": false }, { - "$id": "723", + "$id": "726", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "724", + "$id": "727", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5720,12 +5738,12 @@ "IsDiscriminator": false }, { - "$id": "725", + "$id": "728", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "726", + "$id": "729", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5735,22 +5753,22 @@ "IsDiscriminator": false }, { - "$id": "727", + "$id": "730", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "728", + "$id": "731", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "729", + "$id": "732", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "730", + "$id": "733", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -5762,7 +5780,7 @@ "IsDiscriminator": false }, { - "$id": "731", + "$id": "734", "Name": "type", "SerializedName": "type", "Description": "", @@ -5778,44 +5796,44 @@ ], "Clients": [ { - "$id": "732", + "$id": "735", "Name": "OpenAIClient", "Description": "", "Operations": [], "Protocol": { - "$id": "733" + "$id": "736" }, "Creatable": true }, { - "$id": "734", + "$id": "737", "Name": "Audio", "Description": "", "Operations": [], "Protocol": { - "$id": "735" + "$id": "738" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "736", + "$id": "739", "Name": "AudioTranscriptions", "Description": "", "Operations": [ { - "$id": "737", + "$id": "740", "Name": "create", "ResourceName": "Transcriptions", "Summary": "Transcribes audio into the input language.", "Parameters": [ { - "$id": "738", + "$id": "741", "Name": "host", "NameInRequest": "host", "Description": "OpenAI Endpoint", "Type": { - "$id": "739", + "$id": "742", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5830,9 +5848,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "740", + "$id": "743", "Type": { - "$id": "741", + "$id": "744", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5841,15 +5859,15 @@ } }, { - "$id": "742", + "$id": "745", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "743", + "$id": "746", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "744", + "$id": "747", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5859,9 +5877,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "745", + "$id": "748", "Type": { - "$ref": "743" + "$ref": "746" }, "Value": "multipart/form-data" }, @@ -5875,7 +5893,7 @@ "Kind": "Constant" }, { - "$id": "746", + "$id": "749", "Name": "audio", "NameInRequest": "audio", "Type": { @@ -5892,11 +5910,11 @@ "Kind": "Method" }, { - "$id": "747", + "$id": "750", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "748", + "$id": "751", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5911,9 +5929,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "749", + "$id": "752", "Type": { - "$ref": "748" + "$ref": "751" }, "Value": "application/json" } @@ -5921,7 +5939,7 @@ ], "Responses": [ { - "$id": "750", + "$id": "753", "StatusCodes": [ 200 ], @@ -5949,35 +5967,35 @@ } ], "Protocol": { - "$id": "751" + "$id": "754" }, "Creatable": false, "Parent": "Audio" }, { - "$id": "752", + "$id": "755", "Name": "AudioTranslations", "Description": "", "Operations": [ { - "$id": "753", + "$id": "756", "Name": "create", "ResourceName": "Translations", "Summary": "Transcribes audio into the input language.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "754", + "$id": "757", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "755", + "$id": "758", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "756", + "$id": "759", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5987,9 +6005,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "757", + "$id": "760", "Type": { - "$ref": "755" + "$ref": "758" }, "Value": "multipart/form-data" }, @@ -6003,7 +6021,7 @@ "Kind": "Constant" }, { - "$id": "758", + "$id": "761", "Name": "audio", "NameInRequest": "audio", "Type": { @@ -6020,11 +6038,11 @@ "Kind": "Method" }, { - "$id": "759", + "$id": "762", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "760", + "$id": "763", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6039,9 +6057,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "761", + "$id": "764", "Type": { - "$ref": "760" + "$ref": "763" }, "Value": "application/json" } @@ -6049,7 +6067,7 @@ ], "Responses": [ { - "$id": "762", + "$id": "765", "StatusCodes": [ 200 ], @@ -6077,37 +6095,37 @@ } ], "Protocol": { - "$id": "763" + "$id": "766" }, "Creatable": false, "Parent": "Audio" }, { - "$id": "764", + "$id": "767", "Name": "Chat", "Description": "", "Operations": [], "Protocol": { - "$id": "765" + "$id": "768" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "766", + "$id": "769", "Name": "ChatCompletions", "Description": "", "Operations": [ { - "$id": "767", + "$id": "770", "Name": "create", "ResourceName": "Completions", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "768", + "$id": "771", "Name": "CreateChatCompletionRequest", "NameInRequest": "CreateChatCompletionRequest", "Type": { @@ -6124,11 +6142,11 @@ "Kind": "Method" }, { - "$id": "769", + "$id": "772", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "770", + "$id": "773", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6143,19 +6161,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "771", + "$id": "774", "Type": { - "$ref": "770" + "$ref": "773" }, "Value": "application/json" } }, { - "$id": "772", + "$id": "775", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "773", + "$id": "776", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6170,9 +6188,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "774", + "$id": "777", "Type": { - "$ref": "773" + "$ref": "776" }, "Value": "application/json" } @@ -6180,12 +6198,12 @@ ], "Responses": [ { - "$id": "775", + "$id": "778", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "212" + "$ref": "215" }, "BodyMediaType": "Json", "Headers": [], @@ -6208,42 +6226,42 @@ } ], "Protocol": { - "$id": "776" + "$id": "779" }, "Creatable": false, "Parent": "Chat" }, { - "$id": "777", + "$id": "780", "Name": "FineTuning", "Description": "", "Operations": [], "Protocol": { - "$id": "778" + "$id": "781" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "779", + "$id": "782", "Name": "FineTuningJobs", "Description": "", "Operations": [ { - "$id": "780", + "$id": "783", "Name": "create", "ResourceName": "Jobs", "Description": "Creates a job that fine-tunes a specified model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the\nfine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "781", + "$id": "784", "Name": "job", "NameInRequest": "job", "Type": { - "$ref": "246" + "$ref": "249" }, "Location": "Body", "IsRequired": true, @@ -6256,11 +6274,11 @@ "Kind": "Method" }, { - "$id": "782", + "$id": "785", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "783", + "$id": "786", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6275,19 +6293,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "784", + "$id": "787", "Type": { - "$ref": "783" + "$ref": "786" }, "Value": "application/json" } }, { - "$id": "785", + "$id": "788", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "786", + "$id": "789", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6302,9 +6320,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "787", + "$id": "790", "Type": { - "$ref": "786" + "$ref": "789" }, "Value": "application/json" } @@ -6312,12 +6330,12 @@ ], "Responses": [ { - "$id": "788", + "$id": "791", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "261" + "$ref": "264" }, "BodyMediaType": "Json", "Headers": [], @@ -6339,20 +6357,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "789", + "$id": "792", "Name": "listPaginated", "ResourceName": "Jobs", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "790", + "$id": "793", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last job from the previous pagination request.", "Type": { - "$id": "791", + "$id": "794", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6368,12 +6386,12 @@ "Kind": "Method" }, { - "$id": "792", + "$id": "795", "Name": "limit", "NameInRequest": "limit", "Description": "Number of fine-tuning jobs to retrieve.", "Type": { - "$id": "793", + "$id": "796", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -6389,11 +6407,11 @@ "Kind": "Method" }, { - "$id": "794", + "$id": "797", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "795", + "$id": "798", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6408,9 +6426,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "796", + "$id": "799", "Type": { - "$ref": "795" + "$ref": "798" }, "Value": "application/json" } @@ -6418,12 +6436,12 @@ ], "Responses": [ { - "$id": "797", + "$id": "800", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "301" + "$ref": "304" }, "BodyMediaType": "Json", "Headers": [], @@ -6442,20 +6460,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "798", + "$id": "801", "Name": "retrieve", "ResourceName": "Jobs", "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "799", + "$id": "802", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Type": { - "$id": "800", + "$id": "803", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6471,11 +6489,11 @@ "Kind": "Method" }, { - "$id": "801", + "$id": "804", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "802", + "$id": "805", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6490,9 +6508,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "803", + "$id": "806", "Type": { - "$ref": "802" + "$ref": "805" }, "Value": "application/json" } @@ -6500,12 +6518,12 @@ ], "Responses": [ { - "$id": "804", + "$id": "807", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "261" + "$ref": "264" }, "BodyMediaType": "Json", "Headers": [], @@ -6524,21 +6542,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "805", + "$id": "808", "Name": "listEvents", "ResourceName": "Jobs", "Summary": "Get status updates for a fine-tuning job.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "806", + "$id": "809", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to get events for.", "Type": { - "$id": "807", + "$id": "810", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6554,12 +6572,12 @@ "Kind": "Method" }, { - "$id": "808", + "$id": "811", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last event from the previous pagination request.", "Type": { - "$id": "809", + "$id": "812", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6575,12 +6593,12 @@ "Kind": "Method" }, { - "$id": "810", + "$id": "813", "Name": "limit", "NameInRequest": "limit", "Description": "Number of events to retrieve.", "Type": { - "$id": "811", + "$id": "814", "Kind": "Primitive", "Name": "Int64", "IsNullable": false @@ -6596,11 +6614,11 @@ "Kind": "Method" }, { - "$id": "812", + "$id": "815", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "813", + "$id": "816", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6615,9 +6633,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "814", + "$id": "817", "Type": { - "$ref": "813" + "$ref": "816" }, "Value": "application/json" } @@ -6625,12 +6643,12 @@ ], "Responses": [ { - "$id": "815", + "$id": "818", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "308" + "$ref": "311" }, "BodyMediaType": "Json", "Headers": [], @@ -6649,21 +6667,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "816", + "$id": "819", "Name": "cancel", "ResourceName": "Jobs", "Summary": "Immediately cancel a fine-tune job.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "817", + "$id": "820", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to cancel.", "Type": { - "$id": "818", + "$id": "821", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6679,11 +6697,11 @@ "Kind": "Method" }, { - "$id": "819", + "$id": "822", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "820", + "$id": "823", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6698,9 +6716,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "821", + "$id": "824", "Type": { - "$ref": "820" + "$ref": "823" }, "Value": "application/json" } @@ -6708,12 +6726,12 @@ ], "Responses": [ { - "$id": "822", + "$id": "825", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "261" + "$ref": "264" }, "BodyMediaType": "Json", "Headers": [], @@ -6733,30 +6751,30 @@ } ], "Protocol": { - "$id": "823" + "$id": "826" }, "Creatable": false, "Parent": "FineTuning" }, { - "$id": "824", + "$id": "827", "Name": "Completions", "Description": "", "Operations": [ { - "$id": "825", + "$id": "828", "Name": "create", "ResourceName": "Completions", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "826", + "$id": "829", "Name": "CreateCompletionRequest", "NameInRequest": "CreateCompletionRequest", "Type": { - "$ref": "323" + "$ref": "326" }, "Location": "Body", "IsRequired": true, @@ -6769,11 +6787,11 @@ "Kind": "Method" }, { - "$id": "827", + "$id": "830", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "828", + "$id": "831", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6788,19 +6806,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "829", + "$id": "832", "Type": { - "$ref": "828" + "$ref": "831" }, "Value": "application/json" } }, { - "$id": "830", + "$id": "833", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "831", + "$id": "834", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6815,9 +6833,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "832", + "$id": "835", "Type": { - "$ref": "831" + "$ref": "834" }, "Value": "application/json" } @@ -6825,12 +6843,12 @@ ], "Responses": [ { - "$id": "833", + "$id": "836", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "368" + "$ref": "371" }, "BodyMediaType": "Json", "Headers": [], @@ -6853,31 +6871,31 @@ } ], "Protocol": { - "$id": "834" + "$id": "837" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "835", + "$id": "838", "Name": "Edits", "Description": "", "Operations": [ { - "$id": "836", + "$id": "839", "Name": "create", "ResourceName": "Edits", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "837", + "$id": "840", "Name": "edit", "NameInRequest": "edit", "Type": { - "$ref": "402" + "$ref": "405" }, "Location": "Body", "IsRequired": true, @@ -6890,11 +6908,11 @@ "Kind": "Method" }, { - "$id": "838", + "$id": "841", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "839", + "$id": "842", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6909,19 +6927,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "840", + "$id": "843", "Type": { - "$ref": "839" + "$ref": "842" }, "Value": "application/json" } }, { - "$id": "841", + "$id": "844", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "842", + "$id": "845", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6936,9 +6954,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "843", + "$id": "846", "Type": { - "$ref": "842" + "$ref": "845" }, "Value": "application/json" } @@ -6946,12 +6964,12 @@ ], "Responses": [ { - "$id": "844", + "$id": "847", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "414" + "$ref": "417" }, "BodyMediaType": "Json", "Headers": [], @@ -6974,31 +6992,31 @@ } ], "Protocol": { - "$id": "845" + "$id": "848" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "846", + "$id": "849", "Name": "Embeddings", "Description": "", "Operations": [ { - "$id": "847", + "$id": "850", "Name": "create", "ResourceName": "Embeddings", "Summary": "Creates an embedding vector representing the input text.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "848", + "$id": "851", "Name": "embedding", "NameInRequest": "embedding", "Type": { - "$ref": "428" + "$ref": "431" }, "Location": "Body", "IsRequired": true, @@ -7011,11 +7029,11 @@ "Kind": "Method" }, { - "$id": "849", + "$id": "852", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "850", + "$id": "853", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7030,19 +7048,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "851", + "$id": "854", "Type": { - "$ref": "850" + "$ref": "853" }, "Value": "application/json" } }, { - "$id": "852", + "$id": "855", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "853", + "$id": "856", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7057,9 +7075,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "854", + "$id": "857", "Type": { - "$ref": "853" + "$ref": "856" }, "Value": "application/json" } @@ -7067,12 +7085,12 @@ ], "Responses": [ { - "$id": "855", + "$id": "858", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "442" + "$ref": "445" }, "BodyMediaType": "Json", "Headers": [], @@ -7095,31 +7113,31 @@ } ], "Protocol": { - "$id": "856" + "$id": "859" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "857", + "$id": "860", "Name": "Files", "Description": "", "Operations": [ { - "$id": "858", + "$id": "861", "Name": "list", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "859", + "$id": "862", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "860", + "$id": "863", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7134,9 +7152,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "861", + "$id": "864", "Type": { - "$ref": "860" + "$ref": "863" }, "Value": "application/json" } @@ -7144,12 +7162,12 @@ ], "Responses": [ { - "$id": "862", + "$id": "865", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "463" + "$ref": "466" }, "BodyMediaType": "Json", "Headers": [], @@ -7168,24 +7186,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "863", + "$id": "866", "Name": "create", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "864", + "$id": "867", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "865", + "$id": "868", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "866", + "$id": "869", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7195,9 +7213,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "867", + "$id": "870", "Type": { - "$ref": "865" + "$ref": "868" }, "Value": "multipart/form-data" }, @@ -7211,11 +7229,11 @@ "Kind": "Constant" }, { - "$id": "868", + "$id": "871", "Name": "file", "NameInRequest": "file", "Type": { - "$ref": "484" + "$ref": "487" }, "Location": "Body", "IsRequired": true, @@ -7228,11 +7246,11 @@ "Kind": "Method" }, { - "$id": "869", + "$id": "872", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "870", + "$id": "873", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7247,9 +7265,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "871", + "$id": "874", "Type": { - "$ref": "870" + "$ref": "873" }, "Value": "application/json" } @@ -7257,12 +7275,12 @@ ], "Responses": [ { - "$id": "872", + "$id": "875", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "468" + "$ref": "471" }, "BodyMediaType": "Json", "Headers": [], @@ -7284,21 +7302,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "873", + "$id": "876", "Name": "retrieve", "ResourceName": "Files", "Summary": "Returns information about a specific file.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "874", + "$id": "877", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "875", + "$id": "878", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7314,11 +7332,11 @@ "Kind": "Method" }, { - "$id": "876", + "$id": "879", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "877", + "$id": "880", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7333,9 +7351,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "878", + "$id": "881", "Type": { - "$ref": "877" + "$ref": "880" }, "Value": "application/json" } @@ -7343,12 +7361,12 @@ ], "Responses": [ { - "$id": "879", + "$id": "882", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "468" + "$ref": "471" }, "BodyMediaType": "Json", "Headers": [], @@ -7367,21 +7385,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "880", + "$id": "883", "Name": "delete", "ResourceName": "Files", "Summary": "Delete a file", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "881", + "$id": "884", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "882", + "$id": "885", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7397,11 +7415,11 @@ "Kind": "Method" }, { - "$id": "883", + "$id": "886", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "884", + "$id": "887", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7416,9 +7434,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "885", + "$id": "888", "Type": { - "$ref": "884" + "$ref": "887" }, "Value": "application/json" } @@ -7426,12 +7444,12 @@ ], "Responses": [ { - "$id": "886", + "$id": "889", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "489" + "$ref": "492" }, "BodyMediaType": "Json", "Headers": [], @@ -7450,21 +7468,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "887", + "$id": "890", "Name": "download", "ResourceName": "Files", "Summary": "Returns the contents of the specified file.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "888", + "$id": "891", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "889", + "$id": "892", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7480,11 +7498,11 @@ "Kind": "Method" }, { - "$id": "890", + "$id": "893", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "891", + "$id": "894", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7499,9 +7517,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "892", + "$id": "895", "Type": { - "$ref": "891" + "$ref": "894" }, "Value": "application/json" } @@ -7509,12 +7527,12 @@ ], "Responses": [ { - "$id": "893", + "$id": "896", "StatusCodes": [ 200 ], "BodyType": { - "$id": "894", + "$id": "897", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7537,32 +7555,32 @@ } ], "Protocol": { - "$id": "895" + "$id": "898" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "896", + "$id": "899", "Name": "FineTunes", "Description": "", "Operations": [ { - "$id": "897", + "$id": "900", "Name": "create", "ResourceName": "FineTunes", "Summary": "Creates a job that fine-tunes a specified model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "898", + "$id": "901", "Name": "fine_tune", "NameInRequest": "fine_tune", "Type": { - "$ref": "496" + "$ref": "499" }, "Location": "Body", "IsRequired": true, @@ -7575,11 +7593,11 @@ "Kind": "Method" }, { - "$id": "899", + "$id": "902", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "900", + "$id": "903", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7594,19 +7612,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "901", + "$id": "904", "Type": { - "$ref": "900" + "$ref": "903" }, "Value": "application/json" } }, { - "$id": "902", + "$id": "905", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "903", + "$id": "906", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7621,9 +7639,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "904", + "$id": "907", "Type": { - "$ref": "903" + "$ref": "906" }, "Value": "application/json" } @@ -7631,12 +7649,12 @@ ], "Responses": [ { - "$id": "905", + "$id": "908", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "521" + "$ref": "524" }, "BodyMediaType": "Json", "Headers": [], @@ -7658,21 +7676,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "906", + "$id": "909", "Name": "list", "ResourceName": "FineTunes", "Summary": "List your organization's fine-tuning jobs", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "907", + "$id": "910", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "908", + "$id": "911", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7687,9 +7705,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "909", + "$id": "912", "Type": { - "$ref": "908" + "$ref": "911" }, "Value": "application/json" } @@ -7697,12 +7715,12 @@ ], "Responses": [ { - "$id": "910", + "$id": "913", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "570" + "$ref": "573" }, "BodyMediaType": "Json", "Headers": [], @@ -7721,22 +7739,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "911", + "$id": "914", "Name": "retrieve", "ResourceName": "FineTunes", "Summary": "Gets info about the fine-tune job.\n\n[Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "912", + "$id": "915", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job", "Type": { - "$id": "913", + "$id": "916", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7752,11 +7770,11 @@ "Kind": "Method" }, { - "$id": "914", + "$id": "917", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "915", + "$id": "918", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7771,9 +7789,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "916", + "$id": "919", "Type": { - "$ref": "915" + "$ref": "918" }, "Value": "application/json" } @@ -7781,12 +7799,12 @@ ], "Responses": [ { - "$id": "917", + "$id": "920", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "521" + "$ref": "524" }, "BodyMediaType": "Json", "Headers": [], @@ -7805,22 +7823,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "918", + "$id": "921", "Name": "listEvents", "ResourceName": "FineTunes", "Summary": "Get fine-grained status updates for a fine-tune job.", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "919", + "$id": "922", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job to get events for.", "Type": { - "$id": "920", + "$id": "923", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7836,12 +7854,12 @@ "Kind": "Method" }, { - "$id": "921", + "$id": "924", "Name": "stream", "NameInRequest": "stream", "Description": "Whether to stream events for the fine-tune job. If set to true, events will be sent as\ndata-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available. The stream will terminate with a `data: [DONE]` message when the\njob is finished (succeeded, cancelled, or failed).\n\nIf set to false, only events generated so far will be returned.", "Type": { - "$id": "922", + "$id": "925", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -7857,11 +7875,11 @@ "Kind": "Method" }, { - "$id": "923", + "$id": "926", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "924", + "$id": "927", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7876,9 +7894,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "925", + "$id": "928", "Type": { - "$ref": "924" + "$ref": "927" }, "Value": "application/json" } @@ -7886,12 +7904,12 @@ ], "Responses": [ { - "$id": "926", + "$id": "929", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "575" + "$ref": "578" }, "BodyMediaType": "Json", "Headers": [], @@ -7910,22 +7928,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "927", + "$id": "930", "Name": "cancel", "ResourceName": "FineTunes", "Summary": "Immediately cancel a fine-tune job.", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "928", + "$id": "931", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job to cancel", "Type": { - "$id": "929", + "$id": "932", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7941,11 +7959,11 @@ "Kind": "Method" }, { - "$id": "930", + "$id": "933", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "931", + "$id": "934", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7960,9 +7978,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "932", + "$id": "935", "Type": { - "$ref": "931" + "$ref": "934" }, "Value": "application/json" } @@ -7970,12 +7988,12 @@ ], "Responses": [ { - "$id": "933", + "$id": "936", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "521" + "$ref": "524" }, "BodyMediaType": "Json", "Headers": [], @@ -7995,31 +8013,31 @@ } ], "Protocol": { - "$id": "934" + "$id": "937" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "935", + "$id": "938", "Name": "ModelsOps", "Description": "", "Operations": [ { - "$id": "936", + "$id": "939", "Name": "list", "ResourceName": "Models", "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "937", + "$id": "940", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "938", + "$id": "941", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8034,9 +8052,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "939", + "$id": "942", "Type": { - "$ref": "938" + "$ref": "941" }, "Value": "application/json" } @@ -8044,12 +8062,12 @@ ], "Responses": [ { - "$id": "940", + "$id": "943", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "580" + "$ref": "583" }, "BodyMediaType": "Json", "Headers": [], @@ -8068,21 +8086,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "941", + "$id": "944", "Name": "retrieve", "ResourceName": "Models", "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "942", + "$id": "945", "Name": "model", "NameInRequest": "model", "Description": "The ID of the model to use for this request.", "Type": { - "$id": "943", + "$id": "946", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8098,11 +8116,11 @@ "Kind": "Method" }, { - "$id": "944", + "$id": "947", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "945", + "$id": "948", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8117,9 +8135,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "946", + "$id": "949", "Type": { - "$ref": "945" + "$ref": "948" }, "Value": "application/json" } @@ -8127,12 +8145,12 @@ ], "Responses": [ { - "$id": "947", + "$id": "950", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "585" + "$ref": "588" }, "BodyMediaType": "Json", "Headers": [], @@ -8151,21 +8169,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "948", + "$id": "951", "Name": "delete", "ResourceName": "Models", "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "949", + "$id": "952", "Name": "model", "NameInRequest": "model", "Description": "The model to delete", "Type": { - "$id": "950", + "$id": "953", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8181,11 +8199,11 @@ "Kind": "Method" }, { - "$id": "951", + "$id": "954", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "952", + "$id": "955", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8200,9 +8218,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "953", + "$id": "956", "Type": { - "$ref": "952" + "$ref": "955" }, "Value": "application/json" } @@ -8210,12 +8228,12 @@ ], "Responses": [ { - "$id": "954", + "$id": "957", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "594" + "$ref": "597" }, "BodyMediaType": "Json", "Headers": [], @@ -8235,31 +8253,31 @@ } ], "Protocol": { - "$id": "955" + "$id": "958" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "956", + "$id": "959", "Name": "Images", "Description": "", "Operations": [ { - "$id": "957", + "$id": "960", "Name": "create", "ResourceName": "Images", "Summary": "Creates an image given a prompt", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "958", + "$id": "961", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "601" + "$ref": "604" }, "Location": "Body", "IsRequired": true, @@ -8272,11 +8290,11 @@ "Kind": "Method" }, { - "$id": "959", + "$id": "962", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "960", + "$id": "963", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8291,19 +8309,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "961", + "$id": "964", "Type": { - "$ref": "960" + "$ref": "963" }, "Value": "application/json" } }, { - "$id": "962", + "$id": "965", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "963", + "$id": "966", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8318,9 +8336,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "964", + "$id": "967", "Type": { - "$ref": "963" + "$ref": "966" }, "Value": "application/json" } @@ -8328,12 +8346,12 @@ ], "Responses": [ { - "$id": "965", + "$id": "968", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "610" + "$ref": "613" }, "BodyMediaType": "Json", "Headers": [], @@ -8355,24 +8373,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "966", + "$id": "969", "Name": "createEdit", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "967", + "$id": "970", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "968", + "$id": "971", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "969", + "$id": "972", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8382,9 +8400,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "970", + "$id": "973", "Type": { - "$ref": "968" + "$ref": "971" }, "Value": "multipart/form-data" }, @@ -8398,11 +8416,11 @@ "Kind": "Constant" }, { - "$id": "971", + "$id": "974", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "620" + "$ref": "623" }, "Location": "Body", "IsRequired": true, @@ -8415,11 +8433,11 @@ "Kind": "Method" }, { - "$id": "972", + "$id": "975", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "973", + "$id": "976", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8434,9 +8452,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "974", + "$id": "977", "Type": { - "$ref": "973" + "$ref": "976" }, "Value": "application/json" } @@ -8444,12 +8462,12 @@ ], "Responses": [ { - "$id": "975", + "$id": "978", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "610" + "$ref": "613" }, "BodyMediaType": "Json", "Headers": [], @@ -8471,24 +8489,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "976", + "$id": "979", "Name": "createVariation", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "977", + "$id": "980", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "978", + "$id": "981", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "979", + "$id": "982", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8498,9 +8516,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "980", + "$id": "983", "Type": { - "$ref": "978" + "$ref": "981" }, "Value": "multipart/form-data" }, @@ -8514,11 +8532,11 @@ "Kind": "Constant" }, { - "$id": "981", + "$id": "984", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "633" + "$ref": "636" }, "Location": "Body", "IsRequired": true, @@ -8531,11 +8549,11 @@ "Kind": "Method" }, { - "$id": "982", + "$id": "985", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "983", + "$id": "986", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8550,9 +8568,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "984", + "$id": "987", "Type": { - "$ref": "983" + "$ref": "986" }, "Value": "application/json" } @@ -8560,12 +8578,12 @@ ], "Responses": [ { - "$id": "985", + "$id": "988", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "610" + "$ref": "613" }, "BodyMediaType": "Json", "Headers": [], @@ -8588,31 +8606,31 @@ } ], "Protocol": { - "$id": "986" + "$id": "989" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "987", + "$id": "990", "Name": "Moderations", "Description": "", "Operations": [ { - "$id": "988", + "$id": "991", "Name": "create", "ResourceName": "Moderations", "Summary": "Classifies if text violates OpenAI's Content Policy", "Parameters": [ { - "$ref": "738" + "$ref": "741" }, { - "$id": "989", + "$id": "992", "Name": "content", "NameInRequest": "content", "Type": { - "$ref": "642" + "$ref": "645" }, "Location": "Body", "IsRequired": true, @@ -8625,11 +8643,11 @@ "Kind": "Method" }, { - "$id": "990", + "$id": "993", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "991", + "$id": "994", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8644,19 +8662,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "992", + "$id": "995", "Type": { - "$ref": "991" + "$ref": "994" }, "Value": "application/json" } }, { - "$id": "993", + "$id": "996", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "994", + "$id": "997", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8671,9 +8689,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "995", + "$id": "998", "Type": { - "$ref": "994" + "$ref": "997" }, "Value": "application/json" } @@ -8681,12 +8699,12 @@ ], "Responses": [ { - "$id": "996", + "$id": "999", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "649" + "$ref": "652" }, "BodyMediaType": "Json", "Headers": [], @@ -8709,16 +8727,16 @@ } ], "Protocol": { - "$id": "997" + "$id": "1000" }, "Creatable": false, "Parent": "OpenAIClient" } ], "Auth": { - "$id": "998", + "$id": "1001", "ApiKey": { - "$id": "999", + "$id": "1002", "Name": "Authorization", "Prefix": "Bearer" } From ce573a55c937c3ff5f3e83a394f3caa98ad90d9f Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 14 Mar 2024 00:09:23 +0800 Subject: [PATCH 13/60] fix formatting --- .../Emitter.Csharp/src/lib/model.ts | 15 +- .../Emitter.Csharp/src/lib/utils.ts | 2 +- .../Emitter.Csharp/src/type/converter.ts | 132 ++++++++++-------- 3 files changed, 85 insertions(+), 64 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index 86fface42d5..7bca097ddc8 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -75,11 +75,7 @@ import { getWireName, isInternal } from "@azure-tools/typespec-client-generator-core"; -import { - capitalize, - getFullNamespaceString, - getTypeName -} from "./utils.js"; +import { capitalize, getFullNamespaceString, getTypeName } from "./utils.js"; import { InputTypeKind } from "../type/inputTypeKind.js"; import { InputIntrinsicTypeKind } from "../type/inputIntrinsicTypeKind.js"; import { fromSdkEnumType, fromSdkModelType } from "../type/converter.js"; @@ -604,9 +600,14 @@ export function getInputType( ); } var createdSdkModelType = getClientType(context, m) as SdkModelType; - if (createdSdkModelType){ + if (createdSdkModelType) { context.modelsMap!.set(m, createdSdkModelType); - return fromSdkModelType(createdSdkModelType, context, models, enums); + return fromSdkModelType( + createdSdkModelType, + context, + models, + enums + ); } return undefined; } diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts index 2cb2f5e5585..780483a8fc7 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts @@ -107,4 +107,4 @@ export function getFullNamespaceString( current = current.namespace; } return namespaceString; -} \ No newline at end of file +} diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 1445a84a5f0..6f612650ecc 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -77,13 +77,15 @@ function fromSdkType( if (sdkType.kind === "union") return fromUnionType(sdkType, context, models, enums); if (sdkType.kind === "utcDateTime") return fromSdkDatetimeType(sdkType); - if (sdkType.kind === "duration") return fromSdkDurationType(sdkType as SdkDurationType); - if (sdkType.kind === "bytes") return fromBytesType(sdkType as SdkBuiltInType); + if (sdkType.kind === "duration") + return fromSdkDurationType(sdkType as SdkDurationType); + if (sdkType.kind === "bytes") + return fromBytesType(sdkType as SdkBuiltInType); // TODO: offsetDateTime if (sdkType.kind === "tuple") return fromTupleType(sdkType); if (sdkType.__raw?.kind === "Scalar") return fromScalarType(sdkType); -// this happens for discriminator type, normally all other primitive types should be handled in scalar above -// TODO: can we improve the type in TCGC around discriminator + // this happens for discriminator type, normally all other primitive types should be handled in scalar above + // TODO: can we improve the type in TCGC around discriminator if (sdkType.__raw?.kind === "Intrinsic") return fromIntrinsicType(sdkType); if (isSdkBuiltInType(sdkType.kind)) return fromSdkBuiltInType(sdkType as SdkBuiltInType); @@ -114,12 +116,14 @@ export function fromSdkModelType( modelType.__raw! )?.propertyName, // TO-DO: SdkModelType lacks of DiscriminatorPropertyName DiscriminatorValue: modelType.discriminatorValue, - Usage: fromUsageFlags(modelType.usage), + Usage: fromUsageFlags(modelType.usage) } as InputModelType; models.set(modelTypeName, inputModelType); - inputModelType.BaseModel = modelType.baseModel ? fromSdkModelType(modelType.baseModel, context, models, enums) : undefined; + inputModelType.BaseModel = modelType.baseModel + ? fromSdkModelType(modelType.baseModel, context, models, enums) + : undefined; // TODO: can we fix the resolving reference issue in csharp? // https://github.com/Azure/autorest.csharp/issues/4136 @@ -129,17 +133,24 @@ export function fromSdkModelType( // ).map((m) => fromSdkModelType(m, program, models, enums)); // } - inputModelType.InheritedDictionaryType = modelType.additionalProperties ? { - Kind: InputTypeKind.Dictionary, - Name: InputTypeKind.Dictionary, - KeyType: { - Kind: InputTypeKind.Primitive, - Name: InputPrimitiveTypeKind.String, - IsNullable: false, - } as InputPrimitiveType, - ValueType: fromSdkType(modelType.additionalProperties, context, models, enums), - IsNullable: false, - } as InputDictionaryType : undefined; + inputModelType.InheritedDictionaryType = modelType.additionalProperties + ? ({ + Kind: InputTypeKind.Dictionary, + Name: InputTypeKind.Dictionary, + KeyType: { + Kind: InputTypeKind.Primitive, + Name: InputPrimitiveTypeKind.String, + IsNullable: false + } as InputPrimitiveType, + ValueType: fromSdkType( + modelType.additionalProperties, + context, + models, + enums + ), + IsNullable: false + } as InputDictionaryType) + : undefined; inputModelType.Properties = modelType.properties .filter( (p) => @@ -166,7 +177,7 @@ export function fromSdkModelType( } // TODO: remove this after TCGC provide utility to generate templated model -function getModelName(model: SdkModelType) : string { +function getModelName(model: SdkModelType): string { var name = model.generatedName || model.name; var rawModel = model.__raw! as Model; if ( @@ -176,20 +187,23 @@ function getModelName(model: SdkModelType) : string { ) { return ( name + - rawModel.templateMapper.args.map((it) => (it as Model).name).join("") + rawModel.templateMapper.args + .map((it) => (it as Model).name) + .join("") ); } return name; } -function hasDiscriminator(model? : SdkModelType) : boolean { - if (model == null) - return false; +function hasDiscriminator(model?: SdkModelType): boolean { + if (model == null) return false; - if (model!.properties.some(p => { - return (p as SdkBodyModelPropertyType).discriminator; - })) + if ( + model!.properties.some((p) => { + return (p as SdkBodyModelPropertyType).discriminator; + }) + ) return true; return hasDiscriminator(model!.baseModel); } @@ -272,7 +286,10 @@ function fromSdkDurationType( } return { Kind: InputTypeKind.Primitive, - Name: fromDurationKnownEncoding(durationType.encode, durationType.wireType), + Name: fromDurationKnownEncoding( + durationType.encode, + durationType.wireType + ), IsNullable: durationType.nullable } as InputPrimitiveType; } @@ -281,24 +298,22 @@ function fromTupleType(tupleType: SdkTupleType): InputIntrinsicType { return { Kind: InputTypeKind.Intrinsic, Name: InputIntrinsicTypeKind.Unknown, - IsNullable: tupleType.nullable, + IsNullable: tupleType.nullable } as InputIntrinsicType; } function fromBytesType(bytesType: SdkBuiltInType): InputPrimitiveType { - function fromBytesEncoding(encode: string) : InputPrimitiveTypeKind { - switch (encode) { - case undefined: - case "base64": - return InputPrimitiveTypeKind.Bytes; - case "base64url": - return InputPrimitiveTypeKind.BytesBase64Url; - default: - logger.warn( - `invalid encode ${encode} for bytes.` - ); - return InputPrimitiveTypeKind.Bytes; - } + function fromBytesEncoding(encode: string): InputPrimitiveTypeKind { + switch (encode) { + case undefined: + case "base64": + return InputPrimitiveTypeKind.Bytes; + case "base64url": + return InputPrimitiveTypeKind.BytesBase64Url; + default: + logger.warn(`invalid encode ${encode} for bytes.`); + return InputPrimitiveTypeKind.Bytes; + } } return { @@ -309,17 +324,17 @@ function fromBytesType(bytesType: SdkBuiltInType): InputPrimitiveType { } export function fromSdkBuiltInType(builtInType: SdkBuiltInType): InputType { - const builtInKind: InputPrimitiveTypeKind = - mapTypeSpecTypeToCSharpInputTypeKind( - builtInType.__raw!, - builtInType.kind, - undefined // To-Do: type incompatable - ); - return { - Kind: InputTypeKind.Primitive, - Name: builtInKind, - IsNullable: false - } as InputPrimitiveType; + const builtInKind: InputPrimitiveTypeKind = + mapTypeSpecTypeToCSharpInputTypeKind( + builtInType.__raw!, + builtInType.kind, + undefined // To-Do: type incompatable + ); + return { + Kind: InputTypeKind.Primitive, + Name: builtInKind, + IsNullable: false + } as InputPrimitiveType; } function fromScalarType(scalarType: SdkType): InputPrimitiveType { @@ -338,7 +353,9 @@ function fromIntrinsicType(scalarType: SdkType): InputIntrinsicType { const name = (scalarType.__raw! as IntrinsicType).name; return { Kind: InputTypeKind.Intrinsic, - Name: getCSharpInputTypeKindByIntrinsic(scalarType.__raw! as IntrinsicType), + Name: getCSharpInputTypeKindByIntrinsic( + scalarType.__raw! as IntrinsicType + ), IsNullable: false }; } @@ -508,7 +525,9 @@ function fromSdkModelPropertyType( const modelProperty: InputModelProperty = { Name: propertyType.nameInClient, SerializedName: serializedName, - Description: propertyType.description ?? (isDiscriminator ? "Discriminator" : ""), + Description: + propertyType.description ?? + (isDiscriminator ? "Discriminator" : ""), Type: fromSdkType( propertyType.type, context, @@ -549,9 +568,10 @@ function isSdkBuiltInType(kind: string): boolean { ].includes(kind); } -function getCSharpInputTypeKindByIntrinsic(type: IntrinsicType): InputIntrinsicTypeKind { - switch (type.name) - { +function getCSharpInputTypeKindByIntrinsic( + type: IntrinsicType +): InputIntrinsicTypeKind { + switch (type.name) { case "ErrorType": return InputIntrinsicTypeKind.Error; case "void": From 24f0e812cd83541bc44f054085ac9fd050828c74 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 14 Mar 2024 13:38:19 +0800 Subject: [PATCH 14/60] fix nodejs test error --- .../Emitter.Csharp/src/type/converter.ts | 35 ++++++++++++++++++- .../test/Unit/modelType.test.ts | 8 ++--- .../test/Unit/propertyType.test.ts | 21 +++++++---- .../test/Unit/stringFormat.test.ts | 8 +++-- .../test/Unit/utils/TestUtil.ts | 8 +++-- .../FirstTest-TypeSpec/FirstTest-TypeSpec.tsp | 2 +- .../src/Generated/tspCodeModel.json | 2 +- .../Azure.NewProject.TypeSpec.tsp | 2 +- .../Unbranded-TypeSpec/Unbranded-TypeSpec.tsp | 2 +- 9 files changed, 68 insertions(+), 20 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 6f612650ecc..75b2c434a14 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -8,7 +8,8 @@ import { DateTimeKnownEncoding, Model, Enum, - DurationKnownEncoding + DurationKnownEncoding, + getFormat } from "@typespec/compiler"; import { Usage } from "./usage.js"; import { @@ -81,6 +82,8 @@ function fromSdkType( return fromSdkDurationType(sdkType as SdkDurationType); if (sdkType.kind === "bytes") return fromBytesType(sdkType as SdkBuiltInType); + if (sdkType.kind === "string") + return fromStringType(context.program, sdkType); // TODO: offsetDateTime if (sdkType.kind === "tuple") return fromTupleType(sdkType); if (sdkType.__raw?.kind === "Scalar") return fromScalarType(sdkType); @@ -323,6 +326,36 @@ function fromBytesType(bytesType: SdkBuiltInType): InputPrimitiveType { }; } +function fromStringType(program: Program, stringType: SdkType): InputPrimitiveType { + function fromStringFormat(rawStringType?: Type): InputPrimitiveTypeKind { + if (!rawStringType) + return InputPrimitiveTypeKind.String; + + const format = getFormat(program, rawStringType); + switch (format) { + case "date": + // TODO: remove + return InputPrimitiveTypeKind.DateTime; + case "uri": + case "url": + return InputPrimitiveTypeKind.Uri; + case "uuid": + return InputPrimitiveTypeKind.Guid; + default: + if (format) { + logger.warn(`Invalid string format '${format}'`); + } + return InputPrimitiveTypeKind.String; + } + } + + return { + Kind: InputTypeKind.Primitive, + Name: fromStringFormat(stringType.__raw), + IsNullable: stringType.nullable + }; +} + export function fromSdkBuiltInType(builtInType: SdkBuiltInType): InputType { const builtInKind: InputPrimitiveTypeKind = mapTypeSpecTypeToCSharpInputTypeKind( diff --git a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts index 841a4a50e8a..104d06c620a 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts @@ -189,7 +189,7 @@ op test(@body input: Pet): Pet; Description: "The pet kind", Accessibility: undefined, Deprecated: undefined, - EnumValueType: "String", + EnumValueType: "string", AllowedValues: [ { Name: "Cat", @@ -204,7 +204,7 @@ op test(@body input: Pet): Pet; ], IsExtensible: true, IsNullable: false, - Usage: "None" + Usage: "RoundTrip" }, IsRequired: true, IsReadOnly: false, @@ -323,7 +323,7 @@ op test(@body input: Pet): Pet; Accessibility: undefined, Deprecated: undefined, Description: "The pet kind", - EnumValueType: "String", + EnumValueType: "string", AllowedValues: [ { Name: "Cat", @@ -338,7 +338,7 @@ op test(@body input: Pet): Pet; ], IsExtensible: true, IsNullable: false, - Usage: "None" + Usage: "RoundTrip" }, IsRequired: true, IsReadOnly: false, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts index 91805cdb56c..dbc7e0d9a56 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts @@ -123,7 +123,7 @@ describe("Test GetInputType for enum", () => { Accessibility: undefined, Deprecated: undefined, Description: "fixed string enum", - EnumValueType: "String", + EnumValueType: "string", AllowedValues: [ { Name: "One", @@ -146,7 +146,10 @@ describe("Test GetInputType for enum", () => { Usage: "Input" } as InputEnumType, root.Clients[0].Operations[0].Parameters[0].Type - ) + ), + `Enum type is not correct, got ${JSON.stringify( + root.Clients[0].Operations[0].Parameters[0].Type + )}` ); const type = root.Clients[0].Operations[0].Parameters[0] .Type as InputEnumType; @@ -187,7 +190,7 @@ describe("Test GetInputType for enum", () => { Accessibility: undefined, Deprecated: undefined, Description: "Fixed int enum", - EnumValueType: "Float32", + EnumValueType: "int32", AllowedValues: [ { Name: "One", @@ -210,7 +213,10 @@ describe("Test GetInputType for enum", () => { Usage: "Input" } as InputEnumType, root.Clients[0].Operations[0].Parameters[0].Type - ) + ), + `Enum type is not correct, got ${JSON.stringify( + root.Clients[0].Operations[0].Parameters[0].Type + )}` ); const type = root.Clients[0].Operations[0].Parameters[0] .Type as InputEnumType; @@ -244,7 +250,7 @@ describe("Test GetInputType for enum", () => { Accessibility: undefined, Deprecated: undefined, Description: "Extensible enum", - EnumValueType: "String", + EnumValueType: "string", AllowedValues: [ { Name: "One", Value: "1", Description: undefined }, { Name: "Two", Value: "2", Description: undefined }, @@ -255,7 +261,10 @@ describe("Test GetInputType for enum", () => { Usage: "Input" } as InputEnumType, root.Clients[0].Operations[0].Parameters[0].Type - ) + ), + `Enum type is not correct, got ${JSON.stringify( + root.Clients[0].Operations[0].Parameters[0].Type + )}` ); const type = root.Clients[0].Operations[0].Parameters[0] .Type as InputEnumType; diff --git a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/stringFormat.test.ts b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/stringFormat.test.ts index 820150dd29a..cc0cad9f009 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/stringFormat.test.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/stringFormat.test.ts @@ -17,6 +17,7 @@ import { } from "../../src/type/inputType.js"; import { InputPrimitiveTypeKind } from "../../src/type/inputPrimitiveTypeKind.js"; import { InputTypeKind } from "../../src/type/inputTypeKind.js"; +import { stringify } from "querystring"; describe("Test string format", () => { let runner: TestHost; @@ -92,7 +93,7 @@ describe("Test string format", () => { it("format uri on operation parameter", async () => { const program = await typeSpecCompile( ` - op test(@path @format("Uri")sourceUrl: string): void; + op test(@path @format("uri")sourceUrl: string): void; `, runner ); @@ -128,7 +129,7 @@ describe("Test string format", () => { @doc("This is a model.") model Foo { @doc("The source url.") - @format("Uri") + @format("uri") source: string } `, @@ -150,7 +151,8 @@ describe("Test string format", () => { IsNullable: false }, foo.Properties[0].Type - ) + ), + `string property format is not correct. Got ${JSON.stringify(foo.Properties[0].Type)} ` ); }); diff --git a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/utils/TestUtil.ts b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/utils/TestUtil.ts index b9a1c20ac57..309289ef2da 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/utils/TestUtil.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/utils/TestUtil.ts @@ -17,7 +17,8 @@ import { InputEnumType, InputModelType } from "../../../src/type/inputType.js"; import { getFormattedType, getInputType } from "../../../src/lib/model.js"; import { SdkContext, - createSdkContext + createSdkContext, + getAllModels } from "@azure-tools/typespec-client-generator-core"; import { SdkTestLibrary } from "@azure-tools/typespec-client-generator-core/testing"; @@ -137,5 +138,8 @@ export function navigateModels( export function createNetSdkContext( program: EmitContext ): SdkContext { - return createSdkContext(program, "@azure-tools/typespec-azure"); + const sdkContext = createSdkContext(program, "@azure-tools/typespec-azure"); + // initialize TCGC + getAllModels(sdkContext); + return sdkContext; } diff --git a/test/TestProjects/FirstTest-TypeSpec/FirstTest-TypeSpec.tsp b/test/TestProjects/FirstTest-TypeSpec/FirstTest-TypeSpec.tsp index eb8156f9eee..2974ca1f8f5 100644 --- a/test/TestProjects/FirstTest-TypeSpec/FirstTest-TypeSpec.tsp +++ b/test/TestProjects/FirstTest-TypeSpec/FirstTest-TypeSpec.tsp @@ -237,7 +237,7 @@ union DaysOfWeekExtensibleEnum { model ModelWithFormat { @doc("url format") - @format("Uri") + @format("uri") sourceUrl: string; @doc("uuid format") diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json index f63fc770cb5..4db6368a295 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json @@ -763,7 +763,7 @@ "Type": { "$id": "97", "Kind": "Primitive", - "Name": "String", + "Name": "Uri", "IsNullable": false }, "IsRequired": true, diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/Azure.NewProject.TypeSpec.tsp b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/Azure.NewProject.TypeSpec.tsp index e7f9d908dc2..d5a42aa8918 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/Azure.NewProject.TypeSpec.tsp +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/Azure.NewProject.TypeSpec.tsp @@ -201,7 +201,7 @@ union DaysOfWeekExtensibleEnum { model ModelWithFormat { @doc("url format") - @format("Uri") + @format("uri") sourceUrl: string; @doc("uuid format") diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/Unbranded-TypeSpec.tsp b/test/UnbrandedProjects/Unbranded-TypeSpec/Unbranded-TypeSpec.tsp index ba8ba14ef39..c8907fb2d9d 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/Unbranded-TypeSpec.tsp +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/Unbranded-TypeSpec.tsp @@ -221,7 +221,7 @@ union DaysOfWeekExtensibleEnum { model ModelWithFormat { @doc("url format") - @format("Uri") + @format("uri") sourceUrl: string; @doc("uuid format") From 5ebea81579a665eeb321d9f95654088e608f8f2a Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 14 Mar 2024 13:46:29 +0800 Subject: [PATCH 15/60] regen --- .../Generated/Docs/FirstTestTypeSpecClient.xml | 16 ++++++++-------- .../Models/ModelWithFormat.Serialization.cs | 6 +++--- .../src/Generated/Models/ModelWithFormat.cs | 6 +++--- .../Samples/Samples_FirstTestTypeSpecClient.cs | 16 ++++++++-------- .../Tests/FirstTestTypeSpecClientTests.cs | 8 ++++---- .../Generated/Docs/NewProjectTypeSpecClient.xml | 16 ++++++++-------- .../Models/ModelWithFormat.Serialization.cs | 6 +++--- .../src/Generated/Models/ModelWithFormat.cs | 6 +++--- .../src/Generated/tspCodeModel.json | 2 +- .../Samples/Samples_NewProjectTypeSpecClient.cs | 16 ++++++++-------- .../Models/ModelWithFormat.Serialization.cs | 6 +++--- .../src/Generated/Models/ModelWithFormat.cs | 6 +++--- .../src/Generated/tspCodeModel.json | 2 +- 13 files changed, 56 insertions(+), 56 deletions(-) diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml index a541d290a3a..b4bdf072182 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml @@ -716,7 +716,7 @@ This sample shows how to call StringFormatAsync. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); ]]> This sample shows how to call StringFormatAsync with all parameters. @@ -724,7 +724,7 @@ This sample shows how to call StringFormatAsync with all parameters. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); ]]> @@ -735,7 +735,7 @@ This sample shows how to call StringFormat. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); ]]> This sample shows how to call StringFormat with all parameters. @@ -743,7 +743,7 @@ This sample shows how to call StringFormat with all parameters. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); ]]> @@ -756,7 +756,7 @@ FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -770,7 +770,7 @@ FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -787,7 +787,7 @@ FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -801,7 +801,7 @@ FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs index ff09e37e137..379a8d9b6f2 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStartObject(); writer.WritePropertyName("sourceUrl"u8); - writer.WriteStringValue(SourceUrl); + writer.WriteStringValue(SourceUrl.AbsoluteUri); writer.WritePropertyName("guid"u8); writer.WriteStringValue(Guid); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -70,7 +70,7 @@ internal static ModelWithFormat DeserializeModelWithFormat(JsonElement element, { return null; } - string sourceUrl = default; + Uri sourceUrl = default; Guid guid = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); @@ -78,7 +78,7 @@ internal static ModelWithFormat DeserializeModelWithFormat(JsonElement element, { if (property.NameEquals("sourceUrl"u8)) { - sourceUrl = property.Value.GetString(); + sourceUrl = new Uri(property.Value.GetString()); continue; } if (property.NameEquals("guid"u8)) diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithFormat.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithFormat.cs index ac9380592a0..de491d80745 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithFormat.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ModelWithFormat.cs @@ -50,7 +50,7 @@ public partial class ModelWithFormat /// url format. /// uuid format. /// is null. - public ModelWithFormat(string sourceUrl, Guid guid) + public ModelWithFormat(Uri sourceUrl, Guid guid) { Argument.AssertNotNull(sourceUrl, nameof(sourceUrl)); @@ -62,7 +62,7 @@ public ModelWithFormat(string sourceUrl, Guid guid) /// url format. /// uuid format. /// Keeps track of any properties unknown to the library. - internal ModelWithFormat(string sourceUrl, Guid guid, IDictionary serializedAdditionalRawData) + internal ModelWithFormat(Uri sourceUrl, Guid guid, IDictionary serializedAdditionalRawData) { SourceUrl = sourceUrl; Guid = guid; @@ -75,7 +75,7 @@ internal ModelWithFormat() } /// url format. - public string SourceUrl { get; } + public Uri SourceUrl { get; } /// uuid format. public Guid Guid { get; } } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs index ced1ce0625c..73d4b0c474e 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs @@ -791,7 +791,7 @@ public void Example_FirstTestTypeSpec_StringFormat_ShortVersion() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -808,7 +808,7 @@ public async Task Example_FirstTestTypeSpec_StringFormat_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -823,7 +823,7 @@ public void Example_FirstTestTypeSpec_StringFormat_ShortVersion_Convenience() Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } @@ -834,7 +834,7 @@ public async Task Example_FirstTestTypeSpec_StringFormat_ShortVersion_Convenienc Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } @@ -847,7 +847,7 @@ public void Example_FirstTestTypeSpec_StringFormat_AllParameters() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -864,7 +864,7 @@ public async Task Example_FirstTestTypeSpec_StringFormat_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -879,7 +879,7 @@ public void Example_FirstTestTypeSpec_StringFormat_AllParameters_Convenience() Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } @@ -890,7 +890,7 @@ public async Task Example_FirstTestTypeSpec_StringFormat_AllParameters_Convenien Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs index 3a205c9fe9e..0e0573a1e1b 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs @@ -322,7 +322,7 @@ public async Task FirstTestTypeSpec_StringFormat_ShortVersion() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -336,7 +336,7 @@ public async Task FirstTestTypeSpec_StringFormat_ShortVersion_Convenience() AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } @@ -350,7 +350,7 @@ public async Task FirstTestTypeSpec_StringFormat_AllParameters() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -364,7 +364,7 @@ public async Task FirstTestTypeSpec_StringFormat_AllParameters_Convenience() AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Docs/NewProjectTypeSpecClient.xml b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Docs/NewProjectTypeSpecClient.xml index e7f7b545b78..e00905921b3 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Docs/NewProjectTypeSpecClient.xml +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Docs/NewProjectTypeSpecClient.xml @@ -679,7 +679,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credential); -ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); ]]> This sample shows how to call StringFormatAsync with all parameters. @@ -688,7 +688,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credential); -ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); ]]> @@ -700,7 +700,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credential); -ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); ]]> This sample shows how to call StringFormat with all parameters. @@ -709,7 +709,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credential); -ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); ]]> @@ -723,7 +723,7 @@ NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credent using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -738,7 +738,7 @@ NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credent using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -756,7 +756,7 @@ NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credent using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -771,7 +771,7 @@ NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credent using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs index dcf3a2d3785..2f36b35d7b5 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs @@ -29,7 +29,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStartObject(); writer.WritePropertyName("sourceUrl"u8); - writer.WriteStringValue(SourceUrl); + writer.WriteStringValue(SourceUrl.AbsoluteUri); writer.WritePropertyName("guid"u8); writer.WriteStringValue(Guid); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -70,7 +70,7 @@ internal static ModelWithFormat DeserializeModelWithFormat(JsonElement element, { return null; } - string sourceUrl = default; + Uri sourceUrl = default; Guid guid = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); @@ -78,7 +78,7 @@ internal static ModelWithFormat DeserializeModelWithFormat(JsonElement element, { if (property.NameEquals("sourceUrl"u8)) { - sourceUrl = property.Value.GetString(); + sourceUrl = new Uri(property.Value.GetString()); continue; } if (property.NameEquals("guid"u8)) diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Models/ModelWithFormat.cs b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Models/ModelWithFormat.cs index 72c3e4b762b..10e2f6d9787 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Models/ModelWithFormat.cs +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/Models/ModelWithFormat.cs @@ -50,7 +50,7 @@ public partial class ModelWithFormat /// url format. /// uuid format. /// is null. - public ModelWithFormat(string sourceUrl, Guid guid) + public ModelWithFormat(Uri sourceUrl, Guid guid) { Argument.AssertNotNull(sourceUrl, nameof(sourceUrl)); @@ -62,7 +62,7 @@ public ModelWithFormat(string sourceUrl, Guid guid) /// url format. /// uuid format. /// Keeps track of any properties unknown to the library. - internal ModelWithFormat(string sourceUrl, Guid guid, IDictionary serializedAdditionalRawData) + internal ModelWithFormat(Uri sourceUrl, Guid guid, IDictionary serializedAdditionalRawData) { SourceUrl = sourceUrl; Guid = guid; @@ -75,7 +75,7 @@ internal ModelWithFormat() } /// url format. - public string SourceUrl { get; } + public Uri SourceUrl { get; } /// uuid format. public Guid Guid { get; } } diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json index 595e8ff774d..b034903404b 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json @@ -645,7 +645,7 @@ "Type": { "$id": "81", "Kind": "Primitive", - "Name": "String", + "Name": "Uri", "IsNullable": false }, "IsRequired": true, diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/tests/Generated/Samples/Samples_NewProjectTypeSpecClient.cs b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/tests/Generated/Samples/Samples_NewProjectTypeSpecClient.cs index fa759064488..0640b1fe716 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/tests/Generated/Samples/Samples_NewProjectTypeSpecClient.cs +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/tests/Generated/Samples/Samples_NewProjectTypeSpecClient.cs @@ -753,7 +753,7 @@ public void Example_NewProjectTypeSpec_StringFormat_ShortVersion() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -771,7 +771,7 @@ public async Task Example_NewProjectTypeSpec_StringFormat_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -787,7 +787,7 @@ public void Example_NewProjectTypeSpec_StringFormat_ShortVersion_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credential); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } @@ -799,7 +799,7 @@ public async Task Example_NewProjectTypeSpec_StringFormat_ShortVersion_Convenien AzureKeyCredential credential = new AzureKeyCredential(""); NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credential); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } @@ -813,7 +813,7 @@ public void Example_NewProjectTypeSpec_StringFormat_AllParameters() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -831,7 +831,7 @@ public async Task Example_NewProjectTypeSpec_StringFormat_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - sourceUrl = "", + sourceUrl = "http://localhost:3000", guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", }); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); @@ -847,7 +847,7 @@ public void Example_NewProjectTypeSpec_StringFormat_AllParameters_Convenience() AzureKeyCredential credential = new AzureKeyCredential(""); NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credential); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } @@ -859,7 +859,7 @@ public async Task Example_NewProjectTypeSpec_StringFormat_AllParameters_Convenie AzureKeyCredential credential = new AzureKeyCredential(""); NewProjectTypeSpecClient client = new NewProjectTypeSpecClient(endpoint, credential); - ModelWithFormat body = new ModelWithFormat("", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); } } diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs index 5ae2cad44ce..cc0e37f82bd 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.Serialization.cs @@ -25,7 +25,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteStartObject(); writer.WritePropertyName("sourceUrl"u8); - writer.WriteStringValue(SourceUrl); + writer.WriteStringValue(SourceUrl.AbsoluteUri); writer.WritePropertyName("guid"u8); writer.WriteStringValue(Guid); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -66,7 +66,7 @@ internal static ModelWithFormat DeserializeModelWithFormat(JsonElement element, { return null; } - string sourceUrl = default; + Uri sourceUrl = default; Guid guid = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); @@ -74,7 +74,7 @@ internal static ModelWithFormat DeserializeModelWithFormat(JsonElement element, { if (property.NameEquals("sourceUrl"u8)) { - sourceUrl = property.Value.GetString(); + sourceUrl = new Uri(property.Value.GetString()); continue; } if (property.NameEquals("guid"u8)) diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs index 23884397222..3420fd14ef3 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs @@ -47,7 +47,7 @@ public partial class ModelWithFormat /// url format. /// uuid format. /// is null. - public ModelWithFormat(string sourceUrl, Guid guid) + public ModelWithFormat(Uri sourceUrl, Guid guid) { Argument.AssertNotNull(sourceUrl, nameof(sourceUrl)); @@ -59,7 +59,7 @@ public ModelWithFormat(string sourceUrl, Guid guid) /// url format. /// uuid format. /// Keeps track of any properties unknown to the library. - internal ModelWithFormat(string sourceUrl, Guid guid, IDictionary serializedAdditionalRawData) + internal ModelWithFormat(Uri sourceUrl, Guid guid, IDictionary serializedAdditionalRawData) { SourceUrl = sourceUrl; Guid = guid; @@ -72,7 +72,7 @@ internal ModelWithFormat() } /// url format. - public string SourceUrl { get; } + public Uri SourceUrl { get; } /// uuid format. public Guid Guid { get; } } diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json index 61cee68f3dd..c89c6ca4dc2 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json @@ -1039,7 +1039,7 @@ "Type": { "$id": "128", "Kind": "Primitive", - "Name": "String", + "Name": "Uri", "IsNullable": false }, "IsRequired": true, From 1d46c1ec31e10f91a4a82e7bea7ea95694b60d52 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 14 Mar 2024 15:16:46 +0800 Subject: [PATCH 16/60] fix letter case of enum value type --- .../src/Generated/tspCodeModel.json | 18 ++++---- .../Emitter.Csharp/src/type/converter.ts | 2 +- .../oauth2/src/Generated/tspCodeModel.json | 2 +- .../union/src/Generated/tspCodeModel.json | 2 +- .../basic/src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 2 +- .../standard/src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 2 +- .../multiple/src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 2 +- .../fixed/src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 4 +- .../src/Generated/tspCodeModel.json | 6 +-- .../src/Generated/tspCodeModel.json | 10 ++-- .../union/src/Generated/tspCodeModel.json | 14 +++--- .../src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 6 +-- .../src/Generated/tspCodeModel.json | 10 ++-- .../src/Generated/tspCodeModel.json | 18 ++++---- .../src/Generated/tspCodeModel.json | 4 +- .../src/Generated/tspCodeModel.json | 10 ++-- .../src/Generated/tspCodeModel.json | 10 ++-- .../src/Generated/tspCodeModel.json | 4 +- .../src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 2 +- .../src/Generated/tspCodeModel.json | 14 +++--- .../src/Generated/tspCodeModel.json | 46 +++++++++---------- .../src/Generated/tspCodeModel.json | 12 ++--- 30 files changed, 108 insertions(+), 108 deletions(-) diff --git a/samples/AnomalyDetector/src/Generated/tspCodeModel.json b/samples/AnomalyDetector/src/Generated/tspCodeModel.json index 5e8b73e5535..6cafcfea8d6 100644 --- a/samples/AnomalyDetector/src/Generated/tspCodeModel.json +++ b/samples/AnomalyDetector/src/Generated/tspCodeModel.json @@ -26,7 +26,7 @@ "$id": "4", "Kind": "Enum", "Name": "TimeGranularity", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "5", @@ -84,7 +84,7 @@ "$id": "14", "Kind": "Enum", "Name": "ImputeMode", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "15", @@ -127,7 +127,7 @@ "$id": "21", "Kind": "Enum", "Name": "MultivariateBatchDetectionStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "22", @@ -160,7 +160,7 @@ "$id": "26", "Kind": "Enum", "Name": "DataSchema", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "27", @@ -185,7 +185,7 @@ "$id": "29", "Kind": "Enum", "Name": "AlignMode", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "30", @@ -208,7 +208,7 @@ "$id": "32", "Kind": "Enum", "Name": "FillNAMethod", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "33", @@ -246,7 +246,7 @@ "$id": "38", "Kind": "Enum", "Name": "ModelStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "39", @@ -279,7 +279,7 @@ "$id": "43", "Kind": "Enum", "Name": "AnomalyDetectorErrorCodes", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "44", @@ -346,7 +346,7 @@ "$id": "55", "Kind": "Enum", "Name": "Versions", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "56", diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 75b2c434a14..af27963dc16 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -223,7 +223,7 @@ export function fromSdkEnumType( const newInputEnumType: InputEnumType = { Kind: InputTypeKind.Enum, Name: enumName, - EnumValueType: enumType.valueType.kind, + EnumValueType: fromScalarType(enumType.valueType).Name, AllowedValues: enumType.values.map((v) => fromSdkEnumValueType(v)), Namespace: getFullNamespaceString( (enumType.__raw! as Enum).namespace diff --git a/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json index eab795c556e..fd2b80f3dbb 100644 --- a/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "OAuth2FlowType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json index fce94682bc5..05dbe0ac029 100644 --- a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "OAuth2FlowType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json index 8041464aaa9..225f070d479 100644 --- a/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json @@ -10,7 +10,7 @@ "$id": "2", "Kind": "Enum", "Name": "ListItemInputExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/azure/core/lro/rpc-legacy/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/lro/rpc-legacy/src/Generated/tspCodeModel.json index fe844c0f249..7c2c1a4abd8 100644 --- a/test/CadlRanchProjects/azure/core/lro/rpc-legacy/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/lro/rpc-legacy/src/Generated/tspCodeModel.json @@ -10,7 +10,7 @@ "$id": "2", "Kind": "Enum", "Name": "JobStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json index eb019af7038..b8a5348c523 100644 --- a/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json @@ -10,7 +10,7 @@ "$id": "2", "Kind": "Enum", "Name": "OperationState", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/tspCodeModel.json index 1c668603a6d..4e8bef2e287 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ClientType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json index a69a685a32f..1e99c9c842c 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ClientType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json index b247a3621fc..0a48df06585 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ClientType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/server/path/multiple/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/server/path/multiple/src/Generated/tspCodeModel.json index bde06fe1d55..c58ab8331e0 100644 --- a/test/CadlRanchProjects/server/path/multiple/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/server/path/multiple/src/Generated/tspCodeModel.json @@ -9,7 +9,7 @@ "$id": "2", "Kind": "Enum", "Name": "Versions", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/type/enum/extensible/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/enum/extensible/src/Generated/tspCodeModel.json index e9f6b904e3d..43c152a41ef 100644 --- a/test/CadlRanchProjects/type/enum/extensible/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/enum/extensible/src/Generated/tspCodeModel.json @@ -7,7 +7,7 @@ "$id": "2", "Kind": "Enum", "Name": "DaysOfWeekExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/type/enum/fixed/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/enum/fixed/src/Generated/tspCodeModel.json index 78902ec49f0..e1e8623f1d1 100644 --- a/test/CadlRanchProjects/type/enum/fixed/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/enum/fixed/src/Generated/tspCodeModel.json @@ -7,7 +7,7 @@ "$id": "2", "Kind": "Enum", "Name": "DaysOfWeekEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json index 3bb70d56255..bc905227179 100644 --- a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "DogKind", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -27,7 +27,7 @@ "$id": "4", "Kind": "Enum", "Name": "SnakeKind", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "5", diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json index 4870b71ba86..706a542b385 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json @@ -65,7 +65,7 @@ "$id": "8", "Kind": "Enum", "Name": "UnionStringLiteralPropertyProperty", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "9", @@ -87,7 +87,7 @@ "$id": "11", "Kind": "Enum", "Name": "UnionIntLiteralPropertyProperty", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "12", @@ -109,7 +109,7 @@ "$id": "14", "Kind": "Enum", "Name": "UnionFloatLiteralPropertyProperty", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "15", diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json index bfcb800a5d8..88a81caa76a 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "FixedInnerEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -33,7 +33,7 @@ "$id": "5", "Kind": "Enum", "Name": "InnerEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "6", @@ -115,7 +115,7 @@ "$id": "14", "Kind": "Enum", "Name": "UnionStringLiteralPropertyProperty", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "15", @@ -137,7 +137,7 @@ "$id": "17", "Kind": "Enum", "Name": "UnionIntLiteralPropertyProperty", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "18", @@ -159,7 +159,7 @@ "$id": "20", "Kind": "Enum", "Name": "UnionFloatLiteralPropertyProperty", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "21", diff --git a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json index c2674735950..b923217db21 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "GetResponseProp5", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -35,7 +35,7 @@ "$id": "6", "Kind": "Enum", "Name": "GetResponseProp4", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "7", @@ -57,7 +57,7 @@ "$id": "9", "Kind": "Enum", "Name": "StringExtensibleNamedUnion", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "10", @@ -79,7 +79,7 @@ "$id": "12", "Kind": "Enum", "Name": "GetResponseProp3", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "13", @@ -106,7 +106,7 @@ "$id": "16", "Kind": "Enum", "Name": "GetResponseProp2", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "17", @@ -133,7 +133,7 @@ "$id": "20", "Kind": "Enum", "Name": "EnumsOnlyCasesLr", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "21", @@ -165,7 +165,7 @@ "$id": "25", "Kind": "Enum", "Name": "EnumsOnlyCasesUd", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "26", diff --git a/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json index 580690b5c77..2198a4e638d 100644 --- a/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -32,7 +32,7 @@ "$id": "5", "Kind": "Enum", "Name": "Versions", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "6", diff --git a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json index b59c1619dda..7c495fc70e2 100644 --- a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json @@ -9,7 +9,7 @@ "$id": "2", "Kind": "Enum", "Name": "ProjectKind", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -40,7 +40,7 @@ "$id": "6", "Kind": "Enum", "Name": "OperationState", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "7", @@ -83,7 +83,7 @@ "$id": "12", "Kind": "Enum", "Name": "JobStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "13", diff --git a/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json index 35016a4aab0..e0d77f71682 100644 --- a/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ExtensibleEnumWithOperator", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -33,7 +33,7 @@ "$id": "5", "Kind": "Enum", "Name": "EnumToRename", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "6", @@ -61,7 +61,7 @@ "$id": "9", "Kind": "Enum", "Name": "EnumWithValueToRename", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "10", @@ -89,7 +89,7 @@ "$id": "13", "Kind": "Enum", "Name": "EnumToBeMadeExtensible", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "14", @@ -117,7 +117,7 @@ "$id": "17", "Kind": "Enum", "Name": "NormalEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "18", diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json index 4db6368a295..3da76398b10 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json @@ -124,7 +124,7 @@ "$id": "14", "Kind": "Enum", "Name": "CsProjectedEnum", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "15", @@ -152,7 +152,7 @@ "$id": "18", "Kind": "Enum", "Name": "CsProjectedEnumInModel", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "19", @@ -180,7 +180,7 @@ "$id": "22", "Kind": "Enum", "Name": "StringFixedEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "23", @@ -208,7 +208,7 @@ "$id": "26", "Kind": "Enum", "Name": "StringExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "27", @@ -236,7 +236,7 @@ "$id": "30", "Kind": "Enum", "Name": "IntExtensibleEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "31", @@ -264,7 +264,7 @@ "$id": "34", "Kind": "Enum", "Name": "FloatExtensibleEnum", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "35", @@ -292,7 +292,7 @@ "$id": "38", "Kind": "Enum", "Name": "FloatFixedEnum", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "39", @@ -320,7 +320,7 @@ "$id": "42", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "43", @@ -348,7 +348,7 @@ "$id": "46", "Kind": "Enum", "Name": "OAuth2FlowType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "47", diff --git a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json index 1321ca6988b..b6a13e622a9 100644 --- a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "JobStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -46,7 +46,7 @@ "$id": "8", "Kind": "Enum", "Name": "OAuth2FlowType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "9", diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json index f8d99c6b5a7..1ce62cd7581 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ResourceTypeAliasPatternType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -33,7 +33,7 @@ "$id": "5", "Kind": "Enum", "Name": "ResourceTypeAliasPathTokenType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "6", @@ -94,7 +94,7 @@ "$id": "14", "Kind": "Enum", "Name": "ResourceTypeAliasPathAttributes", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "15", @@ -119,7 +119,7 @@ "$id": "17", "Kind": "Enum", "Name": "ResourceTypeAliasType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "18", @@ -150,7 +150,7 @@ "$id": "21", "Kind": "Enum", "Name": "ProviderAuthorizationConsentState", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "22", diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index 61d5d1c0e51..ea5f4c88f70 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -10,7 +10,7 @@ "$id": "2", "Kind": "Enum", "Name": "FixedStringEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -38,7 +38,7 @@ "$id": "6", "Kind": "Enum", "Name": "FixedIntEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "7", @@ -67,7 +67,7 @@ "$id": "10", "Kind": "Enum", "Name": "ExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "11", @@ -96,7 +96,7 @@ "$id": "14", "Kind": "Enum", "Name": "FixedFloatEnum", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "15", @@ -125,7 +125,7 @@ "$id": "18", "Kind": "Enum", "Name": "ExtensibleIntEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "19", diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json index f6408cf9fb2..56fe106fd5f 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json @@ -9,7 +9,7 @@ "$id": "2", "Kind": "Enum", "Name": "Interval", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -52,7 +52,7 @@ "$id": "8", "Kind": "Enum", "Name": "OAuth2FlowType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "9", diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json index 4b86b935176..131825fd7a2 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "PetKind", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json index d8749ae1881..8c5196de648 100644 --- a/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json @@ -9,7 +9,7 @@ "$id": "2", "Kind": "Enum", "Name": "ProjectKind", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json index b034903404b..b671765711c 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json @@ -122,7 +122,7 @@ "$id": "14", "Kind": "Enum", "Name": "StringFixedEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "15", @@ -150,7 +150,7 @@ "$id": "18", "Kind": "Enum", "Name": "StringExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "19", @@ -178,7 +178,7 @@ "$id": "22", "Kind": "Enum", "Name": "IntExtensibleEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "23", @@ -206,7 +206,7 @@ "$id": "26", "Kind": "Enum", "Name": "FloatExtensibleEnum", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "27", @@ -234,7 +234,7 @@ "$id": "30", "Kind": "Enum", "Name": "FloatFixedEnum", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "31", @@ -262,7 +262,7 @@ "$id": "34", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "35", @@ -290,7 +290,7 @@ "$id": "38", "Kind": "Enum", "Name": "OAuth2FlowType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "39", diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json index 85eb9cd2507..af56f7f172e 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "CreateTranscriptionRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -25,7 +25,7 @@ "$id": "4", "Kind": "Enum", "Name": "CreateTranscriptionRequestResponseFormat", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "5", @@ -62,7 +62,7 @@ "$id": "10", "Kind": "Enum", "Name": "CreateTranslationRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "11", @@ -79,7 +79,7 @@ "$id": "12", "Kind": "Enum", "Name": "CreateTranslationRequestResponseFormat", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "13", @@ -116,7 +116,7 @@ "$id": "18", "Kind": "Enum", "Name": "CreateChatCompletionRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "19", @@ -183,7 +183,7 @@ "$id": "30", "Kind": "Enum", "Name": "ChatCompletionRequestMessageRole", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "31", @@ -215,7 +215,7 @@ "$id": "35", "Kind": "Enum", "Name": "ChatCompletionResponseMessageRole", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "36", @@ -247,7 +247,7 @@ "$id": "40", "Kind": "Enum", "Name": "CreateChatCompletionResponseChoiceFinishReason", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "41", @@ -279,7 +279,7 @@ "$id": "45", "Kind": "Enum", "Name": "CreateFineTuningJobRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "46", @@ -325,7 +325,7 @@ "$id": "51", "Kind": "Enum", "Name": "FineTuningJobStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "52", @@ -367,7 +367,7 @@ "$id": "58", "Kind": "Enum", "Name": "FineTuningJobEventLevel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "59", @@ -394,7 +394,7 @@ "$id": "62", "Kind": "Enum", "Name": "CreateCompletionRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "63", @@ -451,7 +451,7 @@ "$id": "72", "Kind": "Enum", "Name": "CreateCompletionResponseChoiceFinishReason", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "73", @@ -478,7 +478,7 @@ "$id": "76", "Kind": "Enum", "Name": "CreateEditRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "77", @@ -519,7 +519,7 @@ "$id": "81", "Kind": "Enum", "Name": "CreateEditResponseChoiceFinishReason", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "82", @@ -541,7 +541,7 @@ "$id": "84", "Kind": "Enum", "Name": "CreateEmbeddingRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "85", @@ -615,7 +615,7 @@ "$id": "92", "Kind": "Enum", "Name": "OpenAIFileStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "93", @@ -657,7 +657,7 @@ "$id": "99", "Kind": "Enum", "Name": "CreateFineTuneRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "100", @@ -708,7 +708,7 @@ "$id": "106", "Kind": "Enum", "Name": "FineTuneStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "107", @@ -764,7 +764,7 @@ "$id": "114", "Kind": "Enum", "Name": "CreateImageRequestSize", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "115", @@ -791,7 +791,7 @@ "$id": "118", "Kind": "Enum", "Name": "CreateImageRequestResponseFormat", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "119", @@ -813,7 +813,7 @@ "$id": "121", "Kind": "Enum", "Name": "CreateModerationRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "122", @@ -835,7 +835,7 @@ "$id": "124", "Kind": "Enum", "Name": "FineTuningEventType", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "125", diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json index c89c6ca4dc2..621e4055dea 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json @@ -122,7 +122,7 @@ "$id": "14", "Kind": "Enum", "Name": "StringFixedEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "15", @@ -150,7 +150,7 @@ "$id": "18", "Kind": "Enum", "Name": "StringExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "19", @@ -178,7 +178,7 @@ "$id": "22", "Kind": "Enum", "Name": "IntExtensibleEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "23", @@ -206,7 +206,7 @@ "$id": "26", "Kind": "Enum", "Name": "FloatExtensibleEnum", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "27", @@ -234,7 +234,7 @@ "$id": "30", "Kind": "Enum", "Name": "FloatFixedEnum", - "EnumValueType": "float32", + "EnumValueType": "Float32", "AllowedValues": [ { "$id": "31", @@ -262,7 +262,7 @@ "$id": "34", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "35", From 67bf3343ae41699e3979e020b6875323a9848eb7 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Mon, 18 Mar 2024 10:32:13 +0800 Subject: [PATCH 17/60] fix formatting issue --- .../Emitter.Csharp/src/type/converter.ts | 8 +++++--- .../Emitter.Csharp/test/Unit/stringFormat.test.ts | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index af27963dc16..55d897e02ab 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -326,10 +326,12 @@ function fromBytesType(bytesType: SdkBuiltInType): InputPrimitiveType { }; } -function fromStringType(program: Program, stringType: SdkType): InputPrimitiveType { +function fromStringType( + program: Program, + stringType: SdkType +): InputPrimitiveType { function fromStringFormat(rawStringType?: Type): InputPrimitiveTypeKind { - if (!rawStringType) - return InputPrimitiveTypeKind.String; + if (!rawStringType) return InputPrimitiveTypeKind.String; const format = getFormat(program, rawStringType); switch (format) { diff --git a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/stringFormat.test.ts b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/stringFormat.test.ts index cc0cad9f009..942bf0eb818 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/stringFormat.test.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/stringFormat.test.ts @@ -152,7 +152,9 @@ describe("Test string format", () => { }, foo.Properties[0].Type ), - `string property format is not correct. Got ${JSON.stringify(foo.Properties[0].Type)} ` + `string property format is not correct. Got ${JSON.stringify( + foo.Properties[0].Type + )} ` ); }); From 97a0923bbf8ba384b9a11782a5c45c1c541cc161 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Mon, 18 Mar 2024 11:17:34 +0800 Subject: [PATCH 18/60] temp fix for cadl-ranch `value-type` case --- test/CadlRanchProjects.Tests/type-property-value-types.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CadlRanchProjects.Tests/type-property-value-types.cs b/test/CadlRanchProjects.Tests/type-property-value-types.cs index b432e8ef9a2..e45db047575 100644 --- a/test/CadlRanchProjects.Tests/type-property-value-types.cs +++ b/test/CadlRanchProjects.Tests/type-property-value-types.cs @@ -330,13 +330,13 @@ public Task Type_Property_ValueTypes_Decimal128_put() => Test(async (host) => public Task Type_Property_ValueTypes_UnionEnumValue_get() => Test(async (host) => { var response = await new ValueTypesClient(host, null).GetUnionEnumValueClient().GetUnionEnumValueAsync(); - Assert.AreEqual(UnionEnumValuePropertyProperty.Value2, response.Value.Property); + Assert.AreEqual("value2", response.Value.Property); }); [Test] public Task Type_Property_ValueTypes_UnionEnumValue_put() => Test(async (host) => { - var response = await new ValueTypesClient(host, null).GetUnionEnumValueClient().PutAsync(new UnionEnumValueProperty()); + var response = await new ValueTypesClient(host, null).GetUnionEnumValueClient().PutAsync(new UnionEnumValueProperty("value2")); Assert.AreEqual(204, response.Status); }); } From f5fe5b500c215f7268f1b1e80f246498f174d3d8 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Tue, 19 Mar 2024 15:52:05 +0800 Subject: [PATCH 19/60] remove code which intentially put discriminator property first --- .../Emitter.Csharp/src/type/converter.ts | 8 --- .../Models/AbstractModel.Serialization.cs | 4 +- .../src/Generated/Models/AbstractModel.cs | 10 +-- .../Models/RealModel.Serialization.cs | 16 ++--- .../access/src/Generated/Models/RealModel.cs | 4 +- .../UnknownAbstractModel.Serialization.cs | 16 ++--- .../Generated/Models/UnknownAbstractModel.cs | 4 +- .../access/src/Generated/tspCodeModel.json | 16 ++--- .../naming/src/Generated/tspCodeModel.json | 4 +- .../Docs/SingleDiscriminatorClient.xml | 8 +-- .../Models/Dinosaur.Serialization.cs | 4 +- .../src/Generated/Models/Dinosaur.cs | 10 +-- .../Generated/Models/TRex.Serialization.cs | 16 ++--- .../src/Generated/Models/TRex.cs | 4 +- .../Models/UnknownDinosaur.Serialization.cs | 16 ++--- .../src/Generated/Models/UnknownDinosaur.cs | 4 +- ...eritanceSingleDiscriminatorModelFactory.cs | 8 +-- .../src/Generated/tspCodeModel.json | 20 +++--- .../Samples_SingleDiscriminatorClient.cs | 8 +-- .../Docs/ExtendsUnknownDiscriminated.xml | 16 ++--- .../Generated/Docs/IsUnknownDiscriminated.xml | 16 ++--- ...alPropertiesDiscriminated.Serialization.cs | 4 +- ...nknownAdditionalPropertiesDiscriminated.cs | 10 +-- ...rtiesDiscriminatedDerived.Serialization.cs | 16 ++--- ...dditionalPropertiesDiscriminatedDerived.cs | 4 +- ...alPropertiesDiscriminated.Serialization.cs | 4 +- ...nknownAdditionalPropertiesDiscriminated.cs | 10 +-- ...rtiesDiscriminatedDerived.Serialization.cs | 16 ++--- ...dditionalPropertiesDiscriminatedDerived.cs | 4 +- ...alPropertiesDiscriminated.Serialization.cs | 16 ++--- ...nknownAdditionalPropertiesDiscriminated.cs | 4 +- ...alPropertiesDiscriminated.Serialization.cs | 16 ++--- ...nknownAdditionalPropertiesDiscriminated.cs | 4 +- .../src/Generated/tspCodeModel.json | 32 ++++----- .../Samples_ExtendsUnknownDiscriminated.cs | 16 ++--- .../Samples/Samples_IsUnknownDiscriminated.cs | 16 ++--- .../Generated/Docs/ModelsTypeSpecClient.xml | 40 +++++------ ...aseModelWithDiscriminator.Serialization.cs | 4 +- .../Models/BaseModelWithDiscriminator.cs | 10 +-- ...edModelWithDiscriminatorA.Serialization.cs | 18 ++--- .../Models/DerivedModelWithDiscriminatorA.cs | 4 +- ...edModelWithDiscriminatorB.Serialization.cs | 18 ++--- .../Models/DerivedModelWithDiscriminatorB.cs | 4 +- .../Models/SingleBase.Serialization.cs | 4 +- .../src/Generated/Models/SingleBase.cs | 10 +-- ...aseModelWithDiscriminator.Serialization.cs | 18 ++--- .../UnknownBaseModelWithDiscriminator.cs | 4 +- .../Models/UnknownSingleBase.Serialization.cs | 16 ++--- .../src/Generated/Models/UnknownSingleBase.cs | 4 +- .../Generated/ModelsTypeSpecModelFactory.cs | 6 +- .../src/Generated/tspCodeModel.json | 70 +++++++++---------- .../Samples/Samples_ModelsTypeSpecClient.cs | 40 +++++------ .../Tests/ModelsTypeSpecClientTests.cs | 6 +- .../src/Generated/Docs/Pets.xml | 8 +-- .../Generated/Models/Fish.Serialization.cs | 4 +- .../src/Generated/Models/Fish.cs | 10 +-- .../Generated/Models/Shark.Serialization.cs | 16 ++--- .../src/Generated/Models/Shark.cs | 4 +- .../Generated/Models/Tuna.Serialization.cs | 16 ++--- .../src/Generated/Models/Tuna.cs | 4 +- .../Models/UnknownFish.Serialization.cs | 16 ++--- .../src/Generated/Models/UnknownFish.cs | 4 +- .../src/Generated/PetStoreModelFactory.cs | 10 +-- .../src/Generated/tspCodeModel.json | 20 +++--- .../tests/Generated/Samples/Samples_Pets.cs | 8 +-- 65 files changed, 386 insertions(+), 394 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 55d897e02ab..327c0eeea4b 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -166,14 +166,6 @@ export function fromSdkModelType( Namespace: inputModelType?.Namespace } as LiteralTypeContext) ); - - const index = inputModelType.Properties.findIndex( - (p) => p.IsDiscriminator - ); - if (index !== 0 && index !== -1) { - const discriminator = inputModelType.Properties.splice(index, 1)[0]; - inputModelType.Properties.unshift(discriminator); - } } return inputModelType; diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.Serialization.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.Serialization.cs index 2cdfe8468f0..0fa2b95fef8 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.Serialization.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.cs index f0194c501ef..5662c4b45e7 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.cs @@ -61,13 +61,13 @@ protected AbstractModel(string name) } /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal AbstractModel(string kind, string name, IDictionary serializedAdditionalRawData) + internal AbstractModel(string name, string kind, IDictionary serializedAdditionalRawData) { - Kind = kind; Name = name; + Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,9 +76,9 @@ internal AbstractModel() { } - /// Discriminator. - internal string Kind { get; set; } /// Gets the name. public string Name { get; } + /// Discriminator. + internal string Kind { get; set; } } } diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.Serialization.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.Serialization.cs index 6c5d3b57e9f..ea3ec715981 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.Serialization.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static RealModel DeserializeRealModel(JsonElement element, ModelReaderW { return null; } - string kind = default; string name = default; + string kind = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("name"u8)) { - kind = property.Value.GetString(); + name = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("kind"u8)) { - name = property.Value.GetString(); + kind = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static RealModel DeserializeRealModel(JsonElement element, ModelReaderW } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new RealModel(kind, name, serializedAdditionalRawData); + return new RealModel(name, kind, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.cs index b1b0c2cb7af..a32ed3c636f 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.cs @@ -25,10 +25,10 @@ internal RealModel(string name) : base(name) } /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal RealModel(string kind, string name, IDictionary serializedAdditionalRawData) : base(kind, name, serializedAdditionalRawData) + internal RealModel(string name, string kind, IDictionary serializedAdditionalRawData) : base(name, kind, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.Serialization.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.Serialization.cs index daf901a04ba..7922c8fa33e 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.Serialization.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static UnknownAbstractModel DeserializeUnknownAbstractModel(JsonElement { return null; } - string kind = "Unknown"; string name = default; + string kind = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("name"u8)) { - kind = property.Value.GetString(); + name = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("kind"u8)) { - name = property.Value.GetString(); + kind = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static UnknownAbstractModel DeserializeUnknownAbstractModel(JsonElement } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownAbstractModel(kind, name, serializedAdditionalRawData); + return new UnknownAbstractModel(name, kind, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.cs index bfedf1cad95..8154d102bc0 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.cs @@ -14,10 +14,10 @@ namespace _Specs_.Azure.ClientGenerator.Core.Access.Models internal partial class UnknownAbstractModel : AbstractModel { /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal UnknownAbstractModel(string kind, string name, IDictionary serializedAdditionalRawData) : base(kind, name, serializedAdditionalRawData) + internal UnknownAbstractModel(string name, string kind, IDictionary serializedAdditionalRawData) : base(name, kind, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json index acf0c98bb50..310b1617b6a 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json @@ -261,9 +261,9 @@ "Properties": [ { "$id": "29", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "name", + "SerializedName": "name", + "Description": "", "Type": { "$id": "30", "Kind": "Primitive", @@ -272,13 +272,13 @@ }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false }, { "$id": "31", - "Name": "name", - "SerializedName": "name", - "Description": "", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "32", "Kind": "Primitive", @@ -287,7 +287,7 @@ }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": false + "IsDiscriminator": true } ] }, diff --git a/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json index 3252d337fcd..0868e23e293 100644 --- a/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ClientExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -25,7 +25,7 @@ "$id": "4", "Kind": "Enum", "Name": "ExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "5", diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Docs/SingleDiscriminatorClient.xml b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Docs/SingleDiscriminatorClient.xml index 9849fb3ee43..7e628ca32b7 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Docs/SingleDiscriminatorClient.xml +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Docs/SingleDiscriminatorClient.xml @@ -528,8 +528,8 @@ SingleDiscriminatorClient client = new SingleDiscriminatorClient(); Response response = await client.GetLegacyModelAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetLegacyModelAsync with all parameters and parse the result. @@ -551,8 +551,8 @@ SingleDiscriminatorClient client = new SingleDiscriminatorClient(); Response response = client.GetLegacyModel(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetLegacyModel with all parameters and parse the result. diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.Serialization.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.Serialization.cs index 43f9f8f6d80..4242d4237bb 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.Serialization.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.cs index 6848cc5274e..86b2f09d432 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.cs @@ -57,13 +57,13 @@ protected Dinosaur(int size) } /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal Dinosaur(string kind, int size, IDictionary serializedAdditionalRawData) + internal Dinosaur(int size, string kind, IDictionary serializedAdditionalRawData) { - Kind = kind; Size = size; + Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,9 +72,9 @@ internal Dinosaur() { } - /// Discriminator. - internal string Kind { get; set; } /// Gets the size. public int Size { get; } + /// Discriminator. + internal string Kind { get; set; } } } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.Serialization.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.Serialization.cs index 36a0fafd116..f75a83cc75c 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.Serialization.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opti } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static TRex DeserializeTRex(JsonElement element, ModelReaderWriterOptio { return null; } - string kind = default; int size = default; + string kind = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static TRex DeserializeTRex(JsonElement element, ModelReaderWriterOptio } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new TRex(kind, size, serializedAdditionalRawData); + return new TRex(size, kind, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs index 655cefe1fd2..dc38e6ca1c5 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs @@ -21,10 +21,10 @@ internal TRex(int size) : base(size) } /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal TRex(string kind, int size, IDictionary serializedAdditionalRawData) : base(kind, size, serializedAdditionalRawData) + internal TRex(int size, string kind, IDictionary serializedAdditionalRawData) : base(size, kind, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.Serialization.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.Serialization.cs index 4fe7895ccd4..3647147bb41 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.Serialization.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static UnknownDinosaur DeserializeUnknownDinosaur(JsonElement element, { return null; } - string kind = "Unknown"; int size = default; + string kind = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static UnknownDinosaur DeserializeUnknownDinosaur(JsonElement element, } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownDinosaur(kind, size, serializedAdditionalRawData); + return new UnknownDinosaur(size, kind, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.cs index bb4a4440956..73dea1e9261 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.cs @@ -14,10 +14,10 @@ namespace _Type.Model.Inheritance.SingleDiscriminator.Models internal partial class UnknownDinosaur : Dinosaur { /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal UnknownDinosaur(string kind, int size, IDictionary serializedAdditionalRawData) : base(kind, size, serializedAdditionalRawData) + internal UnknownDinosaur(int size, string kind, IDictionary serializedAdditionalRawData) : base(size, kind, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/TypeModelInheritanceSingleDiscriminatorModelFactory.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/TypeModelInheritanceSingleDiscriminatorModelFactory.cs index 96de8434c36..8845ae9fccb 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/TypeModelInheritanceSingleDiscriminatorModelFactory.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/TypeModelInheritanceSingleDiscriminatorModelFactory.cs @@ -11,12 +11,12 @@ namespace _Type.Model.Inheritance.SingleDiscriminator.Models public static partial class TypeModelInheritanceSingleDiscriminatorModelFactory { /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// A new instance for mocking. - public static Dinosaur Dinosaur(string kind = null, int size = default) + public static Dinosaur Dinosaur(int size = default, string kind = null) { - return new UnknownDinosaur(kind, size, serializedAdditionalRawData: null); + return new UnknownDinosaur(size, kind, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -24,7 +24,7 @@ public static Dinosaur Dinosaur(string kind = null, int size = default) /// A new instance for mocking. public static TRex TRex(int size = default) { - return new TRex("t-rex", size, serializedAdditionalRawData: null); + return new TRex(size, "t-rex", serializedAdditionalRawData: null); } } } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json index 31a88c1f21d..5333b02e15b 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json @@ -59,33 +59,33 @@ "Properties": [ { "$id": "8", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "size", + "SerializedName": "size", + "Description": "", "Type": { "$id": "9", "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false }, { "$id": "10", - "Name": "size", - "SerializedName": "size", - "Description": "", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "11", "Kind": "Primitive", - "Name": "Int32", + "Name": "String", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": false + "IsDiscriminator": true } ] }, diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/tests/Generated/Samples/Samples_SingleDiscriminatorClient.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/tests/Generated/Samples/Samples_SingleDiscriminatorClient.cs index 9851230da29..b33c474ac2a 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/tests/Generated/Samples/Samples_SingleDiscriminatorClient.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/tests/Generated/Samples/Samples_SingleDiscriminatorClient.cs @@ -588,8 +588,8 @@ public void Example_SingleDiscriminator_GetLegacyModel_ShortVersion() Response response = client.GetLegacyModel(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -601,8 +601,8 @@ public async Task Example_SingleDiscriminator_GetLegacyModel_ShortVersion_Async( Response response = await client.GetLegacyModelAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -632,8 +632,8 @@ public void Example_SingleDiscriminator_GetLegacyModel_AllParameters() Response response = client.GetLegacyModel(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -645,8 +645,8 @@ public async Task Example_SingleDiscriminator_GetLegacyModel_AllParameters_Async Response response = await client.GetLegacyModelAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsUnknownDiscriminated.xml b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsUnknownDiscriminated.xml index 18d739b79d4..b69d85a4fe2 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsUnknownDiscriminated.xml +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsUnknownDiscriminated.xml @@ -40,8 +40,8 @@ ExtendsUnknownDiscriminated client = new AdditionalPropertiesClient().GetExtends Response response = await client.GetExtendsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetExtendsUnknownDiscriminatedAsync with all parameters and parse the result. @@ -63,8 +63,8 @@ ExtendsUnknownDiscriminated client = new AdditionalPropertiesClient().GetExtends Response response = client.GetExtendsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetExtendsUnknownDiscriminated with all parameters and parse the result. @@ -126,8 +126,8 @@ ExtendsUnknownDiscriminated client = new AdditionalPropertiesClient().GetExtends using RequestContent content = RequestContent.Create(new { index = 1234, - kind = "derived", name = "", + kind = "derived", }); Response response = await client.PutAsync(content); @@ -141,8 +141,8 @@ using RequestContent content = RequestContent.Create(new { index = 1234, age = 123.45F, - kind = "derived", name = "", + kind = "derived", }); Response response = await client.PutAsync(content); @@ -158,8 +158,8 @@ ExtendsUnknownDiscriminated client = new AdditionalPropertiesClient().GetExtends using RequestContent content = RequestContent.Create(new { index = 1234, - kind = "derived", name = "", + kind = "derived", }); Response response = client.Put(content); @@ -173,8 +173,8 @@ using RequestContent content = RequestContent.Create(new { index = 1234, age = 123.45F, - kind = "derived", name = "", + kind = "derived", }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/IsUnknownDiscriminated.xml b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/IsUnknownDiscriminated.xml index 340ee0a474e..289592c440f 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/IsUnknownDiscriminated.xml +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/IsUnknownDiscriminated.xml @@ -40,8 +40,8 @@ IsUnknownDiscriminated client = new AdditionalPropertiesClient().GetIsUnknownDis Response response = await client.GetIsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetIsUnknownDiscriminatedAsync with all parameters and parse the result. @@ -63,8 +63,8 @@ IsUnknownDiscriminated client = new AdditionalPropertiesClient().GetIsUnknownDis Response response = client.GetIsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetIsUnknownDiscriminated with all parameters and parse the result. @@ -126,8 +126,8 @@ IsUnknownDiscriminated client = new AdditionalPropertiesClient().GetIsUnknownDis using RequestContent content = RequestContent.Create(new { index = 1234, - kind = "derived", name = "", + kind = "derived", }); Response response = await client.PutAsync(content); @@ -141,8 +141,8 @@ using RequestContent content = RequestContent.Create(new { index = 1234, age = 123.45F, - kind = "derived", name = "", + kind = "derived", }); Response response = await client.PutAsync(content); @@ -158,8 +158,8 @@ IsUnknownDiscriminated client = new AdditionalPropertiesClient().GetIsUnknownDis using RequestContent content = RequestContent.Create(new { index = 1234, - kind = "derived", name = "", + kind = "derived", }); Response response = client.Put(content); @@ -173,8 +173,8 @@ using RequestContent content = RequestContent.Create(new { index = 1234, age = 123.45F, - kind = "derived", name = "", + kind = "derived", }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index b530cc39699..3553815bfef 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonW } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs index d35e2fb0079..675092d0b7e 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminated.cs @@ -30,13 +30,13 @@ protected ExtendsUnknownAdditionalPropertiesDiscriminated(string name) } /// Initializes a new instance of . - /// The discriminator. /// The name property. + /// The discriminator. /// Additional Properties. - internal ExtendsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary additionalProperties) + internal ExtendsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) { - Kind = kind; Name = name; + Kind = kind; AdditionalProperties = additionalProperties; } @@ -45,10 +45,10 @@ internal ExtendsUnknownAdditionalPropertiesDiscriminated() { } - /// The discriminator. - internal string Kind { get; set; } /// The name property. public string Name { get; set; } + /// The discriminator. + internal string Kind { get; set; } /// /// Additional Properties /// diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs index 3d8a2936a2b..dd643c3f297 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs @@ -35,10 +35,10 @@ void IJsonModel.Write(Ut writer.WritePropertyName("age"u8); writer.WriteNumberValue(Age.Value); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -76,8 +76,8 @@ internal static ExtendsUnknownAdditionalPropertiesDiscriminatedDerived Deseriali } int index = default; float? age = default; - string kind = default; string name = default; + string kind = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -96,20 +96,20 @@ internal static ExtendsUnknownAdditionalPropertiesDiscriminatedDerived Deseriali age = property.Value.GetSingle(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("name"u8)) { - kind = property.Value.GetString(); + name = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("kind"u8)) { - name = property.Value.GetString(); + kind = property.Value.GetString(); continue; } additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } additionalProperties = additionalPropertiesDictionary; - return new ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(kind, name, additionalProperties, index, age); + return new ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(name, kind, additionalProperties, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs index 93d1590f799..6c1724109f3 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.cs @@ -27,12 +27,12 @@ public ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string name, int i } /// Initializes a new instance of . - /// The discriminator. /// The name property. + /// The discriminator. /// Additional Properties. /// The index property. /// The age property. - internal ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string kind, string name, IDictionary additionalProperties, int index, float? age) : base(kind, name, additionalProperties) + internal ExtendsUnknownAdditionalPropertiesDiscriminatedDerived(string name, string kind, IDictionary additionalProperties, int index, float? age) : base(name, kind, additionalProperties) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index 452ccc25dcf..0173d1aaa59 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs index 3e8e2b41a09..07767b532d7 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminated.cs @@ -30,13 +30,13 @@ protected IsUnknownAdditionalPropertiesDiscriminated(string name) } /// Initializes a new instance of . - /// The discriminator. /// The name property. + /// The discriminator. /// Additional Properties. - internal IsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary additionalProperties) + internal IsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) { - Kind = kind; Name = name; + Kind = kind; AdditionalProperties = additionalProperties; } @@ -45,10 +45,10 @@ internal IsUnknownAdditionalPropertiesDiscriminated() { } - /// The discriminator. - internal string Kind { get; set; } /// The name property. public string Name { get; set; } + /// The discriminator. + internal string Kind { get; set; } /// /// Additional Properties /// diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs index f99125be4c2..f6f16b23b59 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.Serialization.cs @@ -35,10 +35,10 @@ void IJsonModel.Write(Utf8Jso writer.WritePropertyName("age"u8); writer.WriteNumberValue(Age.Value); } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -76,8 +76,8 @@ internal static IsUnknownAdditionalPropertiesDiscriminatedDerived DeserializeIsU } int index = default; float? age = default; - string kind = default; string name = default; + string kind = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -96,20 +96,20 @@ internal static IsUnknownAdditionalPropertiesDiscriminatedDerived DeserializeIsU age = property.Value.GetSingle(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("name"u8)) { - kind = property.Value.GetString(); + name = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("kind"u8)) { - name = property.Value.GetString(); + kind = property.Value.GetString(); continue; } additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } additionalProperties = additionalPropertiesDictionary; - return new IsUnknownAdditionalPropertiesDiscriminatedDerived(kind, name, additionalProperties, index, age); + return new IsUnknownAdditionalPropertiesDiscriminatedDerived(name, kind, additionalProperties, index, age); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs index 5b855e6e938..37a6e6a62c7 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/IsUnknownAdditionalPropertiesDiscriminatedDerived.cs @@ -27,12 +27,12 @@ public IsUnknownAdditionalPropertiesDiscriminatedDerived(string name, int index) } /// Initializes a new instance of . - /// The discriminator. /// The name property. + /// The discriminator. /// Additional Properties. /// The index property. /// The age property. - internal IsUnknownAdditionalPropertiesDiscriminatedDerived(string kind, string name, IDictionary additionalProperties, int index, float? age) : base(kind, name, additionalProperties) + internal IsUnknownAdditionalPropertiesDiscriminatedDerived(string name, string kind, IDictionary additionalProperties, int index, float? age) : base(name, kind, additionalProperties) { Index = index; Age = age; diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index 0aff08989fa..c555c009d70 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonW } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -67,26 +67,26 @@ internal static UnknownExtendsUnknownAdditionalPropertiesDiscriminated Deseriali { return null; } - string kind = "Unknown"; string name = default; + string kind = "Unknown"; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("name"u8)) { - kind = property.Value.GetString(); + name = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("kind"u8)) { - name = property.Value.GetString(); + kind = property.Value.GetString(); continue; } additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } additionalProperties = additionalPropertiesDictionary; - return new UnknownExtendsUnknownAdditionalPropertiesDiscriminated(kind, name, additionalProperties); + return new UnknownExtendsUnknownAdditionalPropertiesDiscriminated(name, kind, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs index d7883a7e0ce..99be480a4d2 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownExtendsUnknownAdditionalPropertiesDiscriminated.cs @@ -14,10 +14,10 @@ namespace _Type.Property.AdditionalProperties.Models internal partial class UnknownExtendsUnknownAdditionalPropertiesDiscriminated : ExtendsUnknownAdditionalPropertiesDiscriminated { /// Initializes a new instance of . - /// The discriminator. /// The name property. + /// The discriminator. /// Additional Properties. - internal UnknownExtendsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary additionalProperties) : base(kind, name, additionalProperties) + internal UnknownExtendsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) : base(name, kind, additionalProperties) { } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs index c5fe3bc20e7..b54e8bb9ce9 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -67,26 +67,26 @@ internal static UnknownIsUnknownAdditionalPropertiesDiscriminated DeserializeUnk { return null; } - string kind = "Unknown"; string name = default; + string kind = "Unknown"; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("name"u8)) { - kind = property.Value.GetString(); + name = property.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("kind"u8)) { - name = property.Value.GetString(); + kind = property.Value.GetString(); continue; } additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } additionalProperties = additionalPropertiesDictionary; - return new UnknownIsUnknownAdditionalPropertiesDiscriminated(kind, name, additionalProperties); + return new UnknownIsUnknownAdditionalPropertiesDiscriminated(name, kind, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs index c66c08d7a0e..a2beac3487c 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/UnknownIsUnknownAdditionalPropertiesDiscriminated.cs @@ -14,10 +14,10 @@ namespace _Type.Property.AdditionalProperties.Models internal partial class UnknownIsUnknownAdditionalPropertiesDiscriminated : IsUnknownAdditionalPropertiesDiscriminated { /// Initializes a new instance of . - /// The discriminator. /// The name property. + /// The discriminator. /// Additional Properties. - internal UnknownIsUnknownAdditionalPropertiesDiscriminated(string kind, string name, IDictionary additionalProperties) : base(kind, name, additionalProperties) + internal UnknownIsUnknownAdditionalPropertiesDiscriminated(string name, string kind, IDictionary additionalProperties) : base(name, kind, additionalProperties) { } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json index c06d4ed8839..10cb5d65640 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json @@ -123,9 +123,9 @@ "Properties": [ { "$id": "17", - "Name": "kind", - "SerializedName": "kind", - "Description": "The discriminator", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", "Type": { "$id": "18", "Kind": "Primitive", @@ -134,13 +134,13 @@ }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false }, { "$id": "19", - "Name": "name", - "SerializedName": "name", - "Description": "The name property", + "Name": "kind", + "SerializedName": "kind", + "Description": "The discriminator", "Type": { "$id": "20", "Kind": "Primitive", @@ -149,7 +149,7 @@ }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": false + "IsDiscriminator": true } ] }, @@ -271,9 +271,9 @@ "Properties": [ { "$id": "36", - "Name": "kind", - "SerializedName": "kind", - "Description": "The discriminator", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", "Type": { "$id": "37", "Kind": "Primitive", @@ -282,13 +282,13 @@ }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false }, { "$id": "38", - "Name": "name", - "SerializedName": "name", - "Description": "The name property", + "Name": "kind", + "SerializedName": "kind", + "Description": "The discriminator", "Type": { "$id": "39", "Kind": "Primitive", @@ -297,7 +297,7 @@ }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": false + "IsDiscriminator": true } ] }, diff --git a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsUnknownDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsUnknownDiscriminated.cs index d433c1e5c66..276a9d9df40 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsUnknownDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsUnknownDiscriminated.cs @@ -28,8 +28,8 @@ public void Example_ExtendsUnknownDiscriminated_GetExtendsUnknownDiscriminated_S Response response = client.GetExtendsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -41,8 +41,8 @@ public async Task Example_ExtendsUnknownDiscriminated_GetExtendsUnknownDiscrimin Response response = await client.GetExtendsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -72,8 +72,8 @@ public void Example_ExtendsUnknownDiscriminated_GetExtendsUnknownDiscriminated_A Response response = client.GetExtendsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -85,8 +85,8 @@ public async Task Example_ExtendsUnknownDiscriminated_GetExtendsUnknownDiscrimin Response response = await client.GetExtendsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -116,8 +116,8 @@ public void Example_ExtendsUnknownDiscriminated_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { index = 1234, - kind = "derived", name = "", + kind = "derived", }); Response response = client.Put(content); @@ -133,8 +133,8 @@ public async Task Example_ExtendsUnknownDiscriminated_Put_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { index = 1234, - kind = "derived", name = "", + kind = "derived", }); Response response = await client.PutAsync(content); @@ -171,8 +171,8 @@ public void Example_ExtendsUnknownDiscriminated_Put_AllParameters() { index = 1234, age = 123.45F, - kind = "derived", name = "", + kind = "derived", }); Response response = client.Put(content); @@ -189,8 +189,8 @@ public async Task Example_ExtendsUnknownDiscriminated_Put_AllParameters_Async() { index = 1234, age = 123.45F, - kind = "derived", name = "", + kind = "derived", }); Response response = await client.PutAsync(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_IsUnknownDiscriminated.cs b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_IsUnknownDiscriminated.cs index 45b8230332e..fb2e4513c14 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_IsUnknownDiscriminated.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_IsUnknownDiscriminated.cs @@ -28,8 +28,8 @@ public void Example_IsUnknownDiscriminated_GetIsUnknownDiscriminated_ShortVersio Response response = client.GetIsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -41,8 +41,8 @@ public async Task Example_IsUnknownDiscriminated_GetIsUnknownDiscriminated_Short Response response = await client.GetIsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -72,8 +72,8 @@ public void Example_IsUnknownDiscriminated_GetIsUnknownDiscriminated_AllParamete Response response = client.GetIsUnknownDiscriminated(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -85,8 +85,8 @@ public async Task Example_IsUnknownDiscriminated_GetIsUnknownDiscriminated_AllPa Response response = await client.GetIsUnknownDiscriminatedAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -116,8 +116,8 @@ public void Example_IsUnknownDiscriminated_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { index = 1234, - kind = "derived", name = "", + kind = "derived", }); Response response = client.Put(content); @@ -133,8 +133,8 @@ public async Task Example_IsUnknownDiscriminated_Put_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { index = 1234, - kind = "derived", name = "", + kind = "derived", }); Response response = await client.PutAsync(content); @@ -171,8 +171,8 @@ public void Example_IsUnknownDiscriminated_Put_AllParameters() { index = 1234, age = 123.45F, - kind = "derived", name = "", + kind = "derived", }); Response response = client.Put(content); @@ -189,8 +189,8 @@ public async Task Example_IsUnknownDiscriminated_Put_AllParameters_Async() { index = 1234, age = 123.45F, - kind = "derived", name = "", + kind = "derived", }); Response response = await client.PutAsync(content); diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml b/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml index 4a546b31a18..bbf14a40989 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml @@ -82,15 +82,15 @@ using RequestContent content = RequestContent.Create(new { requiredString = "", optionalInt = 1234, - kind = "A", optionalString = "", + kind = "A", }); Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> @@ -120,15 +120,15 @@ using RequestContent content = RequestContent.Create(new { requiredString = "", optionalInt = 1234, - kind = "A", optionalString = "", + kind = "A", }); Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> @@ -457,8 +457,8 @@ Console.WriteLine(result.GetProperty("requiredInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -568,9 +568,9 @@ Console.WriteLine(result.GetProperty("nonRequiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredReadonlyInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -658,8 +658,8 @@ Console.WriteLine(result.GetProperty("requiredInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -769,9 +769,9 @@ Console.WriteLine(result.GetProperty("nonRequiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredReadonlyInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -1855,8 +1855,8 @@ using RequestContent content = RequestContent.Create(new requiredModel = new { requiredString = "", - discriminatorProperty = "A", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -1929,9 +1929,9 @@ using RequestContent content = RequestContent.Create(new requiredModel = new { requiredString = "", - discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -2021,8 +2021,8 @@ using RequestContent content = RequestContent.Create(new requiredModel = new { requiredString = "", - discriminatorProperty = "A", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -2095,9 +2095,9 @@ using RequestContent content = RequestContent.Create(new requiredModel = new { requiredString = "", - discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -2875,8 +2875,8 @@ ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); Response response = await client.AnalyzeConversationAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); +Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); ]]> This sample shows how to call AnalyzeConversationAsync with all parameters and parse the result. @@ -2901,8 +2901,8 @@ ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); Response response = client.AnalyzeConversation(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); +Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); ]]> This sample shows how to call AnalyzeConversation with all parameters and parse the result. @@ -2961,8 +2961,8 @@ ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); Response response = await client.GetSingleBaseAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetSingleBaseAsync with all parameters and parse the result. @@ -2986,8 +2986,8 @@ ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); Response response = client.GetSingleBase(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetSingleBase with all parameters and parse the result. diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.Serialization.cs index 41e90520d1b..ae39dc1f4ac 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.Serialization.cs @@ -28,8 +28,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); - writer.WritePropertyName("discriminatorProperty"u8); - writer.WriteStringValue(DiscriminatorProperty); if (Optional.IsDefined(OptionalPropertyOnBase)) { writer.WritePropertyName("optionalPropertyOnBase"u8); @@ -37,6 +35,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WritePropertyName("requiredPropertyOnBase"u8); writer.WriteNumberValue(RequiredPropertyOnBase); + writer.WritePropertyName("discriminatorProperty"u8); + writer.WriteStringValue(DiscriminatorProperty); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.cs index d042e54ff19..c89a2d37bbb 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.cs @@ -57,15 +57,15 @@ protected BaseModelWithDiscriminator(int requiredPropertyOnBase) } /// Initializes a new instance of . - /// Discriminator. /// Optional property on base. /// Required property on base. + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal BaseModelWithDiscriminator(string discriminatorProperty, string optionalPropertyOnBase, int requiredPropertyOnBase, IDictionary serializedAdditionalRawData) + internal BaseModelWithDiscriminator(string optionalPropertyOnBase, int requiredPropertyOnBase, string discriminatorProperty, IDictionary serializedAdditionalRawData) { - DiscriminatorProperty = discriminatorProperty; OptionalPropertyOnBase = optionalPropertyOnBase; RequiredPropertyOnBase = requiredPropertyOnBase; + DiscriminatorProperty = discriminatorProperty; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -74,11 +74,11 @@ internal BaseModelWithDiscriminator() { } - /// Discriminator. - internal string DiscriminatorProperty { get; set; } /// Optional property on base. public string OptionalPropertyOnBase { get; set; } /// Required property on base. public int RequiredPropertyOnBase { get; set; } + /// Discriminator. + internal string DiscriminatorProperty { get; set; } } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.Serialization.cs index 0999efe3369..8fea064534d 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.Serialization.cs @@ -30,8 +30,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStartObject(); writer.WritePropertyName("requiredString"u8); writer.WriteStringValue(RequiredString); - writer.WritePropertyName("discriminatorProperty"u8); - writer.WriteStringValue(DiscriminatorProperty); if (Optional.IsDefined(OptionalPropertyOnBase)) { writer.WritePropertyName("optionalPropertyOnBase"u8); @@ -39,6 +37,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WritePropertyName("requiredPropertyOnBase"u8); writer.WriteNumberValue(RequiredPropertyOnBase); + writer.WritePropertyName("discriminatorProperty"u8); + writer.WriteStringValue(DiscriminatorProperty); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,9 +78,9 @@ internal static DerivedModelWithDiscriminatorA DeserializeDerivedModelWithDiscri return null; } string requiredString = default; - string discriminatorProperty = default; string optionalPropertyOnBase = default; int requiredPropertyOnBase = default; + string discriminatorProperty = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,11 +90,6 @@ internal static DerivedModelWithDiscriminatorA DeserializeDerivedModelWithDiscri requiredString = property.Value.GetString(); continue; } - if (property.NameEquals("discriminatorProperty"u8)) - { - discriminatorProperty = property.Value.GetString(); - continue; - } if (property.NameEquals("optionalPropertyOnBase"u8)) { optionalPropertyOnBase = property.Value.GetString(); @@ -105,13 +100,18 @@ internal static DerivedModelWithDiscriminatorA DeserializeDerivedModelWithDiscri requiredPropertyOnBase = property.Value.GetInt32(); continue; } + if (property.NameEquals("discriminatorProperty"u8)) + { + discriminatorProperty = property.Value.GetString(); + continue; + } if (options.Format != "W") { additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new DerivedModelWithDiscriminatorA(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData, requiredString); + return new DerivedModelWithDiscriminatorA(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData, requiredString); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.cs index 51674cbc93a..a8688d34c42 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.cs @@ -27,12 +27,12 @@ public DerivedModelWithDiscriminatorA(int requiredPropertyOnBase, string require } /// Initializes a new instance of . - /// Discriminator. /// Optional property on base. /// Required property on base. + /// Discriminator. /// Keeps track of any properties unknown to the library. /// Required string. - internal DerivedModelWithDiscriminatorA(string discriminatorProperty, string optionalPropertyOnBase, int requiredPropertyOnBase, IDictionary serializedAdditionalRawData, string requiredString) : base(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData) + internal DerivedModelWithDiscriminatorA(string optionalPropertyOnBase, int requiredPropertyOnBase, string discriminatorProperty, IDictionary serializedAdditionalRawData, string requiredString) : base(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData) { RequiredString = requiredString; } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.Serialization.cs index ae44651b5a9..c7a553d23f0 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.Serialization.cs @@ -30,8 +30,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStartObject(); writer.WritePropertyName("requiredInt"u8); writer.WriteNumberValue(RequiredInt); - writer.WritePropertyName("discriminatorProperty"u8); - writer.WriteStringValue(DiscriminatorProperty); if (Optional.IsDefined(OptionalPropertyOnBase)) { writer.WritePropertyName("optionalPropertyOnBase"u8); @@ -39,6 +37,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WritePropertyName("requiredPropertyOnBase"u8); writer.WriteNumberValue(RequiredPropertyOnBase); + writer.WritePropertyName("discriminatorProperty"u8); + writer.WriteStringValue(DiscriminatorProperty); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,9 +78,9 @@ internal static DerivedModelWithDiscriminatorB DeserializeDerivedModelWithDiscri return null; } int requiredInt = default; - string discriminatorProperty = default; string optionalPropertyOnBase = default; int requiredPropertyOnBase = default; + string discriminatorProperty = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,11 +90,6 @@ internal static DerivedModelWithDiscriminatorB DeserializeDerivedModelWithDiscri requiredInt = property.Value.GetInt32(); continue; } - if (property.NameEquals("discriminatorProperty"u8)) - { - discriminatorProperty = property.Value.GetString(); - continue; - } if (property.NameEquals("optionalPropertyOnBase"u8)) { optionalPropertyOnBase = property.Value.GetString(); @@ -105,13 +100,18 @@ internal static DerivedModelWithDiscriminatorB DeserializeDerivedModelWithDiscri requiredPropertyOnBase = property.Value.GetInt32(); continue; } + if (property.NameEquals("discriminatorProperty"u8)) + { + discriminatorProperty = property.Value.GetString(); + continue; + } if (options.Format != "W") { additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new DerivedModelWithDiscriminatorB(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData, requiredInt); + return new DerivedModelWithDiscriminatorB(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData, requiredInt); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.cs index 7657408d904..6feb617f145 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.cs @@ -23,12 +23,12 @@ public DerivedModelWithDiscriminatorB(int requiredPropertyOnBase, int requiredIn } /// Initializes a new instance of . - /// Discriminator. /// Optional property on base. /// Required property on base. + /// Discriminator. /// Keeps track of any properties unknown to the library. /// Required int. - internal DerivedModelWithDiscriminatorB(string discriminatorProperty, string optionalPropertyOnBase, int requiredPropertyOnBase, IDictionary serializedAdditionalRawData, int requiredInt) : base(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData) + internal DerivedModelWithDiscriminatorB(string optionalPropertyOnBase, int requiredPropertyOnBase, string discriminatorProperty, IDictionary serializedAdditionalRawData, int requiredInt) : base(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData) { RequiredInt = requiredInt; } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.Serialization.cs index 08b527d0459..f93b5c099a1 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.cs index e9f9df17a25..d4f57f217d9 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.cs @@ -53,13 +53,13 @@ protected SingleBase(int size) } /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal SingleBase(string kind, int size, IDictionary serializedAdditionalRawData) + internal SingleBase(int size, string kind, IDictionary serializedAdditionalRawData) { - Kind = kind; Size = size; + Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -68,9 +68,9 @@ internal SingleBase() { } - /// Discriminator. - internal string Kind { get; set; } /// Gets the size. public int Size { get; } + /// Discriminator. + internal string Kind { get; set; } } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.Serialization.cs index ece35a69b49..a75b44885a8 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.Serialization.cs @@ -28,8 +28,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); - writer.WritePropertyName("discriminatorProperty"u8); - writer.WriteStringValue(DiscriminatorProperty); if (Optional.IsDefined(OptionalPropertyOnBase)) { writer.WritePropertyName("optionalPropertyOnBase"u8); @@ -37,6 +35,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WritePropertyName("requiredPropertyOnBase"u8); writer.WriteNumberValue(RequiredPropertyOnBase); + writer.WritePropertyName("discriminatorProperty"u8); + writer.WriteStringValue(DiscriminatorProperty); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,18 +75,13 @@ internal static UnknownBaseModelWithDiscriminator DeserializeUnknownBaseModelWit { return null; } - string discriminatorProperty = "Unknown"; string optionalPropertyOnBase = default; int requiredPropertyOnBase = default; + string discriminatorProperty = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("discriminatorProperty"u8)) - { - discriminatorProperty = property.Value.GetString(); - continue; - } if (property.NameEquals("optionalPropertyOnBase"u8)) { optionalPropertyOnBase = property.Value.GetString(); @@ -97,13 +92,18 @@ internal static UnknownBaseModelWithDiscriminator DeserializeUnknownBaseModelWit requiredPropertyOnBase = property.Value.GetInt32(); continue; } + if (property.NameEquals("discriminatorProperty"u8)) + { + discriminatorProperty = property.Value.GetString(); + continue; + } if (options.Format != "W") { additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownBaseModelWithDiscriminator(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData); + return new UnknownBaseModelWithDiscriminator(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.cs index d76c018a160..01c20b60b4c 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.cs @@ -14,11 +14,11 @@ namespace ModelsTypeSpec.Models internal partial class UnknownBaseModelWithDiscriminator : BaseModelWithDiscriminator { /// Initializes a new instance of . - /// Discriminator. /// Optional property on base. /// Required property on base. + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal UnknownBaseModelWithDiscriminator(string discriminatorProperty, string optionalPropertyOnBase, int requiredPropertyOnBase, IDictionary serializedAdditionalRawData) : base(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData) + internal UnknownBaseModelWithDiscriminator(string optionalPropertyOnBase, int requiredPropertyOnBase, string discriminatorProperty, IDictionary serializedAdditionalRawData) : base(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData) { } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.Serialization.cs index e8f20589347..5d329aeb039 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static UnknownSingleBase DeserializeUnknownSingleBase(JsonElement eleme { return null; } - string kind = "Unknown"; int size = default; + string kind = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static UnknownSingleBase DeserializeUnknownSingleBase(JsonElement eleme } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownSingleBase(kind, size, serializedAdditionalRawData); + return new UnknownSingleBase(size, kind, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.cs index fb3a5859638..c7bbb01f01e 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.cs @@ -14,10 +14,10 @@ namespace ModelsTypeSpec.Models internal partial class UnknownSingleBase : SingleBase { /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal UnknownSingleBase(string kind, int size, IDictionary serializedAdditionalRawData) : base(kind, size, serializedAdditionalRawData) + internal UnknownSingleBase(int size, string kind, IDictionary serializedAdditionalRawData) : base(size, kind, serializedAdditionalRawData) { } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs b/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs index 0fde8585361..bf6d05a0ecd 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs @@ -318,12 +318,12 @@ public static ErrorModel ErrorModel(string message = null, ErrorModel innerError } /// Initializes a new instance of . - /// Discriminator. /// + /// Discriminator. /// A new instance for mocking. - public static SingleBase SingleBase(string kind = null, int size = default) + public static SingleBase SingleBase(int size = default, string kind = null) { - return new UnknownSingleBase(kind, size, serializedAdditionalRawData: null); + return new UnknownSingleBase(size, kind, serializedAdditionalRawData: null); } /// Initializes a new instance of . diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index ea5f4c88f70..9e0ff749b58 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -227,33 +227,33 @@ "Properties": [ { "$id": "30", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "optionalString", + "SerializedName": "optionalString", + "Description": "Optional string.", "Type": { "$id": "31", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsRequired": true, + "IsRequired": false, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false }, { "$id": "32", - "Name": "optionalString", - "SerializedName": "optionalString", - "Description": "Optional string.", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "33", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsRequired": false, + "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": false + "IsDiscriminator": true } ] }, @@ -987,48 +987,48 @@ "Properties": [ { "$id": "125", - "Name": "discriminatorProperty", - "SerializedName": "discriminatorProperty", - "Description": "Discriminator", + "Name": "optionalPropertyOnBase", + "SerializedName": "optionalPropertyOnBase", + "Description": "Optional property on base", "Type": { "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsRequired": true, + "IsRequired": false, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false }, { "$id": "127", - "Name": "optionalPropertyOnBase", - "SerializedName": "optionalPropertyOnBase", - "Description": "Optional property on base", + "Name": "requiredPropertyOnBase", + "SerializedName": "requiredPropertyOnBase", + "Description": "Required property on base", "Type": { "$id": "128", "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, - "IsRequired": false, + "IsRequired": true, "IsReadOnly": false, "IsDiscriminator": false }, { "$id": "129", - "Name": "requiredPropertyOnBase", - "SerializedName": "requiredPropertyOnBase", - "Description": "Required property on base", + "Name": "discriminatorProperty", + "SerializedName": "discriminatorProperty", + "Description": "Discriminator", "Type": { "$id": "130", "Kind": "Primitive", - "Name": "Int32", + "Name": "String", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": false + "IsDiscriminator": true } ] }, @@ -2732,33 +2732,33 @@ "Properties": [ { "$id": "341", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "size", + "SerializedName": "size", + "Description": "", "Type": { "$id": "342", "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false }, { "$id": "343", - "Name": "size", - "SerializedName": "size", - "Description": "", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "344", "Kind": "Primitive", - "Name": "Int32", + "Name": "String", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": false + "IsDiscriminator": true } ] }, diff --git a/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs b/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs index 536c1a1e0d9..fa8a4e9b244 100644 --- a/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs +++ b/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs @@ -97,15 +97,15 @@ public void Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_Al { requiredString = "", optionalInt = 1234, - kind = "A", optionalString = "", + kind = "A", }); Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -119,15 +119,15 @@ public async Task Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnB { requiredString = "", optionalInt = 1234, - kind = "A", optionalString = "", + kind = "A", }); Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -322,8 +322,8 @@ public void Example_ModelsTypeSpec_InputToRoundTrip_ShortVersion() Console.WriteLine(result.GetProperty("requiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -405,8 +405,8 @@ public async Task Example_ModelsTypeSpec_InputToRoundTrip_ShortVersion_Async() Console.WriteLine(result.GetProperty("requiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -601,9 +601,9 @@ public void Example_ModelsTypeSpec_InputToRoundTrip_AllParameters() Console.WriteLine(result.GetProperty("nonRequiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredReadonlyInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -722,9 +722,9 @@ public async Task Example_ModelsTypeSpec_InputToRoundTrip_AllParameters_Async() Console.WriteLine(result.GetProperty("nonRequiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredReadonlyInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -1722,8 +1722,8 @@ public void Example_ModelsTypeSpec_RoundTripToOutput_ShortVersion() requiredModel = new { requiredString = "", - discriminatorProperty = "A", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -1795,8 +1795,8 @@ public async Task Example_ModelsTypeSpec_RoundTripToOutput_ShortVersion_Async() requiredModel = new { requiredString = "", - discriminatorProperty = "A", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -1966,9 +1966,9 @@ public void Example_ModelsTypeSpec_RoundTripToOutput_AllParameters() requiredModel = new { requiredString = "", - discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -2062,9 +2062,9 @@ public async Task Example_ModelsTypeSpec_RoundTripToOutput_AllParameters_Async() requiredModel = new { requiredString = "", - discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -3004,8 +3004,8 @@ public void Example_ModelsTypeSpec_AnalyzeConversation_ShortVersion() Response response = client.AnalyzeConversation(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); + Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); } [Test] @@ -3018,8 +3018,8 @@ public async Task Example_ModelsTypeSpec_AnalyzeConversation_ShortVersion_Async( Response response = await client.AnalyzeConversationAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); + Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); } [Test] @@ -3052,9 +3052,9 @@ public void Example_ModelsTypeSpec_AnalyzeConversation_AllParameters() Response response = client.AnalyzeConversation(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); + Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); } [Test] @@ -3067,9 +3067,9 @@ public async Task Example_ModelsTypeSpec_AnalyzeConversation_AllParameters_Async Response response = await client.AnalyzeConversationAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); + Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); } [Test] @@ -3102,8 +3102,8 @@ public void Example_ModelsTypeSpec_GetSingleBase_ShortVersion() Response response = client.GetSingleBase(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -3116,8 +3116,8 @@ public async Task Example_ModelsTypeSpec_GetSingleBase_ShortVersion_Async() Response response = await client.GetSingleBaseAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -3150,8 +3150,8 @@ public void Example_ModelsTypeSpec_GetSingleBase_AllParameters() Response response = client.GetSingleBase(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -3164,8 +3164,8 @@ public async Task Example_ModelsTypeSpec_GetSingleBase_AllParameters_Async() Response response = await client.GetSingleBaseAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] diff --git a/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs b/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs index 14cfc6b94e6..11c7639a3d0 100644 --- a/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs +++ b/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs @@ -63,8 +63,8 @@ public async Task ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_AllP { requiredString = "", optionalInt = 1234, - kind = "A", optionalString = "", + kind = "A", }); Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(content); } @@ -774,8 +774,8 @@ public async Task ModelsTypeSpec_RoundTripToOutput_ShortVersion() requiredModel = new { requiredString = "", - discriminatorProperty = "A", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -894,9 +894,9 @@ public async Task ModelsTypeSpec_RoundTripToOutput_AllParameters() requiredModel = new { requiredString = "", - discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, + discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Docs/Pets.xml b/test/TestProjects/PetStore-TypeSpec/src/Generated/Docs/Pets.xml index 8570ed56390..13692860576 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Docs/Pets.xml +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Docs/Pets.xml @@ -463,8 +463,8 @@ Pets client = new PetStoreClient(endpoint).GetPetsClient(); Response response = await client.GetFishAsync(null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetFishAsync with all parameters and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> @@ -488,8 +488,8 @@ Pets client = new PetStoreClient(endpoint).GetPetsClient(); Response response = client.GetFish(null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> This sample shows how to call GetFish with all parameters and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); +Console.WriteLine(result.GetProperty("kind").ToString()); ]]> diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.Serialization.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.Serialization.cs index 47dcae311d3..4afb338acaa 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.Serialization.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opti } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.cs index 1ce5549989f..2d07b54c9b8 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.cs @@ -57,13 +57,13 @@ protected Fish(int size) } /// Initializes a new instance of . - /// Discriminator. /// The size of the fish. + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal Fish(string kind, int size, IDictionary serializedAdditionalRawData) + internal Fish(int size, string kind, IDictionary serializedAdditionalRawData) { - Kind = kind; Size = size; + Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,9 +72,9 @@ internal Fish() { } - /// Discriminator. - internal string Kind { get; set; } /// The size of the fish. public int Size { get; } + /// Discriminator. + internal string Kind { get; set; } } } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.Serialization.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.Serialization.cs index b9169924089..e16884a8a10 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.Serialization.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.Serialization.cs @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt writer.WriteStartObject(); writer.WritePropertyName("bite"u8); writer.WriteStringValue(Bite); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -73,8 +73,8 @@ internal static Shark DeserializeShark(JsonElement element, ModelReaderWriterOpt return null; } string bite = default; - string kind = default; int size = default; + string kind = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -84,14 +84,14 @@ internal static Shark DeserializeShark(JsonElement element, ModelReaderWriterOpt bite = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } if (options.Format != "W") @@ -100,7 +100,7 @@ internal static Shark DeserializeShark(JsonElement element, ModelReaderWriterOpt } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new Shark(kind, size, serializedAdditionalRawData, bite); + return new Shark(size, kind, serializedAdditionalRawData, bite); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.cs index 882180798aa..be4b3521b02 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.cs @@ -27,11 +27,11 @@ internal Shark(int size, string bite) : base(size) } /// Initializes a new instance of . - /// Discriminator. /// The size of the fish. + /// Discriminator. /// Keeps track of any properties unknown to the library. /// The bite of the shark. - internal Shark(string kind, int size, IDictionary serializedAdditionalRawData, string bite) : base(kind, size, serializedAdditionalRawData) + internal Shark(int size, string kind, IDictionary serializedAdditionalRawData, string bite) : base(size, kind, serializedAdditionalRawData) { Bite = bite; } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.Serialization.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.Serialization.cs index 70a7ddcb88a..94f61a642d9 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.Serialization.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.Serialization.cs @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opti writer.WriteStartObject(); writer.WritePropertyName("fat"u8); writer.WriteNumberValue(Fat); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -73,8 +73,8 @@ internal static Tuna DeserializeTuna(JsonElement element, ModelReaderWriterOptio return null; } int fat = default; - string kind = default; int size = default; + string kind = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -84,14 +84,14 @@ internal static Tuna DeserializeTuna(JsonElement element, ModelReaderWriterOptio fat = property.Value.GetInt32(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } if (options.Format != "W") @@ -100,7 +100,7 @@ internal static Tuna DeserializeTuna(JsonElement element, ModelReaderWriterOptio } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new Tuna(kind, size, serializedAdditionalRawData, fat); + return new Tuna(size, kind, serializedAdditionalRawData, fat); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.cs index 731995b67b2..d06aae8fe0b 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.cs @@ -23,11 +23,11 @@ internal Tuna(int size, int fat) : base(size) } /// Initializes a new instance of . - /// Discriminator. /// The size of the fish. + /// Discriminator. /// Keeps track of any properties unknown to the library. /// The amount of fat of the tuna. - internal Tuna(string kind, int size, IDictionary serializedAdditionalRawData, int fat) : base(kind, size, serializedAdditionalRawData) + internal Tuna(int size, string kind, IDictionary serializedAdditionalRawData, int fat) : base(size, kind, serializedAdditionalRawData) { Fat = fat; } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.Serialization.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.Serialization.cs index f8c94362290..2f8f9a2d63f 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.Serialization.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opti } writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); writer.WritePropertyName("size"u8); writer.WriteNumberValue(Size); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static UnknownFish DeserializeUnknownFish(JsonElement element, ModelRea { return null; } - string kind = "Unknown"; int size = default; + string kind = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static UnknownFish DeserializeUnknownFish(JsonElement element, ModelRea } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownFish(kind, size, serializedAdditionalRawData); + return new UnknownFish(size, kind, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.cs index 84ef6bf889d..8b78414676a 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.cs @@ -14,10 +14,10 @@ namespace PetStore.Models internal partial class UnknownFish : Fish { /// Initializes a new instance of . - /// Discriminator. /// The size of the fish. + /// Discriminator. /// Keeps track of any properties unknown to the library. - internal UnknownFish(string kind, int size, IDictionary serializedAdditionalRawData) : base(kind, size, serializedAdditionalRawData) + internal UnknownFish(int size, string kind, IDictionary serializedAdditionalRawData) : base(size, kind, serializedAdditionalRawData) { } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/PetStoreModelFactory.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/PetStoreModelFactory.cs index f6682ef4d5e..30e13cd6a72 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/PetStoreModelFactory.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/PetStoreModelFactory.cs @@ -11,12 +11,12 @@ namespace PetStore.Models public static partial class PetStoreModelFactory { /// Initializes a new instance of . - /// Discriminator. /// The size of the fish. + /// Discriminator. /// A new instance for mocking. - public static Fish Fish(string kind = null, int size = default) + public static Fish Fish(int size = default, string kind = null) { - return new UnknownFish(kind, size, serializedAdditionalRawData: null); + return new UnknownFish(size, kind, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -25,7 +25,7 @@ public static Fish Fish(string kind = null, int size = default) /// A new instance for mocking. public static Shark Shark(int size = default, string bite = null) { - return new Shark("shark", size, serializedAdditionalRawData: null, bite); + return new Shark(size, "shark", serializedAdditionalRawData: null, bite); } /// Initializes a new instance of . @@ -34,7 +34,7 @@ public static Shark Shark(int size = default, string bite = null) /// A new instance for mocking. public static Tuna Tuna(int size = default, int fat = default) { - return new Tuna("tuna", size, serializedAdditionalRawData: null, fat); + return new Tuna(size, "tuna", serializedAdditionalRawData: null, fat); } } } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json index 131825fd7a2..dcd1e607126 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json @@ -96,33 +96,33 @@ "Properties": [ { "$id": "13", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "size", + "SerializedName": "size", + "Description": "The size of the fish", "Type": { "$id": "14", "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": true + "IsDiscriminator": false }, { "$id": "15", - "Name": "size", - "SerializedName": "size", - "Description": "The size of the fish", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "16", "Kind": "Primitive", - "Name": "Int32", + "Name": "String", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false, - "IsDiscriminator": false + "IsDiscriminator": true } ] }, diff --git a/test/TestProjects/PetStore-TypeSpec/tests/Generated/Samples/Samples_Pets.cs b/test/TestProjects/PetStore-TypeSpec/tests/Generated/Samples/Samples_Pets.cs index 74648938ef4..4cd118cbb15 100644 --- a/test/TestProjects/PetStore-TypeSpec/tests/Generated/Samples/Samples_Pets.cs +++ b/test/TestProjects/PetStore-TypeSpec/tests/Generated/Samples/Samples_Pets.cs @@ -501,8 +501,8 @@ public void Example_Pets_GetFish_ShortVersion() Response response = client.GetFish(null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -515,8 +515,8 @@ public async Task Example_Pets_GetFish_ShortVersion_Async() Response response = await client.GetFishAsync(null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -549,8 +549,8 @@ public void Example_Pets_GetFish_AllParameters() Response response = client.GetFish("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] @@ -563,8 +563,8 @@ public async Task Example_Pets_GetFish_AllParameters_Async() Response response = await client.GetFishAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("size").ToString()); + Console.WriteLine(result.GetProperty("kind").ToString()); } [Test] From bb30a0d13235fcc3e8798c9bb1b52866f14cfb13 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Tue, 19 Mar 2024 16:10:24 +0800 Subject: [PATCH 20/60] do not print IsDiscriminator: false --- .../Emitter.Csharp/src/type/converter.ts | 2 +- .../api-key/src/Generated/tspCodeModel.json | 3 +- .../custom/src/Generated/tspCodeModel.json | 3 +- .../oauth2/src/Generated/tspCodeModel.json | 12 +- .../union/src/Generated/tspCodeModel.json | 9 +- .../access/src/Generated/tspCodeModel.json | 30 +- .../usage/src/Generated/tspCodeModel.json | 9 +- .../basic/src/Generated/tspCodeModel.json | 57 +- .../src/Generated/tspCodeModel.json | 42 +- .../standard/src/Generated/tspCodeModel.json | 66 +- .../traits/src/Generated/tspCodeModel.json | 12 +- .../naming/src/Generated/tspCodeModel.json | 15 +- .../bytes/src/Generated/tspCodeModel.json | 12 +- .../datetime/src/Generated/tspCodeModel.json | 15 +- .../duration/src/Generated/tspCodeModel.json | 15 +- .../src/Generated/tspCodeModel.json | 3 +- .../spread/src/Generated/tspCodeModel.json | 27 +- .../src/Generated/tspCodeModel.json | 9 +- .../pageable/src/Generated/tspCodeModel.json | 9 +- .../src/Generated/tspCodeModel.json | 18 +- .../json/src/Generated/tspCodeModel.json | 3 +- .../src/Generated/tspCodeModel.json | 105 +-- .../array/src/Generated/tspCodeModel.json | 6 +- .../src/Generated/tspCodeModel.json | 6 +- .../src/Generated/tspCodeModel.json | 6 +- .../src/Generated/tspCodeModel.json | 9 +- .../recursive/src/Generated/tspCodeModel.json | 6 +- .../src/Generated/tspCodeModel.json | 15 +- .../usage/src/Generated/tspCodeModel.json | 9 +- .../src/Generated/tspCodeModel.json | 51 +- .../nullable/src/Generated/tspCodeModel.json | 39 +- .../src/Generated/tspCodeModel.json | 45 +- .../src/Generated/tspCodeModel.json | 87 +- .../union/src/Generated/tspCodeModel.json | 102 +-- .../custom/src/Generated/tspCodeModel.json | 3 +- .../src/Generated/tspCodeModel.json | 3 +- .../src/Generated/tspCodeModel.json | 189 ++-- .../src/Generated/tspCodeModel.json | 3 +- .../src/Generated/tspCodeModel.json | 117 +-- .../src/Generated/tspCodeModel.json | 165 ++-- .../src/Generated/tspCodeModel.json | 87 +- .../src/Generated/tspCodeModel.json | 3 +- .../src/Generated/tspCodeModel.json | 33 +- .../src/Generated/tspCodeModel.json | 192 ++--- .../src/Generated/tspCodeModel.json | 420 +++------ .../src/Generated/tspCodeModel.json | 96 +-- .../src/Generated/tspCodeModel.json | 3 +- .../src/Generated/tspCodeModel.json | 33 +- .../src/Generated/tspCodeModel.json | 48 +- .../src/Generated/tspCodeModel.json | 45 +- .../src/Generated/tspCodeModel.json | 114 +-- .../src/Generated/tspCodeModel.json | 39 +- .../src/Generated/tspCodeModel.json | 807 ++++++------------ .../src/Generated/tspCodeModel.json | 123 +-- 54 files changed, 1127 insertions(+), 2253 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 327c0eeea4b..adfbe288613 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -564,7 +564,7 @@ function fromSdkModelPropertyType( ), IsRequired: isRequired, IsReadOnly: isReadOnly, - IsDiscriminator: isDiscriminator + IsDiscriminator: isDiscriminator === true ? true : undefined // TODO: keep backward compatible to ease comparison. remove this after TCGC is merged }; return modelProperty; diff --git a/test/CadlRanchProjects/authentication/api-key/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/api-key/src/Generated/tspCodeModel.json index e6319a7b923..633832c8575 100644 --- a/test/CadlRanchProjects/authentication/api-key/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/api-key/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/authentication/http/custom/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/http/custom/src/Generated/tspCodeModel.json index ad6da3b5028..6800ba4b25b 100644 --- a/test/CadlRanchProjects/authentication/http/custom/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/http/custom/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json index fd2b80f3dbb..d2d8dd64cdf 100644 --- a/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json @@ -82,8 +82,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -104,8 +103,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "14", @@ -123,8 +121,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "16", @@ -138,8 +135,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json index 05dbe0ac029..38b4ee4f9b0 100644 --- a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json @@ -79,8 +79,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "11", @@ -98,8 +97,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "13", @@ -113,8 +111,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json index 310b1617b6a..6a74f915527 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json @@ -27,8 +27,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -54,8 +53,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -81,8 +79,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -108,8 +105,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -135,8 +131,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -162,8 +157,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -198,8 +192,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -231,14 +224,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -271,8 +262,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "31", diff --git a/test/CadlRanchProjects/azure/client-generator-core/usage/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/client-generator-core/usage/src/Generated/tspCodeModel.json index 88437872390..093f668ff86 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/usage/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/client-generator-core/usage/src/Generated/tspCodeModel.json @@ -26,8 +26,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -52,8 +51,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -79,8 +77,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json index 225f070d479..314728a3a17 100644 --- a/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json @@ -73,8 +73,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "10", @@ -88,8 +87,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "12", @@ -121,8 +119,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "17", @@ -136,8 +133,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "19", @@ -151,16 +147,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "21", @@ -174,8 +168,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -206,8 +199,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "26", @@ -221,8 +213,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -247,8 +238,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -275,8 +265,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "34", @@ -290,8 +279,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -334,16 +322,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "42", @@ -357,8 +343,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -404,16 +389,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "50", @@ -427,8 +410,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -463,8 +445,7 @@ "$ref": "28" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/azure/core/lro/rpc-legacy/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/lro/rpc-legacy/src/Generated/tspCodeModel.json index 7c2c1a4abd8..475bd508cb7 100644 --- a/test/CadlRanchProjects/azure/core/lro/rpc-legacy/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/lro/rpc-legacy/src/Generated/tspCodeModel.json @@ -97,8 +97,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "14", @@ -112,8 +111,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "16", @@ -124,8 +122,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "17", @@ -171,8 +168,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "24", @@ -186,8 +182,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "26", @@ -201,8 +196,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "28", @@ -219,8 +213,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "30", @@ -248,8 +241,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "34", @@ -260,28 +252,24 @@ "$ref": "31" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "35", @@ -301,8 +289,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -336,8 +323,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json index b8a5348c523..fbb50d84ea9 100644 --- a/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json @@ -91,8 +91,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "13", @@ -106,8 +105,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -132,8 +130,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "18", @@ -144,8 +141,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "19", @@ -173,8 +169,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "23", @@ -188,8 +183,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "25", @@ -203,8 +197,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "27", @@ -221,8 +214,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "29", @@ -250,8 +242,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "33", @@ -262,20 +253,17 @@ "$ref": "30" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -306,8 +294,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "37", @@ -318,8 +305,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "38", @@ -330,8 +316,7 @@ "$ref": "20" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "39", @@ -359,8 +344,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "43", @@ -374,14 +358,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -409,8 +391,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "48", @@ -421,8 +402,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "49", @@ -433,8 +413,7 @@ "$ref": "20" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "50", @@ -445,8 +424,7 @@ "$ref": "40" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/azure/core/traits/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/traits/src/Generated/tspCodeModel.json index d5af2c73d59..927ff13cf0f 100644 --- a/test/CadlRanchProjects/azure/core/traits/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/traits/src/Generated/tspCodeModel.json @@ -48,8 +48,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "7", @@ -63,8 +62,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -89,8 +87,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -115,8 +112,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json index 0868e23e293..9cfd2ceec02 100644 --- a/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json @@ -65,8 +65,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -90,8 +89,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -115,8 +113,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -140,8 +137,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -165,8 +161,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json index 7092659c29f..c5802aa1a31 100644 --- a/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/bytes/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -50,8 +49,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -75,8 +73,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -106,8 +103,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json index 09ad7052ff8..4393bd71aa7 100644 --- a/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -50,8 +49,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -75,8 +73,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -100,8 +97,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -131,8 +127,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json index 6ef40953aa1..9e84e0f2d71 100644 --- a/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/duration/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -50,8 +49,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -75,8 +73,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -100,8 +97,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -131,8 +127,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/parameters/body-optionality/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/parameters/body-optionality/src/Generated/tspCodeModel.json index 79f5d1eeb0b..24277e1237a 100644 --- a/test/CadlRanchProjects/parameters/body-optionality/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/parameters/body-optionality/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/parameters/spread/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/parameters/spread/src/Generated/tspCodeModel.json index d7c5a25ac67..9cedec2d7fe 100644 --- a/test/CadlRanchProjects/parameters/spread/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/parameters/spread/src/Generated/tspCodeModel.json @@ -26,8 +26,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -51,8 +50,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -76,8 +74,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -101,8 +98,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "14", @@ -116,8 +112,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "16", @@ -131,8 +126,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "18", @@ -146,8 +140,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "20", @@ -161,8 +154,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "22", @@ -176,8 +168,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json index b9624f00f6e..ad47a5405c7 100644 --- a/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -50,8 +49,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -75,8 +73,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/payload/pageable/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/payload/pageable/src/Generated/tspCodeModel.json index 420689b8a68..b963821297a 100644 --- a/test/CadlRanchProjects/payload/pageable/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/payload/pageable/src/Generated/tspCodeModel.json @@ -44,16 +44,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "8", @@ -67,8 +65,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, diff --git a/test/CadlRanchProjects/projection/projected-name/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/projection/projected-name/src/Generated/tspCodeModel.json index 1874a2cdc4a..12f4aafe8c6 100644 --- a/test/CadlRanchProjects/projection/projected-name/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/projection/projected-name/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -50,8 +49,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -75,8 +73,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -100,8 +97,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -125,8 +121,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -150,8 +145,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/serialization/encoded-name/json/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/serialization/encoded-name/json/src/Generated/tspCodeModel.json index 356dc841a9e..3e970e7d794 100644 --- a/test/CadlRanchProjects/serialization/encoded-name/json/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/serialization/encoded-name/json/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json index c45ecf7d70d..295c4906623 100644 --- a/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -50,8 +49,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -75,8 +73,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -100,8 +97,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -125,8 +121,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -150,8 +145,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -175,8 +169,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -200,8 +193,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -225,8 +217,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -250,8 +241,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -275,8 +265,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -300,8 +289,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -325,8 +313,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -350,8 +337,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -375,8 +361,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -400,8 +385,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -425,8 +409,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -450,8 +433,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -475,8 +457,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -500,8 +481,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -525,8 +505,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -550,8 +529,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -575,8 +553,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -600,8 +577,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -625,8 +601,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -650,8 +625,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -675,8 +649,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -700,8 +673,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -725,8 +697,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -750,8 +721,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -775,8 +745,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -800,8 +769,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -825,8 +793,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -850,8 +817,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -875,8 +841,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/type/array/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/array/src/Generated/tspCodeModel.json index 894ebcf8450..eb4357e2427 100644 --- a/test/CadlRanchProjects/type/array/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/array/src/Generated/tspCodeModel.json @@ -26,8 +26,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "5", @@ -44,8 +43,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/type/dictionary/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/dictionary/src/Generated/tspCodeModel.json index d1779a6e606..a058167a4b2 100644 --- a/test/CadlRanchProjects/type/dictionary/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/dictionary/src/Generated/tspCodeModel.json @@ -26,8 +26,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "5", @@ -50,8 +49,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json index bc905227179..084dc579a5f 100644 --- a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json @@ -78,8 +78,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -117,8 +116,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/tspCodeModel.json index 7ffd533979f..6b2035efd7f 100644 --- a/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/not-discriminated/src/Generated/tspCodeModel.json @@ -42,8 +42,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -60,8 +59,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -78,8 +76,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/tspCodeModel.json index aca00ba698d..6e39fc6d791 100644 --- a/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/recursive/src/Generated/tspCodeModel.json @@ -37,8 +37,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -55,8 +54,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json index 5333b02e15b..0f853dcd984 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json @@ -42,8 +42,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -69,8 +68,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "10", @@ -159,8 +157,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "18", @@ -183,8 +180,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "21", @@ -195,8 +191,7 @@ "$ref": "2" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/type/model/usage/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/usage/src/Generated/tspCodeModel.json index 6ea1e5e245a..57228e1c0a8 100644 --- a/test/CadlRanchProjects/type/model/usage/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/usage/src/Generated/tspCodeModel.json @@ -26,8 +26,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -52,8 +51,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -78,8 +76,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json index 10cb5d65640..10a0f729d75 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json @@ -44,8 +44,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -73,8 +72,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "11", @@ -88,8 +86,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -133,8 +130,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "19", @@ -192,8 +188,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -221,8 +216,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "30", @@ -236,8 +230,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -281,8 +274,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "38", @@ -340,8 +332,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -384,8 +375,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -428,8 +418,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -472,8 +461,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -516,8 +504,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -640,8 +627,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "84", @@ -655,8 +641,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -685,8 +670,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "89", @@ -700,8 +684,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json index b73d694cf00..3c74c813f7e 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json @@ -26,8 +26,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "5", @@ -41,8 +40,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -67,8 +65,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "10", @@ -82,8 +79,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -108,8 +104,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "15", @@ -123,8 +118,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -149,8 +143,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "20", @@ -164,8 +157,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -190,8 +182,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "25", @@ -211,8 +202,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -237,8 +227,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "31", @@ -270,16 +259,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json index 706a542b385..41221690256 100644 --- a/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/optionality/src/Generated/tspCodeModel.json @@ -150,8 +150,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -176,8 +175,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -202,8 +200,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -228,8 +225,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -260,8 +256,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -289,8 +284,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -319,8 +313,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -349,8 +342,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -379,8 +371,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -412,8 +403,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -435,8 +425,7 @@ "$ref": "8" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -458,8 +447,7 @@ "$ref": "11" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -481,8 +469,7 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -507,8 +494,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "58", @@ -522,8 +508,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json index cf4a186ef0d..82b50663dd1 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json @@ -217,8 +217,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -243,8 +242,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -269,8 +267,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -295,8 +292,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -321,8 +317,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -347,8 +342,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -373,8 +367,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -399,8 +392,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -425,8 +417,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -448,8 +439,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -471,8 +461,7 @@ "$ref": "5" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -511,14 +500,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -552,8 +539,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -584,8 +570,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -613,8 +598,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -651,8 +635,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -687,8 +670,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -713,8 +695,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -739,8 +720,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -765,8 +745,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -795,8 +774,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -825,8 +803,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -855,8 +832,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -888,8 +864,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -911,8 +886,7 @@ "$ref": "14" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -934,8 +908,7 @@ "$ref": "17" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -957,8 +930,7 @@ "$ref": "20" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -980,8 +952,7 @@ "$ref": "23" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json index b923217db21..e3b5cbb8fff 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json @@ -248,8 +248,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -270,8 +269,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -292,8 +290,7 @@ "$ref": "6" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -314,8 +311,7 @@ "$ref": "6" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -336,8 +332,7 @@ "$ref": "9" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -358,8 +353,7 @@ "$ref": "9" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -380,8 +374,7 @@ "$ref": "12" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -402,8 +395,7 @@ "$ref": "12" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -424,8 +416,7 @@ "$ref": "16" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -446,8 +437,7 @@ "$ref": "16" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -489,8 +479,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -514,8 +503,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } @@ -523,8 +511,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -562,8 +549,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -597,8 +583,7 @@ "$ref": "20" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "70", @@ -609,14 +594,12 @@ "$ref": "25" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -640,8 +623,7 @@ "$ref": "68" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -698,8 +680,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "81", @@ -733,14 +714,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -764,8 +743,7 @@ "$ref": "75" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -856,8 +834,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "101", @@ -925,8 +902,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "111", @@ -994,8 +970,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "121", @@ -1063,14 +1038,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1094,8 +1067,7 @@ "$ref": "90" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1162,8 +1134,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "142", @@ -1207,8 +1178,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "148", @@ -1252,8 +1222,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "154", @@ -1297,14 +1266,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1328,8 +1295,7 @@ "$ref": "135" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/CadlRanchProjectsNonAzure/authentication/http/custom/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/authentication/http/custom/src/Generated/tspCodeModel.json index ad6da3b5028..6800ba4b25b 100644 --- a/test/CadlRanchProjectsNonAzure/authentication/http/custom/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/authentication/http/custom/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json index 2198a4e638d..7b22e32951d 100644 --- a/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -73,8 +73,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json index 7c495fc70e2..630a976adfe 100644 --- a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json @@ -167,8 +167,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "25", @@ -179,8 +178,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "26", @@ -194,8 +192,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "28", @@ -231,8 +228,7 @@ "Properties": [] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "33", @@ -246,8 +242,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "35", @@ -261,8 +256,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "37", @@ -276,8 +270,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "39", @@ -291,8 +284,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "41", @@ -306,8 +298,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "43", @@ -321,8 +312,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "45", @@ -336,8 +326,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -365,8 +354,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "50", @@ -377,8 +365,7 @@ "$ref": "6" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "51", @@ -406,8 +393,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "55", @@ -421,8 +407,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "57", @@ -436,8 +421,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "59", @@ -454,8 +438,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "61", @@ -483,8 +466,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "65", @@ -495,20 +477,17 @@ "$ref": "62" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -542,8 +521,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "69", @@ -557,8 +535,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -583,8 +560,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -608,8 +584,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -637,8 +612,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "80", @@ -652,8 +626,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -677,8 +650,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "85", @@ -692,8 +664,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -717,8 +688,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "90", @@ -732,8 +702,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "92", @@ -747,8 +716,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "94", @@ -762,8 +730,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "96", @@ -774,8 +741,7 @@ "$ref": "12" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "97", @@ -807,8 +773,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "102", @@ -822,16 +787,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "104", @@ -842,8 +805,7 @@ "$ref": "52" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "105", @@ -857,8 +819,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -885,8 +846,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "110", @@ -900,8 +860,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "112", @@ -915,8 +874,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "114", @@ -930,8 +888,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "116", @@ -942,8 +899,7 @@ "$ref": "12" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "117", @@ -960,8 +916,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "119", @@ -972,8 +927,7 @@ "$ref": "52" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "120", @@ -987,8 +941,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -1031,8 +984,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "128", @@ -1046,16 +998,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "130", @@ -1069,8 +1019,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -1116,8 +1065,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "138", @@ -1131,16 +1079,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "140", @@ -1154,8 +1100,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -1182,8 +1127,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "145", @@ -1197,8 +1141,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "147", @@ -1212,8 +1155,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "149", @@ -1227,8 +1169,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "151", @@ -1239,8 +1180,7 @@ "$ref": "12" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "152", @@ -1257,8 +1197,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "154", @@ -1269,8 +1208,7 @@ "$ref": "52" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1318,8 +1256,7 @@ "$ref": "82" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/tspCodeModel.json index 256481b7c55..d6e6763ab7a 100644 --- a/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ConvenienceUpdate-TypeSpec/src/Generated/tspCodeModel.json @@ -26,8 +26,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json index e0d77f71682..0f51cf833c1 100644 --- a/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json @@ -156,8 +156,7 @@ "$ref": "2" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "22", @@ -185,14 +184,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "26", @@ -220,8 +217,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "30", @@ -235,14 +231,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "32", @@ -270,14 +264,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "36", @@ -305,8 +297,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "40", @@ -320,8 +311,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "42", @@ -335,8 +325,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "44", @@ -350,8 +339,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "46", @@ -365,8 +353,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "48", @@ -380,8 +367,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "50", @@ -395,8 +381,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "52", @@ -410,8 +395,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "54", @@ -431,8 +415,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "57", @@ -458,8 +441,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "61", @@ -485,8 +467,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "65", @@ -518,8 +499,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "70", @@ -539,8 +519,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "73", @@ -560,8 +539,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "76", @@ -581,8 +559,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "79", @@ -602,8 +579,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "82", @@ -623,8 +599,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "85", @@ -644,8 +619,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "88", @@ -665,8 +639,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "91", @@ -686,14 +659,12 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "94", @@ -704,8 +675,7 @@ "$ref": "5" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "95", @@ -716,8 +686,7 @@ "$ref": "9" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "96", @@ -728,8 +697,7 @@ "$ref": "13" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "97", @@ -760,14 +728,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "101", @@ -778,8 +744,7 @@ "$ref": "17" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "102", @@ -807,8 +772,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "106", @@ -822,8 +786,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "108", @@ -837,14 +800,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json index 3da76398b10..0b3c60aa77e 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json @@ -460,8 +460,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "60", @@ -501,8 +500,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "66", @@ -520,8 +518,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "68", @@ -539,8 +536,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "70", @@ -558,8 +554,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "72", @@ -580,8 +575,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "75", @@ -599,8 +593,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "77", @@ -618,8 +611,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "79", @@ -637,8 +629,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "81", @@ -659,8 +650,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "84", @@ -674,8 +664,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "86", @@ -695,8 +684,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "89", @@ -716,8 +704,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -742,8 +729,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -767,8 +753,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "98", @@ -782,8 +767,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -808,8 +792,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -854,8 +837,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -872,8 +854,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -930,8 +911,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -948,16 +928,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -996,8 +974,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1017,8 +994,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1043,8 +1019,7 @@ "$ref": "125" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1065,8 +1040,7 @@ "$ref": "18" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1090,8 +1064,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1116,8 +1089,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "135", @@ -1131,8 +1103,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "137", @@ -1149,8 +1120,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "139", @@ -1173,8 +1143,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "142", @@ -1185,8 +1154,7 @@ "$ref": "57" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "143", @@ -1197,8 +1165,7 @@ "$ref": "30" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "144", @@ -1215,8 +1182,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "146", @@ -1227,8 +1193,7 @@ "$ref": "34" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "147", @@ -1245,8 +1210,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "149", @@ -1257,8 +1221,7 @@ "$ref": "38" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "150", @@ -1275,8 +1238,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "152", @@ -1287,8 +1249,7 @@ "$ref": "42" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "153", @@ -1305,8 +1266,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "155", @@ -1317,8 +1277,7 @@ "$ref": "22" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "156", @@ -1332,8 +1291,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "158", @@ -1347,8 +1305,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "160", @@ -1374,8 +1331,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "164", @@ -1401,8 +1357,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "168", @@ -1428,8 +1383,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "172", @@ -1455,8 +1409,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "176", @@ -1484,8 +1437,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "180", @@ -1496,8 +1448,7 @@ "$ref": "26" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "181", @@ -1508,14 +1459,12 @@ "$ref": "22" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1540,8 +1489,7 @@ "$ref": "46" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "184", @@ -1559,8 +1507,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "186", @@ -1578,8 +1525,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "188", @@ -1593,8 +1539,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json index b6a13e622a9..f769e8b7cc5 100644 --- a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json @@ -140,8 +140,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "20", @@ -152,8 +151,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "21", @@ -167,8 +165,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "23", @@ -182,8 +179,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "25", @@ -197,8 +193,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "27", @@ -226,8 +221,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "31", @@ -241,8 +235,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "33", @@ -256,8 +249,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "35", @@ -274,8 +266,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "37", @@ -303,8 +294,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "41", @@ -315,20 +305,17 @@ "$ref": "38" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "42", @@ -356,14 +343,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -403,8 +388,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "50", @@ -418,8 +402,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -444,8 +427,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "55", @@ -456,8 +438,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "56", @@ -471,8 +452,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "58", @@ -486,8 +466,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "60", @@ -501,8 +480,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "62", @@ -513,8 +491,7 @@ "$ref": "28" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -536,8 +513,7 @@ "$ref": "8" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "65", @@ -555,8 +531,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "67", @@ -574,8 +549,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "69", @@ -589,8 +563,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -632,14 +605,12 @@ "Properties": [] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, diff --git a/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json index 1b18a3fdab0..b3b4a30640d 100644 --- a/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json @@ -25,8 +25,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json index 30035fe13fa..c56733b5576 100644 --- a/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -47,8 +47,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "7", @@ -62,8 +61,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "9", @@ -77,8 +75,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -120,8 +117,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "17", @@ -135,8 +131,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "19", @@ -150,16 +145,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "21", @@ -173,8 +166,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -202,8 +194,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "26", @@ -217,8 +208,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -249,8 +239,7 @@ "$ref": "4" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json index 1ce62cd7581..8fb56abe192 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json @@ -206,8 +206,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -231,8 +230,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "32", @@ -252,8 +250,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "35", @@ -267,8 +264,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "37", @@ -294,8 +290,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "41", @@ -309,8 +304,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -351,8 +345,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -385,8 +378,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "52", @@ -400,8 +392,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "54", @@ -415,8 +406,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "56", @@ -430,8 +420,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "58", @@ -457,8 +446,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -488,8 +476,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "66", @@ -503,8 +490,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "68", @@ -518,14 +504,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "70", @@ -571,16 +555,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "77", @@ -594,8 +576,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "79", @@ -609,14 +590,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -653,8 +632,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "84", @@ -668,8 +646,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "86", @@ -683,8 +660,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "88", @@ -698,8 +674,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "90", @@ -730,8 +705,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "95", @@ -751,8 +725,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "98", @@ -784,8 +757,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "103", @@ -799,8 +771,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "105", @@ -820,16 +791,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "108", @@ -861,8 +830,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "113", @@ -894,8 +862,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "118", @@ -915,8 +882,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "121", @@ -944,8 +910,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "125", @@ -959,8 +924,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "127", @@ -971,14 +935,12 @@ "$ref": "2" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "128", @@ -1003,8 +965,7 @@ "$ref": "5" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "131", @@ -1015,22 +976,19 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "132", @@ -1041,8 +999,7 @@ "$ref": "17" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "133", @@ -1056,8 +1013,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "135", @@ -1068,8 +1024,7 @@ "$ref": "122" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "136", @@ -1080,16 +1035,14 @@ "$ref": "129" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "137", @@ -1109,8 +1062,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "140", @@ -1124,8 +1076,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "142", @@ -1157,8 +1108,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "147", @@ -1178,16 +1128,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "150", @@ -1218,8 +1166,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "155", @@ -1233,16 +1180,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "157", @@ -1256,8 +1201,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "159", @@ -1283,16 +1227,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "163", @@ -1303,8 +1245,7 @@ "$ref": "21" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1363,8 +1304,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "168", @@ -1378,8 +1318,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "170", @@ -1405,8 +1344,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "174", @@ -1420,8 +1358,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -1450,8 +1387,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index 9e0ff749b58..6160aa8e2e4 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -219,8 +219,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -237,8 +236,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "32", @@ -308,8 +306,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "40", @@ -323,8 +320,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "42", @@ -338,8 +334,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "44", @@ -353,8 +348,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "46", @@ -368,8 +362,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "48", @@ -383,8 +376,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "50", @@ -402,8 +394,7 @@ "Properties": [] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "52", @@ -414,8 +405,7 @@ "$ref": "51" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "53", @@ -435,8 +425,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "56", @@ -456,8 +445,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "59", @@ -527,8 +515,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -537,16 +524,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "69", @@ -569,8 +554,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "72", @@ -590,8 +574,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "75", @@ -611,8 +594,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "78", @@ -629,8 +611,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "80", @@ -650,8 +631,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "83", @@ -671,8 +651,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "86", @@ -689,8 +668,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "88", @@ -710,8 +688,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "91", @@ -731,8 +708,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "94", @@ -749,8 +725,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "96", @@ -770,8 +745,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "99", @@ -791,8 +765,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -832,8 +805,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "105", @@ -847,8 +819,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "107", @@ -862,8 +833,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "109", @@ -877,8 +847,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "111", @@ -892,8 +861,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "113", @@ -907,8 +875,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "115", @@ -922,8 +889,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "117", @@ -937,8 +903,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "119", @@ -952,8 +917,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "121", @@ -967,8 +931,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "123", @@ -997,8 +960,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "127", @@ -1012,8 +974,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "129", @@ -1033,8 +994,7 @@ ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "131", @@ -1045,8 +1005,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "132", @@ -1057,8 +1016,7 @@ "$ref": "6" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "133", @@ -1069,8 +1027,7 @@ "$ref": "10" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "134", @@ -1087,8 +1044,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "136", @@ -1114,8 +1070,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "140", @@ -1141,8 +1096,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "144", @@ -1165,8 +1119,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "147", @@ -1180,8 +1133,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "149", @@ -1195,8 +1147,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "151", @@ -1216,8 +1167,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "154", @@ -1237,8 +1187,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "157", @@ -1252,8 +1201,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "159", @@ -1267,8 +1215,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "161", @@ -1288,8 +1235,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "164", @@ -1309,8 +1255,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "167", @@ -1330,8 +1275,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "170", @@ -1351,8 +1295,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "173", @@ -1372,8 +1315,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "176", @@ -1393,8 +1335,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1425,8 +1366,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "182", @@ -1440,8 +1380,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "184", @@ -1455,8 +1394,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "186", @@ -1470,8 +1408,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "188", @@ -1485,8 +1422,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "190", @@ -1500,8 +1436,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "192", @@ -1515,8 +1450,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "194", @@ -1530,8 +1464,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "196", @@ -1545,8 +1478,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "198", @@ -1566,8 +1498,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1593,8 +1524,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "204", @@ -1608,8 +1538,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "206", @@ -1629,8 +1558,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "209", @@ -1650,8 +1578,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "212", @@ -1668,8 +1595,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "214", @@ -1680,8 +1606,7 @@ "$ref": "66" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "215", @@ -1717,8 +1642,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1738,14 +1662,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "222", @@ -1756,8 +1678,7 @@ "$ref": "2" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "223", @@ -1768,8 +1689,7 @@ "$ref": "10" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "224", @@ -1795,8 +1715,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "228", @@ -1822,8 +1741,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "232", @@ -1846,8 +1764,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "235", @@ -1861,8 +1778,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "237", @@ -1876,8 +1792,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "239", @@ -1897,8 +1812,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1929,8 +1843,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "245", @@ -1944,8 +1857,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "247", @@ -1959,8 +1871,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "249", @@ -1974,8 +1885,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "251", @@ -1986,8 +1896,7 @@ "$ref": "66" }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "252", @@ -1998,8 +1907,7 @@ "$ref": "66" }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "253", @@ -2010,8 +1918,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "254", @@ -2022,8 +1929,7 @@ "$ref": "10" }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "255", @@ -2034,8 +1940,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "256", @@ -2046,8 +1951,7 @@ "$ref": "10" }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "257", @@ -2067,8 +1971,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "260", @@ -2088,8 +1991,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "263", @@ -2106,8 +2008,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "265", @@ -2133,8 +2034,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "269", @@ -2160,8 +2060,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "273", @@ -2184,8 +2083,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "276", @@ -2205,8 +2103,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "279", @@ -2226,8 +2123,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "282", @@ -2244,8 +2140,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "284", @@ -2271,8 +2166,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "288", @@ -2298,8 +2192,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "292", @@ -2322,8 +2215,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "295", @@ -2343,8 +2235,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "298", @@ -2364,8 +2255,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2390,8 +2280,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "304", @@ -2405,8 +2294,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "306", @@ -2417,8 +2305,7 @@ "$ref": "66" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "307", @@ -2435,8 +2322,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "309", @@ -2459,8 +2345,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "312", @@ -2477,8 +2362,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "314", @@ -2495,8 +2379,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "316", @@ -2519,8 +2402,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "319", @@ -2543,8 +2425,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2569,8 +2450,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "325", @@ -2581,8 +2461,7 @@ "$ref": "322" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2607,8 +2486,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "329", @@ -2619,8 +2497,7 @@ "$ref": "326" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2645,8 +2522,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "333", @@ -2657,8 +2533,7 @@ "$ref": "330" }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -2691,8 +2566,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2712,8 +2586,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2742,8 +2615,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "343", @@ -2798,8 +2670,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2822,8 +2693,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "353", @@ -2837,8 +2707,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2859,8 +2728,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2895,8 +2763,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "360", @@ -2910,8 +2777,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2940,8 +2806,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2970,8 +2835,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3000,8 +2864,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3030,8 +2893,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3056,8 +2918,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "377", @@ -3071,8 +2932,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json index 56fe106fd5f..83c94cf6b6f 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json @@ -164,8 +164,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "22", @@ -179,8 +178,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -222,8 +220,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "30", @@ -237,8 +234,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "32", @@ -252,16 +248,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "34", @@ -275,8 +269,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -327,16 +320,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "43", @@ -350,8 +341,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -382,8 +372,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "48", @@ -397,8 +386,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -441,8 +429,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "56", @@ -456,16 +443,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "58", @@ -479,8 +464,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -526,8 +510,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "66", @@ -541,8 +524,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "68", @@ -556,16 +538,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "70", @@ -579,8 +559,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -626,8 +605,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "78", @@ -641,8 +619,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "80", @@ -656,16 +633,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "82", @@ -679,8 +654,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -704,8 +678,7 @@ "$ref": "8" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "86", @@ -723,8 +696,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "88", @@ -742,8 +714,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "90", @@ -757,8 +728,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -780,8 +750,7 @@ "$ref": "19" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -854,8 +823,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/Parameters-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Parameters-TypeSpec/src/Generated/tspCodeModel.json index b0ae0a75527..8c396cd4c17 100644 --- a/test/TestProjects/Parameters-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Parameters-TypeSpec/src/Generated/tspCodeModel.json @@ -45,8 +45,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json index dcd1e607126..9fb76888e68 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json @@ -49,8 +49,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "8", @@ -64,8 +63,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "10", @@ -79,8 +77,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -106,8 +103,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "15", @@ -146,8 +142,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "20", @@ -161,8 +156,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "22", @@ -176,8 +170,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -202,8 +195,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "27", @@ -217,8 +209,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -256,8 +247,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -286,8 +276,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json index 8c5196de648..2a72aacc3a4 100644 --- a/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json @@ -76,8 +76,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "11", @@ -88,8 +87,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "12", @@ -103,8 +101,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "14", @@ -140,8 +137,7 @@ "Properties": [] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "19", @@ -155,8 +151,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "21", @@ -170,8 +165,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "23", @@ -185,8 +179,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "25", @@ -200,8 +193,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "27", @@ -215,8 +207,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "29", @@ -230,8 +221,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "31", @@ -245,8 +235,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -277,8 +266,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "36", @@ -292,8 +280,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -317,8 +304,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -346,8 +332,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "44", @@ -361,8 +346,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, diff --git a/test/TestProjects/Spread-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Spread-TypeSpec/src/Generated/tspCodeModel.json index 2b747018dbf..3b4fd69789d 100644 --- a/test/TestProjects/Spread-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Spread-TypeSpec/src/Generated/tspCodeModel.json @@ -46,8 +46,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "7", @@ -61,8 +60,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -86,8 +84,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "12", @@ -101,8 +98,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -126,8 +122,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "17", @@ -141,8 +136,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -166,8 +160,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "22", @@ -181,8 +174,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -206,8 +198,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "27", @@ -221,8 +212,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "29", @@ -236,8 +226,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "31", @@ -257,8 +246,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "34", @@ -278,8 +266,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -309,8 +296,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "41", @@ -330,8 +316,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json index b671765711c..668769dacf5 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json @@ -384,8 +384,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "50", @@ -425,8 +424,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "56", @@ -444,8 +442,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "58", @@ -463,8 +460,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "60", @@ -482,8 +478,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "62", @@ -504,8 +499,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "65", @@ -523,8 +517,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "67", @@ -542,8 +535,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "69", @@ -561,8 +553,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "71", @@ -583,8 +574,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "74", @@ -598,8 +588,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -624,8 +613,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -649,8 +637,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "82", @@ -664,8 +651,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -690,8 +676,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "87", @@ -705,8 +690,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "89", @@ -723,8 +707,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "91", @@ -747,8 +730,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "94", @@ -759,8 +741,7 @@ "$ref": "47" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "95", @@ -771,8 +752,7 @@ "$ref": "22" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "96", @@ -789,8 +769,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "98", @@ -801,8 +780,7 @@ "$ref": "26" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "99", @@ -819,8 +797,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "101", @@ -831,8 +808,7 @@ "$ref": "30" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "102", @@ -849,8 +825,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "104", @@ -861,8 +836,7 @@ "$ref": "34" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "105", @@ -879,8 +853,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "107", @@ -891,8 +864,7 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "108", @@ -906,8 +878,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "110", @@ -921,8 +892,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "112", @@ -948,8 +918,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "116", @@ -975,8 +944,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "120", @@ -1002,8 +970,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "124", @@ -1029,8 +996,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true } ] }, @@ -1052,8 +1018,7 @@ "$ref": "38" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "130", @@ -1071,8 +1036,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "132", @@ -1090,8 +1054,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "134", @@ -1105,8 +1068,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/tspCodeModel.json index f4b5eb074f6..778f47485e8 100644 --- a/test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/NoTest-TypeSpec/src/Generated/tspCodeModel.json @@ -141,8 +141,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "17", @@ -182,8 +181,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "23", @@ -201,8 +199,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "25", @@ -220,8 +217,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "27", @@ -239,8 +235,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "29", @@ -261,8 +256,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "32", @@ -280,8 +274,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "34", @@ -299,8 +292,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "36", @@ -318,8 +310,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "38", @@ -340,8 +331,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "41", @@ -355,8 +345,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "43", @@ -376,8 +365,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "46", @@ -397,8 +385,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json index af56f7f172e..962e948eb4b 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json @@ -875,8 +875,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "130", @@ -887,8 +886,7 @@ "$ref": "2" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "131", @@ -902,8 +900,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "133", @@ -914,8 +911,7 @@ "$ref": "4" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "134", @@ -929,8 +925,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "136", @@ -944,8 +939,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -969,8 +963,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -994,8 +987,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "144", @@ -1006,8 +998,7 @@ "$ref": "10" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "145", @@ -1021,8 +1012,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "147", @@ -1033,8 +1023,7 @@ "$ref": "12" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "148", @@ -1048,8 +1037,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1073,8 +1061,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1095,8 +1082,7 @@ "$ref": "18" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "155", @@ -1124,8 +1110,7 @@ "$ref": "30" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "159", @@ -1139,8 +1124,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "161", @@ -1154,8 +1138,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "163", @@ -1182,8 +1165,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "167", @@ -1197,22 +1179,19 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "169", @@ -1243,8 +1222,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "174", @@ -1258,8 +1236,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "176", @@ -1294,16 +1271,14 @@ "Properties": [] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "181", @@ -1361,8 +1336,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } @@ -1370,8 +1344,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "190", @@ -1385,8 +1358,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "192", @@ -1400,8 +1372,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "194", @@ -1415,8 +1386,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "196", @@ -1430,8 +1400,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "198", @@ -1465,8 +1434,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "203", @@ -1480,8 +1448,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "205", @@ -1495,8 +1462,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "207", @@ -1522,8 +1488,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "211", @@ -1537,8 +1502,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "213", @@ -1552,8 +1516,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1593,8 +1556,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "218", @@ -1608,8 +1570,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "220", @@ -1623,8 +1584,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "222", @@ -1638,8 +1598,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "224", @@ -1670,8 +1629,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "229", @@ -1695,8 +1653,7 @@ "$ref": "35" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "232", @@ -1710,8 +1667,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "234", @@ -1738,8 +1694,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "238", @@ -1753,20 +1708,17 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "240", @@ -1777,16 +1729,14 @@ "$ref": "40" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "241", @@ -1814,8 +1764,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "245", @@ -1829,8 +1778,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "247", @@ -1844,14 +1792,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1887,8 +1833,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "252", @@ -1902,8 +1847,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "254", @@ -1914,8 +1858,7 @@ "$ref": "45" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "255", @@ -1963,14 +1906,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "262", @@ -1984,8 +1925,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2012,8 +1952,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "267", @@ -2031,8 +1970,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "269", @@ -2046,8 +1984,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "271", @@ -2061,8 +1998,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "273", @@ -2076,8 +2012,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "275", @@ -2091,8 +2026,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "277", @@ -2106,8 +2040,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "279", @@ -2118,8 +2051,7 @@ "$ref": "51" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "280", @@ -2167,14 +2099,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "287", @@ -2188,8 +2118,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "289", @@ -2203,8 +2132,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "291", @@ -2224,8 +2152,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "294", @@ -2239,8 +2166,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "296", @@ -2267,8 +2193,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "300", @@ -2282,8 +2207,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "302", @@ -2297,14 +2221,12 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2334,8 +2256,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "307", @@ -2352,8 +2273,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "309", @@ -2367,8 +2287,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2392,8 +2311,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "314", @@ -2424,8 +2342,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "319", @@ -2439,8 +2356,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "321", @@ -2454,8 +2370,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "323", @@ -2466,8 +2381,7 @@ "$ref": "58" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "324", @@ -2481,16 +2395,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2514,8 +2426,7 @@ "$ref": "62" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "328", @@ -2579,8 +2490,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "338", @@ -2594,8 +2504,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "340", @@ -2609,8 +2518,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "342", @@ -2624,8 +2532,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "344", @@ -2639,8 +2546,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "346", @@ -2654,8 +2560,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "348", @@ -2689,8 +2594,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "353", @@ -2704,8 +2608,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "355", @@ -2719,8 +2622,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "357", @@ -2746,8 +2648,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "361", @@ -2761,8 +2662,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "363", @@ -2776,8 +2676,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "365", @@ -2791,8 +2690,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "367", @@ -2806,8 +2704,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "369", @@ -2821,8 +2718,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2847,8 +2743,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "374", @@ -2862,8 +2757,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "376", @@ -2877,8 +2771,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "378", @@ -2892,8 +2785,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "380", @@ -2924,8 +2816,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "385", @@ -2939,8 +2830,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "387", @@ -2973,8 +2863,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "392", @@ -2994,8 +2883,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "395", @@ -3027,8 +2915,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "400", @@ -3048,14 +2935,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "403", @@ -3066,16 +2951,14 @@ "$ref": "72" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "404", @@ -3086,8 +2969,7 @@ "$ref": "242" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3114,8 +2996,7 @@ "$ref": "76" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "407", @@ -3129,8 +3010,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "409", @@ -3144,8 +3024,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "411", @@ -3159,8 +3038,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "413", @@ -3174,8 +3052,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "415", @@ -3189,8 +3066,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3219,8 +3095,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "420", @@ -3234,8 +3109,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "422", @@ -3266,8 +3140,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "427", @@ -3281,8 +3154,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "429", @@ -3293,16 +3165,14 @@ "$ref": "81" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "430", @@ -3313,8 +3183,7 @@ "$ref": "242" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3338,8 +3207,7 @@ "$ref": "84" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "433", @@ -3403,8 +3271,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "443", @@ -3418,8 +3285,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3447,8 +3313,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "448", @@ -3462,8 +3327,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "450", @@ -3495,8 +3359,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "455", @@ -3514,8 +3377,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "457", @@ -3535,16 +3397,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "460", @@ -3571,8 +3431,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "464", @@ -3586,14 +3445,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3623,8 +3480,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "469", @@ -3656,8 +3512,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "474", @@ -3675,8 +3530,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "476", @@ -3690,8 +3544,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "478", @@ -3705,8 +3558,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "480", @@ -3720,8 +3572,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "482", @@ -3735,8 +3586,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "484", @@ -3747,8 +3597,7 @@ "$ref": "92" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "485", @@ -3762,16 +3611,14 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3798,8 +3645,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "490", @@ -3813,8 +3659,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3838,8 +3683,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "495", @@ -3853,8 +3697,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "497", @@ -3868,8 +3711,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -3893,8 +3735,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "502", @@ -3908,8 +3749,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "504", @@ -3920,8 +3760,7 @@ "$ref": "99" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "505", @@ -3935,8 +3774,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "507", @@ -3950,8 +3788,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "509", @@ -3965,8 +3802,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "511", @@ -3980,8 +3816,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "513", @@ -3995,8 +3830,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "515", @@ -4010,8 +3844,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "517", @@ -4025,8 +3858,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "519", @@ -4046,8 +3878,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "522", @@ -4061,8 +3892,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -4088,8 +3918,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "527", @@ -4107,8 +3936,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "529", @@ -4122,8 +3950,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "531", @@ -4137,8 +3964,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "533", @@ -4152,8 +3978,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "535", @@ -4167,8 +3992,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "537", @@ -4182,8 +4006,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "539", @@ -4194,8 +4017,7 @@ "$ref": "106" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "540", @@ -4222,8 +4044,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "544", @@ -4237,8 +4058,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "546", @@ -4252,8 +4072,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "548", @@ -4267,8 +4086,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "550", @@ -4282,8 +4100,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "552", @@ -4297,8 +4114,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "554", @@ -4312,14 +4128,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "556", @@ -4336,8 +4150,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "558", @@ -4354,8 +4167,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "560", @@ -4372,8 +4184,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "562", @@ -4404,8 +4215,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "567", @@ -4419,8 +4229,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "569", @@ -4434,8 +4243,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "571", @@ -4449,16 +4257,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -4488,8 +4294,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "576", @@ -4506,8 +4311,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -4531,8 +4335,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "581", @@ -4549,8 +4352,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -4574,8 +4376,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "586", @@ -4607,8 +4408,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "591", @@ -4626,8 +4426,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "593", @@ -4641,8 +4440,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "595", @@ -4656,16 +4454,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -4692,8 +4488,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "600", @@ -4707,8 +4502,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "602", @@ -4722,8 +4516,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -4747,8 +4540,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "607", @@ -4762,8 +4554,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "609", @@ -4774,8 +4565,7 @@ "$ref": "114" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "610", @@ -4786,8 +4576,7 @@ "$ref": "118" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "611", @@ -4801,8 +4590,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -4826,8 +4614,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "616", @@ -4859,8 +4646,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "621", @@ -4874,16 +4660,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -4910,8 +4694,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "626", @@ -4925,8 +4708,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "628", @@ -4940,8 +4722,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "630", @@ -4955,8 +4736,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "632", @@ -4967,8 +4747,7 @@ "$ref": "114" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "633", @@ -4979,8 +4758,7 @@ "$ref": "118" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "634", @@ -4994,8 +4772,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -5019,8 +4796,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "639", @@ -5034,8 +4810,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "641", @@ -5046,8 +4821,7 @@ "$ref": "114" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "642", @@ -5058,8 +4832,7 @@ "$ref": "118" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "643", @@ -5073,8 +4846,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -5118,8 +4890,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "651", @@ -5130,8 +4901,7 @@ "$ref": "121" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -5155,8 +4925,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "655", @@ -5170,8 +4939,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "657", @@ -5202,8 +4970,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "662", @@ -5230,8 +4997,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "666", @@ -5245,8 +5011,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "668", @@ -5260,8 +5025,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "670", @@ -5275,8 +5039,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "672", @@ -5290,8 +5053,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "674", @@ -5305,8 +5067,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "676", @@ -5320,8 +5081,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "678", @@ -5335,8 +5095,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "680", @@ -5350,8 +5109,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "682", @@ -5365,8 +5123,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "684", @@ -5380,14 +5137,12 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "686", @@ -5414,8 +5169,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "690", @@ -5429,8 +5183,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "692", @@ -5444,8 +5197,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "694", @@ -5459,8 +5211,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "696", @@ -5474,8 +5225,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "698", @@ -5489,8 +5239,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "700", @@ -5504,8 +5253,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "702", @@ -5519,8 +5267,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "704", @@ -5534,8 +5281,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "706", @@ -5549,8 +5295,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "708", @@ -5564,22 +5309,19 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -5625,8 +5367,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "715", @@ -5640,8 +5381,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "717", @@ -5655,8 +5395,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "719", @@ -5670,14 +5409,12 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -5704,8 +5441,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "724", @@ -5719,8 +5455,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "726", @@ -5734,8 +5469,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "728", @@ -5749,8 +5483,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "730", @@ -5776,8 +5509,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "734", @@ -5788,8 +5520,7 @@ "$ref": "124" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json index 621e4055dea..cc964b123ba 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json @@ -309,8 +309,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "41", @@ -350,8 +349,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "47", @@ -369,8 +367,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "49", @@ -388,8 +385,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "51", @@ -407,8 +403,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "53", @@ -429,8 +424,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "56", @@ -448,8 +442,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "58", @@ -467,8 +460,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "60", @@ -486,8 +478,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "62", @@ -508,8 +499,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "65", @@ -523,8 +513,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "67", @@ -544,8 +533,7 @@ "IsNullable": true }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "70", @@ -565,8 +553,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -591,8 +578,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "76", @@ -606,8 +592,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "78", @@ -624,8 +609,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "80", @@ -648,8 +632,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "83", @@ -660,8 +643,7 @@ "$ref": "38" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "84", @@ -672,8 +654,7 @@ "$ref": "22" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "85", @@ -690,8 +671,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "87", @@ -702,8 +682,7 @@ "$ref": "26" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "88", @@ -720,8 +699,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "90", @@ -732,8 +710,7 @@ "$ref": "30" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "91", @@ -750,8 +727,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "93", @@ -762,8 +738,7 @@ "$ref": "34" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "94", @@ -780,8 +755,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "96", @@ -792,8 +766,7 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "97", @@ -807,8 +780,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "99", @@ -822,8 +794,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "101", @@ -849,8 +820,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "105", @@ -876,8 +846,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "109", @@ -903,8 +872,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "113", @@ -930,8 +898,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "117", @@ -959,8 +926,7 @@ "IsNullable": true }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "121", @@ -971,8 +937,7 @@ "$ref": "18" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "122", @@ -983,14 +948,12 @@ "$ref": "14" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1018,8 +981,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1043,8 +1005,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "129", @@ -1058,8 +1019,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1084,8 +1044,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, From 374545e0ebbcf5be6df2f75b801c7d04bf294c36 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 20 Mar 2024 10:58:55 +0800 Subject: [PATCH 21/60] optimize perf --- src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index adfbe288613..56940ee22d8 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -154,11 +154,12 @@ export function fromSdkModelType( IsNullable: false } as InputDictionaryType) : undefined; + const baseModelHasDiscriminator = hasDiscriminator(modelType.baseModel); inputModelType.Properties = modelType.properties .filter( (p) => !(p as SdkBodyModelPropertyType).discriminator || - !hasDiscriminator(modelType.baseModel) + !baseModelHasDiscriminator ) .map((p) => fromSdkModelPropertyType(p, context, models, enums, { From 27e212148a2d97e0460488207832b86cd992aa27 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 20 Mar 2024 11:30:49 +0800 Subject: [PATCH 22/60] add backward compatibility of implicit discriminator property sequence --- .../Emitter.Csharp/src/type/converter.ts | 15 ++++ .../Models/AbstractModel.Serialization.cs | 4 +- .../src/Generated/Models/AbstractModel.cs | 10 +-- .../Models/RealModel.Serialization.cs | 16 ++-- .../access/src/Generated/Models/RealModel.cs | 4 +- .../UnknownAbstractModel.Serialization.cs | 16 ++-- .../Generated/Models/UnknownAbstractModel.cs | 4 +- .../access/src/Generated/tspCodeModel.json | 18 ++--- .../Docs/SingleDiscriminatorClient.xml | 8 +- .../Models/Dinosaur.Serialization.cs | 4 +- .../src/Generated/Models/Dinosaur.cs | 10 +-- .../Generated/Models/TRex.Serialization.cs | 16 ++-- .../src/Generated/Models/TRex.cs | 4 +- .../Models/UnknownDinosaur.Serialization.cs | 16 ++-- .../src/Generated/Models/UnknownDinosaur.cs | 4 +- ...eritanceSingleDiscriminatorModelFactory.cs | 8 +- .../src/Generated/tspCodeModel.json | 22 +++--- .../Samples_SingleDiscriminatorClient.cs | 8 +- .../Generated/Docs/ModelsTypeSpecClient.xml | 40 +++++----- ...aseModelWithDiscriminator.Serialization.cs | 4 +- .../Models/BaseModelWithDiscriminator.cs | 10 +-- ...edModelWithDiscriminatorA.Serialization.cs | 18 ++--- .../Models/DerivedModelWithDiscriminatorA.cs | 4 +- ...edModelWithDiscriminatorB.Serialization.cs | 18 ++--- .../Models/DerivedModelWithDiscriminatorB.cs | 4 +- .../Models/SingleBase.Serialization.cs | 4 +- .../src/Generated/Models/SingleBase.cs | 10 +-- ...aseModelWithDiscriminator.Serialization.cs | 18 ++--- .../UnknownBaseModelWithDiscriminator.cs | 4 +- .../Models/UnknownSingleBase.Serialization.cs | 16 ++-- .../src/Generated/Models/UnknownSingleBase.cs | 4 +- .../Generated/ModelsTypeSpecModelFactory.cs | 6 +- .../src/Generated/tspCodeModel.json | 76 +++++++++---------- .../Samples/Samples_ModelsTypeSpecClient.cs | 40 +++++----- .../Tests/ModelsTypeSpecClientTests.cs | 6 +- .../src/Generated/Docs/Pets.xml | 8 +- .../Generated/Models/Fish.Serialization.cs | 4 +- .../src/Generated/Models/Fish.cs | 10 +-- .../Generated/Models/Shark.Serialization.cs | 16 ++-- .../src/Generated/Models/Shark.cs | 4 +- .../Generated/Models/Tuna.Serialization.cs | 16 ++-- .../src/Generated/Models/Tuna.cs | 4 +- .../Models/UnknownFish.Serialization.cs | 16 ++-- .../src/Generated/Models/UnknownFish.cs | 4 +- .../src/Generated/PetStoreModelFactory.cs | 10 +-- .../src/Generated/tspCodeModel.json | 22 +++--- .../tests/Generated/Samples/Samples_Pets.cs | 8 +- 47 files changed, 303 insertions(+), 288 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 56940ee22d8..3955a0fee25 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -167,6 +167,21 @@ export function fromSdkModelType( Namespace: inputModelType?.Namespace } as LiteralTypeContext) ); + + // TODO: remove workaround for backward compatible with previous emitter behavior: https://github.com/Azure/autorest.csharp/blob/879233de12000f68916609e00f4431c604b7c1c5/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts#L717-L739 + // Previously emitter will insert discriminator property at the beginning if it's implicitly defined + // Now TCGC will append implicit discriminator property at the end, so we need to tune the sequence + // Will follow up with TCGC team to see if they can change the logic to insert discriminator property at the beginning, which seems more reasonable + // Then we can remove the following codes + if (inputModelType.DiscriminatorPropertyName && !(modelType.__raw! as Model).properties.has(inputModelType?.DiscriminatorPropertyName)) { + const index = inputModelType.Properties.findIndex( + (p) => p.IsDiscriminator + ); + if (index !== 0 && index !== -1) { + const discriminator = inputModelType.Properties.splice(index, 1)[0]; + inputModelType.Properties.unshift(discriminator); + } + } } return inputModelType; diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.Serialization.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.Serialization.cs index 0fa2b95fef8..2cdfe8468f0 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.Serialization.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.cs index 5662c4b45e7..f0194c501ef 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/AbstractModel.cs @@ -61,13 +61,13 @@ protected AbstractModel(string name) } /// Initializes a new instance of . - /// /// Discriminator. + /// /// Keeps track of any properties unknown to the library. - internal AbstractModel(string name, string kind, IDictionary serializedAdditionalRawData) + internal AbstractModel(string kind, string name, IDictionary serializedAdditionalRawData) { - Name = name; Kind = kind; + Name = name; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,9 +76,9 @@ internal AbstractModel() { } - /// Gets the name. - public string Name { get; } /// Discriminator. internal string Kind { get; set; } + /// Gets the name. + public string Name { get; } } } diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.Serialization.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.Serialization.cs index ea3ec715981..6c5d3b57e9f 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.Serialization.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static RealModel DeserializeRealModel(JsonElement element, ModelReaderW { return null; } - string name = default; string kind = default; + string name = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (property.NameEquals("kind"u8)) { - name = property.Value.GetString(); + kind = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("name"u8)) { - kind = property.Value.GetString(); + name = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static RealModel DeserializeRealModel(JsonElement element, ModelReaderW } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new RealModel(name, kind, serializedAdditionalRawData); + return new RealModel(kind, name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.cs index a32ed3c636f..b1b0c2cb7af 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/RealModel.cs @@ -25,10 +25,10 @@ internal RealModel(string name) : base(name) } /// Initializes a new instance of . - /// /// Discriminator. + /// /// Keeps track of any properties unknown to the library. - internal RealModel(string name, string kind, IDictionary serializedAdditionalRawData) : base(name, kind, serializedAdditionalRawData) + internal RealModel(string kind, string name, IDictionary serializedAdditionalRawData) : base(kind, name, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.Serialization.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.Serialization.cs index 7922c8fa33e..daf901a04ba 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.Serialization.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static UnknownAbstractModel DeserializeUnknownAbstractModel(JsonElement { return null; } - string name = default; string kind = "Unknown"; + string name = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("name"u8)) + if (property.NameEquals("kind"u8)) { - name = property.Value.GetString(); + kind = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("name"u8)) { - kind = property.Value.GetString(); + name = property.Value.GetString(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static UnknownAbstractModel DeserializeUnknownAbstractModel(JsonElement } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownAbstractModel(name, kind, serializedAdditionalRawData); + return new UnknownAbstractModel(kind, name, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.cs b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.cs index 8154d102bc0..bfedf1cad95 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.cs +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/Models/UnknownAbstractModel.cs @@ -14,10 +14,10 @@ namespace _Specs_.Azure.ClientGenerator.Core.Access.Models internal partial class UnknownAbstractModel : AbstractModel { /// Initializes a new instance of . - /// /// Discriminator. + /// /// Keeps track of any properties unknown to the library. - internal UnknownAbstractModel(string name, string kind, IDictionary serializedAdditionalRawData) : base(name, kind, serializedAdditionalRawData) + internal UnknownAbstractModel(string kind, string name, IDictionary serializedAdditionalRawData) : base(kind, name, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json index 6a74f915527..e75a0d5242f 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json @@ -252,9 +252,9 @@ "Properties": [ { "$id": "29", - "Name": "name", - "SerializedName": "name", - "Description": "", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "30", "Kind": "Primitive", @@ -262,13 +262,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": true }, { "$id": "31", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "name", + "SerializedName": "name", + "Description": "", "Type": { "$id": "32", "Kind": "Primitive", @@ -276,8 +277,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": true + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Docs/SingleDiscriminatorClient.xml b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Docs/SingleDiscriminatorClient.xml index 7e628ca32b7..9849fb3ee43 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Docs/SingleDiscriminatorClient.xml +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Docs/SingleDiscriminatorClient.xml @@ -528,8 +528,8 @@ SingleDiscriminatorClient client = new SingleDiscriminatorClient(); Response response = await client.GetLegacyModelAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("size").ToString()); ]]> This sample shows how to call GetLegacyModelAsync with all parameters and parse the result. @@ -551,8 +551,8 @@ SingleDiscriminatorClient client = new SingleDiscriminatorClient(); Response response = client.GetLegacyModel(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("size").ToString()); ]]> This sample shows how to call GetLegacyModel with all parameters and parse the result. diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.Serialization.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.Serialization.cs index 4242d4237bb..43f9f8f6d80 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.Serialization.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteStartObject(); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.cs index 86b2f09d432..6848cc5274e 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/Dinosaur.cs @@ -57,13 +57,13 @@ protected Dinosaur(int size) } /// Initializes a new instance of . - /// /// Discriminator. + /// /// Keeps track of any properties unknown to the library. - internal Dinosaur(int size, string kind, IDictionary serializedAdditionalRawData) + internal Dinosaur(string kind, int size, IDictionary serializedAdditionalRawData) { - Size = size; Kind = kind; + Size = size; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,9 +72,9 @@ internal Dinosaur() { } - /// Gets the size. - public int Size { get; } /// Discriminator. internal string Kind { get; set; } + /// Gets the size. + public int Size { get; } } } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.Serialization.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.Serialization.cs index f75a83cc75c..36a0fafd116 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.Serialization.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opti } writer.WriteStartObject(); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static TRex DeserializeTRex(JsonElement element, ModelReaderWriterOptio { return null; } - int size = default; string kind = default; + int size = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static TRex DeserializeTRex(JsonElement element, ModelReaderWriterOptio } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new TRex(size, kind, serializedAdditionalRawData); + return new TRex(kind, size, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs index dc38e6ca1c5..655cefe1fd2 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/TRex.cs @@ -21,10 +21,10 @@ internal TRex(int size) : base(size) } /// Initializes a new instance of . - /// /// Discriminator. + /// /// Keeps track of any properties unknown to the library. - internal TRex(int size, string kind, IDictionary serializedAdditionalRawData) : base(size, kind, serializedAdditionalRawData) + internal TRex(string kind, int size, IDictionary serializedAdditionalRawData) : base(kind, size, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.Serialization.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.Serialization.cs index 3647147bb41..4fe7895ccd4 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.Serialization.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteStartObject(); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static UnknownDinosaur DeserializeUnknownDinosaur(JsonElement element, { return null; } - int size = default; string kind = "Unknown"; + int size = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static UnknownDinosaur DeserializeUnknownDinosaur(JsonElement element, } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownDinosaur(size, kind, serializedAdditionalRawData); + return new UnknownDinosaur(kind, size, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.cs index 73dea1e9261..bb4a4440956 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownDinosaur.cs @@ -14,10 +14,10 @@ namespace _Type.Model.Inheritance.SingleDiscriminator.Models internal partial class UnknownDinosaur : Dinosaur { /// Initializes a new instance of . - /// /// Discriminator. + /// /// Keeps track of any properties unknown to the library. - internal UnknownDinosaur(int size, string kind, IDictionary serializedAdditionalRawData) : base(size, kind, serializedAdditionalRawData) + internal UnknownDinosaur(string kind, int size, IDictionary serializedAdditionalRawData) : base(kind, size, serializedAdditionalRawData) { } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/TypeModelInheritanceSingleDiscriminatorModelFactory.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/TypeModelInheritanceSingleDiscriminatorModelFactory.cs index 8845ae9fccb..96de8434c36 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/TypeModelInheritanceSingleDiscriminatorModelFactory.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/TypeModelInheritanceSingleDiscriminatorModelFactory.cs @@ -11,12 +11,12 @@ namespace _Type.Model.Inheritance.SingleDiscriminator.Models public static partial class TypeModelInheritanceSingleDiscriminatorModelFactory { /// Initializes a new instance of . - /// /// Discriminator. + /// /// A new instance for mocking. - public static Dinosaur Dinosaur(int size = default, string kind = null) + public static Dinosaur Dinosaur(string kind = null, int size = default) { - return new UnknownDinosaur(size, kind, serializedAdditionalRawData: null); + return new UnknownDinosaur(kind, size, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -24,7 +24,7 @@ public static Dinosaur Dinosaur(int size = default, string kind = null) /// A new instance for mocking. public static TRex TRex(int size = default) { - return new TRex(size, "t-rex", serializedAdditionalRawData: null); + return new TRex("t-rex", size, serializedAdditionalRawData: null); } } } diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json index 0f853dcd984..8dd0291df11 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json @@ -58,32 +58,32 @@ "Properties": [ { "$id": "8", - "Name": "size", - "SerializedName": "size", - "Description": "", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "9", "Kind": "Primitive", - "Name": "Int32", + "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": true }, { "$id": "10", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "size", + "SerializedName": "size", + "Description": "", "Type": { "$id": "11", "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": true + "IsReadOnly": false } ] }, diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/tests/Generated/Samples/Samples_SingleDiscriminatorClient.cs b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/tests/Generated/Samples/Samples_SingleDiscriminatorClient.cs index b33c474ac2a..9851230da29 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/tests/Generated/Samples/Samples_SingleDiscriminatorClient.cs +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/tests/Generated/Samples/Samples_SingleDiscriminatorClient.cs @@ -588,8 +588,8 @@ public void Example_SingleDiscriminator_GetLegacyModel_ShortVersion() Response response = client.GetLegacyModel(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -601,8 +601,8 @@ public async Task Example_SingleDiscriminator_GetLegacyModel_ShortVersion_Async( Response response = await client.GetLegacyModelAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -632,8 +632,8 @@ public void Example_SingleDiscriminator_GetLegacyModel_AllParameters() Response response = client.GetLegacyModel(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -645,8 +645,8 @@ public async Task Example_SingleDiscriminator_GetLegacyModel_AllParameters_Async Response response = await client.GetLegacyModelAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml b/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml index bbf14a40989..4a546b31a18 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Docs/ModelsTypeSpecClient.xml @@ -82,14 +82,14 @@ using RequestContent content = RequestContent.Create(new { requiredString = "", optionalInt = 1234, - optionalString = "", kind = "A", + optionalString = "", }); Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); ]]> @@ -120,14 +120,14 @@ using RequestContent content = RequestContent.Create(new { requiredString = "", optionalInt = 1234, - optionalString = "", kind = "A", + optionalString = "", }); Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); ]]> @@ -457,8 +457,8 @@ Console.WriteLine(result.GetProperty("requiredInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -568,9 +568,9 @@ Console.WriteLine(result.GetProperty("nonRequiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredReadonlyInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -658,8 +658,8 @@ Console.WriteLine(result.GetProperty("requiredInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -769,9 +769,9 @@ Console.WriteLine(result.GetProperty("nonRequiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredReadonlyInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -1855,8 +1855,8 @@ using RequestContent content = RequestContent.Create(new requiredModel = new { requiredString = "", - requiredPropertyOnBase = 1234, discriminatorProperty = "A", + requiredPropertyOnBase = 1234, }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -1929,9 +1929,9 @@ using RequestContent content = RequestContent.Create(new requiredModel = new { requiredString = "", + discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, - discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -2021,8 +2021,8 @@ using RequestContent content = RequestContent.Create(new requiredModel = new { requiredString = "", - requiredPropertyOnBase = 1234, discriminatorProperty = "A", + requiredPropertyOnBase = 1234, }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -2095,9 +2095,9 @@ using RequestContent content = RequestContent.Create(new requiredModel = new { requiredString = "", + discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, - discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -2875,8 +2875,8 @@ ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); Response response = await client.AnalyzeConversationAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); ]]> This sample shows how to call AnalyzeConversationAsync with all parameters and parse the result. @@ -2901,8 +2901,8 @@ ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); Response response = client.AnalyzeConversation(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); ]]> This sample shows how to call AnalyzeConversation with all parameters and parse the result. @@ -2961,8 +2961,8 @@ ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); Response response = await client.GetSingleBaseAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("size").ToString()); ]]> This sample shows how to call GetSingleBaseAsync with all parameters and parse the result. @@ -2986,8 +2986,8 @@ ModelsTypeSpecClient client = new ModelsTypeSpecClient(endpoint); Response response = client.GetSingleBase(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("size").ToString()); ]]> This sample shows how to call GetSingleBase with all parameters and parse the result. diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.Serialization.cs index ae39dc1f4ac..41e90520d1b 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.Serialization.cs @@ -28,6 +28,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); + writer.WritePropertyName("discriminatorProperty"u8); + writer.WriteStringValue(DiscriminatorProperty); if (Optional.IsDefined(OptionalPropertyOnBase)) { writer.WritePropertyName("optionalPropertyOnBase"u8); @@ -35,8 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WritePropertyName("requiredPropertyOnBase"u8); writer.WriteNumberValue(RequiredPropertyOnBase); - writer.WritePropertyName("discriminatorProperty"u8); - writer.WriteStringValue(DiscriminatorProperty); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.cs index c89a2d37bbb..d042e54ff19 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithDiscriminator.cs @@ -57,15 +57,15 @@ protected BaseModelWithDiscriminator(int requiredPropertyOnBase) } /// Initializes a new instance of . + /// Discriminator. /// Optional property on base. /// Required property on base. - /// Discriminator. /// Keeps track of any properties unknown to the library. - internal BaseModelWithDiscriminator(string optionalPropertyOnBase, int requiredPropertyOnBase, string discriminatorProperty, IDictionary serializedAdditionalRawData) + internal BaseModelWithDiscriminator(string discriminatorProperty, string optionalPropertyOnBase, int requiredPropertyOnBase, IDictionary serializedAdditionalRawData) { + DiscriminatorProperty = discriminatorProperty; OptionalPropertyOnBase = optionalPropertyOnBase; RequiredPropertyOnBase = requiredPropertyOnBase; - DiscriminatorProperty = discriminatorProperty; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -74,11 +74,11 @@ internal BaseModelWithDiscriminator() { } + /// Discriminator. + internal string DiscriminatorProperty { get; set; } /// Optional property on base. public string OptionalPropertyOnBase { get; set; } /// Required property on base. public int RequiredPropertyOnBase { get; set; } - /// Discriminator. - internal string DiscriminatorProperty { get; set; } } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.Serialization.cs index 8fea064534d..0999efe3369 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.Serialization.cs @@ -30,6 +30,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStartObject(); writer.WritePropertyName("requiredString"u8); writer.WriteStringValue(RequiredString); + writer.WritePropertyName("discriminatorProperty"u8); + writer.WriteStringValue(DiscriminatorProperty); if (Optional.IsDefined(OptionalPropertyOnBase)) { writer.WritePropertyName("optionalPropertyOnBase"u8); @@ -37,8 +39,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WritePropertyName("requiredPropertyOnBase"u8); writer.WriteNumberValue(RequiredPropertyOnBase); - writer.WritePropertyName("discriminatorProperty"u8); - writer.WriteStringValue(DiscriminatorProperty); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,9 +78,9 @@ internal static DerivedModelWithDiscriminatorA DeserializeDerivedModelWithDiscri return null; } string requiredString = default; + string discriminatorProperty = default; string optionalPropertyOnBase = default; int requiredPropertyOnBase = default; - string discriminatorProperty = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,6 +90,11 @@ internal static DerivedModelWithDiscriminatorA DeserializeDerivedModelWithDiscri requiredString = property.Value.GetString(); continue; } + if (property.NameEquals("discriminatorProperty"u8)) + { + discriminatorProperty = property.Value.GetString(); + continue; + } if (property.NameEquals("optionalPropertyOnBase"u8)) { optionalPropertyOnBase = property.Value.GetString(); @@ -100,18 +105,13 @@ internal static DerivedModelWithDiscriminatorA DeserializeDerivedModelWithDiscri requiredPropertyOnBase = property.Value.GetInt32(); continue; } - if (property.NameEquals("discriminatorProperty"u8)) - { - discriminatorProperty = property.Value.GetString(); - continue; - } if (options.Format != "W") { additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new DerivedModelWithDiscriminatorA(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData, requiredString); + return new DerivedModelWithDiscriminatorA(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData, requiredString); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.cs index a8688d34c42..51674cbc93a 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorA.cs @@ -27,12 +27,12 @@ public DerivedModelWithDiscriminatorA(int requiredPropertyOnBase, string require } /// Initializes a new instance of . + /// Discriminator. /// Optional property on base. /// Required property on base. - /// Discriminator. /// Keeps track of any properties unknown to the library. /// Required string. - internal DerivedModelWithDiscriminatorA(string optionalPropertyOnBase, int requiredPropertyOnBase, string discriminatorProperty, IDictionary serializedAdditionalRawData, string requiredString) : base(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData) + internal DerivedModelWithDiscriminatorA(string discriminatorProperty, string optionalPropertyOnBase, int requiredPropertyOnBase, IDictionary serializedAdditionalRawData, string requiredString) : base(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData) { RequiredString = requiredString; } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.Serialization.cs index c7a553d23f0..ae44651b5a9 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.Serialization.cs @@ -30,6 +30,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStartObject(); writer.WritePropertyName("requiredInt"u8); writer.WriteNumberValue(RequiredInt); + writer.WritePropertyName("discriminatorProperty"u8); + writer.WriteStringValue(DiscriminatorProperty); if (Optional.IsDefined(OptionalPropertyOnBase)) { writer.WritePropertyName("optionalPropertyOnBase"u8); @@ -37,8 +39,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WritePropertyName("requiredPropertyOnBase"u8); writer.WriteNumberValue(RequiredPropertyOnBase); - writer.WritePropertyName("discriminatorProperty"u8); - writer.WriteStringValue(DiscriminatorProperty); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,9 +78,9 @@ internal static DerivedModelWithDiscriminatorB DeserializeDerivedModelWithDiscri return null; } int requiredInt = default; + string discriminatorProperty = default; string optionalPropertyOnBase = default; int requiredPropertyOnBase = default; - string discriminatorProperty = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,6 +90,11 @@ internal static DerivedModelWithDiscriminatorB DeserializeDerivedModelWithDiscri requiredInt = property.Value.GetInt32(); continue; } + if (property.NameEquals("discriminatorProperty"u8)) + { + discriminatorProperty = property.Value.GetString(); + continue; + } if (property.NameEquals("optionalPropertyOnBase"u8)) { optionalPropertyOnBase = property.Value.GetString(); @@ -100,18 +105,13 @@ internal static DerivedModelWithDiscriminatorB DeserializeDerivedModelWithDiscri requiredPropertyOnBase = property.Value.GetInt32(); continue; } - if (property.NameEquals("discriminatorProperty"u8)) - { - discriminatorProperty = property.Value.GetString(); - continue; - } if (options.Format != "W") { additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new DerivedModelWithDiscriminatorB(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData, requiredInt); + return new DerivedModelWithDiscriminatorB(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData, requiredInt); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.cs index 6feb617f145..7657408d904 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/DerivedModelWithDiscriminatorB.cs @@ -23,12 +23,12 @@ public DerivedModelWithDiscriminatorB(int requiredPropertyOnBase, int requiredIn } /// Initializes a new instance of . + /// Discriminator. /// Optional property on base. /// Required property on base. - /// Discriminator. /// Keeps track of any properties unknown to the library. /// Required int. - internal DerivedModelWithDiscriminatorB(string optionalPropertyOnBase, int requiredPropertyOnBase, string discriminatorProperty, IDictionary serializedAdditionalRawData, int requiredInt) : base(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData) + internal DerivedModelWithDiscriminatorB(string discriminatorProperty, string optionalPropertyOnBase, int requiredPropertyOnBase, IDictionary serializedAdditionalRawData, int requiredInt) : base(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData) { RequiredInt = requiredInt; } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.Serialization.cs index f93b5c099a1..08b527d0459 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption } writer.WriteStartObject(); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.cs index d4f57f217d9..e9f9df17a25 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/SingleBase.cs @@ -53,13 +53,13 @@ protected SingleBase(int size) } /// Initializes a new instance of . - /// /// Discriminator. + /// /// Keeps track of any properties unknown to the library. - internal SingleBase(int size, string kind, IDictionary serializedAdditionalRawData) + internal SingleBase(string kind, int size, IDictionary serializedAdditionalRawData) { - Size = size; Kind = kind; + Size = size; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -68,9 +68,9 @@ internal SingleBase() { } - /// Gets the size. - public int Size { get; } /// Discriminator. internal string Kind { get; set; } + /// Gets the size. + public int Size { get; } } } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.Serialization.cs index a75b44885a8..ece35a69b49 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.Serialization.cs @@ -28,6 +28,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); + writer.WritePropertyName("discriminatorProperty"u8); + writer.WriteStringValue(DiscriminatorProperty); if (Optional.IsDefined(OptionalPropertyOnBase)) { writer.WritePropertyName("optionalPropertyOnBase"u8); @@ -35,8 +37,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WritePropertyName("requiredPropertyOnBase"u8); writer.WriteNumberValue(RequiredPropertyOnBase); - writer.WritePropertyName("discriminatorProperty"u8); - writer.WriteStringValue(DiscriminatorProperty); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,13 +75,18 @@ internal static UnknownBaseModelWithDiscriminator DeserializeUnknownBaseModelWit { return null; } + string discriminatorProperty = "Unknown"; string optionalPropertyOnBase = default; int requiredPropertyOnBase = default; - string discriminatorProperty = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("discriminatorProperty"u8)) + { + discriminatorProperty = property.Value.GetString(); + continue; + } if (property.NameEquals("optionalPropertyOnBase"u8)) { optionalPropertyOnBase = property.Value.GetString(); @@ -92,18 +97,13 @@ internal static UnknownBaseModelWithDiscriminator DeserializeUnknownBaseModelWit requiredPropertyOnBase = property.Value.GetInt32(); continue; } - if (property.NameEquals("discriminatorProperty"u8)) - { - discriminatorProperty = property.Value.GetString(); - continue; - } if (options.Format != "W") { additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownBaseModelWithDiscriminator(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData); + return new UnknownBaseModelWithDiscriminator(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.cs index 01c20b60b4c..d76c018a160 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownBaseModelWithDiscriminator.cs @@ -14,11 +14,11 @@ namespace ModelsTypeSpec.Models internal partial class UnknownBaseModelWithDiscriminator : BaseModelWithDiscriminator { /// Initializes a new instance of . + /// Discriminator. /// Optional property on base. /// Required property on base. - /// Discriminator. /// Keeps track of any properties unknown to the library. - internal UnknownBaseModelWithDiscriminator(string optionalPropertyOnBase, int requiredPropertyOnBase, string discriminatorProperty, IDictionary serializedAdditionalRawData) : base(optionalPropertyOnBase, requiredPropertyOnBase, discriminatorProperty, serializedAdditionalRawData) + internal UnknownBaseModelWithDiscriminator(string discriminatorProperty, string optionalPropertyOnBase, int requiredPropertyOnBase, IDictionary serializedAdditionalRawData) : base(discriminatorProperty, optionalPropertyOnBase, requiredPropertyOnBase, serializedAdditionalRawData) { } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.Serialization.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.Serialization.cs index 5d329aeb039..e8f20589347 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.Serialization.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption } writer.WriteStartObject(); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static UnknownSingleBase DeserializeUnknownSingleBase(JsonElement eleme { return null; } - int size = default; string kind = "Unknown"; + int size = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static UnknownSingleBase DeserializeUnknownSingleBase(JsonElement eleme } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownSingleBase(size, kind, serializedAdditionalRawData); + return new UnknownSingleBase(kind, size, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.cs b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.cs index c7bbb01f01e..fb3a5859638 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/UnknownSingleBase.cs @@ -14,10 +14,10 @@ namespace ModelsTypeSpec.Models internal partial class UnknownSingleBase : SingleBase { /// Initializes a new instance of . - /// /// Discriminator. + /// /// Keeps track of any properties unknown to the library. - internal UnknownSingleBase(int size, string kind, IDictionary serializedAdditionalRawData) : base(size, kind, serializedAdditionalRawData) + internal UnknownSingleBase(string kind, int size, IDictionary serializedAdditionalRawData) : base(kind, size, serializedAdditionalRawData) { } diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs b/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs index bf6d05a0ecd..0fde8585361 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs @@ -318,12 +318,12 @@ public static ErrorModel ErrorModel(string message = null, ErrorModel innerError } /// Initializes a new instance of . - /// /// Discriminator. + /// /// A new instance for mocking. - public static SingleBase SingleBase(int size = default, string kind = null) + public static SingleBase SingleBase(string kind = null, int size = default) { - return new UnknownSingleBase(size, kind, serializedAdditionalRawData: null); + return new UnknownSingleBase(kind, size, serializedAdditionalRawData: null); } /// Initializes a new instance of . diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index 6160aa8e2e4..41a28fe9198 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -226,32 +226,32 @@ "Properties": [ { "$id": "30", - "Name": "optionalString", - "SerializedName": "optionalString", - "Description": "Optional string.", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "31", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsRequired": false, - "IsReadOnly": false + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": true }, { "$id": "32", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "optionalString", + "SerializedName": "optionalString", + "Description": "Optional string.", "Type": { "$id": "33", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": true + "IsRequired": false, + "IsReadOnly": false } ] }, @@ -950,46 +950,46 @@ "Properties": [ { "$id": "125", - "Name": "optionalPropertyOnBase", - "SerializedName": "optionalPropertyOnBase", - "Description": "Optional property on base", + "Name": "discriminatorProperty", + "SerializedName": "discriminatorProperty", + "Description": "Discriminator", "Type": { "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsRequired": false, - "IsReadOnly": false + "IsRequired": true, + "IsReadOnly": false, + "IsDiscriminator": true }, { "$id": "127", - "Name": "requiredPropertyOnBase", - "SerializedName": "requiredPropertyOnBase", - "Description": "Required property on base", + "Name": "optionalPropertyOnBase", + "SerializedName": "optionalPropertyOnBase", + "Description": "Optional property on base", "Type": { "$id": "128", "Kind": "Primitive", - "Name": "Int32", + "Name": "String", "IsNullable": false }, - "IsRequired": true, + "IsRequired": false, "IsReadOnly": false }, { "$id": "129", - "Name": "discriminatorProperty", - "SerializedName": "discriminatorProperty", - "Description": "Discriminator", + "Name": "requiredPropertyOnBase", + "SerializedName": "requiredPropertyOnBase", + "Description": "Required property on base", "Type": { "$id": "130", "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": true + "IsReadOnly": false } ] }, @@ -2605,32 +2605,32 @@ "Properties": [ { "$id": "341", - "Name": "size", - "SerializedName": "size", - "Description": "", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "342", "Kind": "Primitive", - "Name": "Int32", + "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": true }, { "$id": "343", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "size", + "SerializedName": "size", + "Description": "", "Type": { "$id": "344", "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": true + "IsReadOnly": false } ] }, diff --git a/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs b/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs index fa8a4e9b244..536c1a1e0d9 100644 --- a/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs +++ b/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs @@ -97,14 +97,14 @@ public void Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_Al { requiredString = "", optionalInt = 1234, - optionalString = "", kind = "A", + optionalString = "", }); Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); } @@ -119,14 +119,14 @@ public async Task Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnB { requiredString = "", optionalInt = 1234, - optionalString = "", kind = "A", + optionalString = "", }); Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("optionalString").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); } @@ -322,8 +322,8 @@ public void Example_ModelsTypeSpec_InputToRoundTrip_ShortVersion() Console.WriteLine(result.GetProperty("requiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -405,8 +405,8 @@ public async Task Example_ModelsTypeSpec_InputToRoundTrip_ShortVersion_Async() Console.WriteLine(result.GetProperty("requiredNullableInt").ToString()); Console.WriteLine(result.GetProperty("requiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -601,9 +601,9 @@ public void Example_ModelsTypeSpec_InputToRoundTrip_AllParameters() Console.WriteLine(result.GetProperty("nonRequiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredReadonlyInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -722,9 +722,9 @@ public async Task Example_ModelsTypeSpec_InputToRoundTrip_AllParameters_Async() Console.WriteLine(result.GetProperty("nonRequiredNullableString").ToString()); Console.WriteLine(result.GetProperty("requiredReadonlyInt").ToString()); Console.WriteLine(result.GetProperty("nonRequiredReadonlyInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredPropertyOnBase").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("requiredFixedStringEnum").ToString()); Console.WriteLine(result.GetProperty("requiredFixedIntEnum").ToString()); Console.WriteLine(result.GetProperty("requiredExtensibleEnum").ToString()); @@ -1722,8 +1722,8 @@ public void Example_ModelsTypeSpec_RoundTripToOutput_ShortVersion() requiredModel = new { requiredString = "", - requiredPropertyOnBase = 1234, discriminatorProperty = "A", + requiredPropertyOnBase = 1234, }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -1795,8 +1795,8 @@ public async Task Example_ModelsTypeSpec_RoundTripToOutput_ShortVersion_Async() requiredModel = new { requiredString = "", - requiredPropertyOnBase = 1234, discriminatorProperty = "A", + requiredPropertyOnBase = 1234, }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -1966,9 +1966,9 @@ public void Example_ModelsTypeSpec_RoundTripToOutput_AllParameters() requiredModel = new { requiredString = "", + discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, - discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -2062,9 +2062,9 @@ public async Task Example_ModelsTypeSpec_RoundTripToOutput_AllParameters_Async() requiredModel = new { requiredString = "", + discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, - discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -3004,8 +3004,8 @@ public void Example_ModelsTypeSpec_AnalyzeConversation_ShortVersion() Response response = client.AnalyzeConversation(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); } [Test] @@ -3018,8 +3018,8 @@ public async Task Example_ModelsTypeSpec_AnalyzeConversation_ShortVersion_Async( Response response = await client.AnalyzeConversationAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); } [Test] @@ -3052,9 +3052,9 @@ public void Example_ModelsTypeSpec_AnalyzeConversation_AllParameters() Response response = client.AnalyzeConversation(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); - Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); } [Test] @@ -3067,9 +3067,9 @@ public async Task Example_ModelsTypeSpec_AnalyzeConversation_AllParameters_Async Response response = await client.AnalyzeConversationAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); Console.WriteLine(result.GetProperty("optionalPropertyOnBase").ToString()); Console.WriteLine(result.GetProperty("requiredPropertyOnBase").ToString()); - Console.WriteLine(result.GetProperty("discriminatorProperty").ToString()); } [Test] @@ -3102,8 +3102,8 @@ public void Example_ModelsTypeSpec_GetSingleBase_ShortVersion() Response response = client.GetSingleBase(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -3116,8 +3116,8 @@ public async Task Example_ModelsTypeSpec_GetSingleBase_ShortVersion_Async() Response response = await client.GetSingleBaseAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -3150,8 +3150,8 @@ public void Example_ModelsTypeSpec_GetSingleBase_AllParameters() Response response = client.GetSingleBase(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -3164,8 +3164,8 @@ public async Task Example_ModelsTypeSpec_GetSingleBase_AllParameters_Async() Response response = await client.GetSingleBaseAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] diff --git a/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs b/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs index 11c7639a3d0..14cfc6b94e6 100644 --- a/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs +++ b/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs @@ -63,8 +63,8 @@ public async Task ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_AllP { requiredString = "", optionalInt = 1234, - optionalString = "", kind = "A", + optionalString = "", }); Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(content); } @@ -774,8 +774,8 @@ public async Task ModelsTypeSpec_RoundTripToOutput_ShortVersion() requiredModel = new { requiredString = "", - requiredPropertyOnBase = 1234, discriminatorProperty = "A", + requiredPropertyOnBase = 1234, }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, @@ -894,9 +894,9 @@ public async Task ModelsTypeSpec_RoundTripToOutput_AllParameters() requiredModel = new { requiredString = "", + discriminatorProperty = "A", optionalPropertyOnBase = "", requiredPropertyOnBase = 1234, - discriminatorProperty = "A", }, requiredFixedStringEnum = "1", requiredFixedIntEnum = 1, diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Docs/Pets.xml b/test/TestProjects/PetStore-TypeSpec/src/Generated/Docs/Pets.xml index 13692860576..8570ed56390 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Docs/Pets.xml +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Docs/Pets.xml @@ -463,8 +463,8 @@ Pets client = new PetStoreClient(endpoint).GetPetsClient(); Response response = await client.GetFishAsync(null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("size").ToString()); ]]> This sample shows how to call GetFishAsync with all parameters and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("size").ToString()); ]]> @@ -488,8 +488,8 @@ Pets client = new PetStoreClient(endpoint).GetPetsClient(); Response response = client.GetFish(null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("size").ToString()); ]]> This sample shows how to call GetFish with all parameters and parse the result. ", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); +Console.WriteLine(result.GetProperty("size").ToString()); ]]> diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.Serialization.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.Serialization.cs index 4afb338acaa..47dcae311d3 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.Serialization.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opti } writer.WriteStartObject(); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.cs index 2d07b54c9b8..1ce5549989f 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Fish.cs @@ -57,13 +57,13 @@ protected Fish(int size) } /// Initializes a new instance of . - /// The size of the fish. /// Discriminator. + /// The size of the fish. /// Keeps track of any properties unknown to the library. - internal Fish(int size, string kind, IDictionary serializedAdditionalRawData) + internal Fish(string kind, int size, IDictionary serializedAdditionalRawData) { - Size = size; Kind = kind; + Size = size; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,9 +72,9 @@ internal Fish() { } - /// The size of the fish. - public int Size { get; } /// Discriminator. internal string Kind { get; set; } + /// The size of the fish. + public int Size { get; } } } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.Serialization.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.Serialization.cs index e16884a8a10..b9169924089 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.Serialization.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.Serialization.cs @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opt writer.WriteStartObject(); writer.WritePropertyName("bite"u8); writer.WriteStringValue(Bite); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -73,8 +73,8 @@ internal static Shark DeserializeShark(JsonElement element, ModelReaderWriterOpt return null; } string bite = default; - int size = default; string kind = default; + int size = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -84,14 +84,14 @@ internal static Shark DeserializeShark(JsonElement element, ModelReaderWriterOpt bite = property.Value.GetString(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -100,7 +100,7 @@ internal static Shark DeserializeShark(JsonElement element, ModelReaderWriterOpt } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new Shark(size, kind, serializedAdditionalRawData, bite); + return new Shark(kind, size, serializedAdditionalRawData, bite); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.cs index be4b3521b02..882180798aa 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Shark.cs @@ -27,11 +27,11 @@ internal Shark(int size, string bite) : base(size) } /// Initializes a new instance of . - /// The size of the fish. /// Discriminator. + /// The size of the fish. /// Keeps track of any properties unknown to the library. /// The bite of the shark. - internal Shark(int size, string kind, IDictionary serializedAdditionalRawData, string bite) : base(size, kind, serializedAdditionalRawData) + internal Shark(string kind, int size, IDictionary serializedAdditionalRawData, string bite) : base(kind, size, serializedAdditionalRawData) { Bite = bite; } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.Serialization.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.Serialization.cs index 94f61a642d9..70a7ddcb88a 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.Serialization.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.Serialization.cs @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opti writer.WriteStartObject(); writer.WritePropertyName("fat"u8); writer.WriteNumberValue(Fat); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -73,8 +73,8 @@ internal static Tuna DeserializeTuna(JsonElement element, ModelReaderWriterOptio return null; } int fat = default; - int size = default; string kind = default; + int size = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -84,14 +84,14 @@ internal static Tuna DeserializeTuna(JsonElement element, ModelReaderWriterOptio fat = property.Value.GetInt32(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -100,7 +100,7 @@ internal static Tuna DeserializeTuna(JsonElement element, ModelReaderWriterOptio } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new Tuna(size, kind, serializedAdditionalRawData, fat); + return new Tuna(kind, size, serializedAdditionalRawData, fat); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.cs index d06aae8fe0b..731995b67b2 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/Tuna.cs @@ -23,11 +23,11 @@ internal Tuna(int size, int fat) : base(size) } /// Initializes a new instance of . - /// The size of the fish. /// Discriminator. + /// The size of the fish. /// Keeps track of any properties unknown to the library. /// The amount of fat of the tuna. - internal Tuna(int size, string kind, IDictionary serializedAdditionalRawData, int fat) : base(size, kind, serializedAdditionalRawData) + internal Tuna(string kind, int size, IDictionary serializedAdditionalRawData, int fat) : base(kind, size, serializedAdditionalRawData) { Fat = fat; } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.Serialization.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.Serialization.cs index 2f8f9a2d63f..f8c94362290 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.Serialization.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.Serialization.cs @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions opti } writer.WriteStartObject(); - writer.WritePropertyName("size"u8); - writer.WriteNumberValue(Size); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind); + writer.WritePropertyName("size"u8); + writer.WriteNumberValue(Size); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -70,20 +70,20 @@ internal static UnknownFish DeserializeUnknownFish(JsonElement element, ModelRea { return null; } - int size = default; string kind = "Unknown"; + int size = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("size"u8)) + if (property.NameEquals("kind"u8)) { - size = property.Value.GetInt32(); + kind = property.Value.GetString(); continue; } - if (property.NameEquals("kind"u8)) + if (property.NameEquals("size"u8)) { - kind = property.Value.GetString(); + size = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -92,7 +92,7 @@ internal static UnknownFish DeserializeUnknownFish(JsonElement element, ModelRea } } serializedAdditionalRawData = additionalPropertiesDictionary; - return new UnknownFish(size, kind, serializedAdditionalRawData); + return new UnknownFish(kind, size, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.cs index 8b78414676a..84ef6bf889d 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/Models/UnknownFish.cs @@ -14,10 +14,10 @@ namespace PetStore.Models internal partial class UnknownFish : Fish { /// Initializes a new instance of . - /// The size of the fish. /// Discriminator. + /// The size of the fish. /// Keeps track of any properties unknown to the library. - internal UnknownFish(int size, string kind, IDictionary serializedAdditionalRawData) : base(size, kind, serializedAdditionalRawData) + internal UnknownFish(string kind, int size, IDictionary serializedAdditionalRawData) : base(kind, size, serializedAdditionalRawData) { } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/PetStoreModelFactory.cs b/test/TestProjects/PetStore-TypeSpec/src/Generated/PetStoreModelFactory.cs index 30e13cd6a72..f6682ef4d5e 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/PetStoreModelFactory.cs +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/PetStoreModelFactory.cs @@ -11,12 +11,12 @@ namespace PetStore.Models public static partial class PetStoreModelFactory { /// Initializes a new instance of . - /// The size of the fish. /// Discriminator. + /// The size of the fish. /// A new instance for mocking. - public static Fish Fish(int size = default, string kind = null) + public static Fish Fish(string kind = null, int size = default) { - return new UnknownFish(size, kind, serializedAdditionalRawData: null); + return new UnknownFish(kind, size, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -25,7 +25,7 @@ public static Fish Fish(int size = default, string kind = null) /// A new instance for mocking. public static Shark Shark(int size = default, string bite = null) { - return new Shark(size, "shark", serializedAdditionalRawData: null, bite); + return new Shark("shark", size, serializedAdditionalRawData: null, bite); } /// Initializes a new instance of . @@ -34,7 +34,7 @@ public static Shark Shark(int size = default, string bite = null) /// A new instance for mocking. public static Tuna Tuna(int size = default, int fat = default) { - return new Tuna(size, "tuna", serializedAdditionalRawData: null, fat); + return new Tuna("tuna", size, serializedAdditionalRawData: null, fat); } } } diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json index 9fb76888e68..edc3e57f86d 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json @@ -93,32 +93,32 @@ "Properties": [ { "$id": "13", - "Name": "size", - "SerializedName": "size", - "Description": "The size of the fish", + "Name": "kind", + "SerializedName": "kind", + "Description": "Discriminator", "Type": { "$id": "14", "Kind": "Primitive", - "Name": "Int32", + "Name": "String", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false + "IsReadOnly": false, + "IsDiscriminator": true }, { "$id": "15", - "Name": "kind", - "SerializedName": "kind", - "Description": "Discriminator", + "Name": "size", + "SerializedName": "size", + "Description": "The size of the fish", "Type": { "$id": "16", "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": true + "IsReadOnly": false } ] }, diff --git a/test/TestProjects/PetStore-TypeSpec/tests/Generated/Samples/Samples_Pets.cs b/test/TestProjects/PetStore-TypeSpec/tests/Generated/Samples/Samples_Pets.cs index 4cd118cbb15..74648938ef4 100644 --- a/test/TestProjects/PetStore-TypeSpec/tests/Generated/Samples/Samples_Pets.cs +++ b/test/TestProjects/PetStore-TypeSpec/tests/Generated/Samples/Samples_Pets.cs @@ -501,8 +501,8 @@ public void Example_Pets_GetFish_ShortVersion() Response response = client.GetFish(null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -515,8 +515,8 @@ public async Task Example_Pets_GetFish_ShortVersion_Async() Response response = await client.GetFishAsync(null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -549,8 +549,8 @@ public void Example_Pets_GetFish_AllParameters() Response response = client.GetFish("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] @@ -563,8 +563,8 @@ public async Task Example_Pets_GetFish_AllParameters_Async() Response response = await client.GetFishAsync("", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("size").ToString()); Console.WriteLine(result.GetProperty("kind").ToString()); + Console.WriteLine(result.GetProperty("size").ToString()); } [Test] From fa855feefbccd09a946c1d84cc093b32dc81b8b7 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 20 Mar 2024 17:18:06 +0800 Subject: [PATCH 23/60] fix code gen --- .../src/Generated/tspCodeModel.json | 309 ++++++------------ 1 file changed, 103 insertions(+), 206 deletions(-) diff --git a/samples/AnomalyDetector/src/Generated/tspCodeModel.json b/samples/AnomalyDetector/src/Generated/tspCodeModel.json index 6cafcfea8d6..b6204125a42 100644 --- a/samples/AnomalyDetector/src/Generated/tspCodeModel.json +++ b/samples/AnomalyDetector/src/Generated/tspCodeModel.json @@ -400,8 +400,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "63", @@ -415,16 +414,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "65", @@ -435,8 +432,7 @@ "$ref": "4" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "66", @@ -450,8 +446,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "68", @@ -465,8 +460,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "70", @@ -480,8 +474,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "72", @@ -495,8 +488,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "74", @@ -507,8 +499,7 @@ "$ref": "14" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "75", @@ -522,8 +513,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -551,8 +541,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "80", @@ -572,8 +561,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "83", @@ -593,8 +581,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "86", @@ -614,8 +601,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "89", @@ -635,8 +621,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "92", @@ -656,8 +641,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "95", @@ -677,8 +661,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "98", @@ -698,8 +681,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -724,8 +706,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "104", @@ -739,8 +720,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "106", @@ -754,8 +734,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "108", @@ -769,8 +748,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "110", @@ -784,8 +762,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "112", @@ -799,8 +776,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "114", @@ -814,8 +790,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "116", @@ -829,8 +804,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "118", @@ -844,8 +818,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -873,8 +846,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "123", @@ -885,8 +857,7 @@ "$ref": "4" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "124", @@ -900,8 +871,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "126", @@ -915,8 +885,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "128", @@ -930,8 +899,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "130", @@ -945,8 +913,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -971,8 +938,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "135", @@ -992,8 +958,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "138", @@ -1013,8 +978,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1039,8 +1003,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "144", @@ -1065,8 +1028,7 @@ "$ref": "21" }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "147", @@ -1098,8 +1060,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "152", @@ -1113,16 +1074,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "154", @@ -1154,8 +1113,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "159", @@ -1169,8 +1127,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "161", @@ -1184,8 +1141,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "163", @@ -1199,8 +1155,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "165", @@ -1214,16 +1169,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "167", @@ -1251,8 +1204,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "171", @@ -1266,8 +1218,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "173", @@ -1281,8 +1232,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "175", @@ -1296,20 +1246,17 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "177", @@ -1341,8 +1288,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "182", @@ -1370,8 +1316,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "186", @@ -1385,8 +1330,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "188", @@ -1400,8 +1344,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "190", @@ -1433,8 +1376,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "195", @@ -1448,8 +1390,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "197", @@ -1483,28 +1424,24 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "202", @@ -1521,16 +1458,14 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1579,8 +1514,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "207", @@ -1591,8 +1525,7 @@ "$ref": "26" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "208", @@ -1606,8 +1539,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "210", @@ -1621,8 +1553,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "212", @@ -1636,8 +1567,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "214", @@ -1651,8 +1581,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "216", @@ -1677,8 +1606,7 @@ "$ref": "29" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "219", @@ -1689,8 +1617,7 @@ "$ref": "32" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "220", @@ -1704,14 +1631,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "222", @@ -1722,8 +1647,7 @@ "$ref": "38" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "223", @@ -1740,8 +1664,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "225", @@ -1789,8 +1712,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "232", @@ -1810,8 +1732,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "235", @@ -1831,8 +1752,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "238", @@ -1852,14 +1772,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "241", @@ -1876,14 +1794,12 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1917,8 +1833,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true, - "IsDiscriminator": false + "IsReadOnly": true }, { "$id": "246", @@ -1932,8 +1847,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "248", @@ -1947,8 +1861,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "250", @@ -1959,8 +1872,7 @@ "$ref": "204" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -1988,8 +1900,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "254", @@ -2003,8 +1914,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "256", @@ -2018,8 +1928,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "258", @@ -2033,8 +1942,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2077,8 +1985,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "266", @@ -2098,8 +2005,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "269", @@ -2119,16 +2025,14 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "272", @@ -2142,8 +2046,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2174,8 +2077,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "277", @@ -2192,8 +2094,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2215,8 +2116,7 @@ "$ref": "43" }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "281", @@ -2230,8 +2130,7 @@ "IsNullable": false }, "IsRequired": false, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] }, @@ -2256,8 +2155,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false }, { "$id": "286", @@ -2271,8 +2169,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": false, - "IsDiscriminator": false + "IsReadOnly": false } ] } From d383a6d1e753a1cbbf65fce294944db6165ae342 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 20 Mar 2024 22:37:09 +0800 Subject: [PATCH 24/60] fix style --- .../Emitter.Csharp/src/type/converter.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 3955a0fee25..bdabe743581 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -173,12 +173,20 @@ export function fromSdkModelType( // Now TCGC will append implicit discriminator property at the end, so we need to tune the sequence // Will follow up with TCGC team to see if they can change the logic to insert discriminator property at the beginning, which seems more reasonable // Then we can remove the following codes - if (inputModelType.DiscriminatorPropertyName && !(modelType.__raw! as Model).properties.has(inputModelType?.DiscriminatorPropertyName)) { + if ( + inputModelType.DiscriminatorPropertyName && + !(modelType.__raw! as Model).properties.has( + inputModelType?.DiscriminatorPropertyName + ) + ) { const index = inputModelType.Properties.findIndex( - (p) => p.IsDiscriminator + (p) => p.IsDiscriminator ); if (index !== 0 && index !== -1) { - const discriminator = inputModelType.Properties.splice(index, 1)[0]; + const discriminator = inputModelType.Properties.splice( + index, + 1 + )[0]; inputModelType.Properties.unshift(discriminator); } } From aa50048e5e752b61e33a85927e9dd1bb214d7371 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 21 Mar 2024 16:41:37 +0800 Subject: [PATCH 25/60] regen --- .../type/union/src/Generated/Models/GetResponse.cs | 1 - .../type/union/src/Generated/Models/GetResponse1.cs | 1 - .../type/union/src/Generated/Models/GetResponse2.cs | 1 - .../type/union/src/Generated/Models/SendRequest.cs | 1 - .../type/union/src/Generated/Models/SendRequest1.cs | 1 - .../type/union/src/Generated/Models/SendRequest2.cs | 1 - 6 files changed, 6 deletions(-) diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse.cs index 7a52d53d959..19a3b6b7c87 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Union; namespace _Type.Union.Models { diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse1.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse1.cs index ea7700c185c..0c02df7e83b 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse1.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse1.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Union; namespace _Type.Union.Models { diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse2.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse2.cs index 70406d67e85..e144e93cd23 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse2.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse2.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Union; namespace _Type.Union.Models { diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest.cs index c580c5c396b..58df02b01a5 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Union; namespace _Type.Union.Models { diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest1.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest1.cs index db6697b6374..6457cacc01b 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest1.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest1.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Union; namespace _Type.Union.Models { diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest2.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest2.cs index adb05abe9b3..cc9449b6733 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest2.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest2.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Union; namespace _Type.Union.Models { From f979b1a04afbaa1fe2e960c7205fe46953840914 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 21 Mar 2024 16:47:40 +0800 Subject: [PATCH 26/60] fix node test --- .../Emitter.Csharp/test/Unit/modelType.test.ts | 4 ++-- .../Emitter.Csharp/test/Unit/propertyType.test.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts index 104d06c620a..5ea13cd892b 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts @@ -189,7 +189,7 @@ op test(@body input: Pet): Pet; Description: "The pet kind", Accessibility: undefined, Deprecated: undefined, - EnumValueType: "string", + EnumValueType: "String", AllowedValues: [ { Name: "Cat", @@ -323,7 +323,7 @@ op test(@body input: Pet): Pet; Accessibility: undefined, Deprecated: undefined, Description: "The pet kind", - EnumValueType: "string", + EnumValueType: "String", AllowedValues: [ { Name: "Cat", diff --git a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts index dbc7e0d9a56..778ab0abdc9 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts @@ -123,7 +123,7 @@ describe("Test GetInputType for enum", () => { Accessibility: undefined, Deprecated: undefined, Description: "fixed string enum", - EnumValueType: "string", + EnumValueType: "String", AllowedValues: [ { Name: "One", @@ -190,7 +190,7 @@ describe("Test GetInputType for enum", () => { Accessibility: undefined, Deprecated: undefined, Description: "Fixed int enum", - EnumValueType: "int32", + EnumValueType: "Int32", AllowedValues: [ { Name: "One", @@ -250,7 +250,7 @@ describe("Test GetInputType for enum", () => { Accessibility: undefined, Deprecated: undefined, Description: "Extensible enum", - EnumValueType: "string", + EnumValueType: "String", AllowedValues: [ { Name: "One", Value: "1", Description: undefined }, { Name: "Two", Value: "2", Description: undefined }, From c75f66b5b7cbb906a52a123018b6bb110bd4c836 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Fri, 22 Mar 2024 11:22:42 +0800 Subject: [PATCH 27/60] regen --- .../value-types/src/Generated/Models/UnionEnumValueProperty.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs index 83b6e4fbbf3..d0e1c4b67f3 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using _Type.Property.ValueTypes; namespace _Type.Property.ValueTypes.Models { From 32a0ad716141c6505811535dc40db39120776edd Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Tue, 26 Mar 2024 22:40:54 +0800 Subject: [PATCH 28/60] do not convert enum client parameters into string except for api-version --- .../src/Generated/ServiceClient.cs | 6 +- .../src/Generated/ServiceRestClient.cs | 16 +++--- .../src/Generated/TableInternalClient.cs | 6 +- .../src/Generated/TableInternalRestClient.cs | 30 +++++----- .../Common/Output/Models/ClientFields.cs | 3 + .../Common/Output/Models/RestClientBuilder.cs | 6 +- .../LowLevel/AutoRest/DpgOutputLibrary.cs | 2 +- .../Output/OperationMethodChainBuilder.cs | 2 +- .../src/Generated/ClientAClient.cs | 24 ++++---- .../src/Generated/ClientBClient.cs | 24 ++++---- ...ceMultipleClientClientBuilderExtensions.cs | 9 +-- .../src/Generated/Docs/ClientAClient.xml | 24 ++++---- .../src/Generated/Docs/ClientBClient.xml | 24 ++++---- .../src/Generated/Models/ClientType.cs | 57 +++++++++++++++++++ .../Samples/Samples_ClientAClient.cs | 25 ++++---- .../Samples/Samples_ClientBClient.cs | 25 ++++---- ...erenameoperationClientBuilderExtensions.cs | 5 +- .../src/Generated/Docs/Group.xml | 24 ++++---- .../Generated/Docs/RenamedOperationClient.xml | 24 ++++---- .../renamed-operation/src/Generated/Group.cs | 13 +++-- .../src/Generated/Models/ClientType.cs | 57 +++++++++++++++++++ .../src/Generated/RenamedOperationClient.cs | 24 ++++---- .../tests/Generated/Samples/Samples_Group.cs | 25 ++++---- .../Samples/Samples_RenamedOperationClient.cs | 25 ++++---- .../src/Generated/Docs/Group1.xml | 24 ++++---- .../src/Generated/Docs/Group2.xml | 24 ++++---- .../src/Generated/Group1.cs | 13 +++-- .../src/Generated/Group2.cs | 13 +++-- .../src/Generated/Models/ClientType.cs | 57 +++++++++++++++++++ .../src/Generated/TwoOperationGroupClient.cs | 17 ++---- .../tests/Generated/Samples/Samples_Group1.cs | 25 ++++---- .../tests/Generated/Samples/Samples_Group2.cs | 25 ++++---- .../src/Generated/Docs/UnionEnumValue.xml | 8 +-- .../src/Generated/Models/ExtendedEnum.cs | 48 ++++++++++++++++ .../UnionEnumValueProperty.Serialization.cs | 6 +- .../Models/UnionEnumValueProperty.cs | 9 +-- .../Samples/Samples_UnionEnumValue.cs | 8 +-- .../Generated/MultipleInputFilesClient.cs | 23 +++----- .../Generated/MultipleInputFilesRestClient.cs | 15 +++-- 39 files changed, 502 insertions(+), 293 deletions(-) create mode 100644 test/CadlRanchProjects/client/structure/multi-client/src/Generated/Models/ClientType.cs create mode 100644 test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Models/ClientType.cs create mode 100644 test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Models/ClientType.cs create mode 100644 test/CadlRanchProjects/type/property/value-types/src/Generated/Models/ExtendedEnum.cs diff --git a/samples/AzureSample.Storage.Tables/src/Generated/ServiceClient.cs b/samples/AzureSample.Storage.Tables/src/Generated/ServiceClient.cs index ca99207974a..6d00a20e882 100644 --- a/samples/AzureSample.Storage.Tables/src/Generated/ServiceClient.cs +++ b/samples/AzureSample.Storage.Tables/src/Generated/ServiceClient.cs @@ -30,9 +30,9 @@ protected ServiceClient() /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The URL of the service account or table that is the targe of the desired operation. - /// Specifies the version of the operation to use for this request. Allowed values: "2018-10-10". - /// , , or is null. - internal ServiceClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version) + /// Specifies the version of the operation to use for this request. + /// , or is null. + internal ServiceClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, Enum0 version) { RestClient = new ServiceRestClient(clientDiagnostics, pipeline, url, version); _clientDiagnostics = clientDiagnostics; diff --git a/samples/AzureSample.Storage.Tables/src/Generated/ServiceRestClient.cs b/samples/AzureSample.Storage.Tables/src/Generated/ServiceRestClient.cs index e411336414d..be3560cfac3 100644 --- a/samples/AzureSample.Storage.Tables/src/Generated/ServiceRestClient.cs +++ b/samples/AzureSample.Storage.Tables/src/Generated/ServiceRestClient.cs @@ -20,7 +20,7 @@ internal partial class ServiceRestClient { private readonly HttpPipeline _pipeline; private readonly string _url; - private readonly string _version; + private readonly Enum0 _version; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -29,14 +29,14 @@ internal partial class ServiceRestClient /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The URL of the service account or table that is the targe of the desired operation. - /// Specifies the version of the operation to use for this request. Allowed values: "2018-10-10". - /// , , or is null. - public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version) + /// Specifies the version of the operation to use for this request. + /// , or is null. + public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, Enum0 version) { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _url = url ?? throw new ArgumentNullException(nameof(url)); - _version = version ?? throw new ArgumentNullException(nameof(version)); + _version = version; } internal HttpMessage CreateSetPropertiesRequest(Enum4 restype, Enum5 comp, StorageServiceProperties storageServiceProperties, int? timeout) @@ -54,7 +54,7 @@ internal HttpMessage CreateSetPropertiesRequest(Enum4 restype, Enum5 comp, Stora uri.AppendQuery("timeout", timeout.Value, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("Accept", "application/xml"); request.Headers.Add("Content-Type", "application/xml"); var content = new XmlWriterContent(); @@ -130,7 +130,7 @@ internal HttpMessage CreateGetPropertiesRequest(Enum4 restype, Enum5 comp, int? uri.AppendQuery("timeout", timeout.Value, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("Accept", "application/xml"); return message; } @@ -204,7 +204,7 @@ internal HttpMessage CreateGetStatisticsRequest(Enum4 restype, Enum6 comp, int? uri.AppendQuery("timeout", timeout.Value, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("Accept", "application/xml"); return message; } diff --git a/samples/AzureSample.Storage.Tables/src/Generated/TableInternalClient.cs b/samples/AzureSample.Storage.Tables/src/Generated/TableInternalClient.cs index 20cbf2b67d2..8c75e68436b 100644 --- a/samples/AzureSample.Storage.Tables/src/Generated/TableInternalClient.cs +++ b/samples/AzureSample.Storage.Tables/src/Generated/TableInternalClient.cs @@ -31,9 +31,9 @@ protected TableInternalClient() /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The URL of the service account or table that is the targe of the desired operation. - /// Specifies the version of the operation to use for this request. Allowed values: "2018-10-10". - /// , , or is null. - internal TableInternalClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version) + /// Specifies the version of the operation to use for this request. + /// , or is null. + internal TableInternalClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, Enum0 version) { RestClient = new TableInternalRestClient(clientDiagnostics, pipeline, url, version); _clientDiagnostics = clientDiagnostics; diff --git a/samples/AzureSample.Storage.Tables/src/Generated/TableInternalRestClient.cs b/samples/AzureSample.Storage.Tables/src/Generated/TableInternalRestClient.cs index d332bf1d26d..0956c020c10 100644 --- a/samples/AzureSample.Storage.Tables/src/Generated/TableInternalRestClient.cs +++ b/samples/AzureSample.Storage.Tables/src/Generated/TableInternalRestClient.cs @@ -22,7 +22,7 @@ internal partial class TableInternalRestClient { private readonly HttpPipeline _pipeline; private readonly string _url; - private readonly string _version; + private readonly Enum0 _version; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -31,14 +31,14 @@ internal partial class TableInternalRestClient /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The URL of the service account or table that is the targe of the desired operation. - /// Specifies the version of the operation to use for this request. Allowed values: "2018-10-10". - /// , , or is null. - public TableInternalRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version) + /// Specifies the version of the operation to use for this request. + /// , or is null. + public TableInternalRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, Enum0 version) { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _url = url ?? throw new ArgumentNullException(nameof(url)); - _version = version ?? throw new ArgumentNullException(nameof(version)); + _version = version; } internal HttpMessage CreateQueryRequest(Enum1 dataServiceVersion, QueryOptions queryOptions) @@ -66,7 +66,7 @@ internal HttpMessage CreateQueryRequest(Enum1 dataServiceVersion, QueryOptions q uri.AppendQuery("$filter", queryOptions.Filter, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; @@ -131,7 +131,7 @@ internal HttpMessage CreateCreateRequest(Enum1 dataServiceVersion, TableProperti uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); request.Headers.Add("Content-Type", "application/json;odata=nometadata"); @@ -216,7 +216,7 @@ internal HttpMessage CreateDeleteRequest(string table) uri.AppendPath(table, true); uri.AppendPath("')", false); request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; } @@ -298,7 +298,7 @@ internal HttpMessage CreateQueryEntitiesRequest(Enum1 dataServiceVersion, string uri.AppendQuery("$filter", queryOptions.Filter, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; @@ -397,7 +397,7 @@ internal HttpMessage CreateQueryEntitiesWithPartitionAndRowKeyRequest(Enum1 data uri.AppendQuery("$filter", queryOptions.Filter, true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; @@ -508,7 +508,7 @@ internal HttpMessage CreateUpdateEntityRequest(Enum1 dataServiceVersion, string uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); if (tableEntityProperties != null) @@ -629,7 +629,7 @@ internal HttpMessage CreateDeleteEntityRequest(Enum1 dataServiceVersion, string uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); return message; @@ -725,7 +725,7 @@ internal HttpMessage CreateInsertEntityRequest(Enum1 dataServiceVersion, string uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("DataServiceVersion", dataServiceVersion.ToString()); request.Headers.Add("Accept", "application/json;odata=nometadata"); if (tableEntityProperties != null) @@ -852,7 +852,7 @@ internal HttpMessage CreateGetAccessPolicyRequest(string table, Enum3 comp, int? } uri.AppendQuery("comp", comp.ToString(), true); request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("Accept", "application/xml"); return message; } @@ -948,7 +948,7 @@ internal HttpMessage CreateSetAccessPolicyRequest(string table, Enum3 comp, int? } uri.AppendQuery("comp", comp.ToString(), true); request.Uri = uri; - request.Headers.Add("x-ms-version", _version); + request.Headers.Add("x-ms-version", _version.ToString()); request.Headers.Add("Accept", "application/xml"); if (tableAcl != null) { diff --git a/src/AutoRest.CSharp/Common/Output/Models/ClientFields.cs b/src/AutoRest.CSharp/Common/Output/Models/ClientFields.cs index f36a91990dc..048b1bac1ab 100644 --- a/src/AutoRest.CSharp/Common/Output/Models/ClientFields.cs +++ b/src/AutoRest.CSharp/Common/Output/Models/ClientFields.cs @@ -131,6 +131,9 @@ private ClientFields(IEnumerable parameters, InputAuth? authorization public FieldDeclaration? GetFieldByParameter(Parameter parameter) => GetFieldByParameter(parameter.Name, parameter.Type); + public FieldDeclaration? GetFieldByName(string name) + => _parameterNamesToFields.TryGetValue(name, out FieldDeclaration? field) ? field : null; + public IEnumerator GetEnumerator() => _fields.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => _fields.GetEnumerator(); public int Count => _fields.Count; diff --git a/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs b/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs index af978159ff4..0083be51222 100644 --- a/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs +++ b/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs @@ -478,7 +478,7 @@ private static IEnumerable GetPathSegments(string httpRequestUri, I public virtual Parameter BuildConstructorParameter(InputParameter operationParameter) { - var parameter = BuildParameter(operationParameter, operationParameter is { Kind: InputOperationParameterKind.Client, Type: InputEnumType enumType } ? _typeFactory.CreateType(enumType.EnumValueType).FrameworkType : null); + var parameter = BuildParameter(operationParameter); if (!operationParameter.IsEndpoint) { return parameter; @@ -498,7 +498,9 @@ public static bool IsIgnoredHeaderParameter(InputParameter operationParameter) private Parameter BuildParameter(in InputParameter operationParameter, Type? typeOverride = null) { - CSharpType type = typeOverride != null ? new CSharpType(typeOverride, operationParameter.Type.IsNullable) : _typeFactory.CreateType(operationParameter.Type); + CSharpType type = typeOverride != null ? new CSharpType(typeOverride, operationParameter.Type.IsNullable) : + // for apiVersion, we still convert enum type to enum value type + operationParameter is { IsApiVersion: true, Type: InputEnumType enumType } ? _typeFactory.CreateType(enumType.EnumValueType) : _typeFactory.CreateType(operationParameter.Type); return Parameter.FromInputParameter(operationParameter, type, _typeFactory); } diff --git a/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs b/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs index cbc0f5c53bd..7617027a25c 100644 --- a/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs +++ b/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs @@ -120,7 +120,7 @@ private Dictionary EnsureDpgSampleProvi public override CSharpType ResolveEnum(InputEnumType enumType) { - if (!_isTspInput || enumType.Usage == InputModelTypeUsage.None) + if (!_isTspInput) { return TypeFactory.CreateType(enumType.EnumValueType); } diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs index 06999be0f20..5aa508443cc 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -650,7 +650,7 @@ private ReferenceOrConstant CreateReference(InputParameter operationParameter, P { if (operationParameter.Kind == InputOperationParameterKind.Client) { - var field = operationParameter.IsEndpoint ? _fields.EndpointField : _fields.GetFieldByParameter(parameter); + var field = operationParameter.IsEndpoint ? _fields.EndpointField : _fields.GetFieldByName(parameter.Name); if (field == null) { throw new InvalidOperationException($"Parameter '{parameter.Name}' should have matching field"); diff --git a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientAClient.cs b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientAClient.cs index aa6d5e8e3b4..444a86b6df4 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientAClient.cs +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientAClient.cs @@ -10,6 +10,7 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Client.Structure.Service.Multiple.Client.Models; namespace Client.Structure.Service.Multiple.Client { @@ -19,7 +20,7 @@ public partial class ClientAClient { private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; - private readonly string _client; + private readonly ClientType _client; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -34,23 +35,20 @@ protected ClientAClient() /// Initializes a new instance of ClientAClient. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - /// or is null. - /// is an empty string, and was expected to be non-empty. - public ClientAClient(Uri endpoint, string client) : this(endpoint, client, new ClientStructureServiceMultipleClientOptions()) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + /// is null. + public ClientAClient(Uri endpoint, ClientType client) : this(endpoint, client, new ClientStructureServiceMultipleClientOptions()) { } /// Initializes a new instance of ClientAClient. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. /// The options for configuring the client. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public ClientAClient(Uri endpoint, string client, ClientStructureServiceMultipleClientOptions options) + /// is null. + public ClientAClient(Uri endpoint, ClientType client, ClientStructureServiceMultipleClientOptions options) { Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNullOrEmpty(client, nameof(client)); options ??= new ClientStructureServiceMultipleClientOptions(); ClientDiagnostics = new ClientDiagnostics(options, true); @@ -253,7 +251,7 @@ internal HttpMessage CreateRenamedOneRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/one", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -268,7 +266,7 @@ internal HttpMessage CreateRenamedThreeRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/three", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -283,7 +281,7 @@ internal HttpMessage CreateRenamedFiveRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/five", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientBClient.cs b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientBClient.cs index 2b36fbb6117..321e2350418 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientBClient.cs +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientBClient.cs @@ -10,6 +10,7 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Client.Structure.Service.Multiple.Client.Models; namespace Client.Structure.Service.Multiple.Client { @@ -19,7 +20,7 @@ public partial class ClientBClient { private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; - private readonly string _client; + private readonly ClientType _client; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -34,23 +35,20 @@ protected ClientBClient() /// Initializes a new instance of ClientBClient. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - /// or is null. - /// is an empty string, and was expected to be non-empty. - public ClientBClient(Uri endpoint, string client) : this(endpoint, client, new ClientStructureServiceMultipleClientOptions()) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + /// is null. + public ClientBClient(Uri endpoint, ClientType client) : this(endpoint, client, new ClientStructureServiceMultipleClientOptions()) { } /// Initializes a new instance of ClientBClient. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. /// The options for configuring the client. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public ClientBClient(Uri endpoint, string client, ClientStructureServiceMultipleClientOptions options) + /// is null. + public ClientBClient(Uri endpoint, ClientType client, ClientStructureServiceMultipleClientOptions options) { Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNullOrEmpty(client, nameof(client)); options ??= new ClientStructureServiceMultipleClientOptions(); ClientDiagnostics = new ClientDiagnostics(options, true); @@ -253,7 +251,7 @@ internal HttpMessage CreateRenamedTwoRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/two", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -268,7 +266,7 @@ internal HttpMessage CreateRenamedFourRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/four", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -283,7 +281,7 @@ internal HttpMessage CreateRenamedSixRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/six", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientStructureServiceMultipleClientClientBuilderExtensions.cs b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientStructureServiceMultipleClientClientBuilderExtensions.cs index 024439c77e4..9a4f29869d9 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientStructureServiceMultipleClientClientBuilderExtensions.cs +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientStructureServiceMultipleClientClientBuilderExtensions.cs @@ -8,6 +8,7 @@ using System; using Azure.Core.Extensions; using Client.Structure.Service.Multiple.Client; +using Client.Structure.Service.Multiple.Client.Models; namespace Microsoft.Extensions.Azure { @@ -17,8 +18,8 @@ public static partial class ClientStructureServiceMultipleClientClientBuilderExt /// Registers a instance. /// The builder to register with. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - public static IAzureClientBuilder AddClientAClient(this TBuilder builder, Uri endpoint, string client) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + public static IAzureClientBuilder AddClientAClient(this TBuilder builder, Uri endpoint, ClientType client) where TBuilder : IAzureClientFactoryBuilder { return builder.RegisterClientFactory((options) => new ClientAClient(endpoint, client, options)); @@ -27,8 +28,8 @@ public static IAzureClientBuilder Registers a instance. /// The builder to register with. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - public static IAzureClientBuilder AddClientBClient(this TBuilder builder, Uri endpoint, string client) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + public static IAzureClientBuilder AddClientBClient(this TBuilder builder, Uri endpoint, ClientType client) where TBuilder : IAzureClientFactoryBuilder { return builder.RegisterClientFactory((options) => new ClientBClient(endpoint, client, options)); diff --git a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Docs/ClientAClient.xml b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Docs/ClientAClient.xml index f28e1cbe2e7..6ac1180bb82 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Docs/ClientAClient.xml +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Docs/ClientAClient.xml @@ -6,7 +6,7 @@ This sample shows how to call RenamedOneAsync. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedOneAsync(); @@ -15,7 +15,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedOneAsync with all request content. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedOneAsync(); @@ -27,7 +27,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedOne. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedOne(); @@ -36,7 +36,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedOne with all request content. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedOne(); @@ -48,7 +48,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedThreeAsync. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedThreeAsync(); @@ -57,7 +57,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedThreeAsync with all request content. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedThreeAsync(); @@ -69,7 +69,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedThree. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedThree(); @@ -78,7 +78,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedThree with all request content. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedThree(); @@ -90,7 +90,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFiveAsync. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedFiveAsync(); @@ -99,7 +99,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFiveAsync with all request content. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedFiveAsync(); @@ -111,7 +111,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFive. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedFive(); @@ -120,7 +120,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFive with all request content. "); -ClientAClient client = new ClientAClient(endpoint, "default"); +ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedFive(); diff --git a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Docs/ClientBClient.xml b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Docs/ClientBClient.xml index 7ff58f85210..9a68e366054 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Docs/ClientBClient.xml +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Docs/ClientBClient.xml @@ -6,7 +6,7 @@ This sample shows how to call RenamedTwoAsync. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedTwoAsync(); @@ -15,7 +15,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedTwoAsync with all request content. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedTwoAsync(); @@ -27,7 +27,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedTwo. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedTwo(); @@ -36,7 +36,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedTwo with all request content. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedTwo(); @@ -48,7 +48,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFourAsync. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedFourAsync(); @@ -57,7 +57,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFourAsync with all request content. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedFourAsync(); @@ -69,7 +69,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFour. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedFour(); @@ -78,7 +78,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFour with all request content. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedFour(); @@ -90,7 +90,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedSixAsync. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedSixAsync(); @@ -99,7 +99,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedSixAsync with all request content. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedSixAsync(); @@ -111,7 +111,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedSix. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedSix(); @@ -120,7 +120,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedSix with all request content. "); -ClientBClient client = new ClientBClient(endpoint, "default"); +ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedSix(); diff --git a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Models/ClientType.cs b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Models/ClientType.cs new file mode 100644 index 00000000000..af61fcdbec7 --- /dev/null +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Models/ClientType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Client.Structure.Service.Multiple.Client.Models +{ + /// The ClientType. + public readonly partial struct ClientType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClientType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "default"; + private const string MultiClientValue = "multi-client"; + private const string RenamedOperationValue = "renamed-operation"; + private const string TwoOperationGroupValue = "two-operation-group"; + + /// default. + public static ClientType Default { get; } = new ClientType(DefaultValue); + /// multi-client. + public static ClientType MultiClient { get; } = new ClientType(MultiClientValue); + /// renamed-operation. + public static ClientType RenamedOperation { get; } = new ClientType(RenamedOperationValue); + /// two-operation-group. + public static ClientType TwoOperationGroup { get; } = new ClientType(TwoOperationGroupValue); + /// Determines if two values are the same. + public static bool operator ==(ClientType left, ClientType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClientType left, ClientType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ClientType(string value) => new ClientType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClientType other && Equals(other); + /// + public bool Equals(ClientType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/test/CadlRanchProjects/client/structure/multi-client/tests/Generated/Samples/Samples_ClientAClient.cs b/test/CadlRanchProjects/client/structure/multi-client/tests/Generated/Samples/Samples_ClientAClient.cs index 026d351e5e4..a278f11abd3 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/tests/Generated/Samples/Samples_ClientAClient.cs +++ b/test/CadlRanchProjects/client/structure/multi-client/tests/Generated/Samples/Samples_ClientAClient.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure; using Azure.Identity; +using Client.Structure.Service.Multiple.Client.Models; using NUnit.Framework; namespace Client.Structure.Service.Multiple.Client.Samples @@ -20,7 +21,7 @@ public partial class Samples_ClientAClient public void Example_ClientA_RenamedOne_ShortVersion() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedOne(); @@ -32,7 +33,7 @@ public void Example_ClientA_RenamedOne_ShortVersion() public async Task Example_ClientA_RenamedOne_ShortVersion_Async() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedOneAsync(); @@ -44,7 +45,7 @@ public async Task Example_ClientA_RenamedOne_ShortVersion_Async() public void Example_ClientA_RenamedOne_AllParameters() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedOne(); @@ -56,7 +57,7 @@ public void Example_ClientA_RenamedOne_AllParameters() public async Task Example_ClientA_RenamedOne_AllParameters_Async() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedOneAsync(); @@ -68,7 +69,7 @@ public async Task Example_ClientA_RenamedOne_AllParameters_Async() public void Example_ClientA_RenamedThree_ShortVersion() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedThree(); @@ -80,7 +81,7 @@ public void Example_ClientA_RenamedThree_ShortVersion() public async Task Example_ClientA_RenamedThree_ShortVersion_Async() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedThreeAsync(); @@ -92,7 +93,7 @@ public async Task Example_ClientA_RenamedThree_ShortVersion_Async() public void Example_ClientA_RenamedThree_AllParameters() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedThree(); @@ -104,7 +105,7 @@ public void Example_ClientA_RenamedThree_AllParameters() public async Task Example_ClientA_RenamedThree_AllParameters_Async() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedThreeAsync(); @@ -116,7 +117,7 @@ public async Task Example_ClientA_RenamedThree_AllParameters_Async() public void Example_ClientA_RenamedFive_ShortVersion() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedFive(); @@ -128,7 +129,7 @@ public void Example_ClientA_RenamedFive_ShortVersion() public async Task Example_ClientA_RenamedFive_ShortVersion_Async() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedFiveAsync(); @@ -140,7 +141,7 @@ public async Task Example_ClientA_RenamedFive_ShortVersion_Async() public void Example_ClientA_RenamedFive_AllParameters() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = client.RenamedFive(); @@ -152,7 +153,7 @@ public void Example_ClientA_RenamedFive_AllParameters() public async Task Example_ClientA_RenamedFive_AllParameters_Async() { Uri endpoint = new Uri(""); - ClientAClient client = new ClientAClient(endpoint, "default"); + ClientAClient client = new ClientAClient(endpoint, ClientType.Default); Response response = await client.RenamedFiveAsync(); diff --git a/test/CadlRanchProjects/client/structure/multi-client/tests/Generated/Samples/Samples_ClientBClient.cs b/test/CadlRanchProjects/client/structure/multi-client/tests/Generated/Samples/Samples_ClientBClient.cs index 1b5653d2a74..af146f32f51 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/tests/Generated/Samples/Samples_ClientBClient.cs +++ b/test/CadlRanchProjects/client/structure/multi-client/tests/Generated/Samples/Samples_ClientBClient.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure; using Azure.Identity; +using Client.Structure.Service.Multiple.Client.Models; using NUnit.Framework; namespace Client.Structure.Service.Multiple.Client.Samples @@ -20,7 +21,7 @@ public partial class Samples_ClientBClient public void Example_ClientB_RenamedTwo_ShortVersion() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedTwo(); @@ -32,7 +33,7 @@ public void Example_ClientB_RenamedTwo_ShortVersion() public async Task Example_ClientB_RenamedTwo_ShortVersion_Async() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedTwoAsync(); @@ -44,7 +45,7 @@ public async Task Example_ClientB_RenamedTwo_ShortVersion_Async() public void Example_ClientB_RenamedTwo_AllParameters() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedTwo(); @@ -56,7 +57,7 @@ public void Example_ClientB_RenamedTwo_AllParameters() public async Task Example_ClientB_RenamedTwo_AllParameters_Async() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedTwoAsync(); @@ -68,7 +69,7 @@ public async Task Example_ClientB_RenamedTwo_AllParameters_Async() public void Example_ClientB_RenamedFour_ShortVersion() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedFour(); @@ -80,7 +81,7 @@ public void Example_ClientB_RenamedFour_ShortVersion() public async Task Example_ClientB_RenamedFour_ShortVersion_Async() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedFourAsync(); @@ -92,7 +93,7 @@ public async Task Example_ClientB_RenamedFour_ShortVersion_Async() public void Example_ClientB_RenamedFour_AllParameters() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedFour(); @@ -104,7 +105,7 @@ public void Example_ClientB_RenamedFour_AllParameters() public async Task Example_ClientB_RenamedFour_AllParameters_Async() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedFourAsync(); @@ -116,7 +117,7 @@ public async Task Example_ClientB_RenamedFour_AllParameters_Async() public void Example_ClientB_RenamedSix_ShortVersion() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedSix(); @@ -128,7 +129,7 @@ public void Example_ClientB_RenamedSix_ShortVersion() public async Task Example_ClientB_RenamedSix_ShortVersion_Async() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedSixAsync(); @@ -140,7 +141,7 @@ public async Task Example_ClientB_RenamedSix_ShortVersion_Async() public void Example_ClientB_RenamedSix_AllParameters() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = client.RenamedSix(); @@ -152,7 +153,7 @@ public void Example_ClientB_RenamedSix_AllParameters() public async Task Example_ClientB_RenamedSix_AllParameters_Async() { Uri endpoint = new Uri(""); - ClientBClient client = new ClientBClient(endpoint, "default"); + ClientBClient client = new ClientBClient(endpoint, ClientType.Default); Response response = await client.RenamedSixAsync(); diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/ClientStructureServicerenameoperationClientBuilderExtensions.cs b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/ClientStructureServicerenameoperationClientBuilderExtensions.cs index 2bddf898906..180e6b424e7 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/ClientStructureServicerenameoperationClientBuilderExtensions.cs +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/ClientStructureServicerenameoperationClientBuilderExtensions.cs @@ -8,6 +8,7 @@ using System; using Azure.Core.Extensions; using Client.Structure.Service.rename.operation; +using Client.Structure.Service.rename.operation.Models; namespace Microsoft.Extensions.Azure { @@ -17,8 +18,8 @@ public static partial class ClientStructureServicerenameoperationClientBuilderEx /// Registers a instance. /// The builder to register with. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - public static IAzureClientBuilder AddRenamedOperationClient(this TBuilder builder, Uri endpoint, string client) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + public static IAzureClientBuilder AddRenamedOperationClient(this TBuilder builder, Uri endpoint, ClientType client) where TBuilder : IAzureClientFactoryBuilder { return builder.RegisterClientFactory((options) => new RenamedOperationClient(endpoint, client, options)); diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Docs/Group.xml b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Docs/Group.xml index 6e4fb4bf3f2..0ae7016d92d 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Docs/Group.xml +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Docs/Group.xml @@ -6,7 +6,7 @@ This sample shows how to call RenamedTwoAsync. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedTwoAsync(); @@ -15,7 +15,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedTwoAsync with all request content. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedTwoAsync(); @@ -27,7 +27,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedTwo. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedTwo(); @@ -36,7 +36,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedTwo with all request content. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedTwo(); @@ -48,7 +48,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFourAsync. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedFourAsync(); @@ -57,7 +57,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFourAsync with all request content. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedFourAsync(); @@ -69,7 +69,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFour. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedFour(); @@ -78,7 +78,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFour with all request content. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedFour(); @@ -90,7 +90,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedSixAsync. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedSixAsync(); @@ -99,7 +99,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedSixAsync with all request content. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedSixAsync(); @@ -111,7 +111,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedSix. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedSix(); @@ -120,7 +120,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedSix with all request content. "); -Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); +Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedSix(); diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Docs/RenamedOperationClient.xml b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Docs/RenamedOperationClient.xml index 6ea9e926466..ed977876a02 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Docs/RenamedOperationClient.xml +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Docs/RenamedOperationClient.xml @@ -6,7 +6,7 @@ This sample shows how to call RenamedOneAsync. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedOneAsync(); @@ -15,7 +15,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedOneAsync with all request content. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedOneAsync(); @@ -27,7 +27,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedOne. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedOne(); @@ -36,7 +36,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedOne with all request content. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedOne(); @@ -48,7 +48,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedThreeAsync. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedThreeAsync(); @@ -57,7 +57,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedThreeAsync with all request content. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedThreeAsync(); @@ -69,7 +69,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedThree. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedThree(); @@ -78,7 +78,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedThree with all request content. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedThree(); @@ -90,7 +90,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFiveAsync. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedFiveAsync(); @@ -99,7 +99,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFiveAsync with all request content. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedFiveAsync(); @@ -111,7 +111,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFive. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedFive(); @@ -120,7 +120,7 @@ Console.WriteLine(response.Status); This sample shows how to call RenamedFive with all request content. "); -RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); +RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedFive(); diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Group.cs b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Group.cs index f2e4a166226..4c82121e319 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Group.cs +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Group.cs @@ -10,6 +10,7 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Client.Structure.Service.rename.operation.Models; namespace Client.Structure.Service.rename.operation { @@ -19,7 +20,7 @@ public partial class Group { private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; - private readonly string _client; + private readonly ClientType _client; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -36,8 +37,8 @@ protected Group() /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - internal Group(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string client) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + internal Group(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, ClientType client) { ClientDiagnostics = clientDiagnostics; _pipeline = pipeline; @@ -239,7 +240,7 @@ internal HttpMessage CreateRenamedTwoRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/two", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -254,7 +255,7 @@ internal HttpMessage CreateRenamedFourRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/four", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -269,7 +270,7 @@ internal HttpMessage CreateRenamedSixRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/six", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Models/ClientType.cs b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Models/ClientType.cs new file mode 100644 index 00000000000..c83c81c8dc3 --- /dev/null +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Models/ClientType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Client.Structure.Service.rename.operation.Models +{ + /// The ClientType. + public readonly partial struct ClientType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClientType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "default"; + private const string MultiClientValue = "multi-client"; + private const string RenamedOperationValue = "renamed-operation"; + private const string TwoOperationGroupValue = "two-operation-group"; + + /// default. + public static ClientType Default { get; } = new ClientType(DefaultValue); + /// multi-client. + public static ClientType MultiClient { get; } = new ClientType(MultiClientValue); + /// renamed-operation. + public static ClientType RenamedOperation { get; } = new ClientType(RenamedOperationValue); + /// two-operation-group. + public static ClientType TwoOperationGroup { get; } = new ClientType(TwoOperationGroupValue); + /// Determines if two values are the same. + public static bool operator ==(ClientType left, ClientType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClientType left, ClientType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ClientType(string value) => new ClientType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClientType other && Equals(other); + /// + public bool Equals(ClientType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/RenamedOperationClient.cs b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/RenamedOperationClient.cs index 8388465e1ad..9977aed641b 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/RenamedOperationClient.cs +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/RenamedOperationClient.cs @@ -11,6 +11,7 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Client.Structure.Service.rename.operation.Models; namespace Client.Structure.Service.rename.operation { @@ -20,7 +21,7 @@ public partial class RenamedOperationClient { private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; - private readonly string _client; + private readonly ClientType _client; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -35,23 +36,20 @@ protected RenamedOperationClient() /// Initializes a new instance of RenamedOperationClient. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - /// or is null. - /// is an empty string, and was expected to be non-empty. - public RenamedOperationClient(Uri endpoint, string client) : this(endpoint, client, new RenamedOperationClientOptions()) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + /// is null. + public RenamedOperationClient(Uri endpoint, ClientType client) : this(endpoint, client, new RenamedOperationClientOptions()) { } /// Initializes a new instance of RenamedOperationClient. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. /// The options for configuring the client. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public RenamedOperationClient(Uri endpoint, string client, RenamedOperationClientOptions options) + /// is null. + public RenamedOperationClient(Uri endpoint, ClientType client, RenamedOperationClientOptions options) { Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNullOrEmpty(client, nameof(client)); options ??= new RenamedOperationClientOptions(); ClientDiagnostics = new ClientDiagnostics(options, true); @@ -262,7 +260,7 @@ internal HttpMessage CreateRenamedOneRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/one", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -277,7 +275,7 @@ internal HttpMessage CreateRenamedThreeRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/three", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -292,7 +290,7 @@ internal HttpMessage CreateRenamedFiveRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/five", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/tests/Generated/Samples/Samples_Group.cs b/test/CadlRanchProjects/client/structure/renamed-operation/tests/Generated/Samples/Samples_Group.cs index 5653563b147..c1c5cede5a5 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/tests/Generated/Samples/Samples_Group.cs +++ b/test/CadlRanchProjects/client/structure/renamed-operation/tests/Generated/Samples/Samples_Group.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure; using Azure.Identity; +using Client.Structure.Service.rename.operation.Models; using NUnit.Framework; namespace Client.Structure.Service.rename.operation.Samples @@ -20,7 +21,7 @@ public partial class Samples_Group public void Example_Group_RenamedTwo_ShortVersion() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedTwo(); @@ -32,7 +33,7 @@ public void Example_Group_RenamedTwo_ShortVersion() public async Task Example_Group_RenamedTwo_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedTwoAsync(); @@ -44,7 +45,7 @@ public async Task Example_Group_RenamedTwo_ShortVersion_Async() public void Example_Group_RenamedTwo_AllParameters() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedTwo(); @@ -56,7 +57,7 @@ public void Example_Group_RenamedTwo_AllParameters() public async Task Example_Group_RenamedTwo_AllParameters_Async() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedTwoAsync(); @@ -68,7 +69,7 @@ public async Task Example_Group_RenamedTwo_AllParameters_Async() public void Example_Group_RenamedFour_ShortVersion() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedFour(); @@ -80,7 +81,7 @@ public void Example_Group_RenamedFour_ShortVersion() public async Task Example_Group_RenamedFour_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedFourAsync(); @@ -92,7 +93,7 @@ public async Task Example_Group_RenamedFour_ShortVersion_Async() public void Example_Group_RenamedFour_AllParameters() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedFour(); @@ -104,7 +105,7 @@ public void Example_Group_RenamedFour_AllParameters() public async Task Example_Group_RenamedFour_AllParameters_Async() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedFourAsync(); @@ -116,7 +117,7 @@ public async Task Example_Group_RenamedFour_AllParameters_Async() public void Example_Group_RenamedSix_ShortVersion() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedSix(); @@ -128,7 +129,7 @@ public void Example_Group_RenamedSix_ShortVersion() public async Task Example_Group_RenamedSix_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedSixAsync(); @@ -140,7 +141,7 @@ public async Task Example_Group_RenamedSix_ShortVersion_Async() public void Example_Group_RenamedSix_AllParameters() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = client.RenamedSix(); @@ -152,7 +153,7 @@ public void Example_Group_RenamedSix_AllParameters() public async Task Example_Group_RenamedSix_AllParameters_Async() { Uri endpoint = new Uri(""); - Group client = new RenamedOperationClient(endpoint, "default").GetGroupClient(); + Group client = new RenamedOperationClient(endpoint, ClientType.Default).GetGroupClient(); Response response = await client.RenamedSixAsync(); diff --git a/test/CadlRanchProjects/client/structure/renamed-operation/tests/Generated/Samples/Samples_RenamedOperationClient.cs b/test/CadlRanchProjects/client/structure/renamed-operation/tests/Generated/Samples/Samples_RenamedOperationClient.cs index 5857c6223a2..704f495fa5a 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/tests/Generated/Samples/Samples_RenamedOperationClient.cs +++ b/test/CadlRanchProjects/client/structure/renamed-operation/tests/Generated/Samples/Samples_RenamedOperationClient.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure; using Azure.Identity; +using Client.Structure.Service.rename.operation.Models; using NUnit.Framework; namespace Client.Structure.Service.rename.operation.Samples @@ -20,7 +21,7 @@ public partial class Samples_RenamedOperationClient public void Example_RenamedOperation_RenamedOne_ShortVersion() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedOne(); @@ -32,7 +33,7 @@ public void Example_RenamedOperation_RenamedOne_ShortVersion() public async Task Example_RenamedOperation_RenamedOne_ShortVersion_Async() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedOneAsync(); @@ -44,7 +45,7 @@ public async Task Example_RenamedOperation_RenamedOne_ShortVersion_Async() public void Example_RenamedOperation_RenamedOne_AllParameters() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedOne(); @@ -56,7 +57,7 @@ public void Example_RenamedOperation_RenamedOne_AllParameters() public async Task Example_RenamedOperation_RenamedOne_AllParameters_Async() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedOneAsync(); @@ -68,7 +69,7 @@ public async Task Example_RenamedOperation_RenamedOne_AllParameters_Async() public void Example_RenamedOperation_RenamedThree_ShortVersion() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedThree(); @@ -80,7 +81,7 @@ public void Example_RenamedOperation_RenamedThree_ShortVersion() public async Task Example_RenamedOperation_RenamedThree_ShortVersion_Async() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedThreeAsync(); @@ -92,7 +93,7 @@ public async Task Example_RenamedOperation_RenamedThree_ShortVersion_Async() public void Example_RenamedOperation_RenamedThree_AllParameters() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedThree(); @@ -104,7 +105,7 @@ public void Example_RenamedOperation_RenamedThree_AllParameters() public async Task Example_RenamedOperation_RenamedThree_AllParameters_Async() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedThreeAsync(); @@ -116,7 +117,7 @@ public async Task Example_RenamedOperation_RenamedThree_AllParameters_Async() public void Example_RenamedOperation_RenamedFive_ShortVersion() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedFive(); @@ -128,7 +129,7 @@ public void Example_RenamedOperation_RenamedFive_ShortVersion() public async Task Example_RenamedOperation_RenamedFive_ShortVersion_Async() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedFiveAsync(); @@ -140,7 +141,7 @@ public async Task Example_RenamedOperation_RenamedFive_ShortVersion_Async() public void Example_RenamedOperation_RenamedFive_AllParameters() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = client.RenamedFive(); @@ -152,7 +153,7 @@ public void Example_RenamedOperation_RenamedFive_AllParameters() public async Task Example_RenamedOperation_RenamedFive_AllParameters_Async() { Uri endpoint = new Uri(""); - RenamedOperationClient client = new RenamedOperationClient(endpoint, "default"); + RenamedOperationClient client = new RenamedOperationClient(endpoint, ClientType.Default); Response response = await client.RenamedFiveAsync(); diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Docs/Group1.xml b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Docs/Group1.xml index a7c44cc6a1b..9372319d059 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Docs/Group1.xml +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Docs/Group1.xml @@ -6,7 +6,7 @@ This sample shows how to call OneAsync. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.OneAsync(); @@ -15,7 +15,7 @@ Console.WriteLine(response.Status); This sample shows how to call OneAsync with all request content. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.OneAsync(); @@ -27,7 +27,7 @@ Console.WriteLine(response.Status); This sample shows how to call One. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.One(); @@ -36,7 +36,7 @@ Console.WriteLine(response.Status); This sample shows how to call One with all request content. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.One(); @@ -48,7 +48,7 @@ Console.WriteLine(response.Status); This sample shows how to call ThreeAsync. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.ThreeAsync(); @@ -57,7 +57,7 @@ Console.WriteLine(response.Status); This sample shows how to call ThreeAsync with all request content. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.ThreeAsync(); @@ -69,7 +69,7 @@ Console.WriteLine(response.Status); This sample shows how to call Three. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.Three(); @@ -78,7 +78,7 @@ Console.WriteLine(response.Status); This sample shows how to call Three with all request content. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.Three(); @@ -90,7 +90,7 @@ Console.WriteLine(response.Status); This sample shows how to call FourAsync. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.FourAsync(); @@ -99,7 +99,7 @@ Console.WriteLine(response.Status); This sample shows how to call FourAsync with all request content. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.FourAsync(); @@ -111,7 +111,7 @@ Console.WriteLine(response.Status); This sample shows how to call Four. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.Four(); @@ -120,7 +120,7 @@ Console.WriteLine(response.Status); This sample shows how to call Four with all request content. "); -Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); +Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.Four(); diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Docs/Group2.xml b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Docs/Group2.xml index 8dcd7e45fd1..4e1ed7002f2 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Docs/Group2.xml +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Docs/Group2.xml @@ -6,7 +6,7 @@ This sample shows how to call TwoAsync. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.TwoAsync(); @@ -15,7 +15,7 @@ Console.WriteLine(response.Status); This sample shows how to call TwoAsync with all request content. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.TwoAsync(); @@ -27,7 +27,7 @@ Console.WriteLine(response.Status); This sample shows how to call Two. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Two(); @@ -36,7 +36,7 @@ Console.WriteLine(response.Status); This sample shows how to call Two with all request content. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Two(); @@ -48,7 +48,7 @@ Console.WriteLine(response.Status); This sample shows how to call FiveAsync. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.FiveAsync(); @@ -57,7 +57,7 @@ Console.WriteLine(response.Status); This sample shows how to call FiveAsync with all request content. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.FiveAsync(); @@ -69,7 +69,7 @@ Console.WriteLine(response.Status); This sample shows how to call Five. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Five(); @@ -78,7 +78,7 @@ Console.WriteLine(response.Status); This sample shows how to call Five with all request content. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Five(); @@ -90,7 +90,7 @@ Console.WriteLine(response.Status); This sample shows how to call SixAsync. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.SixAsync(); @@ -99,7 +99,7 @@ Console.WriteLine(response.Status); This sample shows how to call SixAsync with all request content. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.SixAsync(); @@ -111,7 +111,7 @@ Console.WriteLine(response.Status); This sample shows how to call Six. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Six(); @@ -120,7 +120,7 @@ Console.WriteLine(response.Status); This sample shows how to call Six with all request content. "); -Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); +Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Six(); diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Group1.cs b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Group1.cs index 73e54f184ef..108655cee44 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Group1.cs +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Group1.cs @@ -10,6 +10,7 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Client.Structure.Service.TwoOperationGroup.Models; namespace Client.Structure.Service.TwoOperationGroup { @@ -19,7 +20,7 @@ public partial class Group1 { private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; - private readonly string _client; + private readonly ClientType _client; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -36,8 +37,8 @@ protected Group1() /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - internal Group1(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string client) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + internal Group1(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, ClientType client) { ClientDiagnostics = clientDiagnostics; _pipeline = pipeline; @@ -239,7 +240,7 @@ internal HttpMessage CreateOneRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/one", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -254,7 +255,7 @@ internal HttpMessage CreateThreeRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/three", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -269,7 +270,7 @@ internal HttpMessage CreateFourRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/four", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Group2.cs b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Group2.cs index 9bec2490d06..03bce726b68 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Group2.cs +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Group2.cs @@ -10,6 +10,7 @@ using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Client.Structure.Service.TwoOperationGroup.Models; namespace Client.Structure.Service.TwoOperationGroup { @@ -19,7 +20,7 @@ public partial class Group2 { private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; - private readonly string _client; + private readonly ClientType _client; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -36,8 +37,8 @@ protected Group2() /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. /// Need to be set as 'http://localhost:3000' in client. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - internal Group2(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string client) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + internal Group2(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, ClientType client) { ClientDiagnostics = clientDiagnostics; _pipeline = pipeline; @@ -239,7 +240,7 @@ internal HttpMessage CreateTwoRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/two", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -254,7 +255,7 @@ internal HttpMessage CreateFiveRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/five", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -269,7 +270,7 @@ internal HttpMessage CreateSixRequest(RequestContext context) var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendRaw("/client/structure/", false); - uri.AppendRaw(_client, true); + uri.AppendRaw(_client.ToString(), true); uri.AppendPath("/six", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Models/ClientType.cs b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Models/ClientType.cs new file mode 100644 index 00000000000..3040d746f23 --- /dev/null +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Models/ClientType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Client.Structure.Service.TwoOperationGroup.Models +{ + /// The ClientType. + public readonly partial struct ClientType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClientType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "default"; + private const string MultiClientValue = "multi-client"; + private const string RenamedOperationValue = "renamed-operation"; + private const string TwoOperationGroupValue = "two-operation-group"; + + /// default. + public static ClientType Default { get; } = new ClientType(DefaultValue); + /// multi-client. + public static ClientType MultiClient { get; } = new ClientType(MultiClientValue); + /// renamed-operation. + public static ClientType RenamedOperation { get; } = new ClientType(RenamedOperationValue); + /// two-operation-group. + public static ClientType TwoOperationGroup { get; } = new ClientType(TwoOperationGroupValue); + /// Determines if two values are the same. + public static bool operator ==(ClientType left, ClientType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClientType left, ClientType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ClientType(string value) => new ClientType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClientType other && Equals(other); + /// + public bool Equals(ClientType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/TwoOperationGroupClient.cs b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/TwoOperationGroupClient.cs index baa55f66172..342a96b5da1 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/TwoOperationGroupClient.cs +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/TwoOperationGroupClient.cs @@ -8,6 +8,7 @@ using System; using Azure.Core; using Azure.Core.Pipeline; +using Client.Structure.Service.TwoOperationGroup.Models; namespace Client.Structure.Service.TwoOperationGroup { @@ -51,24 +52,16 @@ public TwoOperationGroupClient(Uri endpoint, TwoOperationGroupClientOptions opti } /// Initializes a new instance of Group1. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Group1 GetGroup1Client(string client) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + public virtual Group1 GetGroup1Client(ClientType client) { - Argument.AssertNotNullOrEmpty(client, nameof(client)); - return new Group1(ClientDiagnostics, _pipeline, _endpoint, client); } /// Initializes a new instance of Group2. - /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. Allowed values: "default" | "multi-client" | "renamed-operation" | "two-operation-group". - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Group2 GetGroup2Client(string client) + /// Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client. + public virtual Group2 GetGroup2Client(ClientType client) { - Argument.AssertNotNullOrEmpty(client, nameof(client)); - return new Group2(ClientDiagnostics, _pipeline, _endpoint, client); } } diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/tests/Generated/Samples/Samples_Group1.cs b/test/CadlRanchProjects/client/structure/two-operation-group/tests/Generated/Samples/Samples_Group1.cs index ff81f328b62..806dd3a1533 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/tests/Generated/Samples/Samples_Group1.cs +++ b/test/CadlRanchProjects/client/structure/two-operation-group/tests/Generated/Samples/Samples_Group1.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure; using Azure.Identity; +using Client.Structure.Service.TwoOperationGroup.Models; using NUnit.Framework; namespace Client.Structure.Service.TwoOperationGroup.Samples @@ -20,7 +21,7 @@ public partial class Samples_Group1 public void Example_Group1_One_ShortVersion() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.One(); @@ -32,7 +33,7 @@ public void Example_Group1_One_ShortVersion() public async Task Example_Group1_One_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.OneAsync(); @@ -44,7 +45,7 @@ public async Task Example_Group1_One_ShortVersion_Async() public void Example_Group1_One_AllParameters() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.One(); @@ -56,7 +57,7 @@ public void Example_Group1_One_AllParameters() public async Task Example_Group1_One_AllParameters_Async() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.OneAsync(); @@ -68,7 +69,7 @@ public async Task Example_Group1_One_AllParameters_Async() public void Example_Group1_Three_ShortVersion() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.Three(); @@ -80,7 +81,7 @@ public void Example_Group1_Three_ShortVersion() public async Task Example_Group1_Three_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.ThreeAsync(); @@ -92,7 +93,7 @@ public async Task Example_Group1_Three_ShortVersion_Async() public void Example_Group1_Three_AllParameters() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.Three(); @@ -104,7 +105,7 @@ public void Example_Group1_Three_AllParameters() public async Task Example_Group1_Three_AllParameters_Async() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.ThreeAsync(); @@ -116,7 +117,7 @@ public async Task Example_Group1_Three_AllParameters_Async() public void Example_Group1_Four_ShortVersion() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.Four(); @@ -128,7 +129,7 @@ public void Example_Group1_Four_ShortVersion() public async Task Example_Group1_Four_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.FourAsync(); @@ -140,7 +141,7 @@ public async Task Example_Group1_Four_ShortVersion_Async() public void Example_Group1_Four_AllParameters() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = client.Four(); @@ -152,7 +153,7 @@ public void Example_Group1_Four_AllParameters() public async Task Example_Group1_Four_AllParameters_Async() { Uri endpoint = new Uri(""); - Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client("default"); + Group1 client = new TwoOperationGroupClient(endpoint).GetGroup1Client(ClientType.Default); Response response = await client.FourAsync(); diff --git a/test/CadlRanchProjects/client/structure/two-operation-group/tests/Generated/Samples/Samples_Group2.cs b/test/CadlRanchProjects/client/structure/two-operation-group/tests/Generated/Samples/Samples_Group2.cs index 2dda4d6937e..cfdc378ac46 100644 --- a/test/CadlRanchProjects/client/structure/two-operation-group/tests/Generated/Samples/Samples_Group2.cs +++ b/test/CadlRanchProjects/client/structure/two-operation-group/tests/Generated/Samples/Samples_Group2.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure; using Azure.Identity; +using Client.Structure.Service.TwoOperationGroup.Models; using NUnit.Framework; namespace Client.Structure.Service.TwoOperationGroup.Samples @@ -20,7 +21,7 @@ public partial class Samples_Group2 public void Example_Group2_Two_ShortVersion() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Two(); @@ -32,7 +33,7 @@ public void Example_Group2_Two_ShortVersion() public async Task Example_Group2_Two_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.TwoAsync(); @@ -44,7 +45,7 @@ public async Task Example_Group2_Two_ShortVersion_Async() public void Example_Group2_Two_AllParameters() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Two(); @@ -56,7 +57,7 @@ public void Example_Group2_Two_AllParameters() public async Task Example_Group2_Two_AllParameters_Async() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.TwoAsync(); @@ -68,7 +69,7 @@ public async Task Example_Group2_Two_AllParameters_Async() public void Example_Group2_Five_ShortVersion() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Five(); @@ -80,7 +81,7 @@ public void Example_Group2_Five_ShortVersion() public async Task Example_Group2_Five_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.FiveAsync(); @@ -92,7 +93,7 @@ public async Task Example_Group2_Five_ShortVersion_Async() public void Example_Group2_Five_AllParameters() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Five(); @@ -104,7 +105,7 @@ public void Example_Group2_Five_AllParameters() public async Task Example_Group2_Five_AllParameters_Async() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.FiveAsync(); @@ -116,7 +117,7 @@ public async Task Example_Group2_Five_AllParameters_Async() public void Example_Group2_Six_ShortVersion() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Six(); @@ -128,7 +129,7 @@ public void Example_Group2_Six_ShortVersion() public async Task Example_Group2_Six_ShortVersion_Async() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.SixAsync(); @@ -140,7 +141,7 @@ public async Task Example_Group2_Six_ShortVersion_Async() public void Example_Group2_Six_AllParameters() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = client.Six(); @@ -152,7 +153,7 @@ public void Example_Group2_Six_AllParameters() public async Task Example_Group2_Six_AllParameters_Async() { Uri endpoint = new Uri(""); - Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client("default"); + Group2 client = new TwoOperationGroupClient(endpoint).GetGroup2Client(ClientType.Default); Response response = await client.SixAsync(); diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionEnumValue.xml b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionEnumValue.xml index ca8884b16fa..f5194abf84f 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionEnumValue.xml +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionEnumValue.xml @@ -79,14 +79,14 @@ This sample shows how to call PutAsync. This sample shows how to call PutAsync with all parameters. @@ -96,14 +96,14 @@ This sample shows how to call Put. This sample shows how to call Put with all parameters. diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/ExtendedEnum.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/ExtendedEnum.cs new file mode 100644 index 00000000000..b34d73e36c7 --- /dev/null +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/ExtendedEnum.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace _Type.Property.ValueTypes.Models +{ + /// The ExtendedEnum. + public readonly partial struct ExtendedEnum : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExtendedEnum(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnumValue2Value = "value2"; + + /// value2. + public static ExtendedEnum EnumValue2 { get; } = new ExtendedEnum(EnumValue2Value); + /// Determines if two values are the same. + public static bool operator ==(ExtendedEnum left, ExtendedEnum right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExtendedEnum left, ExtendedEnum right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ExtendedEnum(string value) => new ExtendedEnum(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExtendedEnum other && Equals(other); + /// + public bool Equals(ExtendedEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.Serialization.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.Serialization.cs index e31027bb712..0248f9c72ae 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.Serialization.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.Serialization.cs @@ -28,7 +28,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteStartObject(); writer.WritePropertyName("property"u8); - writer.WriteStringValue(Property); + writer.WriteStringValue(Property.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -67,14 +67,14 @@ internal static UnionEnumValueProperty DeserializeUnionEnumValueProperty(JsonEle { return null; } - string property = default; + ExtendedEnum property = default; IDictionary serializedAdditionalRawData = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property0 in element.EnumerateObject()) { if (property0.NameEquals("property"u8)) { - property = property0.Value.GetString(); + property = new ExtendedEnum(property0.Value.GetString()); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs index d0e1c4b67f3..81f79f77c66 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs @@ -47,18 +47,15 @@ public partial class UnionEnumValueProperty /// Initializes a new instance of . /// Property. - /// is null. - public UnionEnumValueProperty(string property) + public UnionEnumValueProperty(ExtendedEnum property) { - Argument.AssertNotNull(property, nameof(property)); - Property = property; } /// Initializes a new instance of . /// Property. /// Keeps track of any properties unknown to the library. - internal UnionEnumValueProperty(string property, IDictionary serializedAdditionalRawData) + internal UnionEnumValueProperty(ExtendedEnum property, IDictionary serializedAdditionalRawData) { Property = property; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -70,6 +67,6 @@ internal UnionEnumValueProperty() } /// Property. - public string Property { get; set; } + public ExtendedEnum Property { get; set; } } } diff --git a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionEnumValue.cs b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionEnumValue.cs index e0b10b38cdc..9056af278d9 100644 --- a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionEnumValue.cs +++ b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionEnumValue.cs @@ -138,7 +138,7 @@ public void Example_UnionEnumValue_Put_ShortVersion_Convenience() { UnionEnumValue client = new ValueTypesClient().GetUnionEnumValueClient(); - UnionEnumValueProperty body = new UnionEnumValueProperty("value2"); + UnionEnumValueProperty body = new UnionEnumValueProperty(ExtendedEnum.EnumValue2); Response response = client.Put(body); } @@ -148,7 +148,7 @@ public async Task Example_UnionEnumValue_Put_ShortVersion_Convenience_Async() { UnionEnumValue client = new ValueTypesClient().GetUnionEnumValueClient(); - UnionEnumValueProperty body = new UnionEnumValueProperty("value2"); + UnionEnumValueProperty body = new UnionEnumValueProperty(ExtendedEnum.EnumValue2); Response response = await client.PutAsync(body); } @@ -188,7 +188,7 @@ public void Example_UnionEnumValue_Put_AllParameters_Convenience() { UnionEnumValue client = new ValueTypesClient().GetUnionEnumValueClient(); - UnionEnumValueProperty body = new UnionEnumValueProperty("value2"); + UnionEnumValueProperty body = new UnionEnumValueProperty(ExtendedEnum.EnumValue2); Response response = client.Put(body); } @@ -198,7 +198,7 @@ public async Task Example_UnionEnumValue_Put_AllParameters_Convenience_Async() { UnionEnumValue client = new ValueTypesClient().GetUnionEnumValueClient(); - UnionEnumValueProperty body = new UnionEnumValueProperty("value2"); + UnionEnumValueProperty body = new UnionEnumValueProperty(ExtendedEnum.EnumValue2); Response response = await client.PutAsync(body); } } diff --git a/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesClient.cs b/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesClient.cs index fbcb8d591d9..8b72211caf9 100644 --- a/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesClient.cs +++ b/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesClient.cs @@ -28,15 +28,11 @@ protected MultipleInputFilesClient() } /// Initializes a new instance of MultipleInputFilesClient. - /// source - server parameter. The default value is "value1". Allowed values: "us" | "eu". + /// source - server parameter. The default value is "value1". /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public MultipleInputFilesClient(string source, AzureKeyCredential credential, MultipleInputFilesClientOptions options = null) + public MultipleInputFilesClient(Source source, AzureKeyCredential credential, MultipleInputFilesClientOptions options = null) { - if (source == null) - { - throw new ArgumentNullException(nameof(source)); - } if (credential == null) { throw new ArgumentNullException(nameof(credential)); @@ -49,15 +45,11 @@ public MultipleInputFilesClient(string source, AzureKeyCredential credential, Mu } /// Initializes a new instance of MultipleInputFilesClient. - /// source - server parameter. The default value is "value1". Allowed values: "us" | "eu". + /// source - server parameter. The default value is "value1". /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public MultipleInputFilesClient(string source, TokenCredential credential, MultipleInputFilesClientOptions options = null) + public MultipleInputFilesClient(Source source, TokenCredential credential, MultipleInputFilesClientOptions options = null) { - if (source == null) - { - throw new ArgumentNullException(nameof(source)); - } if (credential == null) { throw new ArgumentNullException(nameof(credential)); @@ -73,10 +65,9 @@ public MultipleInputFilesClient(string source, TokenCredential credential, Multi /// Initializes a new instance of MultipleInputFilesClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// source - server parameter. The default value is "value1". Allowed values: "us" | "eu". - /// , or is null. - /// is an empty string, and was expected to be non-empty. - internal MultipleInputFilesClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string source) + /// source - server parameter. The default value is "value1". + /// or is null. + internal MultipleInputFilesClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Source source) { RestClient = new MultipleInputFilesRestClient(clientDiagnostics, pipeline, source); _clientDiagnostics = clientDiagnostics; diff --git a/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesRestClient.cs b/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesRestClient.cs index a3e27c35d6a..30cd61b09dc 100644 --- a/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesRestClient.cs +++ b/test/TestProjects/MultipleInputFiles/Generated/MultipleInputFilesRestClient.cs @@ -18,7 +18,7 @@ namespace MultipleInputFiles internal partial class MultipleInputFilesRestClient { private readonly HttpPipeline _pipeline; - private readonly string _source; + private readonly Source _source; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -26,14 +26,13 @@ internal partial class MultipleInputFilesRestClient /// Initializes a new instance of MultipleInputFilesRestClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. - /// source - server parameter. The default value is "value1". Allowed values: "us" | "eu". - /// , or is null. - /// is an empty string, and was expected to be non-empty. - public MultipleInputFilesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string source) + /// source - server parameter. The default value is "value1". + /// or is null. + public MultipleInputFilesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Source source) { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _source = source ?? throw new ArgumentNullException(nameof(source)); + _source = source; } internal HttpMessage CreateOperation1Request(TestModel value) @@ -43,7 +42,7 @@ internal HttpMessage CreateOperation1Request(TestModel value) request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.AppendRaw("https://", false); - uri.AppendRaw(_source, true); + uri.AppendRaw(_source.ToString(), true); uri.AppendRaw(".fakeendpoint.azure.com", false); uri.AppendPath("/operation1", false); request.Uri = uri; @@ -103,7 +102,7 @@ internal HttpMessage CreateOperation2Request(TestModel value) request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.AppendRaw("https://", false); - uri.AppendRaw(_source, true); + uri.AppendRaw(_source.ToString(), true); uri.AppendRaw(".fakeendpoint.azure.com", false); uri.AppendPath("/operation2", false); request.Uri = uri; From 3fb9078242f6edd78bc6b78e577b74f3dfe49edc Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Tue, 26 Mar 2024 23:26:50 +0800 Subject: [PATCH 29/60] fix test --- test/CadlRanchProjects.Tests/type-property-optionality.cs | 4 ++-- test/CadlRanchProjects.Tests/type-property-value-types.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/CadlRanchProjects.Tests/type-property-optionality.cs b/test/CadlRanchProjects.Tests/type-property-optionality.cs index 6700677ee7a..1ec101c32df 100644 --- a/test/CadlRanchProjects.Tests/type-property-optionality.cs +++ b/test/CadlRanchProjects.Tests/type-property-optionality.cs @@ -400,7 +400,7 @@ public Task Type_Property_Optional_UnionFloatLiteral_putAll() => Test(async (hos { UnionFloatLiteralProperty data = new() { - Property = BinaryData.FromString("2.375") + Property = UnionFloatLiteralPropertyProperty._2375 }; Response response = await new OptionalClient(host, null).GetUnionFloatLiteralClient().PutAllAsync(data.ToRequestContent()); Assert.AreEqual(204, response.Status); @@ -432,7 +432,7 @@ public Task Type_Property_Optional_UnionIntLiteral_putAll() => Test(async (host) { UnionIntLiteralProperty data = new() { - Property = BinaryData.FromString("2") + Property = UnionIntLiteralPropertyProperty._2 }; Response response = await new OptionalClient(host, null).GetUnionIntLiteralClient().PutAllAsync(data.ToRequestContent()); Assert.AreEqual(204, response.Status); diff --git a/test/CadlRanchProjects.Tests/type-property-value-types.cs b/test/CadlRanchProjects.Tests/type-property-value-types.cs index 304f8a272f6..09ddb902e17 100644 --- a/test/CadlRanchProjects.Tests/type-property-value-types.cs +++ b/test/CadlRanchProjects.Tests/type-property-value-types.cs @@ -385,7 +385,7 @@ public Task Type_Property_ValueTypes_Decimal128_put() => Test(async (host) => public Task Type_Property_ValueTypes_UnionEnumValue_get() => Test(async (host) => { var response = await new ValueTypesClient(host, null).GetUnionEnumValueClient().GetUnionEnumValueAsync(); - Assert.AreEqual("value2", response.Value.Property); + Assert.AreEqual(ExtendedEnum.EnumValue2, response.Value.Property); }); [Test] @@ -407,7 +407,7 @@ public Task Type_Property_ValueTypes_UnionFloatLiteral_get() => Test(async (host [Test] public Task Type_Property_ValueTypes_UnionFloatLiteral_put() => Test(async (host) => { - var response = await new ValueTypesClient(host, null).GetUnionFloatLiteralClient().PutAsync(new UnionFloatLiteralProperty(BinaryData.FromString("46.875"))); + var response = await new ValueTypesClient(host, null).GetUnionFloatLiteralClient().PutAsync(new UnionFloatLiteralProperty(UnionFloatLiteralPropertyProperty._46875)); Assert.AreEqual(204, response.Status); }); @@ -421,7 +421,7 @@ public Task Type_Property_ValueTypes_UnionIntLiteral_get() => Test(async (host) [Test] public Task Type_Property_ValueTypes_UnionIntLiteral_put() => Test(async (host) => { - var response = await new ValueTypesClient(host, null).GetUnionIntLiteralClient().PutAsync(new UnionIntLiteralProperty(BinaryData.FromString("42"))); + var response = await new ValueTypesClient(host, null).GetUnionIntLiteralClient().PutAsync(new UnionIntLiteralProperty(UnionIntLiteralPropertyProperty._42)); Assert.AreEqual(204, response.Status); }); [Test] @@ -434,7 +434,7 @@ public Task Type_Property_ValueTypes_UnionStringLiteral_get() => Test(async (hos [Test] public Task Type_Property_ValueTypes_UnionStringLiteral_put() => Test(async (host) => { - var response = await new ValueTypesClient(host, null).GetUnionStringLiteralClient().PutAsync(new UnionStringLiteralProperty(new UnionStringLiteralPropertyProperty("world"))); + var response = await new ValueTypesClient(host, null).GetUnionStringLiteralClient().PutAsync(new UnionStringLiteralProperty(UnionStringLiteralPropertyProperty.World)); Assert.AreEqual(204, response.Status); }); } From 93dce54a85e364953c9291ccd9f42e7c14059e9a Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 27 Mar 2024 11:48:47 +0800 Subject: [PATCH 30/60] improve test --- test/CadlRanchProjects.Tests/type-property-value-types.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CadlRanchProjects.Tests/type-property-value-types.cs b/test/CadlRanchProjects.Tests/type-property-value-types.cs index 09ddb902e17..efbc5d49239 100644 --- a/test/CadlRanchProjects.Tests/type-property-value-types.cs +++ b/test/CadlRanchProjects.Tests/type-property-value-types.cs @@ -391,7 +391,7 @@ public Task Type_Property_ValueTypes_UnionEnumValue_get() => Test(async (host) = [Test] public Task Type_Property_ValueTypes_UnionEnumValue_put() => Test(async (host) => { - var response = await new ValueTypesClient(host, null).GetUnionEnumValueClient().PutAsync(new UnionEnumValueProperty("value2")); + var response = await new ValueTypesClient(host, null).GetUnionEnumValueClient().PutAsync(new UnionEnumValueProperty(ExtendedEnum.EnumValue2)); Assert.AreEqual(204, response.Status); }); From 7d02b58b93613b593d474b6bbd68088d53c2eacd Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 28 Mar 2024 16:53:58 +0800 Subject: [PATCH 31/60] change enum value type to literal constant with enum type --- .../Emitter.Csharp/src/type/converter.ts | 26 +- .../oauth2/src/Generated/tspCodeModel.json | 61 +- .../union/src/Generated/tspCodeModel.json | 61 +- .../src/Generated/Docs/UnionEnumValue.xml | 8 +- .../Models/UnionEnumValueProperty.cs | 11 +- .../TypePropertyValueTypesModelFactory.cs | 8 + .../src/Generated/tspCodeModel.json | 1239 +++++++++-------- .../Samples/Samples_UnionEnumValue.cs | 8 +- .../src/Generated/tspCodeModel.json | 843 +++++------ .../src/Generated/tspCodeModel.json | 137 +- .../src/Generated/tspCodeModel.json | 265 ++-- .../src/Generated/tspCodeModel.json | 417 +++--- 12 files changed, 1579 insertions(+), 1505 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index bdabe743581..315ef083768 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -68,7 +68,12 @@ function fromSdkType( if (sdkType.kind === "enum") return fromSdkEnumType(sdkType, context, enums); if (sdkType.kind === "enumvalue") - return fromSdkEnumType(sdkType.enumType, context, enums); + return fromSdkEnumValueTypeToConstantType( + sdkType, + context, + enums, + literalTypeContext + ); if (sdkType.kind === "dict") return fromSdkDictionaryType(sdkType, context, models, enums); if (sdkType.kind === "array") @@ -495,6 +500,25 @@ function fromSdkConstantType( } } +function fromSdkEnumValueTypeToConstantType( + enumValueType: SdkEnumValueType, + context: SdkContext, + enums: Map, + literalTypeContext?: LiteralTypeContext +): InputLiteralType { + return { + Kind: InputTypeKind.Literal, + Name: InputTypeKind.Literal, + LiteralValueType: + enumValueType.valueType.kind === "boolean" || + literalTypeContext === undefined + ? fromSdkBuiltInType(enumValueType.valueType as SdkBuiltInType) // TODO: TCGC fix + : fromSdkEnumType(enumValueType.enumType, context, enums), + Value: enumValueType.value, + IsNullable: false + }; +} + function fromSdkEnumValueType( enumValueType: SdkEnumValueType ): InputEnumTypeValue { diff --git a/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json index d2d8dd64cdf..4c4bccd2a7a 100644 --- a/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json @@ -100,18 +100,25 @@ "SerializedName": "type", "Description": "", "Type": { - "$ref": "2" + "$id": "14", + "Kind": "Literal", + "Name": "Literal", + "LiteralValueType": { + "$ref": "2" + }, + "Value": "implicit", + "IsNullable": false }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "14", + "$id": "15", "Name": "authorizationUrl", "SerializedName": "authorizationUrl", "Description": "", "Type": { - "$id": "15", + "$id": "16", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -124,12 +131,12 @@ "IsReadOnly": false }, { - "$id": "16", + "$id": "17", "Name": "scopes", "SerializedName": "scopes", "Description": "", "Type": { - "$id": "17", + "$id": "18", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -142,23 +149,23 @@ ], "Clients": [ { - "$id": "18", + "$id": "19", "Name": "OAuth2Client", "Description": "Illustrates clients generated with OAuth2 authentication.", "Operations": [ { - "$id": "19", + "$id": "20", "Name": "valid", "ResourceName": "OAuth2", "Description": "Check whether client is authenticated", "Parameters": [ { - "$id": "20", + "$id": "21", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "21", + "$id": "22", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -173,9 +180,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "22", + "$id": "23", "Type": { - "$id": "23", + "$id": "24", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -184,11 +191,11 @@ } }, { - "$id": "24", + "$id": "25", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "25", + "$id": "26", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -203,9 +210,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "26", + "$id": "27", "Type": { - "$ref": "25" + "$ref": "26" }, "Value": "application/json" } @@ -213,7 +220,7 @@ ], "Responses": [ { - "$id": "27", + "$id": "28", "StatusCodes": [ 204 ], @@ -231,20 +238,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "28", + "$id": "29", "Name": "invalid", "ResourceName": "OAuth2", "Description": "Check whether client is authenticated. Will return an invalid bearer error.", "Parameters": [ { - "$ref": "20" + "$ref": "21" }, { - "$id": "29", + "$id": "30", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "30", + "$id": "31", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -259,9 +266,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "31", + "$id": "32", "Type": { - "$ref": "30" + "$ref": "31" }, "Value": "application/json" } @@ -269,7 +276,7 @@ ], "Responses": [ { - "$id": "32", + "$id": "33", "StatusCodes": [ 204 ], @@ -278,7 +285,7 @@ "IsErrorResponse": false }, { - "$id": "33", + "$id": "34", "StatusCodes": [ 403 ], @@ -303,15 +310,15 @@ } ], "Protocol": { - "$id": "34" + "$id": "35" }, "Creatable": true } ], "Auth": { - "$id": "35", + "$id": "36", "OAuth2": { - "$id": "36", + "$id": "37", "Scopes": [ "https://security.microsoft.com/.default" ] diff --git a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json index 38b4ee4f9b0..5be59d5566a 100644 --- a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json @@ -76,18 +76,25 @@ "SerializedName": "type", "Description": "", "Type": { - "$ref": "2" + "$id": "11", + "Kind": "Literal", + "Name": "Literal", + "LiteralValueType": { + "$ref": "2" + }, + "Value": "implicit", + "IsNullable": false }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "11", + "$id": "12", "Name": "authorizationUrl", "SerializedName": "authorizationUrl", "Description": "", "Type": { - "$id": "12", + "$id": "13", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -100,12 +107,12 @@ "IsReadOnly": false }, { - "$id": "13", + "$id": "14", "Name": "scopes", "SerializedName": "scopes", "Description": "", "Type": { - "$id": "14", + "$id": "15", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -118,23 +125,23 @@ ], "Clients": [ { - "$id": "15", + "$id": "16", "Name": "UnionClient", "Description": "Illustrates clients generated with ApiKey and OAuth2 authentication.", "Operations": [ { - "$id": "16", + "$id": "17", "Name": "validKey", "ResourceName": "Union", "Description": "Check whether client is authenticated", "Parameters": [ { - "$id": "17", + "$id": "18", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "18", + "$id": "19", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -149,9 +156,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "19", + "$id": "20", "Type": { - "$id": "20", + "$id": "21", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -160,11 +167,11 @@ } }, { - "$id": "21", + "$id": "22", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "22", + "$id": "23", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -179,9 +186,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "23", + "$id": "24", "Type": { - "$ref": "22" + "$ref": "23" }, "Value": "application/json" } @@ -189,7 +196,7 @@ ], "Responses": [ { - "$id": "24", + "$id": "25", "StatusCodes": [ 204 ], @@ -207,20 +214,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "25", + "$id": "26", "Name": "validToken", "ResourceName": "Union", "Description": "Check whether client is authenticated", "Parameters": [ { - "$ref": "17" + "$ref": "18" }, { - "$id": "26", + "$id": "27", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "27", + "$id": "28", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -235,9 +242,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "28", + "$id": "29", "Type": { - "$ref": "27" + "$ref": "28" }, "Value": "application/json" } @@ -245,7 +252,7 @@ ], "Responses": [ { - "$id": "29", + "$id": "30", "StatusCodes": [ 204 ], @@ -264,19 +271,19 @@ } ], "Protocol": { - "$id": "30" + "$id": "31" }, "Creatable": true } ], "Auth": { - "$id": "31", + "$id": "32", "ApiKey": { - "$id": "32", + "$id": "33", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "33", + "$id": "34", "Scopes": [ "https://security.microsoft.com/.default" ] diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionEnumValue.xml b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionEnumValue.xml index f5194abf84f..272c63975d3 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionEnumValue.xml +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Docs/UnionEnumValue.xml @@ -79,14 +79,14 @@ This sample shows how to call PutAsync. This sample shows how to call PutAsync with all parameters. @@ -96,14 +96,14 @@ This sample shows how to call Put. This sample shows how to call Put with all parameters. diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs index 81f79f77c66..509871b5f57 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValueProperty.cs @@ -46,10 +46,8 @@ public partial class UnionEnumValueProperty private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Property. - public UnionEnumValueProperty(ExtendedEnum property) + public UnionEnumValueProperty() { - Property = property; } /// Initializes a new instance of . @@ -61,12 +59,7 @@ internal UnionEnumValueProperty(ExtendedEnum property, IDictionary Initializes a new instance of for deserialization. - internal UnionEnumValueProperty() - { - } - /// Property. - public ExtendedEnum Property { get; set; } + public ExtendedEnum Property { get; } = ExtendedEnum.EnumValue2; } } diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs index 1472efb3a2c..5f1f1f923ba 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs @@ -41,5 +41,13 @@ public static BooleanLiteralProperty BooleanLiteralProperty(bool property = defa { return new BooleanLiteralProperty(property, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// Property. + /// A new instance for mocking. + public static UnionEnumValueProperty UnionEnumValueProperty(ExtendedEnum property = default) + { + return new UnionEnumValueProperty(property, serializedAdditionalRawData: null); + } } } diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json index 82b50663dd1..fb7416ebc01 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json @@ -192,7 +192,7 @@ "Namespace": "Type.Property.ValueTypes", "IsExtensible": true, "IsNullable": false, - "Usage": "None" + "Usage": "RoundTrip" } ], "Models": [ @@ -949,7 +949,14 @@ "SerializedName": "property", "Description": "Property", "Type": { - "$ref": "23" + "$id": "111", + "Kind": "Literal", + "Name": "Literal", + "LiteralValueType": { + "$ref": "23" + }, + "Value": "value2", + "IsNullable": false }, "IsRequired": true, "IsReadOnly": false @@ -959,33 +966,33 @@ ], "Clients": [ { - "$id": "111", + "$id": "112", "Name": "ValueTypesClient", "Description": "", "Operations": [], "Protocol": { - "$id": "112" + "$id": "113" }, "Creatable": true }, { - "$id": "113", + "$id": "114", "Name": "Boolean", "Description": "", "Operations": [ { - "$id": "114", + "$id": "115", "Name": "get", "ResourceName": "Boolean", "Description": "Get call", "Parameters": [ { - "$id": "115", + "$id": "116", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "116", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1000,9 +1007,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "117", + "$id": "118", "Type": { - "$id": "118", + "$id": "119", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1011,11 +1018,11 @@ } }, { - "$id": "119", + "$id": "120", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "120", + "$id": "121", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1030,9 +1037,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "121", + "$id": "122", "Type": { - "$ref": "120" + "$ref": "121" }, "Value": "application/json" } @@ -1040,7 +1047,7 @@ ], "Responses": [ { - "$id": "122", + "$id": "123", "StatusCodes": [ 200 ], @@ -1064,16 +1071,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "123", + "$id": "124", "Name": "put", "ResourceName": "Boolean", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "124", + "$id": "125", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1091,11 +1098,11 @@ "Kind": "Method" }, { - "$id": "125", + "$id": "126", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "126", + "$id": "127", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1110,19 +1117,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "127", + "$id": "128", "Type": { - "$ref": "126" + "$ref": "127" }, "Value": "application/json" } }, { - "$id": "128", + "$id": "129", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "129", + "$id": "130", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1137,9 +1144,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "130", + "$id": "131", "Type": { - "$ref": "129" + "$ref": "130" }, "Value": "application/json" } @@ -1147,7 +1154,7 @@ ], "Responses": [ { - "$id": "131", + "$id": "132", "StatusCodes": [ 204 ], @@ -1169,31 +1176,31 @@ } ], "Protocol": { - "$id": "132" + "$id": "133" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "133", + "$id": "134", "Name": "String", "Description": "", "Operations": [ { - "$id": "134", + "$id": "135", "Name": "get", "ResourceName": "String", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "135", + "$id": "136", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "136", + "$id": "137", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1208,9 +1215,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "137", + "$id": "138", "Type": { - "$ref": "136" + "$ref": "137" }, "Value": "application/json" } @@ -1218,7 +1225,7 @@ ], "Responses": [ { - "$id": "138", + "$id": "139", "StatusCodes": [ 200 ], @@ -1242,16 +1249,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "139", + "$id": "140", "Name": "put", "ResourceName": "String", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "140", + "$id": "141", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1269,11 +1276,11 @@ "Kind": "Method" }, { - "$id": "141", + "$id": "142", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "142", + "$id": "143", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1288,19 +1295,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "143", + "$id": "144", "Type": { - "$ref": "142" + "$ref": "143" }, "Value": "application/json" } }, { - "$id": "144", + "$id": "145", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "145", + "$id": "146", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1315,9 +1322,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "146", + "$id": "147", "Type": { - "$ref": "145" + "$ref": "146" }, "Value": "application/json" } @@ -1325,7 +1332,7 @@ ], "Responses": [ { - "$id": "147", + "$id": "148", "StatusCodes": [ 204 ], @@ -1347,31 +1354,31 @@ } ], "Protocol": { - "$id": "148" + "$id": "149" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "149", + "$id": "150", "Name": "Bytes", "Description": "", "Operations": [ { - "$id": "150", + "$id": "151", "Name": "get", "ResourceName": "Bytes", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "151", + "$id": "152", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "152", + "$id": "153", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1386,9 +1393,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "153", + "$id": "154", "Type": { - "$ref": "152" + "$ref": "153" }, "Value": "application/json" } @@ -1396,7 +1403,7 @@ ], "Responses": [ { - "$id": "154", + "$id": "155", "StatusCodes": [ 200 ], @@ -1420,16 +1427,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "155", + "$id": "156", "Name": "put", "ResourceName": "Bytes", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "156", + "$id": "157", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1447,11 +1454,11 @@ "Kind": "Method" }, { - "$id": "157", + "$id": "158", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "158", + "$id": "159", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1466,19 +1473,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "159", + "$id": "160", "Type": { - "$ref": "158" + "$ref": "159" }, "Value": "application/json" } }, { - "$id": "160", + "$id": "161", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "161", + "$id": "162", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1493,9 +1500,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "162", + "$id": "163", "Type": { - "$ref": "161" + "$ref": "162" }, "Value": "application/json" } @@ -1503,7 +1510,7 @@ ], "Responses": [ { - "$id": "163", + "$id": "164", "StatusCodes": [ 204 ], @@ -1525,31 +1532,31 @@ } ], "Protocol": { - "$id": "164" + "$id": "165" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "165", + "$id": "166", "Name": "Int", "Description": "", "Operations": [ { - "$id": "166", + "$id": "167", "Name": "get", "ResourceName": "Int", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "167", + "$id": "168", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "168", + "$id": "169", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1564,9 +1571,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "169", + "$id": "170", "Type": { - "$ref": "168" + "$ref": "169" }, "Value": "application/json" } @@ -1574,7 +1581,7 @@ ], "Responses": [ { - "$id": "170", + "$id": "171", "StatusCodes": [ 200 ], @@ -1598,16 +1605,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "171", + "$id": "172", "Name": "put", "ResourceName": "Int", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "172", + "$id": "173", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1625,11 +1632,11 @@ "Kind": "Method" }, { - "$id": "173", + "$id": "174", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "174", + "$id": "175", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1644,19 +1651,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "176", "Type": { - "$ref": "174" + "$ref": "175" }, "Value": "application/json" } }, { - "$id": "176", + "$id": "177", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "177", + "$id": "178", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1671,9 +1678,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "178", + "$id": "179", "Type": { - "$ref": "177" + "$ref": "178" }, "Value": "application/json" } @@ -1681,7 +1688,7 @@ ], "Responses": [ { - "$id": "179", + "$id": "180", "StatusCodes": [ 204 ], @@ -1703,31 +1710,31 @@ } ], "Protocol": { - "$id": "180" + "$id": "181" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "181", + "$id": "182", "Name": "Float", "Description": "", "Operations": [ { - "$id": "182", + "$id": "183", "Name": "get", "ResourceName": "Float", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "183", + "$id": "184", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "184", + "$id": "185", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1742,9 +1749,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "185", + "$id": "186", "Type": { - "$ref": "184" + "$ref": "185" }, "Value": "application/json" } @@ -1752,7 +1759,7 @@ ], "Responses": [ { - "$id": "186", + "$id": "187", "StatusCodes": [ 200 ], @@ -1776,16 +1783,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "187", + "$id": "188", "Name": "put", "ResourceName": "Float", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "188", + "$id": "189", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1803,11 +1810,11 @@ "Kind": "Method" }, { - "$id": "189", + "$id": "190", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "190", + "$id": "191", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1822,19 +1829,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "191", + "$id": "192", "Type": { - "$ref": "190" + "$ref": "191" }, "Value": "application/json" } }, { - "$id": "192", + "$id": "193", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "193", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1849,9 +1856,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "194", + "$id": "195", "Type": { - "$ref": "193" + "$ref": "194" }, "Value": "application/json" } @@ -1859,7 +1866,7 @@ ], "Responses": [ { - "$id": "195", + "$id": "196", "StatusCodes": [ 204 ], @@ -1881,31 +1888,31 @@ } ], "Protocol": { - "$id": "196" + "$id": "197" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "197", + "$id": "198", "Name": "Decimal", "Description": "", "Operations": [ { - "$id": "198", + "$id": "199", "Name": "get", "ResourceName": "Decimal", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "199", + "$id": "200", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "200", + "$id": "201", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1920,9 +1927,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "201", + "$id": "202", "Type": { - "$ref": "200" + "$ref": "201" }, "Value": "application/json" } @@ -1930,7 +1937,7 @@ ], "Responses": [ { - "$id": "202", + "$id": "203", "StatusCodes": [ 200 ], @@ -1954,16 +1961,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "203", + "$id": "204", "Name": "put", "ResourceName": "Decimal", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "204", + "$id": "205", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1981,11 +1988,11 @@ "Kind": "Method" }, { - "$id": "205", + "$id": "206", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "206", + "$id": "207", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2000,19 +2007,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "207", + "$id": "208", "Type": { - "$ref": "206" + "$ref": "207" }, "Value": "application/json" } }, { - "$id": "208", + "$id": "209", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "209", + "$id": "210", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2027,9 +2034,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "210", + "$id": "211", "Type": { - "$ref": "209" + "$ref": "210" }, "Value": "application/json" } @@ -2037,7 +2044,7 @@ ], "Responses": [ { - "$id": "211", + "$id": "212", "StatusCodes": [ 204 ], @@ -2059,31 +2066,31 @@ } ], "Protocol": { - "$id": "212" + "$id": "213" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "213", + "$id": "214", "Name": "Decimal128", "Description": "", "Operations": [ { - "$id": "214", + "$id": "215", "Name": "get", "ResourceName": "Decimal128", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "215", + "$id": "216", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "216", + "$id": "217", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2098,9 +2105,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "217", + "$id": "218", "Type": { - "$ref": "216" + "$ref": "217" }, "Value": "application/json" } @@ -2108,7 +2115,7 @@ ], "Responses": [ { - "$id": "218", + "$id": "219", "StatusCodes": [ 200 ], @@ -2132,16 +2139,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "219", + "$id": "220", "Name": "put", "ResourceName": "Decimal128", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "220", + "$id": "221", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2159,11 +2166,11 @@ "Kind": "Method" }, { - "$id": "221", + "$id": "222", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "222", + "$id": "223", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2178,19 +2185,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "223", + "$id": "224", "Type": { - "$ref": "222" + "$ref": "223" }, "Value": "application/json" } }, { - "$id": "224", + "$id": "225", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "225", + "$id": "226", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2205,9 +2212,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "227", "Type": { - "$ref": "225" + "$ref": "226" }, "Value": "application/json" } @@ -2215,7 +2222,7 @@ ], "Responses": [ { - "$id": "227", + "$id": "228", "StatusCodes": [ 204 ], @@ -2237,31 +2244,31 @@ } ], "Protocol": { - "$id": "228" + "$id": "229" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "229", + "$id": "230", "Name": "Datetime", "Description": "", "Operations": [ { - "$id": "230", + "$id": "231", "Name": "get", "ResourceName": "Datetime", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "231", + "$id": "232", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "232", + "$id": "233", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2276,9 +2283,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "233", + "$id": "234", "Type": { - "$ref": "232" + "$ref": "233" }, "Value": "application/json" } @@ -2286,7 +2293,7 @@ ], "Responses": [ { - "$id": "234", + "$id": "235", "StatusCodes": [ 200 ], @@ -2310,16 +2317,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "235", + "$id": "236", "Name": "put", "ResourceName": "Datetime", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "236", + "$id": "237", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2337,11 +2344,11 @@ "Kind": "Method" }, { - "$id": "237", + "$id": "238", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "238", + "$id": "239", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2356,19 +2363,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "239", + "$id": "240", "Type": { - "$ref": "238" + "$ref": "239" }, "Value": "application/json" } }, { - "$id": "240", + "$id": "241", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "241", + "$id": "242", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2383,9 +2390,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "242", + "$id": "243", "Type": { - "$ref": "241" + "$ref": "242" }, "Value": "application/json" } @@ -2393,7 +2400,7 @@ ], "Responses": [ { - "$id": "243", + "$id": "244", "StatusCodes": [ 204 ], @@ -2415,31 +2422,31 @@ } ], "Protocol": { - "$id": "244" + "$id": "245" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "245", + "$id": "246", "Name": "Duration", "Description": "", "Operations": [ { - "$id": "246", + "$id": "247", "Name": "get", "ResourceName": "Duration", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "247", + "$id": "248", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "248", + "$id": "249", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2454,9 +2461,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "249", + "$id": "250", "Type": { - "$ref": "248" + "$ref": "249" }, "Value": "application/json" } @@ -2464,7 +2471,7 @@ ], "Responses": [ { - "$id": "250", + "$id": "251", "StatusCodes": [ 200 ], @@ -2488,16 +2495,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "251", + "$id": "252", "Name": "put", "ResourceName": "Duration", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "252", + "$id": "253", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2515,11 +2522,11 @@ "Kind": "Method" }, { - "$id": "253", + "$id": "254", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "254", + "$id": "255", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2534,19 +2541,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "255", + "$id": "256", "Type": { - "$ref": "254" + "$ref": "255" }, "Value": "application/json" } }, { - "$id": "256", + "$id": "257", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "257", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2561,9 +2568,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "258", + "$id": "259", "Type": { - "$ref": "257" + "$ref": "258" }, "Value": "application/json" } @@ -2571,7 +2578,7 @@ ], "Responses": [ { - "$id": "259", + "$id": "260", "StatusCodes": [ 204 ], @@ -2593,31 +2600,31 @@ } ], "Protocol": { - "$id": "260" + "$id": "261" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "261", + "$id": "262", "Name": "Enum", "Description": "", "Operations": [ { - "$id": "262", + "$id": "263", "Name": "get", "ResourceName": "Enum", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "263", + "$id": "264", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "264", + "$id": "265", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2632,9 +2639,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "265", + "$id": "266", "Type": { - "$ref": "264" + "$ref": "265" }, "Value": "application/json" } @@ -2642,7 +2649,7 @@ ], "Responses": [ { - "$id": "266", + "$id": "267", "StatusCodes": [ 200 ], @@ -2666,16 +2673,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "267", + "$id": "268", "Name": "put", "ResourceName": "Enum", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "268", + "$id": "269", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2693,11 +2700,11 @@ "Kind": "Method" }, { - "$id": "269", + "$id": "270", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "270", + "$id": "271", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2712,19 +2719,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "271", + "$id": "272", "Type": { - "$ref": "270" + "$ref": "271" }, "Value": "application/json" } }, { - "$id": "272", + "$id": "273", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "273", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2739,9 +2746,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "274", + "$id": "275", "Type": { - "$ref": "273" + "$ref": "274" }, "Value": "application/json" } @@ -2749,7 +2756,7 @@ ], "Responses": [ { - "$id": "275", + "$id": "276", "StatusCodes": [ 204 ], @@ -2771,31 +2778,31 @@ } ], "Protocol": { - "$id": "276" + "$id": "277" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "277", + "$id": "278", "Name": "ExtensibleEnum", "Description": "", "Operations": [ { - "$id": "278", + "$id": "279", "Name": "get", "ResourceName": "ExtensibleEnum", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "279", + "$id": "280", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "280", + "$id": "281", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2810,9 +2817,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "281", + "$id": "282", "Type": { - "$ref": "280" + "$ref": "281" }, "Value": "application/json" } @@ -2820,7 +2827,7 @@ ], "Responses": [ { - "$id": "282", + "$id": "283", "StatusCodes": [ 200 ], @@ -2844,16 +2851,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "283", + "$id": "284", "Name": "put", "ResourceName": "ExtensibleEnum", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "284", + "$id": "285", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2871,11 +2878,11 @@ "Kind": "Method" }, { - "$id": "285", + "$id": "286", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "286", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2890,19 +2897,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "287", + "$id": "288", "Type": { - "$ref": "286" + "$ref": "287" }, "Value": "application/json" } }, { - "$id": "288", + "$id": "289", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "289", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2917,9 +2924,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "290", + "$id": "291", "Type": { - "$ref": "289" + "$ref": "290" }, "Value": "application/json" } @@ -2927,7 +2934,7 @@ ], "Responses": [ { - "$id": "291", + "$id": "292", "StatusCodes": [ 204 ], @@ -2949,31 +2956,31 @@ } ], "Protocol": { - "$id": "292" + "$id": "293" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "293", + "$id": "294", "Name": "Model", "Description": "", "Operations": [ { - "$id": "294", + "$id": "295", "Name": "get", "ResourceName": "Model", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "295", + "$id": "296", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "296", + "$id": "297", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2988,9 +2995,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "297", + "$id": "298", "Type": { - "$ref": "296" + "$ref": "297" }, "Value": "application/json" } @@ -2998,7 +3005,7 @@ ], "Responses": [ { - "$id": "298", + "$id": "299", "StatusCodes": [ 200 ], @@ -3022,16 +3029,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "299", + "$id": "300", "Name": "put", "ResourceName": "Model", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "300", + "$id": "301", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3049,11 +3056,11 @@ "Kind": "Method" }, { - "$id": "301", + "$id": "302", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "302", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3068,19 +3075,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "303", + "$id": "304", "Type": { - "$ref": "302" + "$ref": "303" }, "Value": "application/json" } }, { - "$id": "304", + "$id": "305", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "305", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3095,9 +3102,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "306", + "$id": "307", "Type": { - "$ref": "305" + "$ref": "306" }, "Value": "application/json" } @@ -3105,7 +3112,7 @@ ], "Responses": [ { - "$id": "307", + "$id": "308", "StatusCodes": [ 204 ], @@ -3127,31 +3134,31 @@ } ], "Protocol": { - "$id": "308" + "$id": "309" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "309", + "$id": "310", "Name": "CollectionsString", "Description": "", "Operations": [ { - "$id": "310", + "$id": "311", "Name": "get", "ResourceName": "CollectionsString", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "311", + "$id": "312", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "312", + "$id": "313", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3166,9 +3173,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "313", + "$id": "314", "Type": { - "$ref": "312" + "$ref": "313" }, "Value": "application/json" } @@ -3176,7 +3183,7 @@ ], "Responses": [ { - "$id": "314", + "$id": "315", "StatusCodes": [ 200 ], @@ -3200,16 +3207,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "315", + "$id": "316", "Name": "put", "ResourceName": "CollectionsString", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "316", + "$id": "317", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3227,11 +3234,11 @@ "Kind": "Method" }, { - "$id": "317", + "$id": "318", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "318", + "$id": "319", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3246,19 +3253,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "319", + "$id": "320", "Type": { - "$ref": "318" + "$ref": "319" }, "Value": "application/json" } }, { - "$id": "320", + "$id": "321", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "321", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3273,9 +3280,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "322", + "$id": "323", "Type": { - "$ref": "321" + "$ref": "322" }, "Value": "application/json" } @@ -3283,7 +3290,7 @@ ], "Responses": [ { - "$id": "323", + "$id": "324", "StatusCodes": [ 204 ], @@ -3305,31 +3312,31 @@ } ], "Protocol": { - "$id": "324" + "$id": "325" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "325", + "$id": "326", "Name": "CollectionsInt", "Description": "", "Operations": [ { - "$id": "326", + "$id": "327", "Name": "get", "ResourceName": "CollectionsInt", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "327", + "$id": "328", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "328", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3344,9 +3351,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "329", + "$id": "330", "Type": { - "$ref": "328" + "$ref": "329" }, "Value": "application/json" } @@ -3354,7 +3361,7 @@ ], "Responses": [ { - "$id": "330", + "$id": "331", "StatusCodes": [ 200 ], @@ -3378,16 +3385,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "331", + "$id": "332", "Name": "put", "ResourceName": "CollectionsInt", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "332", + "$id": "333", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3405,11 +3412,11 @@ "Kind": "Method" }, { - "$id": "333", + "$id": "334", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "334", + "$id": "335", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3424,19 +3431,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "335", + "$id": "336", "Type": { - "$ref": "334" + "$ref": "335" }, "Value": "application/json" } }, { - "$id": "336", + "$id": "337", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "337", + "$id": "338", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3451,9 +3458,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "338", + "$id": "339", "Type": { - "$ref": "337" + "$ref": "338" }, "Value": "application/json" } @@ -3461,7 +3468,7 @@ ], "Responses": [ { - "$id": "339", + "$id": "340", "StatusCodes": [ 204 ], @@ -3483,31 +3490,31 @@ } ], "Protocol": { - "$id": "340" + "$id": "341" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "341", + "$id": "342", "Name": "CollectionsModel", "Description": "", "Operations": [ { - "$id": "342", + "$id": "343", "Name": "get", "ResourceName": "CollectionsModel", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "343", + "$id": "344", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "344", + "$id": "345", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3522,9 +3529,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "345", + "$id": "346", "Type": { - "$ref": "344" + "$ref": "345" }, "Value": "application/json" } @@ -3532,7 +3539,7 @@ ], "Responses": [ { - "$id": "346", + "$id": "347", "StatusCodes": [ 200 ], @@ -3556,16 +3563,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "347", + "$id": "348", "Name": "put", "ResourceName": "CollectionsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "348", + "$id": "349", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3583,11 +3590,11 @@ "Kind": "Method" }, { - "$id": "349", + "$id": "350", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "350", + "$id": "351", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3602,19 +3609,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "351", + "$id": "352", "Type": { - "$ref": "350" + "$ref": "351" }, "Value": "application/json" } }, { - "$id": "352", + "$id": "353", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "353", + "$id": "354", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3629,9 +3636,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "354", + "$id": "355", "Type": { - "$ref": "353" + "$ref": "354" }, "Value": "application/json" } @@ -3639,7 +3646,7 @@ ], "Responses": [ { - "$id": "355", + "$id": "356", "StatusCodes": [ 204 ], @@ -3661,31 +3668,31 @@ } ], "Protocol": { - "$id": "356" + "$id": "357" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "357", + "$id": "358", "Name": "DictionaryString", "Description": "", "Operations": [ { - "$id": "358", + "$id": "359", "Name": "get", "ResourceName": "DictionaryString", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "359", + "$id": "360", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "360", + "$id": "361", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3700,9 +3707,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "361", + "$id": "362", "Type": { - "$ref": "360" + "$ref": "361" }, "Value": "application/json" } @@ -3710,7 +3717,7 @@ ], "Responses": [ { - "$id": "362", + "$id": "363", "StatusCodes": [ 200 ], @@ -3734,16 +3741,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "363", + "$id": "364", "Name": "put", "ResourceName": "DictionaryString", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "364", + "$id": "365", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3761,11 +3768,11 @@ "Kind": "Method" }, { - "$id": "365", + "$id": "366", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "366", + "$id": "367", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3780,19 +3787,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "367", + "$id": "368", "Type": { - "$ref": "366" + "$ref": "367" }, "Value": "application/json" } }, { - "$id": "368", + "$id": "369", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "369", + "$id": "370", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3807,9 +3814,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "370", + "$id": "371", "Type": { - "$ref": "369" + "$ref": "370" }, "Value": "application/json" } @@ -3817,7 +3824,7 @@ ], "Responses": [ { - "$id": "371", + "$id": "372", "StatusCodes": [ 204 ], @@ -3839,31 +3846,31 @@ } ], "Protocol": { - "$id": "372" + "$id": "373" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "373", + "$id": "374", "Name": "Never", "Description": "", "Operations": [ { - "$id": "374", + "$id": "375", "Name": "get", "ResourceName": "Never", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "375", + "$id": "376", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "376", + "$id": "377", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3878,9 +3885,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "377", + "$id": "378", "Type": { - "$ref": "376" + "$ref": "377" }, "Value": "application/json" } @@ -3888,7 +3895,7 @@ ], "Responses": [ { - "$id": "378", + "$id": "379", "StatusCodes": [ 200 ], @@ -3912,16 +3919,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "379", + "$id": "380", "Name": "put", "ResourceName": "Never", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "380", + "$id": "381", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3939,11 +3946,11 @@ "Kind": "Method" }, { - "$id": "381", + "$id": "382", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "382", + "$id": "383", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3958,19 +3965,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "383", + "$id": "384", "Type": { - "$ref": "382" + "$ref": "383" }, "Value": "application/json" } }, { - "$id": "384", + "$id": "385", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "385", + "$id": "386", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3985,9 +3992,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "386", + "$id": "387", "Type": { - "$ref": "385" + "$ref": "386" }, "Value": "application/json" } @@ -3995,7 +4002,7 @@ ], "Responses": [ { - "$id": "387", + "$id": "388", "StatusCodes": [ 204 ], @@ -4017,31 +4024,31 @@ } ], "Protocol": { - "$id": "388" + "$id": "389" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "389", + "$id": "390", "Name": "UnknownString", "Description": "", "Operations": [ { - "$id": "390", + "$id": "391", "Name": "get", "ResourceName": "UnknownString", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "391", + "$id": "392", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "392", + "$id": "393", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4056,9 +4063,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "393", + "$id": "394", "Type": { - "$ref": "392" + "$ref": "393" }, "Value": "application/json" } @@ -4066,7 +4073,7 @@ ], "Responses": [ { - "$id": "394", + "$id": "395", "StatusCodes": [ 200 ], @@ -4090,16 +4097,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "395", + "$id": "396", "Name": "put", "ResourceName": "UnknownString", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "396", + "$id": "397", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4117,11 +4124,11 @@ "Kind": "Method" }, { - "$id": "397", + "$id": "398", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "398", + "$id": "399", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4136,19 +4143,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "399", + "$id": "400", "Type": { - "$ref": "398" + "$ref": "399" }, "Value": "application/json" } }, { - "$id": "400", + "$id": "401", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "401", + "$id": "402", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4163,9 +4170,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "402", + "$id": "403", "Type": { - "$ref": "401" + "$ref": "402" }, "Value": "application/json" } @@ -4173,7 +4180,7 @@ ], "Responses": [ { - "$id": "403", + "$id": "404", "StatusCodes": [ 204 ], @@ -4195,31 +4202,31 @@ } ], "Protocol": { - "$id": "404" + "$id": "405" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "405", + "$id": "406", "Name": "UnknownInt", "Description": "", "Operations": [ { - "$id": "406", + "$id": "407", "Name": "get", "ResourceName": "UnknownInt", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "407", + "$id": "408", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "408", + "$id": "409", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4234,9 +4241,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "409", + "$id": "410", "Type": { - "$ref": "408" + "$ref": "409" }, "Value": "application/json" } @@ -4244,7 +4251,7 @@ ], "Responses": [ { - "$id": "410", + "$id": "411", "StatusCodes": [ 200 ], @@ -4268,16 +4275,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "411", + "$id": "412", "Name": "put", "ResourceName": "UnknownInt", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "412", + "$id": "413", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4295,11 +4302,11 @@ "Kind": "Method" }, { - "$id": "413", + "$id": "414", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "414", + "$id": "415", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4314,19 +4321,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "415", + "$id": "416", "Type": { - "$ref": "414" + "$ref": "415" }, "Value": "application/json" } }, { - "$id": "416", + "$id": "417", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "417", + "$id": "418", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4341,9 +4348,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "418", + "$id": "419", "Type": { - "$ref": "417" + "$ref": "418" }, "Value": "application/json" } @@ -4351,7 +4358,7 @@ ], "Responses": [ { - "$id": "419", + "$id": "420", "StatusCodes": [ 204 ], @@ -4373,31 +4380,31 @@ } ], "Protocol": { - "$id": "420" + "$id": "421" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "421", + "$id": "422", "Name": "UnknownDict", "Description": "", "Operations": [ { - "$id": "422", + "$id": "423", "Name": "get", "ResourceName": "UnknownDict", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "423", + "$id": "424", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "424", + "$id": "425", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4412,9 +4419,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "425", + "$id": "426", "Type": { - "$ref": "424" + "$ref": "425" }, "Value": "application/json" } @@ -4422,7 +4429,7 @@ ], "Responses": [ { - "$id": "426", + "$id": "427", "StatusCodes": [ 200 ], @@ -4446,16 +4453,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "427", + "$id": "428", "Name": "put", "ResourceName": "UnknownDict", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "428", + "$id": "429", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4473,11 +4480,11 @@ "Kind": "Method" }, { - "$id": "429", + "$id": "430", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "430", + "$id": "431", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4492,19 +4499,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "431", + "$id": "432", "Type": { - "$ref": "430" + "$ref": "431" }, "Value": "application/json" } }, { - "$id": "432", + "$id": "433", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "433", + "$id": "434", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4519,9 +4526,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "434", + "$id": "435", "Type": { - "$ref": "433" + "$ref": "434" }, "Value": "application/json" } @@ -4529,7 +4536,7 @@ ], "Responses": [ { - "$id": "435", + "$id": "436", "StatusCodes": [ 204 ], @@ -4551,31 +4558,31 @@ } ], "Protocol": { - "$id": "436" + "$id": "437" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "437", + "$id": "438", "Name": "UnknownArray", "Description": "", "Operations": [ { - "$id": "438", + "$id": "439", "Name": "get", "ResourceName": "UnknownArray", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "439", + "$id": "440", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "440", + "$id": "441", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4590,9 +4597,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "441", + "$id": "442", "Type": { - "$ref": "440" + "$ref": "441" }, "Value": "application/json" } @@ -4600,7 +4607,7 @@ ], "Responses": [ { - "$id": "442", + "$id": "443", "StatusCodes": [ 200 ], @@ -4624,16 +4631,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "443", + "$id": "444", "Name": "put", "ResourceName": "UnknownArray", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "444", + "$id": "445", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4651,11 +4658,11 @@ "Kind": "Method" }, { - "$id": "445", + "$id": "446", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "446", + "$id": "447", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4670,19 +4677,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "447", + "$id": "448", "Type": { - "$ref": "446" + "$ref": "447" }, "Value": "application/json" } }, { - "$id": "448", + "$id": "449", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "449", + "$id": "450", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4697,9 +4704,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "450", + "$id": "451", "Type": { - "$ref": "449" + "$ref": "450" }, "Value": "application/json" } @@ -4707,7 +4714,7 @@ ], "Responses": [ { - "$id": "451", + "$id": "452", "StatusCodes": [ 204 ], @@ -4729,31 +4736,31 @@ } ], "Protocol": { - "$id": "452" + "$id": "453" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "453", + "$id": "454", "Name": "StringLiteral", "Description": "", "Operations": [ { - "$id": "454", + "$id": "455", "Name": "get", "ResourceName": "StringLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "455", + "$id": "456", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "456", + "$id": "457", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4768,9 +4775,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "457", + "$id": "458", "Type": { - "$ref": "456" + "$ref": "457" }, "Value": "application/json" } @@ -4778,7 +4785,7 @@ ], "Responses": [ { - "$id": "458", + "$id": "459", "StatusCodes": [ 200 ], @@ -4802,16 +4809,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "459", + "$id": "460", "Name": "put", "ResourceName": "StringLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "460", + "$id": "461", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4829,11 +4836,11 @@ "Kind": "Method" }, { - "$id": "461", + "$id": "462", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "462", + "$id": "463", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4848,19 +4855,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "463", + "$id": "464", "Type": { - "$ref": "462" + "$ref": "463" }, "Value": "application/json" } }, { - "$id": "464", + "$id": "465", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "465", + "$id": "466", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4875,9 +4882,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "466", + "$id": "467", "Type": { - "$ref": "465" + "$ref": "466" }, "Value": "application/json" } @@ -4885,7 +4892,7 @@ ], "Responses": [ { - "$id": "467", + "$id": "468", "StatusCodes": [ 204 ], @@ -4907,31 +4914,31 @@ } ], "Protocol": { - "$id": "468" + "$id": "469" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "469", + "$id": "470", "Name": "IntLiteral", "Description": "", "Operations": [ { - "$id": "470", + "$id": "471", "Name": "get", "ResourceName": "IntLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "471", + "$id": "472", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "472", + "$id": "473", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4946,9 +4953,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "473", + "$id": "474", "Type": { - "$ref": "472" + "$ref": "473" }, "Value": "application/json" } @@ -4956,7 +4963,7 @@ ], "Responses": [ { - "$id": "474", + "$id": "475", "StatusCodes": [ 200 ], @@ -4980,16 +4987,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "475", + "$id": "476", "Name": "put", "ResourceName": "IntLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "476", + "$id": "477", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5007,11 +5014,11 @@ "Kind": "Method" }, { - "$id": "477", + "$id": "478", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "478", + "$id": "479", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5026,19 +5033,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "479", + "$id": "480", "Type": { - "$ref": "478" + "$ref": "479" }, "Value": "application/json" } }, { - "$id": "480", + "$id": "481", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "481", + "$id": "482", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5053,9 +5060,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "482", + "$id": "483", "Type": { - "$ref": "481" + "$ref": "482" }, "Value": "application/json" } @@ -5063,7 +5070,7 @@ ], "Responses": [ { - "$id": "483", + "$id": "484", "StatusCodes": [ 204 ], @@ -5085,31 +5092,31 @@ } ], "Protocol": { - "$id": "484" + "$id": "485" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "485", + "$id": "486", "Name": "FloatLiteral", "Description": "", "Operations": [ { - "$id": "486", + "$id": "487", "Name": "get", "ResourceName": "FloatLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "487", + "$id": "488", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "488", + "$id": "489", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5124,9 +5131,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "489", + "$id": "490", "Type": { - "$ref": "488" + "$ref": "489" }, "Value": "application/json" } @@ -5134,7 +5141,7 @@ ], "Responses": [ { - "$id": "490", + "$id": "491", "StatusCodes": [ 200 ], @@ -5158,16 +5165,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "491", + "$id": "492", "Name": "put", "ResourceName": "FloatLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "492", + "$id": "493", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5185,11 +5192,11 @@ "Kind": "Method" }, { - "$id": "493", + "$id": "494", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "494", + "$id": "495", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5204,19 +5211,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "495", + "$id": "496", "Type": { - "$ref": "494" + "$ref": "495" }, "Value": "application/json" } }, { - "$id": "496", + "$id": "497", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "497", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5231,9 +5238,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "498", + "$id": "499", "Type": { - "$ref": "497" + "$ref": "498" }, "Value": "application/json" } @@ -5241,7 +5248,7 @@ ], "Responses": [ { - "$id": "499", + "$id": "500", "StatusCodes": [ 204 ], @@ -5263,31 +5270,31 @@ } ], "Protocol": { - "$id": "500" + "$id": "501" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "501", + "$id": "502", "Name": "BooleanLiteral", "Description": "", "Operations": [ { - "$id": "502", + "$id": "503", "Name": "get", "ResourceName": "BooleanLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "503", + "$id": "504", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "504", + "$id": "505", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5302,9 +5309,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "505", + "$id": "506", "Type": { - "$ref": "504" + "$ref": "505" }, "Value": "application/json" } @@ -5312,7 +5319,7 @@ ], "Responses": [ { - "$id": "506", + "$id": "507", "StatusCodes": [ 200 ], @@ -5336,16 +5343,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "507", + "$id": "508", "Name": "put", "ResourceName": "BooleanLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "508", + "$id": "509", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5363,11 +5370,11 @@ "Kind": "Method" }, { - "$id": "509", + "$id": "510", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "510", + "$id": "511", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5382,19 +5389,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "511", + "$id": "512", "Type": { - "$ref": "510" + "$ref": "511" }, "Value": "application/json" } }, { - "$id": "512", + "$id": "513", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "513", + "$id": "514", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5409,9 +5416,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "514", + "$id": "515", "Type": { - "$ref": "513" + "$ref": "514" }, "Value": "application/json" } @@ -5419,7 +5426,7 @@ ], "Responses": [ { - "$id": "515", + "$id": "516", "StatusCodes": [ 204 ], @@ -5441,31 +5448,31 @@ } ], "Protocol": { - "$id": "516" + "$id": "517" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "517", + "$id": "518", "Name": "UnionStringLiteral", "Description": "", "Operations": [ { - "$id": "518", + "$id": "519", "Name": "get", "ResourceName": "UnionStringLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "519", + "$id": "520", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "520", + "$id": "521", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5480,9 +5487,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "521", + "$id": "522", "Type": { - "$ref": "520" + "$ref": "521" }, "Value": "application/json" } @@ -5490,7 +5497,7 @@ ], "Responses": [ { - "$id": "522", + "$id": "523", "StatusCodes": [ 200 ], @@ -5514,16 +5521,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "523", + "$id": "524", "Name": "put", "ResourceName": "UnionStringLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "524", + "$id": "525", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5541,11 +5548,11 @@ "Kind": "Method" }, { - "$id": "525", + "$id": "526", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "526", + "$id": "527", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5560,19 +5567,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "527", + "$id": "528", "Type": { - "$ref": "526" + "$ref": "527" }, "Value": "application/json" } }, { - "$id": "528", + "$id": "529", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "529", + "$id": "530", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5587,9 +5594,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "530", + "$id": "531", "Type": { - "$ref": "529" + "$ref": "530" }, "Value": "application/json" } @@ -5597,7 +5604,7 @@ ], "Responses": [ { - "$id": "531", + "$id": "532", "StatusCodes": [ 204 ], @@ -5619,31 +5626,31 @@ } ], "Protocol": { - "$id": "532" + "$id": "533" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "533", + "$id": "534", "Name": "UnionIntLiteral", "Description": "", "Operations": [ { - "$id": "534", + "$id": "535", "Name": "get", "ResourceName": "UnionIntLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "535", + "$id": "536", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "536", + "$id": "537", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5658,9 +5665,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "537", + "$id": "538", "Type": { - "$ref": "536" + "$ref": "537" }, "Value": "application/json" } @@ -5668,7 +5675,7 @@ ], "Responses": [ { - "$id": "538", + "$id": "539", "StatusCodes": [ 200 ], @@ -5692,16 +5699,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "539", + "$id": "540", "Name": "put", "ResourceName": "UnionIntLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "540", + "$id": "541", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5719,11 +5726,11 @@ "Kind": "Method" }, { - "$id": "541", + "$id": "542", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "542", + "$id": "543", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5738,19 +5745,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "543", + "$id": "544", "Type": { - "$ref": "542" + "$ref": "543" }, "Value": "application/json" } }, { - "$id": "544", + "$id": "545", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "545", + "$id": "546", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5765,9 +5772,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "546", + "$id": "547", "Type": { - "$ref": "545" + "$ref": "546" }, "Value": "application/json" } @@ -5775,7 +5782,7 @@ ], "Responses": [ { - "$id": "547", + "$id": "548", "StatusCodes": [ 204 ], @@ -5797,31 +5804,31 @@ } ], "Protocol": { - "$id": "548" + "$id": "549" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "549", + "$id": "550", "Name": "UnionFloatLiteral", "Description": "", "Operations": [ { - "$id": "550", + "$id": "551", "Name": "get", "ResourceName": "UnionFloatLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "551", + "$id": "552", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "552", + "$id": "553", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5836,9 +5843,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "553", + "$id": "554", "Type": { - "$ref": "552" + "$ref": "553" }, "Value": "application/json" } @@ -5846,7 +5853,7 @@ ], "Responses": [ { - "$id": "554", + "$id": "555", "StatusCodes": [ 200 ], @@ -5870,16 +5877,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "555", + "$id": "556", "Name": "put", "ResourceName": "UnionFloatLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "556", + "$id": "557", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5897,11 +5904,11 @@ "Kind": "Method" }, { - "$id": "557", + "$id": "558", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "558", + "$id": "559", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5916,19 +5923,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "559", + "$id": "560", "Type": { - "$ref": "558" + "$ref": "559" }, "Value": "application/json" } }, { - "$id": "560", + "$id": "561", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "561", + "$id": "562", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5943,9 +5950,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "562", + "$id": "563", "Type": { - "$ref": "561" + "$ref": "562" }, "Value": "application/json" } @@ -5953,7 +5960,7 @@ ], "Responses": [ { - "$id": "563", + "$id": "564", "StatusCodes": [ 204 ], @@ -5975,31 +5982,31 @@ } ], "Protocol": { - "$id": "564" + "$id": "565" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "565", + "$id": "566", "Name": "UnionEnumValue", "Description": "", "Operations": [ { - "$id": "566", + "$id": "567", "Name": "get", "ResourceName": "UnionEnumValue", "Description": "Get call", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "567", + "$id": "568", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "568", + "$id": "569", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6014,9 +6021,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "569", + "$id": "570", "Type": { - "$ref": "568" + "$ref": "569" }, "Value": "application/json" } @@ -6024,7 +6031,7 @@ ], "Responses": [ { - "$id": "570", + "$id": "571", "StatusCodes": [ 200 ], @@ -6048,16 +6055,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "571", + "$id": "572", "Name": "put", "ResourceName": "UnionEnumValue", "Description": "Put operation", "Parameters": [ { - "$ref": "115" + "$ref": "116" }, { - "$id": "572", + "$id": "573", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -6075,11 +6082,11 @@ "Kind": "Method" }, { - "$id": "573", + "$id": "574", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "574", + "$id": "575", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6094,19 +6101,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "575", + "$id": "576", "Type": { - "$ref": "574" + "$ref": "575" }, "Value": "application/json" } }, { - "$id": "576", + "$id": "577", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "577", + "$id": "578", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6121,9 +6128,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "578", + "$id": "579", "Type": { - "$ref": "577" + "$ref": "578" }, "Value": "application/json" } @@ -6131,7 +6138,7 @@ ], "Responses": [ { - "$id": "579", + "$id": "580", "StatusCodes": [ 204 ], @@ -6153,7 +6160,7 @@ } ], "Protocol": { - "$id": "580" + "$id": "581" }, "Creatable": false, "Parent": "ValueTypesClient" diff --git a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionEnumValue.cs b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionEnumValue.cs index 9056af278d9..81d72b62043 100644 --- a/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionEnumValue.cs +++ b/test/CadlRanchProjects/type/property/value-types/tests/Generated/Samples/Samples_UnionEnumValue.cs @@ -138,7 +138,7 @@ public void Example_UnionEnumValue_Put_ShortVersion_Convenience() { UnionEnumValue client = new ValueTypesClient().GetUnionEnumValueClient(); - UnionEnumValueProperty body = new UnionEnumValueProperty(ExtendedEnum.EnumValue2); + UnionEnumValueProperty body = new UnionEnumValueProperty(); Response response = client.Put(body); } @@ -148,7 +148,7 @@ public async Task Example_UnionEnumValue_Put_ShortVersion_Convenience_Async() { UnionEnumValue client = new ValueTypesClient().GetUnionEnumValueClient(); - UnionEnumValueProperty body = new UnionEnumValueProperty(ExtendedEnum.EnumValue2); + UnionEnumValueProperty body = new UnionEnumValueProperty(); Response response = await client.PutAsync(body); } @@ -188,7 +188,7 @@ public void Example_UnionEnumValue_Put_AllParameters_Convenience() { UnionEnumValue client = new ValueTypesClient().GetUnionEnumValueClient(); - UnionEnumValueProperty body = new UnionEnumValueProperty(ExtendedEnum.EnumValue2); + UnionEnumValueProperty body = new UnionEnumValueProperty(); Response response = client.Put(body); } @@ -198,7 +198,7 @@ public async Task Example_UnionEnumValue_Put_AllParameters_Convenience_Async() { UnionEnumValue client = new ValueTypesClient().GetUnionEnumValueClient(); - UnionEnumValueProperty body = new UnionEnumValueProperty(ExtendedEnum.EnumValue2); + UnionEnumValueProperty body = new UnionEnumValueProperty(); Response response = await client.PutAsync(body); } } diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json index 0b3c60aa77e..d6acf1e0e21 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json @@ -1486,18 +1486,25 @@ "SerializedName": "type", "Description": "", "Type": { - "$ref": "46" + "$id": "184", + "Kind": "Literal", + "Name": "Literal", + "LiteralValueType": { + "$ref": "46" + }, + "Value": "clientCredentials", + "IsNullable": false }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "184", + "$id": "185", "Name": "tokenUrl", "SerializedName": "tokenUrl", "Description": "", "Type": { - "$id": "185", + "$id": "186", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -1510,12 +1517,12 @@ "IsReadOnly": false }, { - "$id": "186", + "$id": "187", "Name": "refreshUrl", "SerializedName": "refreshUrl", "Description": "", "Type": { - "$id": "187", + "$id": "188", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -1528,12 +1535,12 @@ "IsReadOnly": false }, { - "$id": "188", + "$id": "189", "Name": "scopes", "SerializedName": "scopes", "Description": "", "Type": { - "$id": "189", + "$id": "190", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1546,22 +1553,22 @@ ], "Clients": [ { - "$id": "190", + "$id": "191", "Name": "FirstTestTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "191", + "$id": "192", "Name": "topAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level method", "Parameters": [ { - "$id": "192", + "$id": "193", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "193", + "$id": "194", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1577,11 +1584,11 @@ "Kind": "Client" }, { - "$id": "194", + "$id": "195", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "195", + "$id": "196", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1597,11 +1604,11 @@ "Kind": "Method" }, { - "$id": "196", + "$id": "197", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "197", + "$id": "198", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1616,9 +1623,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "198", + "$id": "199", "Type": { - "$ref": "197" + "$ref": "198" }, "Value": "application/json" } @@ -1626,7 +1633,7 @@ ], "Responses": [ { - "$id": "199", + "$id": "200", "StatusCodes": [ 200 ], @@ -1650,20 +1657,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "200", + "$id": "201", "Name": "topAction2", "ResourceName": "FirstTestTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "201", + "$id": "202", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1678,9 +1685,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "204", "Type": { - "$ref": "202" + "$ref": "203" }, "Value": "application/json" } @@ -1688,7 +1695,7 @@ ], "Responses": [ { - "$id": "204", + "$id": "205", "StatusCodes": [ 200 ], @@ -1712,16 +1719,16 @@ "GenerateConvenienceMethod": false }, { - "$id": "205", + "$id": "206", "Name": "patchAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "206", + "$id": "207", "Name": "body", "NameInRequest": "body", "Type": { @@ -1738,11 +1745,11 @@ "Kind": "Method" }, { - "$id": "207", + "$id": "208", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "208", + "$id": "209", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1757,19 +1764,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "209", + "$id": "210", "Type": { - "$ref": "208" + "$ref": "209" }, "Value": "application/json" } }, { - "$id": "210", + "$id": "211", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "211", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1784,9 +1791,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "212", + "$id": "213", "Type": { - "$ref": "211" + "$ref": "212" }, "Value": "application/json" } @@ -1794,7 +1801,7 @@ ], "Responses": [ { - "$id": "213", + "$id": "214", "StatusCodes": [ 200 ], @@ -1821,16 +1828,16 @@ "GenerateConvenienceMethod": false }, { - "$id": "214", + "$id": "215", "Name": "anonymousBody", "ResourceName": "FirstTestTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "215", + "$id": "216", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", @@ -1848,11 +1855,11 @@ "Kind": "Method" }, { - "$id": "216", + "$id": "217", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "217", + "$id": "218", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1867,19 +1874,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "218", + "$id": "219", "Type": { - "$ref": "217" + "$ref": "218" }, "Value": "application/json" } }, { - "$id": "219", + "$id": "220", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "220", + "$id": "221", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1894,9 +1901,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "221", + "$id": "222", "Type": { - "$ref": "220" + "$ref": "221" }, "Value": "application/json" } @@ -1904,7 +1911,7 @@ ], "Responses": [ { - "$id": "222", + "$id": "223", "StatusCodes": [ 200 ], @@ -1931,16 +1938,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "223", + "$id": "224", "Name": "friendlyModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "224", + "$id": "225", "Name": "Friend", "NameInRequest": "NotFriend", "Description": "this is not a friendly model but with a friendly name", @@ -1958,11 +1965,11 @@ "Kind": "Method" }, { - "$id": "225", + "$id": "226", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "226", + "$id": "227", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1977,19 +1984,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "227", + "$id": "228", "Type": { - "$ref": "226" + "$ref": "227" }, "Value": "application/json" } }, { - "$id": "228", + "$id": "229", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "229", + "$id": "230", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2004,9 +2011,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "230", + "$id": "231", "Type": { - "$ref": "229" + "$ref": "230" }, "Value": "application/json" } @@ -2014,7 +2021,7 @@ ], "Responses": [ { - "$id": "231", + "$id": "232", "StatusCodes": [ 200 ], @@ -2041,19 +2048,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "232", + "$id": "233", "Name": "addTimeHeader", "ResourceName": "FirstTestTypeSpec", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "233", + "$id": "234", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "234", + "$id": "235", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -2069,11 +2076,11 @@ "Kind": "Method" }, { - "$id": "235", + "$id": "236", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "236", + "$id": "237", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2088,9 +2095,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "237", + "$id": "238", "Type": { - "$ref": "236" + "$ref": "237" }, "Value": "application/json" } @@ -2098,7 +2105,7 @@ ], "Responses": [ { - "$id": "238", + "$id": "239", "StatusCodes": [ 204 ], @@ -2116,20 +2123,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "239", + "$id": "240", "Name": "stringFormat", "ResourceName": "FirstTestTypeSpec", "Description": "paramete has string format.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "240", + "$id": "241", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "241", + "$id": "242", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -2145,7 +2152,7 @@ "Kind": "Method" }, { - "$id": "242", + "$id": "243", "Name": "body", "NameInRequest": "body", "Type": { @@ -2162,11 +2169,11 @@ "Kind": "Method" }, { - "$id": "243", + "$id": "244", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "244", + "$id": "245", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2181,19 +2188,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "245", + "$id": "246", "Type": { - "$ref": "244" + "$ref": "245" }, "Value": "application/json" } }, { - "$id": "246", + "$id": "247", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "247", + "$id": "248", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2208,9 +2215,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "248", + "$id": "249", "Type": { - "$ref": "247" + "$ref": "248" }, "Value": "application/json" } @@ -2218,7 +2225,7 @@ ], "Responses": [ { - "$id": "249", + "$id": "250", "StatusCodes": [ 204 ], @@ -2239,16 +2246,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "250", + "$id": "251", "Name": "projectedNameModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its projected name", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "251", + "$id": "252", "Name": "ProjectedModel", "NameInRequest": "ModelWithProjectedName", "Description": "this is a model with a projected name", @@ -2266,11 +2273,11 @@ "Kind": "Method" }, { - "$id": "252", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "253", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2285,19 +2292,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "254", + "$id": "255", "Type": { - "$ref": "253" + "$ref": "254" }, "Value": "application/json" } }, { - "$id": "255", + "$id": "256", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "256", + "$id": "257", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2312,9 +2319,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "257", + "$id": "258", "Type": { - "$ref": "256" + "$ref": "257" }, "Value": "application/json" } @@ -2322,7 +2329,7 @@ ], "Responses": [ { - "$id": "258", + "$id": "259", "StatusCodes": [ 200 ], @@ -2349,20 +2356,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "259", + "$id": "260", "Name": "returnsAnonymousModel", "ResourceName": "FirstTestTypeSpec", "Description": "return anonymous model", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "260", + "$id": "261", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "261", + "$id": "262", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2377,9 +2384,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "262", + "$id": "263", "Type": { - "$ref": "261" + "$ref": "262" }, "Value": "application/json" } @@ -2387,7 +2394,7 @@ ], "Responses": [ { - "$id": "263", + "$id": "264", "StatusCodes": [ 200 ], @@ -2411,20 +2418,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "264", + "$id": "265", "Name": "headAsBoolean", "ResourceName": "FirstTestTypeSpec", "Description": "head as boolean.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "265", + "$id": "266", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "266", + "$id": "267", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2440,11 +2447,11 @@ "Kind": "Method" }, { - "$id": "267", + "$id": "268", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "268", + "$id": "269", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2459,9 +2466,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "269", + "$id": "270", "Type": { - "$ref": "268" + "$ref": "269" }, "Value": "application/json" } @@ -2469,7 +2476,7 @@ ], "Responses": [ { - "$id": "270", + "$id": "271", "StatusCodes": [ 204 ], @@ -2487,20 +2494,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "271", + "$id": "272", "Name": "stringBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is string.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "272", + "$id": "273", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "273", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2516,11 +2523,11 @@ "Kind": "Method" }, { - "$id": "274", + "$id": "275", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "275", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2535,19 +2542,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "276", + "$id": "277", "Type": { - "$ref": "275" + "$ref": "276" }, "Value": "application/json" } }, { - "$id": "277", + "$id": "278", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "278", + "$id": "279", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2562,9 +2569,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "279", + "$id": "280", "Type": { - "$ref": "278" + "$ref": "279" }, "Value": "application/json" } @@ -2572,7 +2579,7 @@ ], "Responses": [ { - "$id": "280", + "$id": "281", "StatusCodes": [ 204 ], @@ -2593,20 +2600,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "281", + "$id": "282", "Name": "boolBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is bool.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "282", + "$id": "283", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "283", + "$id": "284", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2622,11 +2629,11 @@ "Kind": "Method" }, { - "$id": "284", + "$id": "285", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "285", + "$id": "286", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2641,19 +2648,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "286", + "$id": "287", "Type": { - "$ref": "285" + "$ref": "286" }, "Value": "application/json" } }, { - "$id": "287", + "$id": "288", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "288", + "$id": "289", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2668,9 +2675,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "289", + "$id": "290", "Type": { - "$ref": "288" + "$ref": "289" }, "Value": "application/json" } @@ -2678,7 +2685,7 @@ ], "Responses": [ { - "$id": "290", + "$id": "291", "StatusCodes": [ 204 ], @@ -2699,20 +2706,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "291", + "$id": "292", "Name": "dateTimeBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is datetime.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "292", + "$id": "293", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "293", + "$id": "294", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -2728,11 +2735,11 @@ "Kind": "Method" }, { - "$id": "294", + "$id": "295", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "295", + "$id": "296", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2747,19 +2754,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "296", + "$id": "297", "Type": { - "$ref": "295" + "$ref": "296" }, "Value": "application/json" } }, { - "$id": "297", + "$id": "298", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "298", + "$id": "299", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2774,9 +2781,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "299", + "$id": "300", "Type": { - "$ref": "298" + "$ref": "299" }, "Value": "application/json" } @@ -2784,7 +2791,7 @@ ], "Responses": [ { - "$id": "300", + "$id": "301", "StatusCodes": [ 204 ], @@ -2805,20 +2812,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "301", + "$id": "302", "Name": "returnString", "ResourceName": "FirstTestTypeSpec", "Description": "The return type is datetime.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "302", + "$id": "303", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "303", + "$id": "304", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2833,9 +2840,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "304", + "$id": "305", "Type": { - "$ref": "303" + "$ref": "304" }, "Value": "application/json" } @@ -2843,12 +2850,12 @@ ], "Responses": [ { - "$id": "305", + "$id": "306", "StatusCodes": [ 200 ], "BodyType": { - "$id": "306", + "$id": "307", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2870,19 +2877,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "307", + "$id": "308", "Name": "returnUnknown", "ResourceName": "FirstTestTypeSpec", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "308", + "$id": "309", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "309", + "$id": "310", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2897,9 +2904,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "310", + "$id": "311", "Type": { - "$ref": "309" + "$ref": "310" }, "Value": "application/json" } @@ -2907,12 +2914,12 @@ ], "Responses": [ { - "$id": "311", + "$id": "312", "StatusCodes": [ 200 ], "BodyType": { - "$id": "312", + "$id": "313", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -2934,16 +2941,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "313", + "$id": "314", "Name": "recursiveExtension", "ResourceName": "FirstTestTypeSpec", "Description": "test parent reference child", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "314", + "$id": "315", "Name": "input", "NameInRequest": "input", "Type": { @@ -2960,11 +2967,11 @@ "Kind": "Method" }, { - "$id": "315", + "$id": "316", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "316", + "$id": "317", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2979,19 +2986,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "317", + "$id": "318", "Type": { - "$ref": "316" + "$ref": "317" }, "Value": "application/json" } }, { - "$id": "318", + "$id": "319", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "319", + "$id": "320", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3006,9 +3013,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "320", + "$id": "321", "Type": { - "$ref": "319" + "$ref": "320" }, "Value": "application/json" } @@ -3016,7 +3023,7 @@ ], "Responses": [ { - "$id": "321", + "$id": "322", "StatusCodes": [ 204 ], @@ -3037,16 +3044,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "322", + "$id": "323", "Name": "threeLevelRecursive", "ResourceName": "FirstTestTypeSpec", "Description": "test three level recursive extension", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "323", + "$id": "324", "Name": "input", "NameInRequest": "input", "Type": { @@ -3063,11 +3070,11 @@ "Kind": "Method" }, { - "$id": "324", + "$id": "325", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "325", + "$id": "326", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3082,19 +3089,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "326", + "$id": "327", "Type": { - "$ref": "325" + "$ref": "326" }, "Value": "application/json" } }, { - "$id": "327", + "$id": "328", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "328", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3109,9 +3116,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "329", + "$id": "330", "Type": { - "$ref": "328" + "$ref": "329" }, "Value": "application/json" } @@ -3119,7 +3126,7 @@ ], "Responses": [ { - "$id": "330", + "$id": "331", "StatusCodes": [ 204 ], @@ -3140,16 +3147,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "331", + "$id": "332", "Name": "recursiveModels", "ResourceName": "FirstTestTypeSpec", "Description": "test child reference parent", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "332", + "$id": "333", "Name": "input", "NameInRequest": "input", "Type": { @@ -3166,11 +3173,11 @@ "Kind": "Method" }, { - "$id": "333", + "$id": "334", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "334", + "$id": "335", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3185,19 +3192,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "335", + "$id": "336", "Type": { - "$ref": "334" + "$ref": "335" }, "Value": "application/json" } }, { - "$id": "336", + "$id": "337", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "337", + "$id": "338", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3212,9 +3219,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "338", + "$id": "339", "Type": { - "$ref": "337" + "$ref": "338" }, "Value": "application/json" } @@ -3222,7 +3229,7 @@ ], "Responses": [ { - "$id": "339", + "$id": "340", "StatusCodes": [ 204 ], @@ -3243,16 +3250,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "340", + "$id": "341", "Name": "ContainSelfModels", "ResourceName": "FirstTestTypeSpec", "Description": "test contain self models", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "341", + "$id": "342", "Name": "input", "NameInRequest": "input", "Type": { @@ -3269,11 +3276,11 @@ "Kind": "Method" }, { - "$id": "342", + "$id": "343", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "343", + "$id": "344", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3288,19 +3295,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "344", + "$id": "345", "Type": { - "$ref": "343" + "$ref": "344" }, "Value": "application/json" } }, { - "$id": "345", + "$id": "346", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "346", + "$id": "347", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3315,9 +3322,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "347", + "$id": "348", "Type": { - "$ref": "346" + "$ref": "347" }, "Value": "application/json" } @@ -3325,7 +3332,7 @@ ], "Responses": [ { - "$id": "348", + "$id": "349", "StatusCodes": [ 204 ], @@ -3346,16 +3353,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "349", + "$id": "350", "Name": "enumParameter", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "350", + "$id": "351", "Name": "p1", "NameInRequest": "p1", "Type": { @@ -3372,11 +3379,11 @@ "Kind": "Method" }, { - "$id": "351", + "$id": "352", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "352", + "$id": "353", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3391,9 +3398,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "353", + "$id": "354", "Type": { - "$ref": "352" + "$ref": "353" }, "Value": "application/json" } @@ -3401,7 +3408,7 @@ ], "Responses": [ { - "$id": "354", + "$id": "355", "StatusCodes": [ 204 ], @@ -3419,16 +3426,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "355", + "$id": "356", "Name": "bodyIsModelWithProjectedEnum", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "356", + "$id": "357", "Name": "body", "NameInRequest": "body", "Type": { @@ -3445,11 +3452,11 @@ "Kind": "Method" }, { - "$id": "357", + "$id": "358", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "358", + "$id": "359", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3464,19 +3471,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "359", + "$id": "360", "Type": { - "$ref": "358" + "$ref": "359" }, "Value": "application/json" } }, { - "$id": "360", + "$id": "361", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "361", + "$id": "362", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3491,9 +3498,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "362", + "$id": "363", "Type": { - "$ref": "361" + "$ref": "362" }, "Value": "application/json" } @@ -3501,7 +3508,7 @@ ], "Responses": [ { - "$id": "363", + "$id": "364", "StatusCodes": [ 204 ], @@ -3522,30 +3529,30 @@ "GenerateConvenienceMethod": true }, { - "$id": "364", + "$id": "365", "Name": "optionalDictionary", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "365", + "$id": "366", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "366", + "$id": "367", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "367", + "$id": "368", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "368", + "$id": "369", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3563,11 +3570,11 @@ "Kind": "Method" }, { - "$id": "369", + "$id": "370", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "370", + "$id": "371", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3582,19 +3589,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "371", + "$id": "372", "Type": { - "$ref": "370" + "$ref": "371" }, "Value": "application/json" } }, { - "$id": "372", + "$id": "373", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "373", + "$id": "374", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3609,9 +3616,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "374", + "$id": "375", "Type": { - "$ref": "373" + "$ref": "374" }, "Value": "application/json" } @@ -3619,7 +3626,7 @@ ], "Responses": [ { - "$id": "375", + "$id": "376", "StatusCodes": [ 204 ], @@ -3640,20 +3647,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "376", + "$id": "377", "Name": "azureLocationOp", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "377", + "$id": "378", "Name": "location", "NameInRequest": "location", "Type": { - "$id": "378", + "$id": "379", "Kind": "Primitive", "Name": "AzureLocation", "IsNullable": false @@ -3669,11 +3676,11 @@ "Kind": "Method" }, { - "$id": "379", + "$id": "380", "Name": "regenLocation", "NameInRequest": "regen-location", "Type": { - "$id": "380", + "$id": "381", "Kind": "Primitive", "Name": "AzureLocation", "IsNullable": false @@ -3689,7 +3696,7 @@ "Kind": "Method" }, { - "$id": "381", + "$id": "382", "Name": "body", "NameInRequest": "body", "Type": { @@ -3706,11 +3713,11 @@ "Kind": "Method" }, { - "$id": "382", + "$id": "383", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "383", + "$id": "384", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3725,19 +3732,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "384", + "$id": "385", "Type": { - "$ref": "383" + "$ref": "384" }, "Value": "application/json" } }, { - "$id": "385", + "$id": "386", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "386", + "$id": "387", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3752,9 +3759,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "387", + "$id": "388", "Type": { - "$ref": "386" + "$ref": "387" }, "Value": "application/json" } @@ -3762,7 +3769,7 @@ ], "Responses": [ { - "$id": "388", + "$id": "389", "StatusCodes": [ 204 ], @@ -3784,41 +3791,41 @@ } ], "Protocol": { - "$id": "389" + "$id": "390" }, "Creatable": true }, { - "$id": "390", + "$id": "391", "Name": "Hello", "Description": "", "Operations": [], "Protocol": { - "$id": "391" + "$id": "392" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "392", + "$id": "393", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "393", + "$id": "394", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "394", + "$id": "395", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "395", + "$id": "396", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3834,11 +3841,11 @@ "Kind": "Method" }, { - "$id": "396", + "$id": "397", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "397", + "$id": "398", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3854,11 +3861,11 @@ "Kind": "Method" }, { - "$id": "398", + "$id": "399", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "399", + "$id": "400", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3874,11 +3881,11 @@ "Kind": "Method" }, { - "$id": "400", + "$id": "401", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "401", + "$id": "402", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3893,9 +3900,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "402", + "$id": "403", "Type": { - "$ref": "401" + "$ref": "402" }, "Value": "application/json" } @@ -3903,7 +3910,7 @@ ], "Responses": [ { - "$id": "403", + "$id": "404", "StatusCodes": [ 200 ], @@ -3928,31 +3935,31 @@ } ], "Protocol": { - "$id": "404" + "$id": "405" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "405", + "$id": "406", "Name": "HelloDemo2", "Description": "", "Operations": [ { - "$id": "406", + "$id": "407", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "407", + "$id": "408", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "408", + "$id": "409", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3968,15 +3975,15 @@ "Kind": "Method" }, { - "$id": "409", + "$id": "410", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "410", + "$id": "411", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "411", + "$id": "412", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3986,9 +3993,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "412", + "$id": "413", "Type": { - "$ref": "410" + "$ref": "411" }, "Value": "text/plain" }, @@ -4002,11 +4009,11 @@ "Kind": "Constant" }, { - "$id": "413", + "$id": "414", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "414", + "$id": "415", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4022,7 +4029,7 @@ "Kind": "Method" }, { - "$id": "415", + "$id": "416", "Name": "action", "NameInRequest": "action", "Type": { @@ -4039,11 +4046,11 @@ "Kind": "Method" }, { - "$id": "416", + "$id": "417", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "417", + "$id": "418", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4058,9 +4065,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "418", + "$id": "419", "Type": { - "$ref": "417" + "$ref": "418" }, "Value": "application/json" } @@ -4068,7 +4075,7 @@ ], "Responses": [ { - "$id": "419", + "$id": "420", "StatusCodes": [ 200 ], @@ -4095,20 +4102,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "420", + "$id": "421", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "421", + "$id": "422", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "422", + "$id": "423", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4124,11 +4131,11 @@ "Kind": "Method" }, { - "$id": "423", + "$id": "424", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "424", + "$id": "425", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4144,7 +4151,7 @@ "Kind": "Method" }, { - "$id": "425", + "$id": "426", "Name": "action", "NameInRequest": "action", "Type": { @@ -4161,11 +4168,11 @@ "Kind": "Method" }, { - "$id": "426", + "$id": "427", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "427", + "$id": "428", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4180,19 +4187,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "428", + "$id": "429", "Type": { - "$ref": "427" + "$ref": "428" }, "Value": "application/json" } }, { - "$id": "429", + "$id": "430", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "430", + "$id": "431", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4207,9 +4214,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "431", + "$id": "432", "Type": { - "$ref": "430" + "$ref": "431" }, "Value": "application/json" } @@ -4217,7 +4224,7 @@ ], "Responses": [ { - "$id": "432", + "$id": "433", "StatusCodes": [ 200 ], @@ -4244,20 +4251,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "433", + "$id": "434", "Name": "helloDemoAgain", "ResourceName": "Demo2", "Description": "Return hi in demo2", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "434", + "$id": "435", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "435", + "$id": "436", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4272,9 +4279,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "436", + "$id": "437", "Type": { - "$ref": "435" + "$ref": "436" }, "Value": "application/json" } @@ -4282,7 +4289,7 @@ ], "Responses": [ { - "$id": "437", + "$id": "438", "StatusCodes": [ 200 ], @@ -4306,16 +4313,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "438", + "$id": "439", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "439", + "$id": "440", "Name": "body", "NameInRequest": "body", "Type": { @@ -4332,11 +4339,11 @@ "Kind": "Method" }, { - "$id": "440", + "$id": "441", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "441", + "$id": "442", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4351,19 +4358,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "442", + "$id": "443", "Type": { - "$ref": "441" + "$ref": "442" }, "Value": "application/json" } }, { - "$id": "443", + "$id": "444", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "444", + "$id": "445", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4378,9 +4385,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "445", + "$id": "446", "Type": { - "$ref": "444" + "$ref": "445" }, "Value": "application/json" } @@ -4388,7 +4395,7 @@ ], "Responses": [ { - "$id": "446", + "$id": "447", "StatusCodes": [ 200 ], @@ -4415,24 +4422,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "447", + "$id": "448", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "448", + "$id": "449", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "449", + "$id": "450", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "450", + "$id": "451", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4442,9 +4449,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "451", + "$id": "452", "Type": { - "$ref": "449" + "$ref": "450" }, "Value": "test" }, @@ -4458,15 +4465,15 @@ "Kind": "Constant" }, { - "$id": "452", + "$id": "453", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "453", + "$id": "454", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "454", + "$id": "455", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -4476,9 +4483,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "455", + "$id": "456", "Type": { - "$ref": "453" + "$ref": "454" }, "Value": 123 }, @@ -4492,15 +4499,15 @@ "Kind": "Constant" }, { - "$id": "456", + "$id": "457", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "457", + "$id": "458", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "458", + "$id": "459", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4510,9 +4517,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "459", + "$id": "460", "Type": { - "$ref": "457" + "$ref": "458" }, "Value": true }, @@ -4526,11 +4533,11 @@ "Kind": "Constant" }, { - "$id": "460", + "$id": "461", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "461", + "$id": "462", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4545,9 +4552,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "462", + "$id": "463", "Type": { - "$ref": "461" + "$ref": "462" }, "Value": "application/json" } @@ -4555,7 +4562,7 @@ ], "Responses": [ { - "$id": "463", + "$id": "464", "StatusCodes": [ 200 ], @@ -4580,31 +4587,31 @@ } ], "Protocol": { - "$id": "464" + "$id": "465" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "465", + "$id": "466", "Name": "EnumTest", "Description": "", "Operations": [ { - "$id": "466", + "$id": "467", "Name": "getUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "467", + "$id": "468", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "468", + "$id": "469", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4619,9 +4626,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "469", + "$id": "470", "Type": { - "$ref": "468" + "$ref": "469" }, "Value": "application/json" } @@ -4629,12 +4636,12 @@ ], "Responses": [ { - "$id": "470", + "$id": "471", "StatusCodes": [ 200 ], "BodyType": { - "$id": "471", + "$id": "472", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4657,27 +4664,27 @@ } ], "Protocol": { - "$id": "472" + "$id": "473" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "473", + "$id": "474", "Name": "ProtocolAndConvenient", "Description": "", "Operations": [ { - "$id": "474", + "$id": "475", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "475", + "$id": "476", "Name": "body", "NameInRequest": "body", "Type": { @@ -4694,11 +4701,11 @@ "Kind": "Method" }, { - "$id": "476", + "$id": "477", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "477", + "$id": "478", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4713,19 +4720,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "478", + "$id": "479", "Type": { - "$ref": "477" + "$ref": "478" }, "Value": "application/json" } }, { - "$id": "479", + "$id": "480", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "480", + "$id": "481", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4740,9 +4747,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "481", + "$id": "482", "Type": { - "$ref": "480" + "$ref": "481" }, "Value": "application/json" } @@ -4750,7 +4757,7 @@ ], "Responses": [ { - "$id": "482", + "$id": "483", "StatusCodes": [ 200 ], @@ -4777,20 +4784,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "483", + "$id": "484", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "484", + "$id": "485", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "485", + "$id": "486", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4805,9 +4812,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "486", + "$id": "487", "Type": { - "$ref": "485" + "$ref": "486" }, "Value": "application/json" } @@ -4815,7 +4822,7 @@ ], "Responses": [ { - "$id": "487", + "$id": "488", "StatusCodes": [ 204 ], @@ -4834,31 +4841,31 @@ } ], "Protocol": { - "$id": "488" + "$id": "489" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "489", + "$id": "490", "Name": "Entity", "Description": "", "Operations": [ { - "$id": "490", + "$id": "491", "Name": "doSomething", "ResourceName": "Entity", "Description": "doSomething for entity", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "491", + "$id": "492", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "492", + "$id": "493", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4874,11 +4881,11 @@ "Kind": "Method" }, { - "$id": "493", + "$id": "494", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "494", + "$id": "495", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4893,9 +4900,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "495", + "$id": "496", "Type": { - "$ref": "494" + "$ref": "495" }, "Value": "application/json" } @@ -4903,7 +4910,7 @@ ], "Responses": [ { - "$id": "496", + "$id": "497", "StatusCodes": [ 200 ], @@ -4928,31 +4935,31 @@ } ], "Protocol": { - "$id": "497" + "$id": "498" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "498", + "$id": "499", "Name": "Glossary", "Description": "", "Operations": [ { - "$id": "499", + "$id": "500", "Name": "doSomething", "ResourceName": "Glossary", "Description": "doSomething for glossary", "Parameters": [ { - "$ref": "192" + "$ref": "193" }, { - "$id": "500", + "$id": "501", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "501", + "$id": "502", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4968,11 +4975,11 @@ "Kind": "Method" }, { - "$id": "502", + "$id": "503", "Name": "h1", "NameInRequest": "h1", "Type": { - "$id": "503", + "$id": "504", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4988,11 +4995,11 @@ "Kind": "Method" }, { - "$id": "504", + "$id": "505", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "505", + "$id": "506", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5007,9 +5014,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "506", + "$id": "507", "Type": { - "$ref": "505" + "$ref": "506" }, "Value": "application/json" } @@ -5017,7 +5024,7 @@ ], "Responses": [ { - "$id": "507", + "$id": "508", "StatusCodes": [ 200 ], @@ -5042,20 +5049,20 @@ } ], "Protocol": { - "$id": "508" + "$id": "509" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" } ], "Auth": { - "$id": "509", + "$id": "510", "ApiKey": { - "$id": "510", + "$id": "511", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "511", + "$id": "512", "Scopes": [ "https://api.example.com/.default" ] diff --git a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json index f769e8b7cc5..186e2f0fe9c 100644 --- a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json @@ -510,18 +510,25 @@ "SerializedName": "type", "Description": "", "Type": { - "$ref": "8" + "$id": "65", + "Kind": "Literal", + "Name": "Literal", + "LiteralValueType": { + "$ref": "8" + }, + "Value": "clientCredentials", + "IsNullable": false }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "65", + "$id": "66", "Name": "tokenUrl", "SerializedName": "tokenUrl", "Description": "", "Type": { - "$id": "66", + "$id": "67", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -534,12 +541,12 @@ "IsReadOnly": false }, { - "$id": "67", + "$id": "68", "Name": "refreshUrl", "SerializedName": "refreshUrl", "Description": "", "Type": { - "$id": "68", + "$id": "69", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -552,12 +559,12 @@ "IsReadOnly": false }, { - "$id": "69", + "$id": "70", "Name": "scopes", "SerializedName": "scopes", "Description": "", "Type": { - "$id": "70", + "$id": "71", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -568,7 +575,7 @@ ] }, { - "$id": "71", + "$id": "72", "Kind": "Model", "Name": "HealthInsightsRetryAfterTrait", "Namespace": "lro", @@ -577,12 +584,12 @@ "Usage": "None", "Properties": [ { - "$id": "72", + "$id": "73", "Name": "retryAfter", "SerializedName": "retryAfter", "Description": "The retry-after header.", "Type": { - "$id": "73", + "$id": "74", "Kind": "Model", "Name": "HealthInsightsRetryAfterTraitRetryAfter", "Namespace": "lro", @@ -590,12 +597,12 @@ "Usage": "None", "Properties": [ { - "$id": "74", + "$id": "75", "Name": "response", "SerializedName": "response", "Description": "", "Type": { - "$id": "75", + "$id": "76", "Kind": "Model", "Name": "RetryAfterHeader", "Namespace": "Azure.Core.Foundations", @@ -615,41 +622,41 @@ ] }, { - "$ref": "73" + "$ref": "74" }, { - "$ref": "75" + "$ref": "76" } ], "Clients": [ { - "$id": "76", + "$id": "77", "Name": "lroClient", "Description": "", "Operations": [], "Protocol": { - "$id": "77" + "$id": "78" }, "Creatable": true }, { - "$id": "78", + "$id": "79", "Name": "LegacyLro", "Description": "", "Operations": [ { - "$id": "79", + "$id": "80", "Name": "getJob", "ResourceName": "LegacyLro", "Summary": "Get Radiology Insights job details", "Description": "Gets the status and details of the Radiology Insights job.", "Parameters": [ { - "$id": "80", + "$id": "81", "Name": "lroEndpoint", "NameInRequest": "lroEndpoint", "Type": { - "$id": "81", + "$id": "82", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -665,12 +672,12 @@ "Kind": "Client" }, { - "$id": "82", + "$id": "83", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "83", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -686,12 +693,12 @@ "Kind": "Method" }, { - "$id": "84", + "$id": "85", "Name": "id", "NameInRequest": "id", "Description": "A processing job identifier.", "Type": { - "$id": "85", + "$id": "86", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -707,11 +714,11 @@ "Kind": "Method" }, { - "$id": "86", + "$id": "87", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "87", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -726,9 +733,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "88", + "$id": "89", "Type": { - "$ref": "87" + "$ref": "88" }, "Value": "application/json" } @@ -736,7 +743,7 @@ ], "Responses": [ { - "$id": "89", + "$id": "90", "StatusCodes": [ 200 ], @@ -746,12 +753,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "90", + "$id": "91", "Name": "Retry-After", "NameInResponse": "retryAfter", "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "Type": { - "$id": "91", + "$id": "92", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -773,22 +780,22 @@ "GenerateConvenienceMethod": false }, { - "$id": "92", + "$id": "93", "Name": "createJob", "ResourceName": "LegacyLro", "Summary": "Create Radiology Insights job", "Description": "Creates a Radiology Insights job with the given request body.", "Parameters": [ { - "$ref": "80" + "$ref": "81" }, { - "$id": "93", + "$id": "94", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "94", + "$id": "95", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -804,12 +811,12 @@ "Kind": "Method" }, { - "$id": "95", + "$id": "96", "Name": "repeatabilityRequestId", "NameInRequest": "Repeatability-Request-ID", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "96", + "$id": "97", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -825,12 +832,12 @@ "Kind": "Method" }, { - "$id": "97", + "$id": "98", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Description": "Specifies the date and time at which the request was first created.", "Type": { - "$id": "98", + "$id": "99", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -846,7 +853,7 @@ "Kind": "Method" }, { - "$id": "99", + "$id": "100", "Name": "RadiologyInsightsData", "NameInRequest": "RadiologyInsightsData", "Description": "The body of the Radiology Insights request.", @@ -864,11 +871,11 @@ "Kind": "Method" }, { - "$id": "100", + "$id": "101", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "101", + "$id": "102", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -883,19 +890,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "102", + "$id": "103", "Type": { - "$ref": "101" + "$ref": "102" }, "Value": "application/json" } }, { - "$id": "103", + "$id": "104", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "104", + "$id": "105", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -910,9 +917,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "105", + "$id": "106", "Type": { - "$ref": "104" + "$ref": "105" }, "Value": "application/json" } @@ -920,7 +927,7 @@ ], "Responses": [ { - "$id": "106", + "$id": "107", "StatusCodes": [ 202 ], @@ -930,45 +937,45 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "107", + "$id": "108", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "108", + "$id": "109", "Kind": "Primitive", "Name": "Uri", "IsNullable": false } }, { - "$id": "109", + "$id": "110", "Name": "Retry-After", "NameInResponse": "retryAfter", "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "Type": { - "$id": "110", + "$id": "111", "Kind": "Primitive", "Name": "Int32", "IsNullable": false } }, { - "$id": "111", + "$id": "112", "Name": "Repeatability-Result", "NameInResponse": "repeatabilityResult", "Description": "Indicates whether the repeatable request was accepted or rejected.", "Type": { - "$id": "112", + "$id": "113", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "113", + "$id": "114", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "114", + "$id": "115", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -977,11 +984,11 @@ "IsNullable": false }, { - "$id": "115", + "$id": "116", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "116", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1009,10 +1016,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "117", + "$id": "118", "FinalStateVia": 3, "FinalResponse": { - "$id": "118", + "$id": "119", "StatusCodes": [ 200 ], @@ -1028,20 +1035,20 @@ } ], "Protocol": { - "$id": "119" + "$id": "120" }, "Creatable": false, "Parent": "lroClient" } ], "Auth": { - "$id": "120", + "$id": "121", "ApiKey": { - "$id": "121", + "$id": "122", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "122", + "$id": "123", "Scopes": [ "https://api.example.com/.default" ] diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json index 83c94cf6b6f..d920309f6d9 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json @@ -675,18 +675,25 @@ "SerializedName": "type", "Description": "", "Type": { - "$ref": "8" + "$id": "86", + "Kind": "Literal", + "Name": "Literal", + "LiteralValueType": { + "$ref": "8" + }, + "Value": "clientCredentials", + "IsNullable": false }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "86", + "$id": "87", "Name": "tokenUrl", "SerializedName": "tokenUrl", "Description": "", "Type": { - "$id": "87", + "$id": "88", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -699,12 +706,12 @@ "IsReadOnly": false }, { - "$id": "88", + "$id": "89", "Name": "refreshUrl", "SerializedName": "refreshUrl", "Description": "", "Type": { - "$id": "89", + "$id": "90", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -717,12 +724,12 @@ "IsReadOnly": false }, { - "$id": "90", + "$id": "91", "Name": "scopes", "SerializedName": "scopes", "Description": "", "Type": { - "$id": "91", + "$id": "92", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -733,7 +740,7 @@ ] }, { - "$id": "92", + "$id": "93", "Kind": "Model", "Name": "ListLedgerEntryInput", "Namespace": "Pagination", @@ -742,7 +749,7 @@ "Usage": "Input", "Properties": [ { - "$id": "93", + "$id": "94", "Name": "bodyInput", "SerializedName": "bodyInput", "Description": "Body parameter", @@ -755,7 +762,7 @@ ] }, { - "$id": "94", + "$id": "95", "Kind": "Model", "Name": "MetricDimensions", "Namespace": "Pagination", @@ -764,7 +771,7 @@ "Properties": [] }, { - "$id": "95", + "$id": "96", "Kind": "Model", "Name": "TestRuns", "Namespace": "Pagination", @@ -774,7 +781,7 @@ "Properties": [] }, { - "$id": "96", + "$id": "97", "Kind": "Model", "Name": "Dimension", "Namespace": "Pagination", @@ -783,7 +790,7 @@ "Properties": [] }, { - "$id": "97", + "$id": "98", "Kind": "Model", "Name": "BatchRequestHeaders", "Namespace": "Pagination", @@ -793,7 +800,7 @@ "Properties": [] }, { - "$id": "98", + "$id": "99", "Kind": "Model", "Name": "BatchResponseHeaders", "Namespace": "Pagination", @@ -803,7 +810,7 @@ "Properties": [] }, { - "$id": "99", + "$id": "100", "Kind": "Model", "Name": "BatchError", "Namespace": "Pagination", @@ -812,12 +819,12 @@ "Usage": "Output", "Properties": [ { - "$id": "100", + "$id": "101", "Name": "code", "SerializedName": "code", "Description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", "Type": { - "$id": "101", + "$id": "102", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -830,23 +837,23 @@ ], "Clients": [ { - "$id": "102", + "$id": "103", "Name": "PaginationClient", "Description": "", "Operations": [ { - "$id": "103", + "$id": "104", "Name": "ListPaginationLedgerEntries", "ResourceName": "LedgerEntry", "Summary": "Gets ledger entries from a collection corresponding to a range.", "Description": "A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned.", "Parameters": [ { - "$id": "104", + "$id": "105", "Name": "pagnationUri", "NameInRequest": "pagnationUri", "Type": { - "$id": "105", + "$id": "106", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -862,21 +869,21 @@ "Kind": "Client" }, { - "$id": "106", + "$id": "107", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "107", + "$id": "108", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "108", + "$id": "109", "Type": { - "$id": "109", + "$id": "110", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -893,7 +900,7 @@ "Kind": "Client" }, { - "$id": "110", + "$id": "111", "Name": "bodyInput", "NameInRequest": "bodyInput", "Description": "Body parameter", @@ -911,11 +918,11 @@ "Kind": "Method" }, { - "$id": "111", + "$id": "112", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "112", + "$id": "113", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -930,19 +937,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "113", + "$id": "114", "Type": { - "$ref": "112" + "$ref": "113" }, "Value": "application/json" } }, { - "$id": "114", + "$id": "115", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "115", + "$id": "116", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -957,9 +964,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "116", + "$id": "117", "Type": { - "$ref": "115" + "$ref": "116" }, "Value": "application/json" } @@ -967,7 +974,7 @@ ], "Responses": [ { - "$id": "117", + "$id": "118", "StatusCodes": [ 200 ], @@ -991,7 +998,7 @@ ], "BufferResponse": true, "Paging": { - "$id": "118", + "$id": "119", "NextLinkName": "customNextLink", "ItemName": "entries" }, @@ -1000,39 +1007,39 @@ } ], "Protocol": { - "$id": "119" + "$id": "120" }, "Creatable": true }, { - "$id": "120", + "$id": "121", "Name": "AdditionalParameter", "Description": "", "Operations": [ { - "$id": "121", + "$id": "122", "Name": "ListMetricDimensionValues", "ResourceName": "DimensionValueListItem", "Summary": "List the dimension values for the given metric dimension name.", "Description": "List the dimension values for the given metric dimension name.", "Parameters": [ { - "$ref": "104" + "$ref": "105" }, { - "$id": "122", + "$id": "123", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "123", + "$id": "124", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "109" }, "IsRequired": true, "IsApiVersion": true, @@ -1044,12 +1051,12 @@ "Kind": "Client" }, { - "$id": "124", + "$id": "125", "Name": "testRunId", "NameInRequest": "testRunId", "Description": "Unique test run name as identifier", "Type": { - "$id": "125", + "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1065,12 +1072,12 @@ "Kind": "Method" }, { - "$id": "126", + "$id": "127", "Name": "name", "NameInRequest": "name", "Description": "Dimension name", "Type": { - "$id": "127", + "$id": "128", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1086,7 +1093,7 @@ "Kind": "Method" }, { - "$id": "128", + "$id": "129", "Name": "interval", "NameInRequest": "interval", "Description": "The interval (i.e. timegrain) of the query.", @@ -1104,12 +1111,12 @@ "Kind": "Method" }, { - "$id": "129", + "$id": "130", "Name": "metricName", "NameInRequest": "metricName", "Description": "Metric name", "Type": { - "$id": "130", + "$id": "131", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1125,12 +1132,12 @@ "Kind": "Method" }, { - "$id": "131", + "$id": "132", "Name": "metricNamespace", "NameInRequest": "metricNamespace", "Description": "Metric namespace to query metric definitions for.", "Type": { - "$id": "132", + "$id": "133", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1146,12 +1153,12 @@ "Kind": "Method" }, { - "$id": "133", + "$id": "134", "Name": "timespan", "NameInRequest": "timespan", "Description": "The timespan of the query. It is a string with the following format\n'startDateTime_ISO/endDateTime_ISO'.", "Type": { - "$id": "134", + "$id": "135", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1167,11 +1174,11 @@ "Kind": "Method" }, { - "$id": "135", + "$id": "136", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "136", + "$id": "137", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1186,9 +1193,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "137", + "$id": "138", "Type": { - "$ref": "136" + "$ref": "137" }, "Value": "application/json" } @@ -1196,7 +1203,7 @@ ], "Responses": [ { - "$id": "138", + "$id": "139", "StatusCodes": [ 200 ], @@ -1217,7 +1224,7 @@ "Path": "/app/test-runs/{testRunId}/metric-dimensions/{name}/values", "BufferResponse": true, "Paging": { - "$id": "139", + "$id": "140", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1226,39 +1233,39 @@ } ], "Protocol": { - "$id": "140" + "$id": "141" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "141", + "$id": "142", "Name": "UseFoundationsResourceList", "Description": "", "Operations": [ { - "$id": "142", + "$id": "143", "Name": "list", "ResourceName": "LedgerEntry", "Description": "List upload detail for the discovery resource.", "Parameters": [ { - "$ref": "104" + "$ref": "105" }, { - "$id": "143", + "$id": "144", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "144", + "$id": "145", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "109" }, "IsRequired": true, "IsApiVersion": true, @@ -1270,11 +1277,11 @@ "Kind": "Client" }, { - "$id": "145", + "$id": "146", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "146", + "$id": "147", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1289,9 +1296,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "147", + "$id": "148", "Type": { - "$ref": "146" + "$ref": "147" }, "Value": "application/json" } @@ -1299,7 +1306,7 @@ ], "Responses": [ { - "$id": "148", + "$id": "149", "StatusCodes": [ 200 ], @@ -1320,7 +1327,7 @@ "Path": "/app/adp/transactions", "BufferResponse": true, "Paging": { - "$id": "149", + "$id": "150", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1329,40 +1336,40 @@ } ], "Protocol": { - "$id": "150" + "$id": "151" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "151", + "$id": "152", "Name": "TwoTypesItem", "Description": "", "Operations": [ { - "$id": "152", + "$id": "153", "Name": "listTextBlocklists", "ResourceName": "TextBlocklist", "Summary": "Get All Text Blocklists", "Description": "Get all text blocklists details.", "Parameters": [ { - "$ref": "104" + "$ref": "105" }, { - "$id": "153", + "$id": "154", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "154", + "$id": "155", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "109" }, "IsRequired": true, "IsApiVersion": true, @@ -1374,11 +1381,11 @@ "Kind": "Client" }, { - "$id": "155", + "$id": "156", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "156", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1393,9 +1400,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "157", + "$id": "158", "Type": { - "$ref": "156" + "$ref": "157" }, "Value": "application/json" } @@ -1403,7 +1410,7 @@ ], "Responses": [ { - "$id": "158", + "$id": "159", "StatusCodes": [ 200 ], @@ -1424,7 +1431,7 @@ "Path": "/app/text/blocklists", "BufferResponse": true, "Paging": { - "$id": "159", + "$id": "160", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1432,29 +1439,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "160", + "$id": "161", "Name": "listTextBlocklistItems", "ResourceName": "TextBlockItem", "Summary": "Get All BlockItems By blocklistName", "Description": "Get all blockItems in a text blocklist", "Parameters": [ { - "$ref": "104" + "$ref": "105" }, { - "$id": "161", + "$id": "162", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "162", + "$id": "163", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "109" }, "IsRequired": true, "IsApiVersion": true, @@ -1466,12 +1473,12 @@ "Kind": "Client" }, { - "$id": "163", + "$id": "164", "Name": "blocklistName", "NameInRequest": "blocklistName", "Description": "Text blocklist name. Only supports the following characters: 0-9 A-Z a-z - . _ ~", "Type": { - "$id": "164", + "$id": "165", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1487,12 +1494,12 @@ "Kind": "Method" }, { - "$id": "165", + "$id": "166", "Name": "top", "NameInRequest": "top", "Description": "The number of result items to return.", "Type": { - "$id": "166", + "$id": "167", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1508,12 +1515,12 @@ "Kind": "Method" }, { - "$id": "167", + "$id": "168", "Name": "skip", "NameInRequest": "skip", "Description": "The number of result items to skip.", "Type": { - "$id": "168", + "$id": "169", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1529,12 +1536,12 @@ "Kind": "Method" }, { - "$id": "169", + "$id": "170", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Description": "The maximum number of result items per page.", "Type": { - "$id": "170", + "$id": "171", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1550,11 +1557,11 @@ "Kind": "Method" }, { - "$id": "171", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "172", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1569,9 +1576,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "173", + "$id": "174", "Type": { - "$ref": "172" + "$ref": "173" }, "Value": "application/json" } @@ -1579,7 +1586,7 @@ ], "Responses": [ { - "$id": "174", + "$id": "175", "StatusCodes": [ 200 ], @@ -1600,7 +1607,7 @@ "Path": "/app/text/blocklists/{blocklistName}/blockItems", "BufferResponse": true, "Paging": { - "$id": "175", + "$id": "176", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1609,39 +1616,39 @@ } ], "Protocol": { - "$id": "176" + "$id": "177" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "177", + "$id": "178", "Name": "Pools", "Description": "", "Operations": [ { - "$id": "178", + "$id": "179", "Name": "listPools", "ResourceName": "Pools", "Description": "Lists all of the Pools in the specified Account.", "Parameters": [ { - "$ref": "104" + "$ref": "105" }, { - "$id": "179", + "$id": "180", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "180", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "109" }, "IsRequired": true, "IsApiVersion": true, @@ -1653,12 +1660,12 @@ "Kind": "Client" }, { - "$id": "181", + "$id": "182", "Name": "$filter", "NameInRequest": "$filter", "Description": "An OData $filter clause. For more information on constructing this filter, see\nhttps://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools.", "Type": { - "$id": "182", + "$id": "183", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1674,16 +1681,16 @@ "Kind": "Method" }, { - "$id": "183", + "$id": "184", "Name": "$select", "NameInRequest": "$select", "Description": "An OData $select clause.", "Type": { - "$id": "184", + "$id": "185", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "185", + "$id": "186", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1702,16 +1709,16 @@ "ArraySerializationDelimiter": "," }, { - "$id": "186", + "$id": "187", "Name": "$expand", "NameInRequest": "$expand", "Description": "An OData $expand clause.", "Type": { - "$id": "187", + "$id": "188", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "188", + "$id": "189", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1730,11 +1737,11 @@ "ArraySerializationDelimiter": "," }, { - "$id": "189", + "$id": "190", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "190", + "$id": "191", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1749,9 +1756,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "191", + "$id": "192", "Type": { - "$ref": "190" + "$ref": "191" }, "Value": "application/json" } @@ -1759,7 +1766,7 @@ ], "Responses": [ { - "$id": "192", + "$id": "193", "StatusCodes": [ 200 ], @@ -1780,7 +1787,7 @@ "Path": "/app/pools", "BufferResponse": true, "Paging": { - "$id": "193", + "$id": "194", "NextLinkName": "odata.nextLink", "ItemName": "value" }, @@ -1789,16 +1796,16 @@ } ], "Protocol": { - "$id": "194" + "$id": "195" }, "Creatable": false, "Parent": "PaginationClient" } ], "Auth": { - "$id": "195", + "$id": "196", "OAuth2": { - "$id": "196", + "$id": "197", "Scopes": [ "https://pagination.azure.com/.default" ] diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json index 668769dacf5..ee2051f2359 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json @@ -1015,18 +1015,25 @@ "SerializedName": "type", "Description": "", "Type": { - "$ref": "38" + "$id": "130", + "Kind": "Literal", + "Name": "Literal", + "LiteralValueType": { + "$ref": "38" + }, + "Value": "clientCredentials", + "IsNullable": false }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "130", + "$id": "131", "Name": "tokenUrl", "SerializedName": "tokenUrl", "Description": "", "Type": { - "$id": "131", + "$id": "132", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -1039,12 +1046,12 @@ "IsReadOnly": false }, { - "$id": "132", + "$id": "133", "Name": "refreshUrl", "SerializedName": "refreshUrl", "Description": "", "Type": { - "$id": "133", + "$id": "134", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -1057,12 +1064,12 @@ "IsReadOnly": false }, { - "$id": "134", + "$id": "135", "Name": "scopes", "SerializedName": "scopes", "Description": "", "Type": { - "$id": "135", + "$id": "136", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1075,22 +1082,22 @@ ], "Clients": [ { - "$id": "136", + "$id": "137", "Name": "NewProjectTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "137", + "$id": "138", "Name": "topAction", "ResourceName": "NewProjectTypeSpec", "Description": "top level method", "Parameters": [ { - "$id": "138", + "$id": "139", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "139", + "$id": "140", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1106,11 +1113,11 @@ "Kind": "Client" }, { - "$id": "140", + "$id": "141", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "141", + "$id": "142", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1126,11 +1133,11 @@ "Kind": "Method" }, { - "$id": "142", + "$id": "143", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "143", + "$id": "144", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1145,9 +1152,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "144", + "$id": "145", "Type": { - "$ref": "143" + "$ref": "144" }, "Value": "application/json" } @@ -1155,7 +1162,7 @@ ], "Responses": [ { - "$id": "145", + "$id": "146", "StatusCodes": [ 200 ], @@ -1179,20 +1186,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "146", + "$id": "147", "Name": "topAction2", "ResourceName": "NewProjectTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "147", + "$id": "148", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "148", + "$id": "149", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1207,9 +1214,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "149", + "$id": "150", "Type": { - "$ref": "148" + "$ref": "149" }, "Value": "application/json" } @@ -1217,7 +1224,7 @@ ], "Responses": [ { - "$id": "150", + "$id": "151", "StatusCodes": [ 200 ], @@ -1241,16 +1248,16 @@ "GenerateConvenienceMethod": false }, { - "$id": "151", + "$id": "152", "Name": "patchAction", "ResourceName": "NewProjectTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "152", + "$id": "153", "Name": "body", "NameInRequest": "body", "Type": { @@ -1267,11 +1274,11 @@ "Kind": "Method" }, { - "$id": "153", + "$id": "154", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "154", + "$id": "155", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1286,19 +1293,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "155", + "$id": "156", "Type": { - "$ref": "154" + "$ref": "155" }, "Value": "application/json" } }, { - "$id": "156", + "$id": "157", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "157", + "$id": "158", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1313,9 +1320,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "158", + "$id": "159", "Type": { - "$ref": "157" + "$ref": "158" }, "Value": "application/json" } @@ -1323,7 +1330,7 @@ ], "Responses": [ { - "$id": "159", + "$id": "160", "StatusCodes": [ 200 ], @@ -1350,16 +1357,16 @@ "GenerateConvenienceMethod": false }, { - "$id": "160", + "$id": "161", "Name": "anonymousBody", "ResourceName": "NewProjectTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "161", + "$id": "162", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", @@ -1377,11 +1384,11 @@ "Kind": "Method" }, { - "$id": "162", + "$id": "163", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "163", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1396,19 +1403,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "164", + "$id": "165", "Type": { - "$ref": "163" + "$ref": "164" }, "Value": "application/json" } }, { - "$id": "165", + "$id": "166", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "166", + "$id": "167", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1423,9 +1430,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "167", + "$id": "168", "Type": { - "$ref": "166" + "$ref": "167" }, "Value": "application/json" } @@ -1433,7 +1440,7 @@ ], "Responses": [ { - "$id": "168", + "$id": "169", "StatusCodes": [ 200 ], @@ -1460,16 +1467,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "169", + "$id": "170", "Name": "friendlyModel", "ResourceName": "NewProjectTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "170", + "$id": "171", "Name": "Friend", "NameInRequest": "NotFriend", "Description": "this is not a friendly model but with a friendly name", @@ -1487,11 +1494,11 @@ "Kind": "Method" }, { - "$id": "171", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "172", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1506,19 +1513,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "173", + "$id": "174", "Type": { - "$ref": "172" + "$ref": "173" }, "Value": "application/json" } }, { - "$id": "174", + "$id": "175", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "175", + "$id": "176", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1533,9 +1540,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "176", + "$id": "177", "Type": { - "$ref": "175" + "$ref": "176" }, "Value": "application/json" } @@ -1543,7 +1550,7 @@ ], "Responses": [ { - "$id": "177", + "$id": "178", "StatusCodes": [ 200 ], @@ -1570,19 +1577,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "178", + "$id": "179", "Name": "addTimeHeader", "ResourceName": "NewProjectTypeSpec", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "179", + "$id": "180", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "180", + "$id": "181", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1598,11 +1605,11 @@ "Kind": "Method" }, { - "$id": "181", + "$id": "182", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "182", + "$id": "183", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1617,9 +1624,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "183", + "$id": "184", "Type": { - "$ref": "182" + "$ref": "183" }, "Value": "application/json" } @@ -1627,7 +1634,7 @@ ], "Responses": [ { - "$id": "184", + "$id": "185", "StatusCodes": [ 204 ], @@ -1645,20 +1652,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "185", + "$id": "186", "Name": "stringFormat", "ResourceName": "NewProjectTypeSpec", "Description": "paramete has string format.", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "186", + "$id": "187", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "187", + "$id": "188", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -1674,7 +1681,7 @@ "Kind": "Method" }, { - "$id": "188", + "$id": "189", "Name": "body", "NameInRequest": "body", "Type": { @@ -1691,11 +1698,11 @@ "Kind": "Method" }, { - "$id": "189", + "$id": "190", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "190", + "$id": "191", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1710,19 +1717,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "191", + "$id": "192", "Type": { - "$ref": "190" + "$ref": "191" }, "Value": "application/json" } }, { - "$id": "192", + "$id": "193", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "193", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1737,9 +1744,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "194", + "$id": "195", "Type": { - "$ref": "193" + "$ref": "194" }, "Value": "application/json" } @@ -1747,7 +1754,7 @@ ], "Responses": [ { - "$id": "195", + "$id": "196", "StatusCodes": [ 204 ], @@ -1769,41 +1776,41 @@ } ], "Protocol": { - "$id": "196" + "$id": "197" }, "Creatable": true }, { - "$id": "197", + "$id": "198", "Name": "Hello", "Description": "", "Operations": [], "Protocol": { - "$id": "198" + "$id": "199" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" }, { - "$id": "199", + "$id": "200", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "200", + "$id": "201", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "201", + "$id": "202", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "202", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1819,11 +1826,11 @@ "Kind": "Method" }, { - "$id": "203", + "$id": "204", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "204", + "$id": "205", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1839,11 +1846,11 @@ "Kind": "Method" }, { - "$id": "205", + "$id": "206", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "206", + "$id": "207", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1859,11 +1866,11 @@ "Kind": "Method" }, { - "$id": "207", + "$id": "208", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "208", + "$id": "209", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1878,9 +1885,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "209", + "$id": "210", "Type": { - "$ref": "208" + "$ref": "209" }, "Value": "application/json" } @@ -1888,7 +1895,7 @@ ], "Responses": [ { - "$id": "210", + "$id": "211", "StatusCodes": [ 200 ], @@ -1913,31 +1920,31 @@ } ], "Protocol": { - "$id": "211" + "$id": "212" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "212", + "$id": "213", "Name": "HelloDemo2", "Description": "", "Operations": [ { - "$id": "213", + "$id": "214", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "214", + "$id": "215", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "215", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1953,15 +1960,15 @@ "Kind": "Method" }, { - "$id": "216", + "$id": "217", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "217", + "$id": "218", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "218", + "$id": "219", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1971,9 +1978,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "219", + "$id": "220", "Type": { - "$ref": "217" + "$ref": "218" }, "Value": "text/plain" }, @@ -1987,11 +1994,11 @@ "Kind": "Constant" }, { - "$id": "220", + "$id": "221", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "221", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2007,7 +2014,7 @@ "Kind": "Method" }, { - "$id": "222", + "$id": "223", "Name": "action", "NameInRequest": "action", "Type": { @@ -2024,11 +2031,11 @@ "Kind": "Method" }, { - "$id": "223", + "$id": "224", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "224", + "$id": "225", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2043,9 +2050,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "225", + "$id": "226", "Type": { - "$ref": "224" + "$ref": "225" }, "Value": "application/json" } @@ -2053,7 +2060,7 @@ ], "Responses": [ { - "$id": "226", + "$id": "227", "StatusCodes": [ 200 ], @@ -2080,20 +2087,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "227", + "$id": "228", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "228", + "$id": "229", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "229", + "$id": "230", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2109,11 +2116,11 @@ "Kind": "Method" }, { - "$id": "230", + "$id": "231", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "231", + "$id": "232", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2129,7 +2136,7 @@ "Kind": "Method" }, { - "$id": "232", + "$id": "233", "Name": "action", "NameInRequest": "action", "Type": { @@ -2146,11 +2153,11 @@ "Kind": "Method" }, { - "$id": "233", + "$id": "234", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "234", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2165,19 +2172,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "235", + "$id": "236", "Type": { - "$ref": "234" + "$ref": "235" }, "Value": "application/json" } }, { - "$id": "236", + "$id": "237", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "237", + "$id": "238", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2192,9 +2199,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "238", + "$id": "239", "Type": { - "$ref": "237" + "$ref": "238" }, "Value": "application/json" } @@ -2202,7 +2209,7 @@ ], "Responses": [ { - "$id": "239", + "$id": "240", "StatusCodes": [ 200 ], @@ -2229,16 +2236,16 @@ "GenerateConvenienceMethod": false }, { - "$id": "240", + "$id": "241", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "241", + "$id": "242", "Name": "body", "NameInRequest": "body", "Type": { @@ -2255,11 +2262,11 @@ "Kind": "Method" }, { - "$id": "242", + "$id": "243", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "243", + "$id": "244", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2274,19 +2281,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "244", + "$id": "245", "Type": { - "$ref": "243" + "$ref": "244" }, "Value": "application/json" } }, { - "$id": "245", + "$id": "246", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "246", + "$id": "247", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2301,9 +2308,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "247", + "$id": "248", "Type": { - "$ref": "246" + "$ref": "247" }, "Value": "application/json" } @@ -2311,7 +2318,7 @@ ], "Responses": [ { - "$id": "248", + "$id": "249", "StatusCodes": [ 200 ], @@ -2338,24 +2345,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "249", + "$id": "250", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "250", + "$id": "251", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "251", + "$id": "252", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "252", + "$id": "253", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2365,9 +2372,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "253", + "$id": "254", "Type": { - "$ref": "251" + "$ref": "252" }, "Value": "test" }, @@ -2381,15 +2388,15 @@ "Kind": "Constant" }, { - "$id": "254", + "$id": "255", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "255", + "$id": "256", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "256", + "$id": "257", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -2399,9 +2406,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "257", + "$id": "258", "Type": { - "$ref": "255" + "$ref": "256" }, "Value": 123 }, @@ -2415,15 +2422,15 @@ "Kind": "Constant" }, { - "$id": "258", + "$id": "259", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "259", + "$id": "260", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "260", + "$id": "261", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2433,9 +2440,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "261", + "$id": "262", "Type": { - "$ref": "259" + "$ref": "260" }, "Value": true }, @@ -2449,11 +2456,11 @@ "Kind": "Constant" }, { - "$id": "262", + "$id": "263", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "263", + "$id": "264", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2468,9 +2475,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "264", + "$id": "265", "Type": { - "$ref": "263" + "$ref": "264" }, "Value": "application/json" } @@ -2478,7 +2485,7 @@ ], "Responses": [ { - "$id": "265", + "$id": "266", "StatusCodes": [ 200 ], @@ -2503,31 +2510,31 @@ } ], "Protocol": { - "$id": "266" + "$id": "267" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "267", + "$id": "268", "Name": "EnumTest", "Description": "", "Operations": [ { - "$id": "268", + "$id": "269", "Name": "getUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "269", + "$id": "270", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "270", + "$id": "271", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2542,9 +2549,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "271", + "$id": "272", "Type": { - "$ref": "270" + "$ref": "271" }, "Value": "application/json" } @@ -2552,12 +2559,12 @@ ], "Responses": [ { - "$id": "272", + "$id": "273", "StatusCodes": [ 200 ], "BodyType": { - "$id": "273", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2580,27 +2587,27 @@ } ], "Protocol": { - "$id": "274" + "$id": "275" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" }, { - "$id": "275", + "$id": "276", "Name": "ProtocolAndConvenient", "Description": "", "Operations": [ { - "$id": "276", + "$id": "277", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "277", + "$id": "278", "Name": "body", "NameInRequest": "body", "Type": { @@ -2617,11 +2624,11 @@ "Kind": "Method" }, { - "$id": "278", + "$id": "279", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "279", + "$id": "280", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2636,19 +2643,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "280", + "$id": "281", "Type": { - "$ref": "279" + "$ref": "280" }, "Value": "application/json" } }, { - "$id": "281", + "$id": "282", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "282", + "$id": "283", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2663,9 +2670,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "283", + "$id": "284", "Type": { - "$ref": "282" + "$ref": "283" }, "Value": "application/json" } @@ -2673,7 +2680,7 @@ ], "Responses": [ { - "$id": "284", + "$id": "285", "StatusCodes": [ 200 ], @@ -2700,20 +2707,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "285", + "$id": "286", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Parameters": [ { - "$ref": "138" + "$ref": "139" }, { - "$id": "286", + "$id": "287", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "287", + "$id": "288", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2728,9 +2735,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "288", + "$id": "289", "Type": { - "$ref": "287" + "$ref": "288" }, "Value": "application/json" } @@ -2738,7 +2745,7 @@ ], "Responses": [ { - "$id": "289", + "$id": "290", "StatusCodes": [ 204 ], @@ -2757,20 +2764,20 @@ } ], "Protocol": { - "$id": "290" + "$id": "291" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" } ], "Auth": { - "$id": "291", + "$id": "292", "ApiKey": { - "$id": "292", + "$id": "293", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "293", + "$id": "294", "Scopes": [ "https://api.example.com/.default" ] From 563d603fecb53a4822d87012358895ee06231978 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Fri, 29 Mar 2024 10:46:00 +0800 Subject: [PATCH 32/60] optimize codes - remove unused codes in model.ts - remove ensureInputType() since now we'll create a type if not found --- .../Emitter.Csharp/src/lib/model.ts | 237 +----------------- .../Emitter.Csharp/src/lib/operation.ts | 8 +- .../Emitter.Csharp/src/lib/typespecServer.ts | 4 +- 3 files changed, 14 insertions(+), 235 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index 3d702d55b21..f530209cf66 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -18,7 +18,6 @@ import { Union, UsageFlags, getDeprecated, - getDiscriminator, getDoc, getEffectiveModelType, getEncode, @@ -79,7 +78,6 @@ import { capitalize, getFullNamespaceString, getTypeName } from "./utils.js"; import { InputTypeKind } from "../type/inputTypeKind.js"; import { InputIntrinsicTypeKind } from "../type/inputIntrinsicTypeKind.js"; import { fromSdkEnumType, fromSdkModelType } from "../type/converter.js"; -import { $lib } from "../emitter.js"; /** * Map calType to csharp InputTypeKind */ @@ -290,17 +288,13 @@ export function getDefaultValue(type: Type): any { } } -function isNeverType(type: Type): type is NeverType { - return type.kind === "Intrinsic" && type.name === "never"; -} - export function getInputType( context: SdkContext, formattedType: FormattedType, models: Map, enums: Map, literalTypeContext?: LiteralTypeContext -): InputType | undefined { +): InputType { const type = formattedType.type.kind === "ModelProperty" ? formattedType.type.type @@ -376,7 +370,7 @@ export function getInputType( function getInputModelType( m: Model - ): InputListType | InputDictionaryType | InputModelType | undefined { + ): InputListType | InputDictionaryType | InputModelType { /* Array and Map Type. */ if (isArrayModelType(program, m)) { return getInputTypeForArray(m.indexer.value); @@ -568,7 +562,7 @@ export function getInputType( return { Kind: InputTypeKind.Array, Name: InputTypeKind.Array, - ElementType: ensureInputType( + ElementType: getInputType( context, getFormattedType(program, elementType), models, @@ -582,13 +576,13 @@ export function getInputType( return { Kind: InputTypeKind.Dictionary, Name: InputTypeKind.Dictionary, - KeyType: ensureInputType( + KeyType: getInputType( context, getFormattedType(program, key), models, enums ), - ValueType: ensureInputType( + ValueType: getInputType( context, getFormattedType(program, value), models, @@ -598,7 +592,7 @@ export function getInputType( }; } - function getInputModelForModel(m: Model): InputModelType | undefined { + function getInputModelForModel(m: Model): InputModelType { if (context.modelsMap!.has(m)) { return fromSdkModelType( context.modelsMap!.get(m) as SdkModelType, @@ -608,189 +602,8 @@ export function getInputType( ); } var createdSdkModelType = getClientType(context, m) as SdkModelType; - if (createdSdkModelType) { - context.modelsMap!.set(m, createdSdkModelType); - return fromSdkModelType( - createdSdkModelType, - context, - models, - enums - ); - } - return undefined; - } - - function getDiscriminatorValue( - m: Model, - baseModel?: InputModelType - ): string | undefined { - const discriminatorPropertyName = baseModel?.DiscriminatorPropertyName; - - if (discriminatorPropertyName) { - const discriminatorProperty = m.properties.get( - discriminatorPropertyName - ); - if ( - discriminatorProperty?.type.kind === "String" || - // discriminator property cannot be number, but enum support number values - // typespec compiler will do the check, but here we do a double check just in case - (discriminatorProperty?.type.kind === "EnumMember" && - typeof discriminatorProperty?.type.value !== "number") - ) { - return String( - discriminatorProperty.type.value ?? - discriminatorProperty.type.name - ); - } - if ( - discriminatorProperty?.type.kind === "UnionVariant" && - discriminatorProperty?.type.type.kind === "String" - ) { - return String( - discriminatorProperty.type.type.value ?? - discriminatorProperty.type.name - ); - } - } - - return undefined; - } - - function addModelProperties( - model: InputModelType, - inputProperties: Map, - outputProperties: InputModelProperty[] - ): void { - let discriminatorPropertyDefined = false; - inputProperties.forEach((value: ModelProperty, key: string) => { - if ( - value.name !== model.BaseModel?.DiscriminatorPropertyName && - isSchemaProperty(context, value) - ) { - const vis = getVisibility(program, value); - let isReadOnly: boolean = false; - if (vis && vis.includes("read") && vis.length === 1) { - isReadOnly = true; - } - if (isNeverType(value.type) || isVoidType(value.type)) return; - const name = getTypeName(context, value); - const serializedName = getWireName(context, value); - const literalTypeContext: LiteralTypeContext = { - ModelName: model.Name, - PropertyName: name, - Namespace: model.Namespace - }; - const inputType = ensureInputType( - context, - getFormattedType(program, value), - models, - enums, - literalTypeContext - ); - if ( - model.Namespace === "Azure.Core.Foundations" && - model.Name === "Error" && - isInputModelType(inputType) - ) { - inputType.Accessibility = undefined; - } - const inputProp = { - Name: name, - SerializedName: serializedName, - Description: getDoc(program, value) ?? "", - Type: inputType, - IsRequired: !value.optional, - IsReadOnly: isReadOnly - } as InputModelProperty; - - if (name === model.DiscriminatorPropertyName) { - inputProp.IsDiscriminator = true; - discriminatorPropertyDefined = true; - } - outputProperties.push(inputProp); - } - }); - - if (model.DiscriminatorPropertyName && !discriminatorPropertyDefined) { - // if the discriminator property has already been defined on one of the base models of myself, - // we still need to add a property here because the `IsDiscriminator` property would be different from the one inherited from the base model - // TODO -- need to confirm how TCGC handles this case - logger.info( - `No specified type for discriminator property '${model.DiscriminatorPropertyName}'. Assume it is a string.` - ); - const discriminatorProperty: InputModelProperty = { - Name: model.DiscriminatorPropertyName, - SerializedName: model.DiscriminatorPropertyName, - Description: "Discriminator", - IsRequired: true, - IsReadOnly: false, - Type: { - Kind: InputTypeKind.Primitive, - Name: InputPrimitiveTypeKind.String, - IsNullable: false - } as InputPrimitiveType, - IsDiscriminator: true - }; - // put default discriminator property as the first property to keep previous behavior - outputProperties.unshift(discriminatorProperty); - } - } - - // in the real cases of tsp, because now we use `extends` or `is` to represent additional properties, - // and tsp only supports one base model, we can only have one of baseModel and sourceModel defined - // but it is valid case that a model has a base model as well as additional properties - // which is the reason we did not define the return type as `InputModelType | InputDictionaryType | undefined` - // to keep the possibility that we could have both `baseModel` and `inheritedDictionaryType` defined in the future - // tsp might support this in the future. - function getInputModelBaseType(m: Model): { - baseModel?: InputModelType; - inheritedDictionaryType?: InputDictionaryType; - } { - const baseModel = m.baseModel; - const sourceModel = m.sourceModel; - - // we cannot have both `extends` and `is`, therefore only one of baseModel and sourceModel can be defined - if (sourceModel && isRecordModelType(program, sourceModel)) { - return { - inheritedDictionaryType: getInputTypeForMap( - sourceModel.indexer.key, - sourceModel.indexer.value - ) - }; - } - - if (baseModel) { - const baseModelType = getInputModelType(baseModel); - if (baseModelType === undefined) { - $lib.reportDiagnostic(program, { - code: "No-Model", - format: { name: baseModel.name }, - target: NoTarget - }); - } - - if (isInputListType(baseModelType!)) { - // tsp never allows array to be the base model of a model - // meaning that it should be invalid tsp if you write: - // model Foo extends Bar[] {} - // or - // model Foo extends Array {} - // therefore it is safe that here we just return empty result here because this will be unreachable - return {}; - } - - if (isInputDictionaryType(baseModelType!)) { - return { - inheritedDictionaryType: baseModelType - }; - } - - return { - baseModel: baseModelType - }; - } - - return {}; + context.modelsMap!.set(m, createdSdkModelType); + return fromSdkModelType(createdSdkModelType, context, models, enums); } function getInputModelForIntrinsicType( @@ -825,7 +638,7 @@ export function getInputType( let hasNullType = false; for (const variant of variants) { - const inputType = ensureInputType( + const inputType = getInputType( context, getFormattedType(program, variant.type), models, @@ -859,38 +672,6 @@ export function getInputType( } } -export function ensureInputType( - context: SdkContext, - formattedType: FormattedType, - models: Map, - enums: Map, - literalTypeContext?: LiteralTypeContext -): InputType { - const type = getInputType( - context, - formattedType, - models, - enums, - literalTypeContext - ); - if (type === undefined) { - if (formattedType.type.kind === "Model") { - $lib.reportDiagnostic(context.program, { - code: "No-Model", - format: { name: (formattedType.type as Model).name }, - target: NoTarget - }); - } else { - $lib.reportDiagnostic(context.program, { - code: "No-Type", - format: { kind: formattedType.type.kind }, - target: NoTarget - }); - } - } - return type!; -} - export function setUsage( context: SdkContext, source: Model | Enum, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts index 61030ccc288..87cf1afb627 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts @@ -19,7 +19,6 @@ import { ModelProperty, Namespace, Operation, - Program } from "@typespec/compiler"; import { getResourceOperation } from "@typespec/rest"; import { @@ -59,7 +58,6 @@ import { import { getExternalDocs, getOperationId, hasDecorator } from "./decorators.js"; import { logger } from "./logger.js"; import { - ensureInputType, getDefaultValue, getEffectiveSchemaType, getFormattedType, @@ -254,7 +252,7 @@ export function loadOperation( const { type: location, name, param } = parameter; const format = parameter.type === "path" ? undefined : parameter.format; const typespecType = param.type; - const inputType: InputType = ensureInputType( + const inputType: InputType = getInputType( context, getFormattedType(program, param), models, @@ -309,7 +307,7 @@ export function loadOperation( context: SdkContext, body: ModelProperty | Model ): InputParameter { - const inputType: InputType = ensureInputType( + const inputType: InputType = getInputType( context, getFormattedType(program, body), models, @@ -350,7 +348,7 @@ export function loadOperation( let type: InputType | undefined = undefined; if (body?.type) { const typespecType = getEffectiveSchemaType(context, body.type); - const inputType: InputType = ensureInputType( + const inputType: InputType = getInputType( context, getFormattedType(program, typespecType), models, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/typespecServer.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/typespecServer.ts index f2ea444e3e7..b033534c2c6 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/typespecServer.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/typespecServer.ts @@ -14,7 +14,7 @@ import { } from "../type/inputType.js"; import { InputPrimitiveTypeKind } from "../type/inputPrimitiveTypeKind.js"; import { RequestLocation } from "../type/requestLocation.js"; -import { getInputType, getFormattedType, ensureInputType } from "./model.js"; +import { getInputType, getFormattedType } from "./model.js"; import { SdkContext } from "@azure-tools/typespec-client-generator-core"; import { InputTypeKind } from "../type/inputTypeKind.js"; @@ -62,7 +62,7 @@ export function resolveServers( Name: InputPrimitiveTypeKind.Uri, IsNullable: false } as InputPrimitiveType) - : ensureInputType( + : getInputType( context, getFormattedType(context.program, prop), models, From 58514e8188067d05fe15536878caa25e28011d19 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sun, 7 Apr 2024 11:46:38 +0800 Subject: [PATCH 33/60] fix style --- src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts index 87cf1afb627..46ac1f3a6e0 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts @@ -18,7 +18,7 @@ import { Model, ModelProperty, Namespace, - Operation, + Operation } from "@typespec/compiler"; import { getResourceOperation } from "@typespec/rest"; import { From d9342d13add74eae15d1f7b0cb0358ee0b482ef3 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Mon, 15 Apr 2024 13:54:50 +0800 Subject: [PATCH 34/60] fix style --- .../Emitter.Csharp/src/type/converter.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 4e580c9d6c2..768dde6342c 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -165,7 +165,13 @@ export function fromSdkModelType( (p) => !(p as SdkBodyModelPropertyType).discriminator || !baseModelHasDiscriminator - ).filter((p) => p.kind !== "header" && p.kind !== "query" && p.kind !== "path") + ) + .filter( + (p) => + p.kind !== "header" && + p.kind !== "query" && + p.kind !== "path" + ) .map((p) => fromSdkModelPropertyType(p, context, models, enums, { ModelName: inputModelType?.Name, @@ -365,12 +371,12 @@ function fromSdkBuiltInType(builtInType: SdkBuiltInType): InputType { return { Kind: InputTypeKind.Primitive, Name: builtInKind, - IsNullable: builtInType.nullable, + IsNullable: builtInType.nullable } as InputPrimitiveType; } function mapTcgcTypeToCSharpInputTypeKind( - type: SdkBuiltInType, + type: SdkBuiltInType ): InputPrimitiveTypeKind { switch (type.kind) { case "numeric": From 0f96ef1794c924816e75e1f1cfb8caa99c7463b8 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Mon, 15 Apr 2024 14:06:30 +0800 Subject: [PATCH 35/60] add back deleted files --- ...del-reader-writer-implementation-design.md | 248 ++++++++++++++++++ docs/features/service_client_constructors.md | 68 +++++ 2 files changed, 316 insertions(+) create mode 100644 docs/design/model-reader-writer-implementation-design.md create mode 100644 docs/features/service_client_constructors.md diff --git a/docs/design/model-reader-writer-implementation-design.md b/docs/design/model-reader-writer-implementation-design.md new file mode 100644 index 00000000000..8c29a82a7c4 --- /dev/null +++ b/docs/design/model-reader-writer-implementation-design.md @@ -0,0 +1,248 @@ +# Azure SDK Design Spec for implementation of `ModelReaderWriter` + +- [Summary](#summary) +- [Problem Statement or Scenario Description](#problem-statement-or-scenario-description) +- [Scope: Goals and Non-Goals](#scope-goals-and-non-goals) +- [Feature Design](#feature-design) +- [Detailed Implementation](#detailed-implementation) + +## Summary + +This design specification is for the implementation of `ModelReaderWriter` related interfaces on the generated libraries, not the design specification of `ModelReaderWriter` itself. + +The implementation of `ModelReaderWriter` might change in the future when we have further consolidations of existing interfaces. + +For details of `ModelReaderWriter`, please refer to [ModelReaderWriter](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/README.md). + +## Problem Statement or Scenario Description + +Our SDK libraries ship with a set of generated models which are used to represent the data structures of the service. These models are shipped with a set of serialization and deserialization but those are only designed for us to use internally by our generated operation to build the payload or parse the response back to the models. + +In this design, our customers will not be able to serialize or deserialize the models in the same way as we do. They could only serialize the model using the default way which is not usually correct. An intuitive example of this is when there is an "extensible enum" type in the model: +```csharp +public partial class Foo +{ + public ExtensibleEnumType? Bar { get; set; } +} + +public partial struct ExtensibleEnumType : IEquatable +{ + private readonly string _value; + + public ExtensibleEnumType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } +} +``` + +The default behavior of the most widely used JSON serializer and deserializer is usually: they serialize classes and structs in the same way, assuming that they are models containing properties. This is true for our classes, but for structs, it is not always true. The extensible enums are modeled as structs, but they are actually serialized to a string value in our internal implementation when building the payload or parsing the response. For example, the `Foo` model above are expected to be serialized to the following JSON: +```json +{ + "bar": "value" +} +``` +but in the default behavior of `System.Text.JsonSerializer`, it will be serialized to: +```json +{ + "bar": {} +} +``` +which is completely incorrect. + +Therefore we need a way to let our customer could publicly access to our internal implementation of the serialization and deserialization because they could be properly generated by the generator. + +`System.ClientModel.Primitives.ModelReaderWriter` is designed to solve this problem. It provides utility methods to serialize and deserialize models. In the meantime, to use its functionality, our models need to implement the interfaces defined in namespace `System.ClientModel.Primitives`: `IPersistableModel` and `IJsonModel`. + +Once a model is implemented by these interfaces, the model could be used in the `Write` and `Read` method of `System.ClientModel.Primitives.ModelReaderWriter` static class to serialize and deserialize. + +If we still want to use the model in `System.Text.JsonSerialize` or other json serialization framework like `Newtonsoft.Json`, a converter will be needed to pass in as an option to the serializer. For details of this, please refer to the official document of `System.ClientModel`. + +## Scope: Goals and Non-Goals + +### Goals + +Design a proper implementation for the model reader writer to consume, which should keep our current wire behavior unchanged, and meet the requirement for our customers to persistantly store their data from the models. + +### Non-Goals + +This is not a design for the APIs in model reader writer. + +## Feature Design + +### Introduction of the methods in the interfaces + +The definitions of the interfaces we would like to implement are: +```csharp +namespace System.ClientModel.Primitives +{ + public partial interface IJsonModel : System.ClientModel.Primitives.IPersistableModel + { + T Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options); + void Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options); + } + public partial interface IPersistableModel + { + T Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options); + string GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options); + System.BinaryData Write(System.ClientModel.Primitives.ModelReaderWriterOptions options); + } + public partial class ModelReaderWriterOptions + { + public ModelReaderWriterOptions(string format) { } + public string Format { get { throw null; } } + public static System.ClientModel.Primitives.ModelReaderWriterOptions Json { get { throw null; } } + public static System.ClientModel.Primitives.ModelReaderWriterOptions Xml { get { throw null; } } + } +} +``` + +The methods in `IJsonModel` controls how the model writes into a JSON or reads from JSON via `Utf8JsonWriter` or `Utf8JsonReader`. The methods in `IPersistableModel` controls how the model writes into a BinaryData or reads from a BinaryData which serves a general purpose of serialization and deserialization including JSON case. + +### Implementation design + +Our general principals are: +1. The behavior should keep unchanged when the library calls it on wire. +2. When the customer calls the `ModelReaderWriter.Read` API, it should properly deserialize all the content in the input into the model (including the properties that this model does not currently support). +3. When the customer calls the `ModelReaderWriter.Write` API, it should properly serialize all the properties into the result (including the properties that this model does not currently support). + +We should have the following methods in a model: + +1. `IUtf8JsonSerializable.Write(Utf8JsonWriter writer)` method. +2. `IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)` method. +3. `IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)` method. +4. `IPersistableModel.Write(ModelReaderWriterOptions options)` method. +5. `IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)` method. +6. the static `Deserialize{ModelName}(JsonElement element, ModelReaderWriterOptions options = null)` method. + +If the model supports `xml` format, it will contain the following methods: +1. `IXmlSerializable.Write(XmlWriter writer, string nameHint)` method. +2. `WriteInternal(XmlWriter writer, string nameHint, ModelReaderWriterOptions options)` method. +3. the static `Deserialize{ModelName}(XElement element, ModelReaderWriterOptions options = null)` method. + +#### The changes on models + +All models will now have a field `private IDictionary _serializedAdditionalRawData`, if the model has a base type, the field should change to `private protected IDictionary _serializedAdditionalRawData`. + +This private field works exactly the same as additional properties property, it should vanish when the model or any of its base type has an additional properties property defined. + +All models will always have an internal constructor that takes all properties as parameters and the `serializedAdditionalRawData` if itself or any of its direct or indirect base type has `serializedAdditionalRawData` field. + +All models will always have an internal constructor with no parameter if it does not have one for deserialization. + +#### The `IUtf8JsonSerializable.Write(Utf8JsonWriter writer)` method + +Our operations will call this method to serialize the model into payload, to keep the behavior unchanged for wire cases, we should now implement the internal interface method `IUtf8JsonSerializable.Write(Utf8JsonWriter)` in this way: +```csharp +public partial class Foo : IUtf8JsonSerializable, IJsonModel +{ + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); +} +``` + +The cast `(IJsonModel)this` is required because the method implementation of all interfaces will be explicitly implemented. And here we use `W` as the format for wire serialization and deserialization. + +#### The `IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)` method + +This method should iterate all the properties on this model, and write it into the `Utf8JsonWriter`. + +For readonly properties, we should not write it on wire because we previously did not write it, we should check the value of `Format` in the `options`. For example we have a model `Foo` with two properties `A` and `B`: +```csharp +public partial class Foo +{ + public string A { get; set; } // this property is not readonly + + public string B { get; } // this property is readonly +} +``` + +The implementation of `IJsonModel.Write` should also validate the format because the methods on this interface could only support Json: +```csharp +var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; +if (format != "J") +{ + throw new InvalidOperationException($"The model {nameof(T)} does not support '{format}' format."); +} +``` +In this implementation, the method `IPersistableModel.GetFormatFromOptions` is called to get the real format when we get the format of `W` which represents "wire", and then throw exception if the actual format is not `J` which represents "json". + +In the wire serialization, we will only write property `A`, and in a Json serialization (invoked by our customer via `ModelReaderWriter`), we will write both properties `A` and `B` as well as everything in the `_serializedAdditionalRawData`, therefore the implementation should be: +```csharp +public partial class Foo : IUtf8JsonSerializable, IJsonModel +{ + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new InvalidOperationException($"The model {nameof(Foo)} does not support '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(A)) + { + writer.WritePropertyName("a"u8); + writer.WriteStringValue(A); + } + if (options.Format != "W" && Optional.IsDefined(B)) + { + writer.WritePropertyName("b"u8); + writer.WriteStringValue(B); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } +} +``` + +#### The `IPersistableModel.Write(ModelReaderWriterOptions options)` method + +This method should switch all possible formats this model supports, and calls their respective implementations, such as: + +```csharp +public partial class Foo : IUtf8JsonSerializable, IJsonModel, IXmlSerializable, IPersistableModel +{ + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "X": + { + using MemoryStream stream = new MemoryStream(); + using XmlWriter writer = XmlWriter.Create(stream); + WriteInternal(writer, null, options); + writer.Flush(); + return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); + } + default: + throw new InvalidOperationException($"The model {nameof(Foo)} does not support '{options.Format}' format."); + } + } +} +``` + +The `J` case we just call `ModelReaderWriter.Write`, and this will not raise an infinite call issue because the implementation of `ModelReaderWriter.Write` will end up in the method `IJsonModel.Write` and will not circle back to this method. + +#### The `Create` methods + +These `Create` methods will just call the corresponding implementation of the static `Deserialize{ModelName}` method. diff --git a/docs/features/service_client_constructors.md b/docs/features/service_client_constructors.md new file mode 100644 index 00000000000..eec88608b82 --- /dev/null +++ b/docs/features/service_client_constructors.md @@ -0,0 +1,68 @@ +## Service Client Constrctors + +Scope: This document only applies to DPG libraries. + +There will be two **public** client constructors in a generated service client: + +**One primary public constructor with:** +- An `endpoint` parameter (no matter it is required or optional). +- All the **required** client parameters. +- A `ClientOptions` parameter. + +**One secondary public constructor with:** +- All the **required** client parameters (without the `ClientOptions` parameter and **optional** paramters). + +The secondary public constructor calls the primary public constructor underneath with default values of `endpoint` (if any) and `ClientOptions`. + +For example, required parameters `Uri endpoint` and `AzureKeyCredential credential` are defined, then the generated public constructors are: + +```C# +public ServiceClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new ServiceClientOptions()) {} + +public ServiceClient(Uri endpoint, AzureKeyCredential credential, ServiceClientOptions options) {} +``` + +Usually, all the client parameters are required. But if some additional optional client parameters are defined, all the optional client parameters will go to `ClientOptions`, except for the `endpoint` parameter. + +For example, if an optional parameter `string optional` is defined, the `ClientOptions` will have a new property as + +```C# +public partial class ServiceClientOptions : ClientOptions +{ + /* Other irrelevant lines*/ + + public string Optional { get; set; } +} +``` + +The signature of the public constructors will not change, but its implementation will change to +```C# +public ServiceClient(Uri endpoint, AzureKeyCredential credential) : this(endpoint, credential, new ServiceClientOptions()) {} + +public ServiceClient(Uri endpoint, AzureKeyCredential credential, ServiceClientOptions options) +{ + /* Other irrelevant lines*/ + + _optional = options.Optional; +} +``` + +If the optional client parameters contain `endpoint`, it will still be in the client constructor, not going to `ClientOptions`. For example, if an optional parameter `string optional` is defined, an optional `endpoint` with default value `"http://localhost:3000"`, and a required parameter `AzureKeyCredential credential`, the generated public constructors are: + +```C# +public ServiceClient(AzureKeyCredential credential) : this(new Uri("http://localhost:3000"), credential, new ServiceClientOptions()) {} + +public ServiceClient(Uri endpoint, AzureKeyCredential credential, ServiceClientOptions options) +{ + /* Other irrelevant lines*/ + + _optional = options.Optional; +} + +public partial class ServiceClientOptions : ClientOptions +{ + /* Other irrelevant lines*/ + + public string Optional { get; set; } +} +``` \ No newline at end of file From cd8ff73df5beb8f315f74187127c3d4925dd33a6 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Mon, 15 Apr 2024 14:40:58 +0800 Subject: [PATCH 36/60] fix raw type of SdkEnumType --- src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 768dde6342c..deef0c9300b 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -233,7 +233,8 @@ export function fromSdkEnumType( EnumValueType: fromScalarType(enumType.valueType).Name, AllowedValues: enumType.values.map((v) => fromSdkEnumValueType(v)), Namespace: getFullNamespaceString( - (enumType.__raw! as Enum).namespace + // Enum and Union have optional namespace property + (enumType.__raw! as any).namespace ), Accessibility: enumType.access, Deprecated: enumType.deprecation, From a64f425fdab90a607e145e7535338bd8f010c770 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Mon, 15 Apr 2024 17:10:40 +0800 Subject: [PATCH 37/60] fix incorrect readonly --- .../Emitter.Csharp/src/type/converter.ts | 10 +++------- .../Models-TypeSpec/src/Generated/tspCodeModel.json | 2 +- .../Generated/Models/TextBlockItem.Serialization.cs | 7 ++----- .../src/Generated/Models/TextBlockItem.cs | 7 +++++-- .../Generated/Models/TextBlocklist.Serialization.cs | 7 ++----- .../src/Generated/Models/TextBlocklist.cs | 12 +++++++++++- .../src/Generated/tspCodeModel.json | 4 ++-- 7 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index deef0c9300b..a194f35a40f 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -28,7 +28,8 @@ import { SdkDurationType, UsageFlags, SdkBuiltInKinds, - isSdkBuiltInKind + isSdkBuiltInKind, + isReadOnly } from "@azure-tools/typespec-client-generator-core"; import { InputDictionaryType, @@ -646,11 +647,6 @@ function fromSdkModelPropertyType( propertyType.kind === "path" || propertyType.kind === "body" ? true : !propertyType.optional; // TO-DO: SdkBodyParameter lacks of optional - const isReadOnly = - propertyType.kind === "property" && - propertyType.visibility?.includes(Visibility.Read) - ? true - : false; const isDiscriminator = propertyType.kind === "property" && propertyType.discriminator ? true @@ -669,7 +665,7 @@ function fromSdkModelPropertyType( literalTypeContext ), IsRequired: isRequired, - IsReadOnly: isReadOnly, + IsReadOnly: propertyType.kind === "property" && isReadOnly(propertyType), IsDiscriminator: isDiscriminator === true ? true : undefined // TODO: keep backward compatible to ease comparison. remove this after TCGC is merged }; diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index 0f9517ca6e6..7c7d730c2aa 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -2917,7 +2917,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": false }, { "$id": "377", diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.Serialization.cs b/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.Serialization.cs index b374c3dfc50..b83d1414cdc 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.Serialization.cs +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.Serialization.cs @@ -27,11 +27,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("blockItemId"u8); - writer.WriteStringValue(BlockItemId); - } + writer.WritePropertyName("blockItemId"u8); + writer.WriteStringValue(BlockItemId); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.cs b/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.cs index c167cb20431..ed7e52aaef9 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.cs +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlockItem.cs @@ -46,12 +46,15 @@ public partial class TextBlockItem private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . + /// Block Item Id. It will be uuid. /// Block item content. - /// is null. - internal TextBlockItem(string text) + /// or is null. + internal TextBlockItem(string blockItemId, string text) { + Argument.AssertNotNull(blockItemId, nameof(blockItemId)); Argument.AssertNotNull(text, nameof(text)); + BlockItemId = blockItemId; Text = text; } diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.Serialization.cs b/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.Serialization.cs index 0cc7bc254d8..add6b917bd6 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.Serialization.cs +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.Serialization.cs @@ -27,11 +27,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteStartObject(); - if (options.Format != "W") - { - writer.WritePropertyName("blocklistName"u8); - writer.WriteStringValue(BlocklistName); - } + writer.WritePropertyName("blocklistName"u8); + writer.WriteStringValue(BlocklistName); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.cs b/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.cs index c7ff88fa6f2..d7cc2936d50 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.cs +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/Models/TextBlocklist.cs @@ -46,8 +46,13 @@ public partial class TextBlocklist private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal TextBlocklist() + /// Text blocklist name. Only supports the following characters: 0-9 A-Z a-z - . _ ~. + /// is null. + internal TextBlocklist(string blocklistName) { + Argument.AssertNotNull(blocklistName, nameof(blocklistName)); + + BlocklistName = blocklistName; } /// Initializes a new instance of . @@ -61,6 +66,11 @@ internal TextBlocklist(string blocklistName, string description, IDictionary Initializes a new instance of for deserialization. + internal TextBlocklist() + { + } + /// Text blocklist name. Only supports the following characters: 0-9 A-Z a-z - . _ ~. public string BlocklistName { get; } /// Text blocklist description. diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json index 2b589c27b48..26fb2b38726 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json @@ -428,7 +428,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": false }, { "$id": "56", @@ -509,7 +509,7 @@ "IsNullable": false }, "IsRequired": true, - "IsReadOnly": true + "IsReadOnly": false }, { "$id": "66", From 9dae0afc72fdaaaaffd1eaa36555d9c2e195ad30 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Tue, 16 Apr 2024 11:36:45 +0800 Subject: [PATCH 38/60] fix typescript style --- src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index a194f35a40f..02ffd21bc67 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -665,7 +665,8 @@ function fromSdkModelPropertyType( literalTypeContext ), IsRequired: isRequired, - IsReadOnly: propertyType.kind === "property" && isReadOnly(propertyType), + IsReadOnly: + propertyType.kind === "property" && isReadOnly(propertyType), IsDiscriminator: isDiscriminator === true ? true : undefined // TODO: keep backward compatible to ease comparison. remove this after TCGC is merged }; From e97baef668f177693adcdd434ba3625ed8a93ec5 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 17 Apr 2024 15:01:27 +0800 Subject: [PATCH 39/60] bump latest dev version of tcgc To fix an issues in discriminator property type --- package-lock.json | 30 +++++++++---------- package.json | 2 +- .../Emitter.Csharp/package.json | 4 +-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee031a96a60..51d5fb39f53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "name": "@autorest/csharp", "devDependencies": { "@azure-tools/cadl-ranch-mockapis": "file:test/CadlRanchMockApis", - "@azure-tools/typespec-client-generator-core": "0.42.0-dev.8", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.48", @@ -335,23 +335,23 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.42.0-dev.8", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.42.0-dev.8.tgz", - "integrity": "sha512-Kpelh/TOBp/Pv5h0IisGcWJ7CnHi340qxy2k514qAbiGWTfeqw3Q8PAHPf68MsRGgVXq+r/DljEDtE3oSMAVjA==", + "version": "0.42.0-pr-680.20240416.27", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", "dev": true, + "license": "MIT", "dependencies": { - "change-case": "~5.4.3", + "change-case": "~5.4.4", "pluralize": "^8.0.0" }, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.41.0 || >=0.42.0-dev <0.42.0", - "@typespec/compiler": "~0.55.0 || >=0.56.0-dev <0.56.0", - "@typespec/http": "~0.55.0 || >=0.56.0-dev <0.56.0", - "@typespec/rest": "~0.55.0 || >=0.56.0-dev <0.56.0", - "@typespec/versioning": "~0.55.0 || >=0.56.0-dev <0.56.0" + "@azure-tools/typespec-azure-core": "~0.41.0 || >=0.42.0-0 <0.42.0", + "@typespec/compiler": "~0.55.0 || >=0.56.0-0 <0.56.0", + "@typespec/http": "~0.55.0 || >=0.56.0-0 <0.56.0", + "@typespec/rest": "~0.55.0 || >=0.56.0-0 <0.56.0", + "@typespec/versioning": "~0.55.0 || >=0.56.0-0 <0.56.0" } }, "node_modules/@azure-tools/typespec-csharp": { @@ -2741,9 +2741,9 @@ } }, "node_modules/change-case": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.3.tgz", - "integrity": "sha512-4cdyvorTy/lViZlVzw2O8/hHCLUuHqp4KpSSP3DlauhFCf3LdnfF+p5s0EAhjKsU7bqrMzu7iQArYfoPiHO2nw==", + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", "dev": true }, "node_modules/chokidar": { @@ -8415,7 +8415,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.41.0", - "@azure-tools/typespec-client-generator-core": "0.42.0-dev.8", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", "@types/lodash.isequal": "^4.5.6", "@types/mocha": "~9.1.0", "@types/node": "~18.13.0", @@ -8439,7 +8439,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": "0.42.0-dev.8 || >=0.36.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", "@typespec/compiler": ">=0.50.0 <1.0.0", "@typespec/http": ">=0.50.0 <1.0.0", "@typespec/openapi": ">=0.50.0 <1.0.0", diff --git a/package.json b/package.json index d844d5fa85e..46a09f7c207 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "package.json intended for in-repo use only, package.json used for publishing is located in src/AutoRest.CSharp/package.json", "devDependencies": { "@azure-tools/cadl-ranch-mockapis": "file:test/CadlRanchMockApis", - "@azure-tools/typespec-client-generator-core": "0.42.0-dev.8", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.48", diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index c9ce32023c8..201c6571ab3 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -40,7 +40,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": "0.42.0-dev.8 || >=0.36.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", "@typespec/compiler": ">=0.50.0 <1.0.0", "@typespec/http": ">=0.50.0 <1.0.0", "@typespec/rest": ">=0.50.0 <1.0.0", @@ -49,7 +49,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.41.0", - "@azure-tools/typespec-client-generator-core": "0.42.0-dev.8", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", "@typespec/compiler": "0.55.0", "@typespec/eslint-config-typespec": "0.55.0", "@typespec/eslint-plugin": "0.55.0", From 9cee5e265f5e2eec64bc4ea5bd0ef7f59a77c3f1 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 17 Apr 2024 15:06:03 +0800 Subject: [PATCH 40/60] add license declaration --- src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 02ffd21bc67..e764e5d0467 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + import { IntrinsicType, Program, From 06d9cc211f955958419e5b2affe65277d827220c Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Wed, 17 Apr 2024 17:20:09 +0800 Subject: [PATCH 41/60] fix test error --- test/CadlRanchProjects.Tests/type-property-optionality.cs | 4 ++-- test/CadlRanchProjects.Tests/type-property-value-types.cs | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/CadlRanchProjects.Tests/type-property-optionality.cs b/test/CadlRanchProjects.Tests/type-property-optionality.cs index 36f47178c42..90c11465482 100644 --- a/test/CadlRanchProjects.Tests/type-property-optionality.cs +++ b/test/CadlRanchProjects.Tests/type-property-optionality.cs @@ -385,7 +385,7 @@ public Task Type_Property_Optional_StringLiteral_putDefault() => Test(async (hos public Task Type_Property_Optional_UnionFloatLiteral_getAll() => Test(async (host) => { Response response = await new OptionalClient(host, null).GetUnionFloatLiteralClient().GetAllAsync(new RequestContext()); - BinaryDataAssert.AreEqual(BinaryData.FromObjectAsJson(2.375), UnionFloatLiteralProperty.FromResponse(response).Property); + Assert.AreEqual(UnionFloatLiteralPropertyProperty._2375, UnionFloatLiteralProperty.FromResponse(response).Property); }); [Test] @@ -417,7 +417,7 @@ public Task Type_Property_Optional_UnionFloatLiteral_putDefault() => Test(async public Task Type_Property_Optional_UnionIntLiteral_getAll() => Test(async (host) => { Response response = await new OptionalClient(host, null).GetUnionIntLiteralClient().GetAllAsync(new RequestContext()); - BinaryDataAssert.AreEqual(BinaryData.FromObjectAsJson(2), UnionIntLiteralProperty.FromResponse(response).Property); + Assert.AreEqual(UnionIntLiteralPropertyProperty._2, UnionIntLiteralProperty.FromResponse(response).Property); }); [Test] diff --git a/test/CadlRanchProjects.Tests/type-property-value-types.cs b/test/CadlRanchProjects.Tests/type-property-value-types.cs index ff2c0ad5dd5..001632931d1 100644 --- a/test/CadlRanchProjects.Tests/type-property-value-types.cs +++ b/test/CadlRanchProjects.Tests/type-property-value-types.cs @@ -399,9 +399,8 @@ public Task Type_Property_ValueTypes_UnionEnumValue_put() => Test(async (host) = public Task Type_Property_ValueTypes_UnionFloatLiteral_get() => Test(async (host) => { var response = await new ValueTypesClient(host, null).GetUnionFloatLiteralClient().GetUnionFloatLiteralAsync(); - var expected = BinaryData.FromObjectAsJson(46.875); var actual = response.Value.Property; - BinaryDataAssert.AreEqual(expected, actual); + Assert.AreEqual(UnionFloatLiteralPropertyProperty._46875, actual); }); [Test] @@ -415,7 +414,7 @@ public Task Type_Property_ValueTypes_UnionFloatLiteral_put() => Test(async (host public Task Type_Property_ValueTypes_UnionIntLiteral_get() => Test(async (host) => { var response = await new ValueTypesClient(host, null).GetUnionIntLiteralClient().GetUnionIntLiteralAsync(); - BinaryDataAssert.AreEqual(BinaryData.FromString("42"), response.Value.Property); + Assert.AreEqual(UnionIntLiteralPropertyProperty._42, response.Value.Property); }); [Test] From 8af9d0eaca47cf28fea76feca786d4faa0c8455e Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 18 Apr 2024 12:04:14 +0800 Subject: [PATCH 42/60] refactor discrminiator property handling --- .../Emitter.Csharp/src/type/converter.ts | 53 ++++++------------- .../access/src/Generated/tspCodeModel.json | 1 + .../src/Generated/tspCodeModel.json | 2 + .../src/Generated/tspCodeModel.json | 5 ++ .../src/Generated/tspCodeModel.json | 2 + .../src/Generated/tspCodeModel.json | 2 + .../src/Generated/tspCodeModel.json | 5 ++ .../src/Generated/tspCodeModel.json | 2 + 8 files changed, 35 insertions(+), 37 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index e764e5d0467..6138531fbc6 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -4,7 +4,6 @@ import { IntrinsicType, Program, - getDiscriminator, Type, DateTimeKnownEncoding, Model, @@ -59,6 +58,7 @@ import { InputPrimitiveTypeKind } from "./inputPrimitiveTypeKind.js"; import { LiteralTypeContext } from "./literalTypeContext.js"; import { InputIntrinsicTypeKind } from "./inputIntrinsicTypeKind.js"; import { logger } from "../lib/logger.js"; +import { get } from "http"; function fromSdkType( sdkType: SdkType, @@ -123,10 +123,7 @@ export function fromSdkModelType( Deprecated: modelType.deprecation, Description: modelType.description, IsNullable: modelType.nullable, - DiscriminatorPropertyName: getDiscriminator( - context.program, - modelType.__raw! - )?.propertyName, // TO-DO: SdkModelType lacks of DiscriminatorPropertyName + DiscriminatorPropertyName: getDiscriminatorPropertyName(modelType), DiscriminatorValue: modelType.discriminatorValue, Usage: fromUsageFlags(modelType.usage) } as InputModelType; @@ -182,44 +179,26 @@ export function fromSdkModelType( Namespace: inputModelType?.Namespace } as LiteralTypeContext) ); - - // TODO: remove workaround for backward compatible with previous emitter behavior: https://github.com/Azure/autorest.csharp/blob/879233de12000f68916609e00f4431c604b7c1c5/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts#L717-L739 - // Previously emitter will insert discriminator property at the beginning if it's implicitly defined - // Now TCGC will append implicit discriminator property at the end, so we need to tune the sequence - // Will follow up with TCGC team to see if they can change the logic to insert discriminator property at the beginning, which seems more reasonable - // Then we can remove the following codes - if ( - inputModelType.DiscriminatorPropertyName && - !(modelType.__raw! as Model).properties.has( - inputModelType?.DiscriminatorPropertyName - ) - ) { - const index = inputModelType.Properties.findIndex( - (p) => p.IsDiscriminator - ); - if (index !== 0 && index !== -1) { - const discriminator = inputModelType.Properties.splice( - index, - 1 - )[0]; - inputModelType.Properties.unshift(discriminator); - } - } } return inputModelType; } +function getDiscriminatorPropertyName( + model?: SdkModelType +): string | undefined { + if (model == null) return undefined; + + const discriminatorProperty = model.properties.find( + (p) => (p as SdkBodyModelPropertyType).discriminator + ); + if (discriminatorProperty) return discriminatorProperty.name; + + return getDiscriminatorPropertyName(model.baseModel); +} + function hasDiscriminator(model?: SdkModelType): boolean { - if (model == null) return false; - - if ( - model!.properties.some((p) => { - return (p as SdkBodyModelPropertyType).discriminator; - }) - ) - return true; - return hasDiscriminator(model!.baseModel); + return getDiscriminatorPropertyName(model) !== undefined; } export function fromSdkEnumType( diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json index e75a0d5242f..ff5906a8bb5 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json @@ -289,6 +289,7 @@ "Accessibility": "internal", "Description": "Used in internal operations, should be generated but not exported.", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "real", "Usage": "Output", "BaseModel": { diff --git a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json index 084dc579a5f..afdffa044ce 100644 --- a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json @@ -127,6 +127,7 @@ "Namespace": "Type.Model.Inheritance.EnumDiscriminator", "Description": "Golden dog model", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "golden", "Usage": "RoundTrip", "BaseModel": { @@ -141,6 +142,7 @@ "Namespace": "Type.Model.Inheritance.EnumDiscriminator", "Description": "Cobra model", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "cobra", "Usage": "RoundTrip", "BaseModel": { diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json index 8dd0291df11..fee1cabdd95 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json @@ -94,6 +94,7 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level model in polymorphic single level inheritance.", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "seagull", "Usage": "RoundTrip", "BaseModel": { @@ -108,6 +109,7 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level model in polymorphic single level inheritance.", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "sparrow", "Usage": "RoundTrip", "BaseModel": { @@ -122,6 +124,7 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level model in polymorphic single level inheritance.", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "goose", "Usage": "RoundTrip", "BaseModel": { @@ -136,6 +139,7 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level model in polymorphic single levels inheritance which contains references to other polymorphic instances.", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "eagle", "Usage": "RoundTrip", "BaseModel": { @@ -202,6 +206,7 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level legacy model in polymorphic single level inheritance.", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "t-rex", "Usage": "Output", "BaseModel": { diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json index 10a0f729d75..edf7b7419ea 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json @@ -609,6 +609,7 @@ "Namespace": "Type.Property.AdditionalProperties", "Description": "The derived discriminated type", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { @@ -652,6 +653,7 @@ "Namespace": "Type.Property.AdditionalProperties", "Description": "The derived discriminated type", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json index 8fb56abe192..282c1a7578f 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json @@ -1280,6 +1280,7 @@ "Namespace": "ModelReaderWriterValidationTypeSpec", "Description": "The ModelX in the discriminated set", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "X", "Usage": "RoundTrip", "BaseModel": { @@ -1369,6 +1370,7 @@ "Namespace": "ModelReaderWriterValidationTypeSpec", "Description": "The ModelY in the discriminated set", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "Y", "Usage": "RoundTrip", "BaseModel": { diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index 7c7d730c2aa..aaecbc51f4f 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -2744,6 +2744,7 @@ "Namespace": "ModelsTypeSpec", "Description": "A derived class in the discriminated set inheriting from a base with the predefined discriminator property", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "A", "Usage": "RoundTrip", "BaseModel": { @@ -2787,6 +2788,7 @@ "Namespace": "ModelsTypeSpec", "Description": "Deriver model with discriminator property.", "IsNullable": false, + "DiscriminatorPropertyName": "discriminatorProperty", "DiscriminatorValue": "A", "Usage": "RoundTrip", "BaseModel": { @@ -2816,6 +2818,7 @@ "Namespace": "ModelsTypeSpec", "Description": "Deriver model with discriminator property.", "IsNullable": false, + "DiscriminatorPropertyName": "discriminatorProperty", "DiscriminatorValue": "B", "Usage": "RoundTrip", "BaseModel": { @@ -2845,6 +2848,7 @@ "Namespace": "ModelsTypeSpec", "Description": "First derived model as an output", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "first", "Usage": "Output", "BaseModel": { @@ -2874,6 +2878,7 @@ "Namespace": "ModelsTypeSpec", "Description": "Second derived model as an output", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "second", "Usage": "Output", "BaseModel": { diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json index edc3e57f86d..ae0dbf1b04a 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json @@ -229,6 +229,7 @@ "Namespace": "PetStore", "Description": "Shark is a fish", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "shark", "Usage": "Output", "BaseModel": { @@ -258,6 +259,7 @@ "Namespace": "PetStore", "Description": "Tuna is a fish", "IsNullable": false, + "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "tuna", "Usage": "Output", "BaseModel": { From 81db0cff77c812308b9a8dad24a1d58c6d1db290 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 18 Apr 2024 12:07:57 +0800 Subject: [PATCH 43/60] bump tcgc to 0.41.3 --- package-lock.json | 22 +++++++++---------- package.json | 2 +- .../Emitter.Csharp/package.json | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51d5fb39f53..a085cb7b203 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "name": "@autorest/csharp", "devDependencies": { "@azure-tools/cadl-ranch-mockapis": "file:test/CadlRanchMockApis", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", + "@azure-tools/typespec-client-generator-core": "0.41.3", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.48", @@ -335,10 +335,10 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.42.0-pr-680.20240416.27", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", + "version": "0.41.3", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.41.3.tgz", + "integrity": "sha512-f5H6gz7GCi0kUd7/8LoyJaMq68E0fNldZKQPxUIxqwlQHTFUI/7K37kCkOMNVk8gqmLgLKCShBLhE7zONKe8MA==", "dev": true, - "license": "MIT", "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -347,11 +347,11 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.41.0 || >=0.42.0-0 <0.42.0", - "@typespec/compiler": "~0.55.0 || >=0.56.0-0 <0.56.0", - "@typespec/http": "~0.55.0 || >=0.56.0-0 <0.56.0", - "@typespec/rest": "~0.55.0 || >=0.56.0-0 <0.56.0", - "@typespec/versioning": "~0.55.0 || >=0.56.0-0 <0.56.0" + "@azure-tools/typespec-azure-core": "~0.41.0", + "@typespec/compiler": "~0.55.0", + "@typespec/http": "~0.55.0", + "@typespec/rest": "~0.55.0", + "@typespec/versioning": "~0.55.0" } }, "node_modules/@azure-tools/typespec-csharp": { @@ -8415,7 +8415,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.41.0", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", + "@azure-tools/typespec-client-generator-core": "0.41.3", "@types/lodash.isequal": "^4.5.6", "@types/mocha": "~9.1.0", "@types/node": "~18.13.0", @@ -8439,7 +8439,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", + "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", "@typespec/compiler": ">=0.50.0 <1.0.0", "@typespec/http": ">=0.50.0 <1.0.0", "@typespec/openapi": ">=0.50.0 <1.0.0", diff --git a/package.json b/package.json index 46a09f7c207..8b29c988b96 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "package.json intended for in-repo use only, package.json used for publishing is located in src/AutoRest.CSharp/package.json", "devDependencies": { "@azure-tools/cadl-ranch-mockapis": "file:test/CadlRanchMockApis", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", + "@azure-tools/typespec-client-generator-core": "0.41.3", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.48", diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 201c6571ab3..4b1c71a93e5 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -40,7 +40,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", + "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", "@typespec/compiler": ">=0.50.0 <1.0.0", "@typespec/http": ">=0.50.0 <1.0.0", "@typespec/rest": ">=0.50.0 <1.0.0", @@ -49,7 +49,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.41.0", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzcwNDk4Ny9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-680.20240416.27.tgz", + "@azure-tools/typespec-client-generator-core": "0.41.3", "@typespec/compiler": "0.55.0", "@typespec/eslint-config-typespec": "0.55.0", "@typespec/eslint-plugin": "0.55.0", From 05d2bb3925ce3fb185d694cbde4d15894b335b56 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Thu, 18 Apr 2024 13:37:04 +0800 Subject: [PATCH 44/60] do not generate `DiscriminatorPropertyName` for child models --- .../Emitter.Csharp/src/type/converter.ts | 23 +- .../access/src/Generated/tspCodeModel.json | 1 - .../src/Generated/tspCodeModel.json | 2 - .../src/Generated/tspCodeModel.json | 5 - .../src/Generated/tspCodeModel.json | 2 - .../src/Generated/tspCodeModel.json | 2 - .../src/Generated/tspCodeModel.json | 5 - .../src/Generated/tspCodeModel.json | 2 - .../Models/CreateChatCompletionRequest.cs | 2 +- .../Models/CreateCompletionRequest.cs | 6 +- .../Models/CreateEmbeddingRequest.cs | 4 +- .../Models/StopSequences.Serialization.cs | 107 + .../src/Generated/Models/StopSequences.cs | 28 + .../Models/TokenArray.Serialization.cs | 107 + .../src/Generated/Models/TokenArray.cs | 28 + .../Models/TokenArrayArray.Serialization.cs | 107 + .../src/Generated/Models/TokenArrayArray.cs | 28 + .../src/Generated/tspCodeModel.json | 1974 +++++++++-------- 18 files changed, 1421 insertions(+), 1012 deletions(-) create mode 100644 test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/StopSequences.Serialization.cs create mode 100644 test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/StopSequences.cs create mode 100644 test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArray.Serialization.cs create mode 100644 test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArray.cs create mode 100644 test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArrayArray.Serialization.cs create mode 100644 test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArrayArray.cs diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 6138531fbc6..5d5a67673ad 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -110,9 +110,10 @@ export function fromSdkModelType( models: Map, enums: Map ): InputModelType { - let modelTypeName = modelType.name; + const modelTypeName = modelType.name; let inputModelType = models.get(modelTypeName); if (!inputModelType) { + const baseModelHasDiscriminator = hasDiscriminator(modelType.baseModel); inputModelType = { Kind: InputTypeKind.Model, Name: modelTypeName, @@ -123,7 +124,9 @@ export function fromSdkModelType( Deprecated: modelType.deprecation, Description: modelType.description, IsNullable: modelType.nullable, - DiscriminatorPropertyName: getDiscriminatorPropertyName(modelType), + DiscriminatorPropertyName: baseModelHasDiscriminator + ? undefined + : getDiscriminatorPropertyNameFromCurrentModel(modelType), DiscriminatorValue: modelType.discriminatorValue, Usage: fromUsageFlags(modelType.usage) } as InputModelType; @@ -160,7 +163,6 @@ export function fromSdkModelType( IsNullable: false } as InputDictionaryType) : undefined; - const baseModelHasDiscriminator = hasDiscriminator(modelType.baseModel); inputModelType.Properties = modelType.properties .filter( (p) => @@ -184,7 +186,7 @@ export function fromSdkModelType( return inputModelType; } -function getDiscriminatorPropertyName( +function getDiscriminatorPropertyNameFromCurrentModel( model?: SdkModelType ): string | undefined { if (model == null) return undefined; @@ -194,11 +196,20 @@ function getDiscriminatorPropertyName( ); if (discriminatorProperty) return discriminatorProperty.name; - return getDiscriminatorPropertyName(model.baseModel); + return undefined; } function hasDiscriminator(model?: SdkModelType): boolean { - return getDiscriminatorPropertyName(model) !== undefined; + if (model == null) return false; + + if ( + model.properties.some( + (p) => (p as SdkBodyModelPropertyType).discriminator + ) + ) + return true; + + return hasDiscriminator(model.baseModel); } export function fromSdkEnumType( diff --git a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json index ff5906a8bb5..e75a0d5242f 100644 --- a/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json @@ -289,7 +289,6 @@ "Accessibility": "internal", "Description": "Used in internal operations, should be generated but not exported.", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "real", "Usage": "Output", "BaseModel": { diff --git a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json index afdffa044ce..084dc579a5f 100644 --- a/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json @@ -127,7 +127,6 @@ "Namespace": "Type.Model.Inheritance.EnumDiscriminator", "Description": "Golden dog model", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "golden", "Usage": "RoundTrip", "BaseModel": { @@ -142,7 +141,6 @@ "Namespace": "Type.Model.Inheritance.EnumDiscriminator", "Description": "Cobra model", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "cobra", "Usage": "RoundTrip", "BaseModel": { diff --git a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json index fee1cabdd95..8dd0291df11 100644 --- a/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json @@ -94,7 +94,6 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level model in polymorphic single level inheritance.", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "seagull", "Usage": "RoundTrip", "BaseModel": { @@ -109,7 +108,6 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level model in polymorphic single level inheritance.", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "sparrow", "Usage": "RoundTrip", "BaseModel": { @@ -124,7 +122,6 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level model in polymorphic single level inheritance.", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "goose", "Usage": "RoundTrip", "BaseModel": { @@ -139,7 +136,6 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level model in polymorphic single levels inheritance which contains references to other polymorphic instances.", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "eagle", "Usage": "RoundTrip", "BaseModel": { @@ -206,7 +202,6 @@ "Namespace": "Type.Model.Inheritance.SingleDiscriminator", "Description": "The second level legacy model in polymorphic single level inheritance.", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "t-rex", "Usage": "Output", "BaseModel": { diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json index edf7b7419ea..10a0f729d75 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json @@ -609,7 +609,6 @@ "Namespace": "Type.Property.AdditionalProperties", "Description": "The derived discriminated type", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { @@ -653,7 +652,6 @@ "Namespace": "Type.Property.AdditionalProperties", "Description": "The derived discriminated type", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { diff --git a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json index 282c1a7578f..8fb56abe192 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json @@ -1280,7 +1280,6 @@ "Namespace": "ModelReaderWriterValidationTypeSpec", "Description": "The ModelX in the discriminated set", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "X", "Usage": "RoundTrip", "BaseModel": { @@ -1370,7 +1369,6 @@ "Namespace": "ModelReaderWriterValidationTypeSpec", "Description": "The ModelY in the discriminated set", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "Y", "Usage": "RoundTrip", "BaseModel": { diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index aaecbc51f4f..7c7d730c2aa 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -2744,7 +2744,6 @@ "Namespace": "ModelsTypeSpec", "Description": "A derived class in the discriminated set inheriting from a base with the predefined discriminator property", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "A", "Usage": "RoundTrip", "BaseModel": { @@ -2788,7 +2787,6 @@ "Namespace": "ModelsTypeSpec", "Description": "Deriver model with discriminator property.", "IsNullable": false, - "DiscriminatorPropertyName": "discriminatorProperty", "DiscriminatorValue": "A", "Usage": "RoundTrip", "BaseModel": { @@ -2818,7 +2816,6 @@ "Namespace": "ModelsTypeSpec", "Description": "Deriver model with discriminator property.", "IsNullable": false, - "DiscriminatorPropertyName": "discriminatorProperty", "DiscriminatorValue": "B", "Usage": "RoundTrip", "BaseModel": { @@ -2848,7 +2845,6 @@ "Namespace": "ModelsTypeSpec", "Description": "First derived model as an output", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "first", "Usage": "Output", "BaseModel": { @@ -2878,7 +2874,6 @@ "Namespace": "ModelsTypeSpec", "Description": "Second derived model as an output", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "second", "Usage": "Output", "BaseModel": { diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json index ae0dbf1b04a..edc3e57f86d 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json @@ -229,7 +229,6 @@ "Namespace": "PetStore", "Description": "Shark is a fish", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "shark", "Usage": "Output", "BaseModel": { @@ -259,7 +258,6 @@ "Namespace": "PetStore", "Description": "Tuna is a fish", "IsNullable": false, - "DiscriminatorPropertyName": "kind", "DiscriminatorValue": "tuna", "Usage": "Output", "BaseModel": { diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionRequest.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionRequest.cs index ea29968f1a2..72c9857b02e 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionRequest.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionRequest.cs @@ -268,7 +268,7 @@ internal CreateChatCompletionRequest() /// /// /// - /// where T is of type + /// /// /// /// diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionRequest.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionRequest.cs index 7f7c7740691..7b1c24d9de4 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionRequest.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionRequest.cs @@ -211,10 +211,10 @@ internal CreateCompletionRequest() /// where T is of type /// /// - /// where T is of type + /// /// /// - /// where T is of type IList{long} + /// /// /// /// @@ -287,7 +287,7 @@ internal CreateCompletionRequest() /// /// /// - /// where T is of type + /// /// /// /// diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEmbeddingRequest.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEmbeddingRequest.cs index 9968ebafc09..36442b78e00 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEmbeddingRequest.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEmbeddingRequest.cs @@ -109,10 +109,10 @@ internal CreateEmbeddingRequest() /// where T is of type /// /// - /// where T is of type + /// /// /// - /// where T is of type IList{long} + /// /// /// /// diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/StopSequences.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/StopSequences.Serialization.cs new file mode 100644 index 00000000000..3ca921593aa --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/StopSequences.Serialization.cs @@ -0,0 +1,107 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace OpenAI.Models +{ + internal partial class StopSequences : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopSequences)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + + StopSequences IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopSequences)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStopSequences(document.RootElement, options); + } + + internal static StopSequences DeserializeStopSequences(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetString()); + } + additionalProperties = additionalPropertiesDictionary; + return new StopSequences(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StopSequences)} does not support writing '{options.Format}' format."); + } + } + + StopSequences IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStopSequences(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StopSequences)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The result to deserialize the model from. + internal static StopSequences FromResponse(PipelineResponse response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeStopSequences(document.RootElement); + } + + /// Convert into a . + internal virtual BinaryContent ToBinaryContent() + { + return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/StopSequences.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/StopSequences.cs new file mode 100644 index 00000000000..350b270c4df --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/StopSequences.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace OpenAI.Models +{ + /// The StopSequences. + internal partial class StopSequences + { + /// Initializes a new instance of . + public StopSequences() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal StopSequences(IDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// Additional Properties. + public IDictionary AdditionalProperties { get; } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArray.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArray.Serialization.cs new file mode 100644 index 00000000000..32856d68466 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArray.Serialization.cs @@ -0,0 +1,107 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace OpenAI.Models +{ + internal partial class TokenArray : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TokenArray)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + } + + TokenArray IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TokenArray)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTokenArray(document.RootElement, options); + } + + internal static TokenArray DeserializeTokenArray(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, property.Value.GetInt64()); + } + additionalProperties = additionalPropertiesDictionary; + return new TokenArray(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TokenArray)} does not support writing '{options.Format}' format."); + } + } + + TokenArray IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTokenArray(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TokenArray)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The result to deserialize the model from. + internal static TokenArray FromResponse(PipelineResponse response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTokenArray(document.RootElement); + } + + /// Convert into a . + internal virtual BinaryContent ToBinaryContent() + { + return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArray.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArray.cs new file mode 100644 index 00000000000..56a362bb4fc --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArray.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace OpenAI.Models +{ + /// The TokenArray. + internal partial class TokenArray + { + /// Initializes a new instance of . + public TokenArray() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal TokenArray(IDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// Additional Properties. + public IDictionary AdditionalProperties { get; } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArrayArray.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArrayArray.Serialization.cs new file mode 100644 index 00000000000..0234e214e6f --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArrayArray.Serialization.cs @@ -0,0 +1,107 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace OpenAI.Models +{ + internal partial class TokenArrayArray : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TokenArrayArray)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + + TokenArrayArray IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TokenArrayArray)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTokenArrayArray(document.RootElement, options); + } + + internal static TokenArrayArray DeserializeTokenArrayArray(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + additionalPropertiesDictionary.Add(property.Name, TokenArray.DeserializeTokenArray(property.Value, options)); + } + additionalProperties = additionalPropertiesDictionary; + return new TokenArrayArray(additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TokenArrayArray)} does not support writing '{options.Format}' format."); + } + } + + TokenArrayArray IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeTokenArrayArray(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TokenArrayArray)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The result to deserialize the model from. + internal static TokenArrayArray FromResponse(PipelineResponse response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeTokenArrayArray(document.RootElement); + } + + /// Convert into a . + internal virtual BinaryContent ToBinaryContent() + { + return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArrayArray.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArrayArray.cs new file mode 100644 index 00000000000..d48fd332338 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/TokenArrayArray.cs @@ -0,0 +1,28 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace OpenAI.Models +{ + /// The TokenArrayArray. + internal partial class TokenArrayArray + { + /// Initializes a new instance of . + public TokenArrayArray() + { + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Additional Properties. + internal TokenArrayArray(IDictionary additionalProperties) + { + AdditionalProperties = additionalProperties; + } + + /// Additional Properties. + public IDictionary AdditionalProperties { get; } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json index 7c3cdf056e3..c2992ea74a5 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json @@ -1420,15 +1420,30 @@ }, { "$id": "201", - "Kind": "Array", - "Name": "Array", - "ElementType": { + "Kind": "Model", + "Name": "StopSequences", + "Namespace": "OpenAI", + "IsNullable": false, + "Usage": "Input", + "InheritedDictionaryType": { "$id": "202", - "Kind": "Primitive", - "Name": "String", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "203", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "204", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, "IsNullable": false }, - "IsNullable": false + "Properties": [] } ], "IsNullable": false @@ -1437,12 +1452,12 @@ "IsReadOnly": false }, { - "$id": "203", + "$id": "205", "Name": "presence_penalty", "SerializedName": "presence_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear\nin the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "204", + "$id": "206", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1451,12 +1466,12 @@ "IsReadOnly": false }, { - "$id": "205", + "$id": "207", "Name": "frequency_penalty", "SerializedName": "frequency_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing\nfrequency in the text so far, decreasing the model's likelihood to repeat the same line\nverbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "206", + "$id": "208", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1465,22 +1480,22 @@ "IsReadOnly": false }, { - "$id": "207", + "$id": "209", "Name": "logit_bias", "SerializedName": "logit_bias", "Description": "Modify the likelihood of specified tokens appearing in the completion.\nAccepts a json object that maps tokens (specified by their token ID in the tokenizer) to an\nassociated bias value from -100 to 100. Mathematically, the bias is added to the logits\ngenerated by the model prior to sampling. The exact effect will vary per model, but values\nbetween -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.", "Type": { - "$id": "208", + "$id": "210", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "209", + "$id": "211", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "210", + "$id": "212", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1491,12 +1506,12 @@ "IsReadOnly": false }, { - "$id": "211", + "$id": "213", "Name": "user", "SerializedName": "user", "Description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect\nabuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "Type": { - "$id": "212", + "$id": "214", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1505,12 +1520,12 @@ "IsReadOnly": false }, { - "$id": "213", + "$id": "215", "Name": "stream", "SerializedName": "stream", "Description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available, with the stream terminated by a `data: [DONE]` message.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).", "Type": { - "$id": "214", + "$id": "216", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -1536,7 +1551,10 @@ "$ref": "187" }, { - "$id": "215", + "$ref": "201" + }, + { + "$id": "217", "Kind": "Model", "Name": "CreateChatCompletionResponse", "Namespace": "OpenAI", @@ -1545,12 +1563,12 @@ "Usage": "Output", "Properties": [ { - "$id": "216", + "$id": "218", "Name": "id", "SerializedName": "id", "Description": "A unique identifier for the chat completion.", "Type": { - "$id": "217", + "$id": "219", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1559,12 +1577,12 @@ "IsReadOnly": false }, { - "$id": "218", + "$id": "220", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `chat.completion`.", "Type": { - "$id": "219", + "$id": "221", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1573,12 +1591,12 @@ "IsReadOnly": false }, { - "$id": "220", + "$id": "222", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the chat completion was created.", "Type": { - "$id": "221", + "$id": "223", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1587,12 +1605,12 @@ "IsReadOnly": false }, { - "$id": "222", + "$id": "224", "Name": "model", "SerializedName": "model", "Description": "The model used for the chat completion.", "Type": { - "$id": "223", + "$id": "225", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1601,16 +1619,16 @@ "IsReadOnly": false }, { - "$id": "224", + "$id": "226", "Name": "choices", "SerializedName": "choices", "Description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "Type": { - "$id": "225", + "$id": "227", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "226", + "$id": "228", "Kind": "Model", "Name": "CreateChatCompletionResponseChoice", "Namespace": "OpenAI", @@ -1618,12 +1636,12 @@ "Usage": "Output", "Properties": [ { - "$id": "227", + "$id": "229", "Name": "index", "SerializedName": "index", "Description": "The index of the choice in the list of choices.", "Type": { - "$id": "228", + "$id": "230", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1632,12 +1650,12 @@ "IsReadOnly": false }, { - "$id": "229", + "$id": "231", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "230", + "$id": "232", "Kind": "Model", "Name": "ChatCompletionResponseMessage", "Namespace": "OpenAI", @@ -1645,7 +1663,7 @@ "Usage": "Output", "Properties": [ { - "$id": "231", + "$id": "233", "Name": "role", "SerializedName": "role", "Description": "The role of the author of this message.", @@ -1656,12 +1674,12 @@ "IsReadOnly": false }, { - "$id": "232", + "$id": "234", "Name": "content", "SerializedName": "content", "Description": "The contents of the message.", "Type": { - "$id": "233", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1670,12 +1688,12 @@ "IsReadOnly": false }, { - "$id": "234", + "$id": "236", "Name": "function_call", "SerializedName": "function_call", "Description": "The name and arguments of a function that should be called, as generated by the model.", "Type": { - "$id": "235", + "$id": "237", "Kind": "Model", "Name": "ChatCompletionResponseMessageFunctionCall", "Namespace": "OpenAI", @@ -1683,12 +1701,12 @@ "Usage": "Output", "Properties": [ { - "$id": "236", + "$id": "238", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "237", + "$id": "239", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1697,12 +1715,12 @@ "IsReadOnly": false }, { - "$id": "238", + "$id": "240", "Name": "arguments", "SerializedName": "arguments", "Description": "The arguments to call the function with, as generated by the model in JSON format. Note that\nthe model does not always generate valid JSON, and may hallucinate parameters not defined by\nyour function schema. Validate the arguments in your code before calling your function.", "Type": { - "$id": "239", + "$id": "241", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1721,7 +1739,7 @@ "IsReadOnly": false }, { - "$id": "240", + "$id": "242", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, `length` if the maximum number of tokens\nspecified in the request was reached, `content_filter` if the content was omitted due to\na flag from our content filters, or `function_call` if the model called a function.", @@ -1739,12 +1757,12 @@ "IsReadOnly": false }, { - "$id": "241", + "$id": "243", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$id": "242", + "$id": "244", "Kind": "Model", "Name": "CompletionUsage", "Namespace": "OpenAI", @@ -1753,12 +1771,12 @@ "Usage": "Output", "Properties": [ { - "$id": "243", + "$id": "245", "Name": "prompt_tokens", "SerializedName": "prompt_tokens", "Description": "Number of tokens in the prompt.", "Type": { - "$id": "244", + "$id": "246", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1767,12 +1785,12 @@ "IsReadOnly": false }, { - "$id": "245", + "$id": "247", "Name": "completion_tokens", "SerializedName": "completion_tokens", "Description": "Number of tokens in the generated completion", "Type": { - "$id": "246", + "$id": "248", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1781,12 +1799,12 @@ "IsReadOnly": false }, { - "$id": "247", + "$id": "249", "Name": "total_tokens", "SerializedName": "total_tokens", "Description": "Total number of tokens used in the request (prompt + completion).", "Type": { - "$id": "248", + "$id": "250", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1802,19 +1820,19 @@ ] }, { - "$ref": "226" + "$ref": "228" }, { - "$ref": "230" + "$ref": "232" }, { - "$ref": "235" + "$ref": "237" }, { - "$ref": "242" + "$ref": "244" }, { - "$id": "249", + "$id": "251", "Kind": "Model", "Name": "CreateFineTuningJobRequest", "Namespace": "OpenAI", @@ -1822,12 +1840,12 @@ "Usage": "Input", "Properties": [ { - "$id": "250", + "$id": "252", "Name": "training_file", "SerializedName": "training_file", "Description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/upload) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with\nthe purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "251", + "$id": "253", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1836,12 +1854,12 @@ "IsReadOnly": false }, { - "$id": "252", + "$id": "254", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation metrics periodically during\nfine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should\nnot be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose\n`fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "253", + "$id": "255", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1850,7 +1868,7 @@ "IsReadOnly": false }, { - "$id": "254", + "$id": "256", "Name": "model", "SerializedName": "model", "Description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/what-models-can-be-fine-tuned).", @@ -1861,12 +1879,12 @@ "IsReadOnly": false }, { - "$id": "255", + "$id": "257", "Name": "hyperparameters", "SerializedName": "hyperparameters", "Description": "The hyperparameters used for the fine-tuning job.", "Type": { - "$id": "256", + "$id": "258", "Kind": "Model", "Name": "CreateFineTuningJobRequestHyperparameters", "Namespace": "OpenAI", @@ -1874,21 +1892,21 @@ "Usage": "Input", "Properties": [ { - "$id": "257", + "$id": "259", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "258", + "$id": "260", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "259", + "$id": "261", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "260", + "$id": "262", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1897,7 +1915,7 @@ "IsNullable": false }, { - "$id": "261", + "$id": "263", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1914,12 +1932,12 @@ "IsReadOnly": false }, { - "$id": "262", + "$id": "264", "Name": "suffix", "SerializedName": "suffix", "Description": "A string of up to 18 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like\n`ft:gpt-3.5-turbo:openai:custom-model-name:7p4lURel`.", "Type": { - "$id": "263", + "$id": "265", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1930,10 +1948,10 @@ ] }, { - "$ref": "256" + "$ref": "258" }, { - "$id": "264", + "$id": "266", "Kind": "Model", "Name": "FineTuningJob", "Namespace": "OpenAI", @@ -1941,12 +1959,12 @@ "Usage": "Output", "Properties": [ { - "$id": "265", + "$id": "267", "Name": "id", "SerializedName": "id", "Description": "The object identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "266", + "$id": "268", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1955,12 +1973,12 @@ "IsReadOnly": false }, { - "$id": "267", + "$id": "269", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"fine_tuning.job\".", "Type": { - "$id": "268", + "$id": "270", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -1973,12 +1991,12 @@ "IsReadOnly": false }, { - "$id": "269", + "$id": "271", "Name": "created_at", "SerializedName": "created_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "Type": { - "$id": "270", + "$id": "272", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1987,12 +2005,12 @@ "IsReadOnly": false }, { - "$id": "271", + "$id": "273", "Name": "finished_at", "SerializedName": "finished_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be\nnull if the fine-tuning job is still running.", "Type": { - "$id": "272", + "$id": "274", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": true @@ -2001,12 +2019,12 @@ "IsReadOnly": false }, { - "$id": "273", + "$id": "275", "Name": "model", "SerializedName": "model", "Description": "The base model that is being fine-tuned.", "Type": { - "$id": "274", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2015,12 +2033,12 @@ "IsReadOnly": false }, { - "$id": "275", + "$id": "277", "Name": "fine_tuned_model", "SerializedName": "fine_tuned_model", "Description": "The name of the fine-tuned model that is being created. The value will be null if the\nfine-tuning job is still running.", "Type": { - "$id": "276", + "$id": "278", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2029,12 +2047,12 @@ "IsReadOnly": false }, { - "$id": "277", + "$id": "279", "Name": "organization_id", "SerializedName": "organization_id", "Description": "The organization that owns the fine-tuning job.", "Type": { - "$id": "278", + "$id": "280", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2043,7 +2061,7 @@ "IsReadOnly": false }, { - "$id": "279", + "$id": "281", "Name": "status", "SerializedName": "status", "Description": "The current status of the fine-tuning job, which can be either `created`, `pending`, `running`,\n`succeeded`, `failed`, or `cancelled`.", @@ -2054,12 +2072,12 @@ "IsReadOnly": false }, { - "$id": "280", + "$id": "282", "Name": "hyperparameters", "SerializedName": "hyperparameters", "Description": "The hyperparameters used for the fine-tuning job. See the\n[fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "281", + "$id": "283", "Kind": "Model", "Name": "FineTuningJobHyperparameters", "Namespace": "OpenAI", @@ -2067,21 +2085,21 @@ "Usage": "Output", "Properties": [ { - "$id": "282", + "$id": "284", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.\n\n\"Auto\" decides the optimal number of epochs based on the size of the dataset. If setting the\nnumber manually, we support any number between 1 and 50 epochs.", "Type": { - "$id": "283", + "$id": "285", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "284", + "$id": "286", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "285", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2090,7 +2108,7 @@ "IsNullable": false }, { - "$id": "286", + "$id": "288", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2107,12 +2125,12 @@ "IsReadOnly": false }, { - "$id": "287", + "$id": "289", "Name": "training_file", "SerializedName": "training_file", "Description": "The file ID used for training. You can retrieve the training data with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "288", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2121,12 +2139,12 @@ "IsReadOnly": false }, { - "$id": "289", + "$id": "291", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The file ID used for validation. You can retrieve the validation results with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "290", + "$id": "292", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2135,16 +2153,16 @@ "IsReadOnly": false }, { - "$id": "291", + "$id": "293", "Name": "result_files", "SerializedName": "result_files", "Description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "292", + "$id": "294", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "293", + "$id": "295", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2155,12 +2173,12 @@ "IsReadOnly": false }, { - "$id": "294", + "$id": "296", "Name": "trained_tokens", "SerializedName": "trained_tokens", "Description": "The total number of billable tokens processed by this fine tuning job. The value will be null\nif the fine-tuning job is still running.", "Type": { - "$id": "295", + "$id": "297", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2169,12 +2187,12 @@ "IsReadOnly": false }, { - "$id": "296", + "$id": "298", "Name": "error", "SerializedName": "error", "Description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the\nfailure.", "Type": { - "$id": "297", + "$id": "299", "Kind": "Model", "Name": "FineTuningJobError", "Namespace": "", @@ -2182,12 +2200,12 @@ "Usage": "Output", "Properties": [ { - "$id": "298", + "$id": "300", "Name": "message", "SerializedName": "message", "Description": "A human-readable error message.", "Type": { - "$id": "299", + "$id": "301", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2196,12 +2214,12 @@ "IsReadOnly": false }, { - "$id": "300", + "$id": "302", "Name": "code", "SerializedName": "code", "Description": "A machine-readable error code.", "Type": { - "$id": "301", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2210,12 +2228,12 @@ "IsReadOnly": false }, { - "$id": "302", + "$id": "304", "Name": "param", "SerializedName": "param", "Description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field\nwill be null if the failure was not parameter-specific.", "Type": { - "$id": "303", + "$id": "305", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2231,13 +2249,13 @@ ] }, { - "$ref": "281" + "$ref": "283" }, { - "$ref": "297" + "$ref": "299" }, { - "$id": "304", + "$id": "306", "Kind": "Model", "Name": "ListPaginatedFineTuningJobsResponse", "Namespace": "OpenAI", @@ -2245,12 +2263,12 @@ "Usage": "Output", "Properties": [ { - "$id": "305", + "$id": "307", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "306", + "$id": "308", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2259,16 +2277,16 @@ "IsReadOnly": false }, { - "$id": "307", + "$id": "309", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "308", + "$id": "310", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "264" + "$ref": "266" }, "IsNullable": false }, @@ -2276,12 +2294,12 @@ "IsReadOnly": false }, { - "$id": "309", + "$id": "311", "Name": "has_more", "SerializedName": "has_more", "Description": "", "Type": { - "$id": "310", + "$id": "312", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2292,7 +2310,7 @@ ] }, { - "$id": "311", + "$id": "313", "Kind": "Model", "Name": "ListFineTuningJobEventsResponse", "Namespace": "OpenAI", @@ -2300,12 +2318,12 @@ "Usage": "Output", "Properties": [ { - "$id": "312", + "$id": "314", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "313", + "$id": "315", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2314,16 +2332,16 @@ "IsReadOnly": false }, { - "$id": "314", + "$id": "316", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "315", + "$id": "317", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "316", + "$id": "318", "Kind": "Model", "Name": "FineTuningJobEvent", "Namespace": "OpenAI", @@ -2331,12 +2349,12 @@ "Usage": "Output", "Properties": [ { - "$id": "317", + "$id": "319", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "318", + "$id": "320", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2345,12 +2363,12 @@ "IsReadOnly": false }, { - "$id": "319", + "$id": "321", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "320", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2359,12 +2377,12 @@ "IsReadOnly": false }, { - "$id": "321", + "$id": "323", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "322", + "$id": "324", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2373,7 +2391,7 @@ "IsReadOnly": false }, { - "$id": "323", + "$id": "325", "Name": "level", "SerializedName": "level", "Description": "", @@ -2384,12 +2402,12 @@ "IsReadOnly": false }, { - "$id": "324", + "$id": "326", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "325", + "$id": "327", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2407,10 +2425,10 @@ ] }, { - "$ref": "316" + "$ref": "318" }, { - "$id": "326", + "$id": "328", "Kind": "Model", "Name": "CreateCompletionRequest", "Namespace": "OpenAI", @@ -2418,7 +2436,7 @@ "Usage": "Input", "Properties": [ { - "$id": "327", + "$id": "329", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to\nsee all of your available models, or see our [Model overview](/docs/models/overview) for\ndescriptions of them.", @@ -2429,33 +2447,21 @@ "IsReadOnly": false }, { - "$id": "328", + "$id": "330", "Name": "prompt", "SerializedName": "prompt", "Description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of\ntokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a\nprompt is not specified the model will generate as if from the beginning of a new document.", "Type": { - "$id": "329", + "$id": "331", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "330", + "$id": "332", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - { - "$id": "331", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$id": "332", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsNullable": false - }, { "$id": "333", "Kind": "Array", @@ -2463,28 +2469,61 @@ "ElementType": { "$id": "334", "Kind": "Primitive", - "Name": "SafeInt", + "Name": "String", "IsNullable": false }, "IsNullable": false }, { "$id": "335", - "Kind": "Array", - "Name": "Array", - "ElementType": { + "Kind": "Model", + "Name": "TokenArray", + "Namespace": "OpenAI", + "IsNullable": false, + "Usage": "Input", + "InheritedDictionaryType": { "$id": "336", - "Kind": "Array", - "Name": "Array", - "ElementType": { + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { "$id": "337", "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "338", + "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false }, "IsNullable": false }, - "IsNullable": false + "Properties": [] + }, + { + "$id": "339", + "Kind": "Model", + "Name": "TokenArrayArray", + "Namespace": "OpenAI", + "IsNullable": false, + "Usage": "Input", + "InheritedDictionaryType": { + "$id": "340", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "341", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$ref": "335" + }, + "IsNullable": false + }, + "Properties": [] } ], "IsNullable": false @@ -2493,12 +2532,12 @@ "IsReadOnly": false }, { - "$id": "338", + "$id": "342", "Name": "suffix", "SerializedName": "suffix", "Description": "The suffix that comes after a completion of inserted text.", "Type": { - "$id": "339", + "$id": "343", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2507,12 +2546,12 @@ "IsReadOnly": false }, { - "$id": "340", + "$id": "344", "Name": "temperature", "SerializedName": "temperature", "Description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "Type": { - "$id": "341", + "$id": "345", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2521,12 +2560,12 @@ "IsReadOnly": false }, { - "$id": "342", + "$id": "346", "Name": "top_p", "SerializedName": "top_p", "Description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers\nthe results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising\nthe top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "Type": { - "$id": "343", + "$id": "347", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2535,12 +2574,12 @@ "IsReadOnly": false }, { - "$id": "344", + "$id": "348", "Name": "n", "SerializedName": "n", "Description": "How many completions to generate for each prompt.\n**Note:** Because this parameter generates many completions, it can quickly consume your token\nquota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "Type": { - "$id": "345", + "$id": "349", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2549,12 +2588,12 @@ "IsReadOnly": false }, { - "$id": "346", + "$id": "350", "Name": "max_tokens", "SerializedName": "max_tokens", "Description": "The maximum number of [tokens](/tokenizer) to generate in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)\nfor counting tokens.", "Type": { - "$id": "347", + "$id": "351", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2563,32 +2602,23 @@ "IsReadOnly": false }, { - "$id": "348", + "$id": "352", "Name": "stop", "SerializedName": "stop", "Description": "Up to 4 sequences where the API will stop generating further tokens.", "Type": { - "$id": "349", + "$id": "353", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "350", + "$id": "354", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "351", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$id": "352", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsNullable": false + "$ref": "201" } ], "IsNullable": false @@ -2597,12 +2627,12 @@ "IsReadOnly": false }, { - "$id": "353", + "$id": "355", "Name": "presence_penalty", "SerializedName": "presence_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear\nin the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "354", + "$id": "356", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2611,12 +2641,12 @@ "IsReadOnly": false }, { - "$id": "355", + "$id": "357", "Name": "frequency_penalty", "SerializedName": "frequency_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing\nfrequency in the text so far, decreasing the model's likelihood to repeat the same line\nverbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "356", + "$id": "358", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2625,22 +2655,22 @@ "IsReadOnly": false }, { - "$id": "357", + "$id": "359", "Name": "logit_bias", "SerializedName": "logit_bias", "Description": "Modify the likelihood of specified tokens appearing in the completion.\nAccepts a json object that maps tokens (specified by their token ID in the tokenizer) to an\nassociated bias value from -100 to 100. Mathematically, the bias is added to the logits\ngenerated by the model prior to sampling. The exact effect will vary per model, but values\nbetween -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.", "Type": { - "$id": "358", + "$id": "360", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "359", + "$id": "361", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "360", + "$id": "362", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2651,12 +2681,12 @@ "IsReadOnly": false }, { - "$id": "361", + "$id": "363", "Name": "user", "SerializedName": "user", "Description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect\nabuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "Type": { - "$id": "362", + "$id": "364", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2665,12 +2695,12 @@ "IsReadOnly": false }, { - "$id": "363", + "$id": "365", "Name": "stream", "SerializedName": "stream", "Description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available, with the stream terminated by a `data: [DONE]` message.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).", "Type": { - "$id": "364", + "$id": "366", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -2679,12 +2709,12 @@ "IsReadOnly": false }, { - "$id": "365", + "$id": "367", "Name": "logprobs", "SerializedName": "logprobs", "Description": "Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens.\nFor example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The\nAPI will always return the `logprob` of the sampled token, so there may be up to `logprobs+1`\nelements in the response.\n\nThe maximum value for `logprobs` is 5.", "Type": { - "$id": "366", + "$id": "368", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2693,12 +2723,12 @@ "IsReadOnly": false }, { - "$id": "367", + "$id": "369", "Name": "echo", "SerializedName": "echo", "Description": "Echo back the prompt in addition to the completion", "Type": { - "$id": "368", + "$id": "370", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -2707,12 +2737,12 @@ "IsReadOnly": false }, { - "$id": "369", + "$id": "371", "Name": "best_of", "SerializedName": "best_of", "Description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest\nlog probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies\nhow many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token\nquota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "Type": { - "$id": "370", + "$id": "372", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2723,7 +2753,13 @@ ] }, { - "$id": "371", + "$ref": "335" + }, + { + "$ref": "339" + }, + { + "$id": "373", "Kind": "Model", "Name": "CreateCompletionResponse", "Namespace": "OpenAI", @@ -2732,12 +2768,12 @@ "Usage": "Output", "Properties": [ { - "$id": "372", + "$id": "374", "Name": "id", "SerializedName": "id", "Description": "A unique identifier for the completion.", "Type": { - "$id": "373", + "$id": "375", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2746,12 +2782,12 @@ "IsReadOnly": false }, { - "$id": "374", + "$id": "376", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `text_completion`.", "Type": { - "$id": "375", + "$id": "377", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2760,12 +2796,12 @@ "IsReadOnly": false }, { - "$id": "376", + "$id": "378", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the completion was created.", "Type": { - "$id": "377", + "$id": "379", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2774,12 +2810,12 @@ "IsReadOnly": false }, { - "$id": "378", + "$id": "380", "Name": "model", "SerializedName": "model", "Description": "The model used for the completion.", "Type": { - "$id": "379", + "$id": "381", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2788,16 +2824,16 @@ "IsReadOnly": false }, { - "$id": "380", + "$id": "382", "Name": "choices", "SerializedName": "choices", "Description": "The list of completion choices the model generated for the input.", "Type": { - "$id": "381", + "$id": "383", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "382", + "$id": "384", "Kind": "Model", "Name": "CreateCompletionResponseChoice", "Namespace": "OpenAI", @@ -2805,12 +2841,12 @@ "Usage": "Output", "Properties": [ { - "$id": "383", + "$id": "385", "Name": "index", "SerializedName": "index", "Description": "", "Type": { - "$id": "384", + "$id": "386", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2819,12 +2855,12 @@ "IsReadOnly": false }, { - "$id": "385", + "$id": "387", "Name": "text", "SerializedName": "text", "Description": "", "Type": { - "$id": "386", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2833,12 +2869,12 @@ "IsReadOnly": false }, { - "$id": "387", + "$id": "389", "Name": "logprobs", "SerializedName": "logprobs", "Description": "", "Type": { - "$id": "388", + "$id": "390", "Kind": "Model", "Name": "CreateCompletionResponseChoiceLogprobs", "Namespace": "", @@ -2846,16 +2882,16 @@ "Usage": "Output", "Properties": [ { - "$id": "389", + "$id": "391", "Name": "tokens", "SerializedName": "tokens", "Description": "", "Type": { - "$id": "390", + "$id": "392", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "391", + "$id": "393", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2866,16 +2902,16 @@ "IsReadOnly": false }, { - "$id": "392", + "$id": "394", "Name": "token_logprobs", "SerializedName": "token_logprobs", "Description": "", "Type": { - "$id": "393", + "$id": "395", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "394", + "$id": "396", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -2886,26 +2922,26 @@ "IsReadOnly": false }, { - "$id": "395", + "$id": "397", "Name": "top_logprobs", "SerializedName": "top_logprobs", "Description": "", "Type": { - "$id": "396", + "$id": "398", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "397", + "$id": "399", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "398", + "$id": "400", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "399", + "$id": "401", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2918,16 +2954,16 @@ "IsReadOnly": false }, { - "$id": "400", + "$id": "402", "Name": "text_offset", "SerializedName": "text_offset", "Description": "", "Type": { - "$id": "401", + "$id": "403", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "402", + "$id": "404", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2943,7 +2979,7 @@ "IsReadOnly": false }, { - "$id": "403", + "$id": "405", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, or `content_filter` if content was omitted\ndue to a flag from our content filters, `length` if the maximum number of tokens specified\nin the request was reached, or `content_filter` if content was omitted due to a flag from our\ncontent filters.", @@ -2961,12 +2997,12 @@ "IsReadOnly": false }, { - "$id": "404", + "$id": "406", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$ref": "242" + "$ref": "244" }, "IsRequired": false, "IsReadOnly": false @@ -2974,13 +3010,13 @@ ] }, { - "$ref": "382" + "$ref": "384" }, { - "$ref": "388" + "$ref": "390" }, { - "$id": "405", + "$id": "407", "Kind": "Model", "Name": "CreateEditRequest", "Namespace": "OpenAI", @@ -2988,7 +3024,7 @@ "Usage": "Input", "Properties": [ { - "$id": "406", + "$id": "408", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the `text-davinci-edit-001` or `code-davinci-edit-001`\nmodel with this endpoint.", @@ -2999,12 +3035,12 @@ "IsReadOnly": false }, { - "$id": "407", + "$id": "409", "Name": "input", "SerializedName": "input", "Description": "The input text to use as a starting point for the edit.", "Type": { - "$id": "408", + "$id": "410", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3013,12 +3049,12 @@ "IsReadOnly": false }, { - "$id": "409", + "$id": "411", "Name": "instruction", "SerializedName": "instruction", "Description": "The instruction that tells the model how to edit the prompt.", "Type": { - "$id": "410", + "$id": "412", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3027,12 +3063,12 @@ "IsReadOnly": false }, { - "$id": "411", + "$id": "413", "Name": "n", "SerializedName": "n", "Description": "How many edits to generate for the input and instruction.", "Type": { - "$id": "412", + "$id": "414", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3041,12 +3077,12 @@ "IsReadOnly": false }, { - "$id": "413", + "$id": "415", "Name": "temperature", "SerializedName": "temperature", "Description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "Type": { - "$id": "414", + "$id": "416", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3055,12 +3091,12 @@ "IsReadOnly": false }, { - "$id": "415", + "$id": "417", "Name": "top_p", "SerializedName": "top_p", "Description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers\nthe results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising\nthe top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "Type": { - "$id": "416", + "$id": "418", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3071,7 +3107,7 @@ ] }, { - "$id": "417", + "$id": "419", "Kind": "Model", "Name": "CreateEditResponse", "Namespace": "OpenAI", @@ -3080,12 +3116,12 @@ "Usage": "Output", "Properties": [ { - "$id": "418", + "$id": "420", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `edit`.", "Type": { - "$id": "419", + "$id": "421", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3098,12 +3134,12 @@ "IsReadOnly": false }, { - "$id": "420", + "$id": "422", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the edit was created.", "Type": { - "$id": "421", + "$id": "423", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3112,16 +3148,16 @@ "IsReadOnly": false }, { - "$id": "422", + "$id": "424", "Name": "choices", "SerializedName": "choices", "Description": "description: A list of edit choices. Can be more than one if `n` is greater than 1.", "Type": { - "$id": "423", + "$id": "425", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "424", + "$id": "426", "Kind": "Model", "Name": "CreateEditResponseChoice", "Namespace": "OpenAI", @@ -3129,12 +3165,12 @@ "Usage": "Output", "Properties": [ { - "$id": "425", + "$id": "427", "Name": "text", "SerializedName": "text", "Description": "The edited result.", "Type": { - "$id": "426", + "$id": "428", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3143,12 +3179,12 @@ "IsReadOnly": false }, { - "$id": "427", + "$id": "429", "Name": "index", "SerializedName": "index", "Description": "The index of the choice in the list of choices.", "Type": { - "$id": "428", + "$id": "430", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3157,7 +3193,7 @@ "IsReadOnly": false }, { - "$id": "429", + "$id": "431", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, or `length` if the maximum number of tokens\nspecified in the request was reached.", @@ -3175,12 +3211,12 @@ "IsReadOnly": false }, { - "$id": "430", + "$id": "432", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$ref": "242" + "$ref": "244" }, "IsRequired": true, "IsReadOnly": false @@ -3188,10 +3224,10 @@ ] }, { - "$ref": "424" + "$ref": "426" }, { - "$id": "431", + "$id": "433", "Kind": "Model", "Name": "CreateEmbeddingRequest", "Namespace": "OpenAI", @@ -3199,7 +3235,7 @@ "Usage": "Input", "Properties": [ { - "$id": "432", + "$id": "434", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", @@ -3210,27 +3246,27 @@ "IsReadOnly": false }, { - "$id": "433", + "$id": "435", "Name": "input", "SerializedName": "input", "Description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a\nsingle request, pass an array of strings or array of token arrays. Each input must not exceed\nthe max input tokens for the model (8191 tokens for `text-embedding-ada-002`) and cannot be an empty string.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)\nfor counting tokens.", "Type": { - "$id": "434", + "$id": "436", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "435", + "$id": "437", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "436", + "$id": "438", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "437", + "$id": "439", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3238,34 +3274,10 @@ "IsNullable": false }, { - "$id": "438", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$id": "439", - "Kind": "Primitive", - "Name": "SafeInt", - "IsNullable": false - }, - "IsNullable": false + "$ref": "335" }, { - "$id": "440", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$id": "441", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$id": "442", - "Kind": "Primitive", - "Name": "SafeInt", - "IsNullable": false - }, - "IsNullable": false - }, - "IsNullable": false + "$ref": "339" } ], "IsNullable": false @@ -3274,12 +3286,12 @@ "IsReadOnly": false }, { - "$id": "443", + "$id": "440", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "444", + "$id": "441", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3290,7 +3302,7 @@ ] }, { - "$id": "445", + "$id": "442", "Kind": "Model", "Name": "CreateEmbeddingResponse", "Namespace": "OpenAI", @@ -3298,12 +3310,12 @@ "Usage": "Output", "Properties": [ { - "$id": "446", + "$id": "443", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"embedding\".", "Type": { - "$id": "447", + "$id": "444", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3316,12 +3328,12 @@ "IsReadOnly": false }, { - "$id": "448", + "$id": "445", "Name": "model", "SerializedName": "model", "Description": "The name of the model used to generate the embedding.", "Type": { - "$id": "449", + "$id": "446", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3330,16 +3342,16 @@ "IsReadOnly": false }, { - "$id": "450", + "$id": "447", "Name": "data", "SerializedName": "data", "Description": "The list of embeddings generated by the model.", "Type": { - "$id": "451", + "$id": "448", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "452", + "$id": "449", "Kind": "Model", "Name": "Embedding", "Namespace": "OpenAI", @@ -3348,12 +3360,12 @@ "Usage": "Output", "Properties": [ { - "$id": "453", + "$id": "450", "Name": "index", "SerializedName": "index", "Description": "The index of the embedding in the list of embeddings.", "Type": { - "$id": "454", + "$id": "451", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3362,12 +3374,12 @@ "IsReadOnly": false }, { - "$id": "455", + "$id": "452", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"embedding\".", "Type": { - "$id": "456", + "$id": "453", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3380,16 +3392,16 @@ "IsReadOnly": false }, { - "$id": "457", + "$id": "454", "Name": "embedding", "SerializedName": "embedding", "Description": "The embedding vector, which is a list of floats. The length of vector depends on the model as\\\nlisted in the [embedding guide](/docs/guides/embeddings).", "Type": { - "$id": "458", + "$id": "455", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "459", + "$id": "456", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -3407,12 +3419,12 @@ "IsReadOnly": false }, { - "$id": "460", + "$id": "457", "Name": "usage", "SerializedName": "usage", "Description": "The usage information for the request.", "Type": { - "$id": "461", + "$id": "458", "Kind": "Model", "Name": "CreateEmbeddingResponseUsage", "Namespace": "OpenAI", @@ -3420,12 +3432,12 @@ "Usage": "Output", "Properties": [ { - "$id": "462", + "$id": "459", "Name": "prompt_tokens", "SerializedName": "prompt_tokens", "Description": "The number of tokens used by the prompt.", "Type": { - "$id": "463", + "$id": "460", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3434,12 +3446,12 @@ "IsReadOnly": false }, { - "$id": "464", + "$id": "461", "Name": "total_tokens", "SerializedName": "total_tokens", "Description": "The total number of tokens used by the request.", "Type": { - "$id": "465", + "$id": "462", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3455,13 +3467,13 @@ ] }, { - "$ref": "452" + "$ref": "449" }, { - "$ref": "461" + "$ref": "458" }, { - "$id": "466", + "$id": "463", "Kind": "Model", "Name": "ListFilesResponse", "Namespace": "OpenAI", @@ -3469,12 +3481,12 @@ "Usage": "Output", "Properties": [ { - "$id": "467", + "$id": "464", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "468", + "$id": "465", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3483,16 +3495,16 @@ "IsReadOnly": false }, { - "$id": "469", + "$id": "466", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "470", + "$id": "467", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "471", + "$id": "468", "Kind": "Model", "Name": "OpenAIFile", "Namespace": "OpenAI", @@ -3501,12 +3513,12 @@ "Usage": "Output", "Properties": [ { - "$id": "472", + "$id": "469", "Name": "id", "SerializedName": "id", "Description": "The file identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "473", + "$id": "470", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3515,12 +3527,12 @@ "IsReadOnly": false }, { - "$id": "474", + "$id": "471", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"file\".", "Type": { - "$id": "475", + "$id": "472", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3533,12 +3545,12 @@ "IsReadOnly": false }, { - "$id": "476", + "$id": "473", "Name": "bytes", "SerializedName": "bytes", "Description": "The size of the file in bytes.", "Type": { - "$id": "477", + "$id": "474", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3547,12 +3559,12 @@ "IsReadOnly": false }, { - "$id": "478", + "$id": "475", "Name": "createdAt", "SerializedName": "createdAt", "Description": "The Unix timestamp (in seconds) for when the file was created.", "Type": { - "$id": "479", + "$id": "476", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3561,12 +3573,12 @@ "IsReadOnly": false }, { - "$id": "480", + "$id": "477", "Name": "filename", "SerializedName": "filename", "Description": "The name of the file.", "Type": { - "$id": "481", + "$id": "478", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3575,12 +3587,12 @@ "IsReadOnly": false }, { - "$id": "482", + "$id": "479", "Name": "purpose", "SerializedName": "purpose", "Description": "The intended purpose of the file. Currently, only \"fine-tune\" is supported.", "Type": { - "$id": "483", + "$id": "480", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3589,7 +3601,7 @@ "IsReadOnly": false }, { - "$id": "484", + "$id": "481", "Name": "status", "SerializedName": "status", "Description": "The current status of the file, which can be either `uploaded`, `processed`, `pending`,\n`error`, `deleting` or `deleted`.", @@ -3600,12 +3612,12 @@ "IsReadOnly": false }, { - "$id": "485", + "$id": "482", "Name": "status_details", "SerializedName": "status_details", "Description": "Additional details about the status of the file. If the file is in the `error` state, this will\ninclude a message describing the error.", "Type": { - "$id": "486", + "$id": "483", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3623,10 +3635,10 @@ ] }, { - "$ref": "471" + "$ref": "468" }, { - "$id": "487", + "$id": "484", "Kind": "Model", "Name": "CreateFileRequest", "Namespace": "OpenAI", @@ -3634,12 +3646,12 @@ "Usage": "Input", "Properties": [ { - "$id": "488", + "$id": "485", "Name": "file", "SerializedName": "file", "Description": "Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.\n\nIf the `purpose` is set to \"fine-tune\", the file will be used for fine-tuning.", "Type": { - "$id": "489", + "$id": "486", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -3648,12 +3660,12 @@ "IsReadOnly": false }, { - "$id": "490", + "$id": "487", "Name": "purpose", "SerializedName": "purpose", "Description": "The intended purpose of the uploaded documents. Use \"fine-tune\" for\n[fine-tuning](/docs/api-reference/fine-tuning). This allows us to validate the format of the\nuploaded file.", "Type": { - "$id": "491", + "$id": "488", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3664,7 +3676,7 @@ ] }, { - "$id": "492", + "$id": "489", "Kind": "Model", "Name": "DeleteFileResponse", "Namespace": "OpenAI", @@ -3672,12 +3684,12 @@ "Usage": "Output", "Properties": [ { - "$id": "493", + "$id": "490", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "494", + "$id": "491", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3686,12 +3698,12 @@ "IsReadOnly": false }, { - "$id": "495", + "$id": "492", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "496", + "$id": "493", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3700,12 +3712,12 @@ "IsReadOnly": false }, { - "$id": "497", + "$id": "494", "Name": "deleted", "SerializedName": "deleted", "Description": "", "Type": { - "$id": "498", + "$id": "495", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -3716,7 +3728,7 @@ ] }, { - "$id": "499", + "$id": "496", "Kind": "Model", "Name": "CreateFineTuneRequest", "Namespace": "OpenAI", @@ -3724,12 +3736,12 @@ "Usage": "Input", "Properties": [ { - "$id": "500", + "$id": "497", "Name": "training_file", "SerializedName": "training_file", "Description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/upload) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file, where each training example is a JSON object\nwith the keys \"prompt\" and \"completion\". Additionally, you must upload your file with the\npurpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more\ndetails.", "Type": { - "$id": "501", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3738,12 +3750,12 @@ "IsReadOnly": false }, { - "$id": "502", + "$id": "499", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation metrics periodically during\nfine-tuning. These metrics can be viewed in the\n[fine-tuning results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).\nYour train and validation data should be mutually exclusive.\n\nYour dataset must be formatted as a JSONL file, where each validation example is a JSON object\nwith the keys \"prompt\" and \"completion\". Additionally, you must upload your file with the\npurpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more\ndetails.", "Type": { - "$id": "503", + "$id": "500", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3752,7 +3764,7 @@ "IsReadOnly": false }, { - "$id": "504", + "$id": "501", "Name": "model", "SerializedName": "model", "Description": "The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\",\n\"davinci\", or a fine-tuned model created after 2022-04-21 and before 2023-08-22. To learn more\nabout these models, see the [Models](/docs/models) documentation.", @@ -3763,12 +3775,12 @@ "IsReadOnly": false }, { - "$id": "505", + "$id": "502", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "506", + "$id": "503", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3777,12 +3789,12 @@ "IsReadOnly": false }, { - "$id": "507", + "$id": "504", "Name": "batch_size", "SerializedName": "batch_size", "Description": "The batch size to use for training. The batch size is the number of training examples used to\ntrain a single forward and backward pass.\n\nBy default, the batch size will be dynamically configured to be ~0.2% of the number of examples\nin the training set, capped at 256 - in general, we've found that larger batch sizes tend to\nwork better for larger datasets.", "Type": { - "$id": "508", + "$id": "505", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3791,12 +3803,12 @@ "IsReadOnly": false }, { - "$id": "509", + "$id": "506", "Name": "learning_rate_multiplier", "SerializedName": "learning_rate_multiplier", "Description": "The learning rate multiplier to use for training. The fine-tuning learning rate is the original\nlearning rate used for pretraining multiplied by this value.\n\nBy default, the learning rate multiplier is the 0.05, 0.1, or 0.2 depending on final\n`batch_size` (larger learning rates tend to perform better with larger batch sizes). We\nrecommend experimenting with values in the range 0.02 to 0.2 to see what produces the best\nresults.", "Type": { - "$id": "510", + "$id": "507", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3805,12 +3817,12 @@ "IsReadOnly": false }, { - "$id": "511", + "$id": "508", "Name": "prompt_loss_rate", "SerializedName": "prompt_loss_rate", "Description": "The weight to use for loss on the prompt tokens. This controls how much the model tries to\nlearn to generate the prompt (as compared to the completion which always has a weight of 1.0),\nand can add a stabilizing effect to training when completions are short.\n\nIf prompts are extremely long (relative to completions), it may make sense to reduce this\nweight so as to avoid over-prioritizing learning the prompt.", "Type": { - "$id": "512", + "$id": "509", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3819,12 +3831,12 @@ "IsReadOnly": false }, { - "$id": "513", + "$id": "510", "Name": "compute_classification_metrics", "SerializedName": "compute_classification_metrics", "Description": "If set, we calculate classification-specific metrics such as accuracy and F-1 score using the\nvalidation set at the end of every epoch. These metrics can be viewed in the\n[results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).\n\nIn order to compute classification metrics, you must provide a `validation_file`. Additionally,\nyou must specify `classification_n_classes` for multiclass classification or\n`classification_positive_class` for binary classification.", "Type": { - "$id": "514", + "$id": "511", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -3833,12 +3845,12 @@ "IsReadOnly": false }, { - "$id": "515", + "$id": "512", "Name": "classification_n_classes", "SerializedName": "classification_n_classes", "Description": "The number of classes in a classification task.\n\nThis parameter is required for multiclass classification.", "Type": { - "$id": "516", + "$id": "513", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3847,12 +3859,12 @@ "IsReadOnly": false }, { - "$id": "517", + "$id": "514", "Name": "classification_positive_class", "SerializedName": "classification_positive_class", "Description": "The positive class in binary classification.\n\nThis parameter is needed to generate precision, recall, and F1 metrics when doing binary\nclassification.", "Type": { - "$id": "518", + "$id": "515", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3861,16 +3873,16 @@ "IsReadOnly": false }, { - "$id": "519", + "$id": "516", "Name": "classification_betas", "SerializedName": "classification_betas", "Description": "If this is provided, we calculate F-beta scores at the specified beta values. The F-beta score\nis a generalization of F-1 score. This is only used for binary classification.\n\nWith a beta of 1 (i.e. the F-1 score), precision and recall are given the same weight. A larger\nbeta score puts more weight on recall and less on precision. A smaller beta score puts more\nweight on precision and less on recall.", "Type": { - "$id": "520", + "$id": "517", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "521", + "$id": "518", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -3881,12 +3893,12 @@ "IsReadOnly": false }, { - "$id": "522", + "$id": "519", "Name": "suffix", "SerializedName": "suffix", "Description": "A string of up to 18 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like\n`ada:ft-your-org:custom-model-name-2022-02-15-04-21-04`.", "Type": { - "$id": "523", + "$id": "520", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3897,7 +3909,7 @@ ] }, { - "$id": "524", + "$id": "521", "Kind": "Model", "Name": "FineTune", "Namespace": "OpenAI", @@ -3907,12 +3919,12 @@ "Usage": "Output", "Properties": [ { - "$id": "525", + "$id": "522", "Name": "id", "SerializedName": "id", "Description": "The object identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "526", + "$id": "523", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3921,12 +3933,12 @@ "IsReadOnly": false }, { - "$id": "527", + "$id": "524", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"fine-tune\".", "Type": { - "$id": "528", + "$id": "525", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3939,12 +3951,12 @@ "IsReadOnly": false }, { - "$id": "529", + "$id": "526", "Name": "created_at", "SerializedName": "created_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "Type": { - "$id": "530", + "$id": "527", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3953,12 +3965,12 @@ "IsReadOnly": false }, { - "$id": "531", + "$id": "528", "Name": "updated_at", "SerializedName": "updated_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was last updated.", "Type": { - "$id": "532", + "$id": "529", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3967,12 +3979,12 @@ "IsReadOnly": false }, { - "$id": "533", + "$id": "530", "Name": "model", "SerializedName": "model", "Description": "The base model that is being fine-tuned.", "Type": { - "$id": "534", + "$id": "531", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3981,12 +3993,12 @@ "IsReadOnly": false }, { - "$id": "535", + "$id": "532", "Name": "fine_tuned_model", "SerializedName": "fine_tuned_model", "Description": "The name of the fine-tuned model that is being created.", "Type": { - "$id": "536", + "$id": "533", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3995,12 +4007,12 @@ "IsReadOnly": false }, { - "$id": "537", + "$id": "534", "Name": "organization_id", "SerializedName": "organization_id", "Description": "The organization that owns the fine-tuning job.", "Type": { - "$id": "538", + "$id": "535", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4009,7 +4021,7 @@ "IsReadOnly": false }, { - "$id": "539", + "$id": "536", "Name": "status", "SerializedName": "status", "Description": "The current status of the fine-tuning job, which can be either `created`, `running`,\n`succeeded`, `failed`, or `cancelled`.", @@ -4020,12 +4032,12 @@ "IsReadOnly": false }, { - "$id": "540", + "$id": "537", "Name": "hyperparams", "SerializedName": "hyperparams", "Description": "The hyperparameters used for the fine-tuning job. See the\n[fine-tuning guide](/docs/guides/legacy-fine-tuning/hyperparameters) for more details.", "Type": { - "$id": "541", + "$id": "538", "Kind": "Model", "Name": "FineTuneHyperparams", "Namespace": "OpenAI", @@ -4033,12 +4045,12 @@ "Usage": "Output", "Properties": [ { - "$id": "542", + "$id": "539", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "543", + "$id": "540", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4047,12 +4059,12 @@ "IsReadOnly": false }, { - "$id": "544", + "$id": "541", "Name": "batch_size", "SerializedName": "batch_size", "Description": "The batch size to use for training. The batch size is the number of training examples used to\ntrain a single forward and backward pass.", "Type": { - "$id": "545", + "$id": "542", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4061,12 +4073,12 @@ "IsReadOnly": false }, { - "$id": "546", + "$id": "543", "Name": "prompt_loss_weight", "SerializedName": "prompt_loss_weight", "Description": "The weight to use for loss on the prompt tokens.", "Type": { - "$id": "547", + "$id": "544", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4075,12 +4087,12 @@ "IsReadOnly": false }, { - "$id": "548", + "$id": "545", "Name": "learning_rate_multiplier", "SerializedName": "learning_rate_multiplier", "Description": "The learning rate multiplier to use for training.", "Type": { - "$id": "549", + "$id": "546", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4089,12 +4101,12 @@ "IsReadOnly": false }, { - "$id": "550", + "$id": "547", "Name": "compute_classification_metrics", "SerializedName": "compute_classification_metrics", "Description": "The classification metrics to compute using the validation dataset at the end of every epoch.", "Type": { - "$id": "551", + "$id": "548", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4103,12 +4115,12 @@ "IsReadOnly": false }, { - "$id": "552", + "$id": "549", "Name": "classification_positive_class", "SerializedName": "classification_positive_class", "Description": "The positive class to use for computing classification metrics.", "Type": { - "$id": "553", + "$id": "550", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4117,12 +4129,12 @@ "IsReadOnly": false }, { - "$id": "554", + "$id": "551", "Name": "classification_n_classes", "SerializedName": "classification_n_classes", "Description": "The number of classes to use for computing classification metrics.", "Type": { - "$id": "555", + "$id": "552", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4136,16 +4148,16 @@ "IsReadOnly": false }, { - "$id": "556", + "$id": "553", "Name": "training_files", "SerializedName": "training_files", "Description": "The list of files used for training.", "Type": { - "$id": "557", + "$id": "554", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "471" + "$ref": "468" }, "IsNullable": false }, @@ -4153,16 +4165,16 @@ "IsReadOnly": false }, { - "$id": "558", + "$id": "555", "Name": "validation_files", "SerializedName": "validation_files", "Description": "The list of files used for validation.", "Type": { - "$id": "559", + "$id": "556", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "471" + "$ref": "468" }, "IsNullable": false }, @@ -4170,16 +4182,16 @@ "IsReadOnly": false }, { - "$id": "560", + "$id": "557", "Name": "result_files", "SerializedName": "result_files", "Description": "The compiled results files for the fine-tuning job.", "Type": { - "$id": "561", + "$id": "558", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "471" + "$ref": "468" }, "IsNullable": false }, @@ -4187,16 +4199,16 @@ "IsReadOnly": false }, { - "$id": "562", + "$id": "559", "Name": "events", "SerializedName": "events", "Description": "The list of events that have been observed in the lifecycle of the FineTune job.", "Type": { - "$id": "563", + "$id": "560", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "564", + "$id": "561", "Kind": "Model", "Name": "FineTuneEvent", "Namespace": "OpenAI", @@ -4204,12 +4216,12 @@ "Usage": "Output", "Properties": [ { - "$id": "565", + "$id": "562", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "566", + "$id": "563", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4218,12 +4230,12 @@ "IsReadOnly": false }, { - "$id": "567", + "$id": "564", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "568", + "$id": "565", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4232,12 +4244,12 @@ "IsReadOnly": false }, { - "$id": "569", + "$id": "566", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "570", + "$id": "567", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4246,12 +4258,12 @@ "IsReadOnly": false }, { - "$id": "571", + "$id": "568", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "572", + "$id": "569", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4269,13 +4281,13 @@ ] }, { - "$ref": "541" + "$ref": "538" }, { - "$ref": "564" + "$ref": "561" }, { - "$id": "573", + "$id": "570", "Kind": "Model", "Name": "ListFineTunesResponse", "Namespace": "OpenAI", @@ -4283,12 +4295,12 @@ "Usage": "Output", "Properties": [ { - "$id": "574", + "$id": "571", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "575", + "$id": "572", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4297,16 +4309,16 @@ "IsReadOnly": false }, { - "$id": "576", + "$id": "573", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "577", + "$id": "574", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "524" + "$ref": "521" }, "IsNullable": false }, @@ -4316,7 +4328,7 @@ ] }, { - "$id": "578", + "$id": "575", "Kind": "Model", "Name": "ListFineTuneEventsResponse", "Namespace": "OpenAI", @@ -4324,12 +4336,12 @@ "Usage": "Output", "Properties": [ { - "$id": "579", + "$id": "576", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "580", + "$id": "577", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4338,16 +4350,16 @@ "IsReadOnly": false }, { - "$id": "581", + "$id": "578", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "582", + "$id": "579", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "564" + "$ref": "561" }, "IsNullable": false }, @@ -4357,7 +4369,7 @@ ] }, { - "$id": "583", + "$id": "580", "Kind": "Model", "Name": "ListModelsResponse", "Namespace": "OpenAI", @@ -4365,12 +4377,12 @@ "Usage": "Output", "Properties": [ { - "$id": "584", + "$id": "581", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "585", + "$id": "582", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4379,16 +4391,16 @@ "IsReadOnly": false }, { - "$id": "586", + "$id": "583", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "587", + "$id": "584", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "588", + "$id": "585", "Kind": "Model", "Name": "Model", "Namespace": "OpenAI", @@ -4397,12 +4409,12 @@ "Usage": "Output", "Properties": [ { - "$id": "589", + "$id": "586", "Name": "id", "SerializedName": "id", "Description": "The model identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "590", + "$id": "587", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4411,12 +4423,12 @@ "IsReadOnly": false }, { - "$id": "591", + "$id": "588", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"model\".", "Type": { - "$id": "592", + "$id": "589", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -4429,12 +4441,12 @@ "IsReadOnly": false }, { - "$id": "593", + "$id": "590", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) when the model was created.", "Type": { - "$id": "594", + "$id": "591", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4443,12 +4455,12 @@ "IsReadOnly": false }, { - "$id": "595", + "$id": "592", "Name": "owned_by", "SerializedName": "owned_by", "Description": "The organization that owns the model.", "Type": { - "$id": "596", + "$id": "593", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4466,10 +4478,10 @@ ] }, { - "$ref": "588" + "$ref": "585" }, { - "$id": "597", + "$id": "594", "Kind": "Model", "Name": "DeleteModelResponse", "Namespace": "OpenAI", @@ -4477,12 +4489,12 @@ "Usage": "Output", "Properties": [ { - "$id": "598", + "$id": "595", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "599", + "$id": "596", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4491,12 +4503,12 @@ "IsReadOnly": false }, { - "$id": "600", + "$id": "597", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "601", + "$id": "598", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4505,12 +4517,12 @@ "IsReadOnly": false }, { - "$id": "602", + "$id": "599", "Name": "deleted", "SerializedName": "deleted", "Description": "", "Type": { - "$id": "603", + "$id": "600", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4521,7 +4533,7 @@ ] }, { - "$id": "604", + "$id": "601", "Kind": "Model", "Name": "CreateImageRequest", "Namespace": "OpenAI", @@ -4529,12 +4541,12 @@ "Usage": "Input", "Properties": [ { - "$id": "605", + "$id": "602", "Name": "prompt", "SerializedName": "prompt", "Description": "A text description of the desired image(s). The maximum length is 1000 characters.", "Type": { - "$id": "606", + "$id": "603", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4543,12 +4555,12 @@ "IsReadOnly": false }, { - "$id": "607", + "$id": "604", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "608", + "$id": "605", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4557,7 +4569,7 @@ "IsReadOnly": false }, { - "$id": "609", + "$id": "606", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -4568,7 +4580,7 @@ "IsReadOnly": false }, { - "$id": "610", + "$id": "607", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -4579,12 +4591,12 @@ "IsReadOnly": false }, { - "$id": "611", + "$id": "608", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "612", + "$id": "609", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4595,7 +4607,7 @@ ] }, { - "$id": "613", + "$id": "610", "Kind": "Model", "Name": "ImagesResponse", "Namespace": "OpenAI", @@ -4603,12 +4615,12 @@ "Usage": "Output", "Properties": [ { - "$id": "614", + "$id": "611", "Name": "created", "SerializedName": "created", "Description": "", "Type": { - "$id": "615", + "$id": "612", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4617,16 +4629,16 @@ "IsReadOnly": false }, { - "$id": "616", + "$id": "613", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "617", + "$id": "614", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "618", + "$id": "615", "Kind": "Model", "Name": "Image", "Namespace": "OpenAI", @@ -4635,12 +4647,12 @@ "Usage": "Output", "Properties": [ { - "$id": "619", + "$id": "616", "Name": "url", "SerializedName": "url", "Description": "The URL of the generated image, if `response_format` is `url` (default).", "Type": { - "$id": "620", + "$id": "617", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -4649,12 +4661,12 @@ "IsReadOnly": false }, { - "$id": "621", + "$id": "618", "Name": "b64_json", "SerializedName": "b64_json", "Description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", "Type": { - "$id": "622", + "$id": "619", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4672,10 +4684,10 @@ ] }, { - "$ref": "618" + "$ref": "615" }, { - "$id": "623", + "$id": "620", "Kind": "Model", "Name": "CreateImageEditRequest", "Namespace": "OpenAI", @@ -4683,12 +4695,12 @@ "Usage": "Input", "Properties": [ { - "$id": "624", + "$id": "621", "Name": "prompt", "SerializedName": "prompt", "Description": "A text description of the desired image(s). The maximum length is 1000 characters.", "Type": { - "$id": "625", + "$id": "622", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4697,12 +4709,12 @@ "IsReadOnly": false }, { - "$id": "626", + "$id": "623", "Name": "image", "SerializedName": "image", "Description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not\nprovided, image must have transparency, which will be used as the mask.", "Type": { - "$id": "627", + "$id": "624", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4711,12 +4723,12 @@ "IsReadOnly": false }, { - "$id": "628", + "$id": "625", "Name": "mask", "SerializedName": "mask", "Description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where\n`image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions\nas `image`.", "Type": { - "$id": "629", + "$id": "626", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4725,12 +4737,12 @@ "IsReadOnly": false }, { - "$id": "630", + "$id": "627", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "631", + "$id": "628", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4739,7 +4751,7 @@ "IsReadOnly": false }, { - "$id": "632", + "$id": "629", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -4750,7 +4762,7 @@ "IsReadOnly": false }, { - "$id": "633", + "$id": "630", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -4761,12 +4773,12 @@ "IsReadOnly": false }, { - "$id": "634", + "$id": "631", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "635", + "$id": "632", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4777,7 +4789,7 @@ ] }, { - "$id": "636", + "$id": "633", "Kind": "Model", "Name": "CreateImageVariationRequest", "Namespace": "OpenAI", @@ -4785,12 +4797,12 @@ "Usage": "Input", "Properties": [ { - "$id": "637", + "$id": "634", "Name": "image", "SerializedName": "image", "Description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB,\nand square.", "Type": { - "$id": "638", + "$id": "635", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4799,12 +4811,12 @@ "IsReadOnly": false }, { - "$id": "639", + "$id": "636", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "640", + "$id": "637", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4813,7 +4825,7 @@ "IsReadOnly": false }, { - "$id": "641", + "$id": "638", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -4824,7 +4836,7 @@ "IsReadOnly": false }, { - "$id": "642", + "$id": "639", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -4835,12 +4847,12 @@ "IsReadOnly": false }, { - "$id": "643", + "$id": "640", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "644", + "$id": "641", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4851,7 +4863,7 @@ ] }, { - "$id": "645", + "$id": "642", "Kind": "Model", "Name": "CreateModerationRequest", "Namespace": "OpenAI", @@ -4859,27 +4871,27 @@ "Usage": "Input", "Properties": [ { - "$id": "646", + "$id": "643", "Name": "input", "SerializedName": "input", "Description": "The input text to classify", "Type": { - "$id": "647", + "$id": "644", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "648", + "$id": "645", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "649", + "$id": "646", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "650", + "$id": "647", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4893,7 +4905,7 @@ "IsReadOnly": false }, { - "$id": "651", + "$id": "648", "Name": "model", "SerializedName": "model", "Description": "Two content moderations models are available: `text-moderation-stable` and\n`text-moderation-latest`. The default is `text-moderation-latest` which will be automatically\nupgraded over time. This ensures you are always using our most accurate model. If you use\n`text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy\nof `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", @@ -4906,7 +4918,7 @@ ] }, { - "$id": "652", + "$id": "649", "Kind": "Model", "Name": "CreateModerationResponse", "Namespace": "OpenAI", @@ -4914,12 +4926,12 @@ "Usage": "Output", "Properties": [ { - "$id": "653", + "$id": "650", "Name": "id", "SerializedName": "id", "Description": "The unique identifier for the moderation request.", "Type": { - "$id": "654", + "$id": "651", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4928,12 +4940,12 @@ "IsReadOnly": false }, { - "$id": "655", + "$id": "652", "Name": "model", "SerializedName": "model", "Description": "The model used to generate the moderation results.", "Type": { - "$id": "656", + "$id": "653", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4942,16 +4954,16 @@ "IsReadOnly": false }, { - "$id": "657", + "$id": "654", "Name": "results", "SerializedName": "results", "Description": "A list of moderation objects.", "Type": { - "$id": "658", + "$id": "655", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "659", + "$id": "656", "Kind": "Model", "Name": "CreateModerationResponseResult", "Namespace": "OpenAI", @@ -4959,12 +4971,12 @@ "Usage": "Output", "Properties": [ { - "$id": "660", + "$id": "657", "Name": "flagged", "SerializedName": "flagged", "Description": "Whether the content violates [OpenAI's usage policies](/policies/usage-policies).", "Type": { - "$id": "661", + "$id": "658", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4973,12 +4985,12 @@ "IsReadOnly": false }, { - "$id": "662", + "$id": "659", "Name": "categories", "SerializedName": "categories", "Description": "A list of the categories, and whether they are flagged or not.", "Type": { - "$id": "663", + "$id": "660", "Kind": "Model", "Name": "CreateModerationResponseResultCategories", "Namespace": "OpenAI", @@ -4986,12 +4998,12 @@ "Usage": "Output", "Properties": [ { - "$id": "664", + "$id": "661", "Name": "hate", "SerializedName": "hate", "Description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity,\nreligion, nationality, sexual orientation, disability status, or caste. Hateful content\naimed at non-protected groups (e.g., chess players) is harrassment.", "Type": { - "$id": "665", + "$id": "662", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5000,12 +5012,12 @@ "IsReadOnly": false }, { - "$id": "666", + "$id": "663", "Name": "hate/threatening", "SerializedName": "hate/threatening", "Description": "Hateful content that also includes violence or serious harm towards the targeted group\nbased on race, gender, ethnicity, religion, nationality, sexual orientation, disability\nstatus, or caste.", "Type": { - "$id": "667", + "$id": "664", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5014,12 +5026,12 @@ "IsReadOnly": false }, { - "$id": "668", + "$id": "665", "Name": "harassment", "SerializedName": "harassment", "Description": "Content that expresses, incites, or promotes harassing language towards any target.", "Type": { - "$id": "669", + "$id": "666", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5028,12 +5040,12 @@ "IsReadOnly": false }, { - "$id": "670", + "$id": "667", "Name": "harassment/threatening", "SerializedName": "harassment/threatening", "Description": "Harassment content that also includes violence or serious harm towards any target.", "Type": { - "$id": "671", + "$id": "668", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5042,12 +5054,12 @@ "IsReadOnly": false }, { - "$id": "672", + "$id": "669", "Name": "self-harm", "SerializedName": "self-harm", "Description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting,\nand eating disorders.", "Type": { - "$id": "673", + "$id": "670", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5056,12 +5068,12 @@ "IsReadOnly": false }, { - "$id": "674", + "$id": "671", "Name": "self-harm/intent", "SerializedName": "self-harm/intent", "Description": "Content where the speaker expresses that they are engaging or intend to engage in acts of\nself-harm, such as suicide, cutting, and eating disorders.", "Type": { - "$id": "675", + "$id": "672", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5070,12 +5082,12 @@ "IsReadOnly": false }, { - "$id": "676", + "$id": "673", "Name": "self-harm/instructive", "SerializedName": "self-harm/instructive", "Description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating\ndisorders, or that gives instructions or advice on how to commit such acts.", "Type": { - "$id": "677", + "$id": "674", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5084,12 +5096,12 @@ "IsReadOnly": false }, { - "$id": "678", + "$id": "675", "Name": "sexual", "SerializedName": "sexual", "Description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or\nthat promotes sexual services (excluding sex education and wellness).", "Type": { - "$id": "679", + "$id": "676", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5098,12 +5110,12 @@ "IsReadOnly": false }, { - "$id": "680", + "$id": "677", "Name": "sexual/minors", "SerializedName": "sexual/minors", "Description": "Sexual content that includes an individual who is under 18 years old.", "Type": { - "$id": "681", + "$id": "678", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5112,12 +5124,12 @@ "IsReadOnly": false }, { - "$id": "682", + "$id": "679", "Name": "violence", "SerializedName": "violence", "Description": "Content that depicts death, violence, or physical injury.", "Type": { - "$id": "683", + "$id": "680", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5126,12 +5138,12 @@ "IsReadOnly": false }, { - "$id": "684", + "$id": "681", "Name": "violence/graphic", "SerializedName": "violence/graphic", "Description": "Content that depicts death, violence, or physical injury in graphic detail.", "Type": { - "$id": "685", + "$id": "682", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5145,12 +5157,12 @@ "IsReadOnly": false }, { - "$id": "686", + "$id": "683", "Name": "category_scores", "SerializedName": "category_scores", "Description": "A list of the categories along with their scores as predicted by model.", "Type": { - "$id": "687", + "$id": "684", "Kind": "Model", "Name": "CreateModerationResponseResultCategoryScores", "Namespace": "OpenAI", @@ -5158,12 +5170,12 @@ "Usage": "Output", "Properties": [ { - "$id": "688", + "$id": "685", "Name": "hate", "SerializedName": "hate", "Description": "The score for the category 'hate'.", "Type": { - "$id": "689", + "$id": "686", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5172,12 +5184,12 @@ "IsReadOnly": false }, { - "$id": "690", + "$id": "687", "Name": "hate/threatening", "SerializedName": "hate/threatening", "Description": "The score for the category 'hate/threatening'.", "Type": { - "$id": "691", + "$id": "688", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5186,12 +5198,12 @@ "IsReadOnly": false }, { - "$id": "692", + "$id": "689", "Name": "harassment", "SerializedName": "harassment", "Description": "The score for the category 'harassment'.", "Type": { - "$id": "693", + "$id": "690", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5200,12 +5212,12 @@ "IsReadOnly": false }, { - "$id": "694", + "$id": "691", "Name": "harassment/threatening", "SerializedName": "harassment/threatening", "Description": "The score for the category 'harassment/threatening'.", "Type": { - "$id": "695", + "$id": "692", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5214,12 +5226,12 @@ "IsReadOnly": false }, { - "$id": "696", + "$id": "693", "Name": "self-harm", "SerializedName": "self-harm", "Description": "The score for the category 'self-harm'.", "Type": { - "$id": "697", + "$id": "694", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5228,12 +5240,12 @@ "IsReadOnly": false }, { - "$id": "698", + "$id": "695", "Name": "self-harm/intent", "SerializedName": "self-harm/intent", "Description": "The score for the category 'self-harm/intent'.", "Type": { - "$id": "699", + "$id": "696", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5242,12 +5254,12 @@ "IsReadOnly": false }, { - "$id": "700", + "$id": "697", "Name": "self-harm/instructive", "SerializedName": "self-harm/instructive", "Description": "The score for the category 'self-harm/instructive'.", "Type": { - "$id": "701", + "$id": "698", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5256,12 +5268,12 @@ "IsReadOnly": false }, { - "$id": "702", + "$id": "699", "Name": "sexual", "SerializedName": "sexual", "Description": "The score for the category 'sexual'.", "Type": { - "$id": "703", + "$id": "700", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5270,12 +5282,12 @@ "IsReadOnly": false }, { - "$id": "704", + "$id": "701", "Name": "sexual/minors", "SerializedName": "sexual/minors", "Description": "The score for the category 'sexual/minors'.", "Type": { - "$id": "705", + "$id": "702", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5284,12 +5296,12 @@ "IsReadOnly": false }, { - "$id": "706", + "$id": "703", "Name": "violence", "SerializedName": "violence", "Description": "The score for the category 'violence'.", "Type": { - "$id": "707", + "$id": "704", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5298,12 +5310,12 @@ "IsReadOnly": false }, { - "$id": "708", + "$id": "705", "Name": "violence/graphic", "SerializedName": "violence/graphic", "Description": "The score for the category 'violence/graphic'.", "Type": { - "$id": "709", + "$id": "706", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5326,16 +5338,16 @@ ] }, { - "$ref": "659" + "$ref": "656" }, { - "$ref": "663" + "$ref": "660" }, { - "$ref": "687" + "$ref": "684" }, { - "$id": "710", + "$id": "707", "Kind": "Model", "Name": "ErrorResponse", "Namespace": "OpenAI", @@ -5343,12 +5355,12 @@ "Usage": "Output", "Properties": [ { - "$id": "711", + "$id": "708", "Name": "error", "SerializedName": "error", "Description": "", "Type": { - "$id": "712", + "$id": "709", "Kind": "Model", "Name": "Error", "Namespace": "OpenAI", @@ -5356,12 +5368,12 @@ "Usage": "Output", "Properties": [ { - "$id": "713", + "$id": "710", "Name": "type", "SerializedName": "type", "Description": "", "Type": { - "$id": "714", + "$id": "711", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5370,12 +5382,12 @@ "IsReadOnly": false }, { - "$id": "715", + "$id": "712", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "716", + "$id": "713", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5384,12 +5396,12 @@ "IsReadOnly": false }, { - "$id": "717", + "$id": "714", "Name": "param", "SerializedName": "param", "Description": "", "Type": { - "$id": "718", + "$id": "715", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -5398,12 +5410,12 @@ "IsReadOnly": false }, { - "$id": "719", + "$id": "716", "Name": "code", "SerializedName": "code", "Description": "", "Type": { - "$id": "720", + "$id": "717", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -5419,10 +5431,10 @@ ] }, { - "$ref": "712" + "$ref": "709" }, { - "$id": "721", + "$id": "718", "Kind": "Model", "Name": "FineTuningEvent", "Namespace": "OpenAI", @@ -5430,12 +5442,12 @@ "Usage": "None", "Properties": [ { - "$id": "722", + "$id": "719", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "723", + "$id": "720", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5444,12 +5456,12 @@ "IsReadOnly": false }, { - "$id": "724", + "$id": "721", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "725", + "$id": "722", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -5458,12 +5470,12 @@ "IsReadOnly": false }, { - "$id": "726", + "$id": "723", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "727", + "$id": "724", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5472,12 +5484,12 @@ "IsReadOnly": false }, { - "$id": "728", + "$id": "725", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "729", + "$id": "726", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5486,22 +5498,22 @@ "IsReadOnly": false }, { - "$id": "730", + "$id": "727", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "731", + "$id": "728", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "732", + "$id": "729", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "733", + "$id": "730", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -5512,7 +5524,7 @@ "IsReadOnly": false }, { - "$id": "734", + "$id": "731", "Name": "type", "SerializedName": "type", "Description": "", @@ -5527,44 +5539,44 @@ ], "Clients": [ { - "$id": "735", + "$id": "732", "Name": "OpenAIClient", "Description": "", "Operations": [], "Protocol": { - "$id": "736" + "$id": "733" }, "Creatable": true }, { - "$id": "737", + "$id": "734", "Name": "Audio", "Description": "", "Operations": [], "Protocol": { - "$id": "738" + "$id": "735" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "739", + "$id": "736", "Name": "AudioTranscriptions", "Description": "", "Operations": [ { - "$id": "740", + "$id": "737", "Name": "create", "ResourceName": "Transcriptions", "Summary": "Transcribes audio into the input language.", "Parameters": [ { - "$id": "741", + "$id": "738", "Name": "host", "NameInRequest": "host", "Description": "OpenAI Endpoint", "Type": { - "$id": "742", + "$id": "739", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5579,9 +5591,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "743", + "$id": "740", "Type": { - "$id": "744", + "$id": "741", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5590,15 +5602,15 @@ } }, { - "$id": "745", + "$id": "742", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "746", + "$id": "743", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "747", + "$id": "744", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5608,9 +5620,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "748", + "$id": "745", "Type": { - "$ref": "746" + "$ref": "743" }, "Value": "multipart/form-data" }, @@ -5624,7 +5636,7 @@ "Kind": "Constant" }, { - "$id": "749", + "$id": "746", "Name": "audio", "NameInRequest": "audio", "Type": { @@ -5641,11 +5653,11 @@ "Kind": "Method" }, { - "$id": "750", + "$id": "747", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "751", + "$id": "748", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5660,9 +5672,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "752", + "$id": "749", "Type": { - "$ref": "751" + "$ref": "748" }, "Value": "application/json" } @@ -5670,7 +5682,7 @@ ], "Responses": [ { - "$id": "753", + "$id": "750", "StatusCodes": [ 200 ], @@ -5698,35 +5710,35 @@ } ], "Protocol": { - "$id": "754" + "$id": "751" }, "Creatable": false, "Parent": "Audio" }, { - "$id": "755", + "$id": "752", "Name": "AudioTranslations", "Description": "", "Operations": [ { - "$id": "756", + "$id": "753", "Name": "create", "ResourceName": "Translations", "Summary": "Transcribes audio into the input language.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "757", + "$id": "754", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "758", + "$id": "755", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "759", + "$id": "756", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5736,9 +5748,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "760", + "$id": "757", "Type": { - "$ref": "758" + "$ref": "755" }, "Value": "multipart/form-data" }, @@ -5752,7 +5764,7 @@ "Kind": "Constant" }, { - "$id": "761", + "$id": "758", "Name": "audio", "NameInRequest": "audio", "Type": { @@ -5769,11 +5781,11 @@ "Kind": "Method" }, { - "$id": "762", + "$id": "759", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "763", + "$id": "760", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5788,9 +5800,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "764", + "$id": "761", "Type": { - "$ref": "763" + "$ref": "760" }, "Value": "application/json" } @@ -5798,7 +5810,7 @@ ], "Responses": [ { - "$id": "765", + "$id": "762", "StatusCodes": [ 200 ], @@ -5826,37 +5838,37 @@ } ], "Protocol": { - "$id": "766" + "$id": "763" }, "Creatable": false, "Parent": "Audio" }, { - "$id": "767", + "$id": "764", "Name": "Chat", "Description": "", "Operations": [], "Protocol": { - "$id": "768" + "$id": "765" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "769", + "$id": "766", "Name": "ChatCompletions", "Description": "", "Operations": [ { - "$id": "770", + "$id": "767", "Name": "create", "ResourceName": "Completions", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "771", + "$id": "768", "Name": "CreateChatCompletionRequest", "NameInRequest": "CreateChatCompletionRequest", "Type": { @@ -5873,11 +5885,11 @@ "Kind": "Method" }, { - "$id": "772", + "$id": "769", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "773", + "$id": "770", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5892,19 +5904,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "774", + "$id": "771", "Type": { - "$ref": "773" + "$ref": "770" }, "Value": "application/json" } }, { - "$id": "775", + "$id": "772", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "776", + "$id": "773", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5919,9 +5931,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "777", + "$id": "774", "Type": { - "$ref": "776" + "$ref": "773" }, "Value": "application/json" } @@ -5929,12 +5941,12 @@ ], "Responses": [ { - "$id": "778", + "$id": "775", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "215" + "$ref": "217" }, "BodyMediaType": "Json", "Headers": [], @@ -5957,42 +5969,42 @@ } ], "Protocol": { - "$id": "779" + "$id": "776" }, "Creatable": false, "Parent": "Chat" }, { - "$id": "780", + "$id": "777", "Name": "FineTuning", "Description": "", "Operations": [], "Protocol": { - "$id": "781" + "$id": "778" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "782", + "$id": "779", "Name": "FineTuningJobs", "Description": "", "Operations": [ { - "$id": "783", + "$id": "780", "Name": "create", "ResourceName": "Jobs", "Description": "Creates a job that fine-tunes a specified model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the\nfine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "784", + "$id": "781", "Name": "job", "NameInRequest": "job", "Type": { - "$ref": "249" + "$ref": "251" }, "Location": "Body", "IsRequired": true, @@ -6005,11 +6017,11 @@ "Kind": "Method" }, { - "$id": "785", + "$id": "782", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "786", + "$id": "783", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6024,19 +6036,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "787", + "$id": "784", "Type": { - "$ref": "786" + "$ref": "783" }, "Value": "application/json" } }, { - "$id": "788", + "$id": "785", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "789", + "$id": "786", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6051,9 +6063,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "790", + "$id": "787", "Type": { - "$ref": "789" + "$ref": "786" }, "Value": "application/json" } @@ -6061,12 +6073,12 @@ ], "Responses": [ { - "$id": "791", + "$id": "788", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "264" + "$ref": "266" }, "BodyMediaType": "Json", "Headers": [], @@ -6088,20 +6100,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "792", + "$id": "789", "Name": "listPaginated", "ResourceName": "Jobs", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "793", + "$id": "790", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last job from the previous pagination request.", "Type": { - "$id": "794", + "$id": "791", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6117,12 +6129,12 @@ "Kind": "Method" }, { - "$id": "795", + "$id": "792", "Name": "limit", "NameInRequest": "limit", "Description": "Number of fine-tuning jobs to retrieve.", "Type": { - "$id": "796", + "$id": "793", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -6138,11 +6150,11 @@ "Kind": "Method" }, { - "$id": "797", + "$id": "794", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "798", + "$id": "795", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6157,9 +6169,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "799", + "$id": "796", "Type": { - "$ref": "798" + "$ref": "795" }, "Value": "application/json" } @@ -6167,12 +6179,12 @@ ], "Responses": [ { - "$id": "800", + "$id": "797", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "304" + "$ref": "306" }, "BodyMediaType": "Json", "Headers": [], @@ -6191,20 +6203,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "801", + "$id": "798", "Name": "retrieve", "ResourceName": "Jobs", "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "802", + "$id": "799", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Type": { - "$id": "803", + "$id": "800", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6220,11 +6232,11 @@ "Kind": "Method" }, { - "$id": "804", + "$id": "801", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "805", + "$id": "802", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6239,9 +6251,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "806", + "$id": "803", "Type": { - "$ref": "805" + "$ref": "802" }, "Value": "application/json" } @@ -6249,12 +6261,12 @@ ], "Responses": [ { - "$id": "807", + "$id": "804", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "264" + "$ref": "266" }, "BodyMediaType": "Json", "Headers": [], @@ -6273,21 +6285,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "808", + "$id": "805", "Name": "listEvents", "ResourceName": "Jobs", "Summary": "Get status updates for a fine-tuning job.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "809", + "$id": "806", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to get events for.", "Type": { - "$id": "810", + "$id": "807", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6303,12 +6315,12 @@ "Kind": "Method" }, { - "$id": "811", + "$id": "808", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last event from the previous pagination request.", "Type": { - "$id": "812", + "$id": "809", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6324,12 +6336,12 @@ "Kind": "Method" }, { - "$id": "813", + "$id": "810", "Name": "limit", "NameInRequest": "limit", "Description": "Number of events to retrieve.", "Type": { - "$id": "814", + "$id": "811", "Kind": "Primitive", "Name": "Int64", "IsNullable": false @@ -6345,11 +6357,11 @@ "Kind": "Method" }, { - "$id": "815", + "$id": "812", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "816", + "$id": "813", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6364,9 +6376,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "817", + "$id": "814", "Type": { - "$ref": "816" + "$ref": "813" }, "Value": "application/json" } @@ -6374,12 +6386,12 @@ ], "Responses": [ { - "$id": "818", + "$id": "815", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "311" + "$ref": "313" }, "BodyMediaType": "Json", "Headers": [], @@ -6398,21 +6410,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "819", + "$id": "816", "Name": "cancel", "ResourceName": "Jobs", "Summary": "Immediately cancel a fine-tune job.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "820", + "$id": "817", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to cancel.", "Type": { - "$id": "821", + "$id": "818", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6428,11 +6440,11 @@ "Kind": "Method" }, { - "$id": "822", + "$id": "819", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "823", + "$id": "820", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6447,9 +6459,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "824", + "$id": "821", "Type": { - "$ref": "823" + "$ref": "820" }, "Value": "application/json" } @@ -6457,12 +6469,12 @@ ], "Responses": [ { - "$id": "825", + "$id": "822", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "264" + "$ref": "266" }, "BodyMediaType": "Json", "Headers": [], @@ -6482,30 +6494,30 @@ } ], "Protocol": { - "$id": "826" + "$id": "823" }, "Creatable": false, "Parent": "FineTuning" }, { - "$id": "827", + "$id": "824", "Name": "Completions", "Description": "", "Operations": [ { - "$id": "828", + "$id": "825", "Name": "create", "ResourceName": "Completions", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "829", + "$id": "826", "Name": "CreateCompletionRequest", "NameInRequest": "CreateCompletionRequest", "Type": { - "$ref": "326" + "$ref": "328" }, "Location": "Body", "IsRequired": true, @@ -6518,11 +6530,11 @@ "Kind": "Method" }, { - "$id": "830", + "$id": "827", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "831", + "$id": "828", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6537,19 +6549,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "832", + "$id": "829", "Type": { - "$ref": "831" + "$ref": "828" }, "Value": "application/json" } }, { - "$id": "833", + "$id": "830", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "834", + "$id": "831", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6564,9 +6576,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "835", + "$id": "832", "Type": { - "$ref": "834" + "$ref": "831" }, "Value": "application/json" } @@ -6574,12 +6586,12 @@ ], "Responses": [ { - "$id": "836", + "$id": "833", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "371" + "$ref": "373" }, "BodyMediaType": "Json", "Headers": [], @@ -6602,31 +6614,31 @@ } ], "Protocol": { - "$id": "837" + "$id": "834" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "838", + "$id": "835", "Name": "Edits", "Description": "", "Operations": [ { - "$id": "839", + "$id": "836", "Name": "create", "ResourceName": "Edits", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "840", + "$id": "837", "Name": "edit", "NameInRequest": "edit", "Type": { - "$ref": "405" + "$ref": "407" }, "Location": "Body", "IsRequired": true, @@ -6639,11 +6651,11 @@ "Kind": "Method" }, { - "$id": "841", + "$id": "838", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "842", + "$id": "839", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6658,19 +6670,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "843", + "$id": "840", "Type": { - "$ref": "842" + "$ref": "839" }, "Value": "application/json" } }, { - "$id": "844", + "$id": "841", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "845", + "$id": "842", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6685,9 +6697,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "846", + "$id": "843", "Type": { - "$ref": "845" + "$ref": "842" }, "Value": "application/json" } @@ -6695,12 +6707,12 @@ ], "Responses": [ { - "$id": "847", + "$id": "844", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "417" + "$ref": "419" }, "BodyMediaType": "Json", "Headers": [], @@ -6723,31 +6735,31 @@ } ], "Protocol": { - "$id": "848" + "$id": "845" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "849", + "$id": "846", "Name": "Embeddings", "Description": "", "Operations": [ { - "$id": "850", + "$id": "847", "Name": "create", "ResourceName": "Embeddings", "Summary": "Creates an embedding vector representing the input text.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "851", + "$id": "848", "Name": "embedding", "NameInRequest": "embedding", "Type": { - "$ref": "431" + "$ref": "433" }, "Location": "Body", "IsRequired": true, @@ -6760,11 +6772,11 @@ "Kind": "Method" }, { - "$id": "852", + "$id": "849", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "853", + "$id": "850", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6779,19 +6791,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "854", + "$id": "851", "Type": { - "$ref": "853" + "$ref": "850" }, "Value": "application/json" } }, { - "$id": "855", + "$id": "852", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "856", + "$id": "853", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6806,9 +6818,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "857", + "$id": "854", "Type": { - "$ref": "856" + "$ref": "853" }, "Value": "application/json" } @@ -6816,12 +6828,12 @@ ], "Responses": [ { - "$id": "858", + "$id": "855", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "445" + "$ref": "442" }, "BodyMediaType": "Json", "Headers": [], @@ -6844,31 +6856,31 @@ } ], "Protocol": { - "$id": "859" + "$id": "856" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "860", + "$id": "857", "Name": "Files", "Description": "", "Operations": [ { - "$id": "861", + "$id": "858", "Name": "list", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "862", + "$id": "859", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "863", + "$id": "860", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6883,9 +6895,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "864", + "$id": "861", "Type": { - "$ref": "863" + "$ref": "860" }, "Value": "application/json" } @@ -6893,12 +6905,12 @@ ], "Responses": [ { - "$id": "865", + "$id": "862", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "466" + "$ref": "463" }, "BodyMediaType": "Json", "Headers": [], @@ -6917,24 +6929,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "866", + "$id": "863", "Name": "create", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "867", + "$id": "864", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "868", + "$id": "865", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "869", + "$id": "866", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6944,9 +6956,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "870", + "$id": "867", "Type": { - "$ref": "868" + "$ref": "865" }, "Value": "multipart/form-data" }, @@ -6960,11 +6972,11 @@ "Kind": "Constant" }, { - "$id": "871", + "$id": "868", "Name": "file", "NameInRequest": "file", "Type": { - "$ref": "487" + "$ref": "484" }, "Location": "Body", "IsRequired": true, @@ -6977,11 +6989,11 @@ "Kind": "Method" }, { - "$id": "872", + "$id": "869", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "873", + "$id": "870", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6996,9 +7008,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "874", + "$id": "871", "Type": { - "$ref": "873" + "$ref": "870" }, "Value": "application/json" } @@ -7006,12 +7018,12 @@ ], "Responses": [ { - "$id": "875", + "$id": "872", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "471" + "$ref": "468" }, "BodyMediaType": "Json", "Headers": [], @@ -7033,21 +7045,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "876", + "$id": "873", "Name": "retrieve", "ResourceName": "Files", "Summary": "Returns information about a specific file.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "877", + "$id": "874", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "878", + "$id": "875", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7063,11 +7075,11 @@ "Kind": "Method" }, { - "$id": "879", + "$id": "876", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "880", + "$id": "877", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7082,9 +7094,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "881", + "$id": "878", "Type": { - "$ref": "880" + "$ref": "877" }, "Value": "application/json" } @@ -7092,12 +7104,12 @@ ], "Responses": [ { - "$id": "882", + "$id": "879", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "471" + "$ref": "468" }, "BodyMediaType": "Json", "Headers": [], @@ -7116,21 +7128,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "883", + "$id": "880", "Name": "delete", "ResourceName": "Files", "Summary": "Delete a file", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "884", + "$id": "881", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "885", + "$id": "882", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7146,11 +7158,11 @@ "Kind": "Method" }, { - "$id": "886", + "$id": "883", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "887", + "$id": "884", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7165,9 +7177,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "888", + "$id": "885", "Type": { - "$ref": "887" + "$ref": "884" }, "Value": "application/json" } @@ -7175,12 +7187,12 @@ ], "Responses": [ { - "$id": "889", + "$id": "886", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "492" + "$ref": "489" }, "BodyMediaType": "Json", "Headers": [], @@ -7199,21 +7211,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "890", + "$id": "887", "Name": "download", "ResourceName": "Files", "Summary": "Returns the contents of the specified file.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "891", + "$id": "888", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "892", + "$id": "889", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7229,11 +7241,11 @@ "Kind": "Method" }, { - "$id": "893", + "$id": "890", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "894", + "$id": "891", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7248,9 +7260,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "895", + "$id": "892", "Type": { - "$ref": "894" + "$ref": "891" }, "Value": "application/json" } @@ -7258,12 +7270,12 @@ ], "Responses": [ { - "$id": "896", + "$id": "893", "StatusCodes": [ 200 ], "BodyType": { - "$id": "897", + "$id": "894", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7286,32 +7298,32 @@ } ], "Protocol": { - "$id": "898" + "$id": "895" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "899", + "$id": "896", "Name": "FineTunes", "Description": "", "Operations": [ { - "$id": "900", + "$id": "897", "Name": "create", "ResourceName": "FineTunes", "Summary": "Creates a job that fine-tunes a specified model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "901", + "$id": "898", "Name": "fine_tune", "NameInRequest": "fine_tune", "Type": { - "$ref": "499" + "$ref": "496" }, "Location": "Body", "IsRequired": true, @@ -7324,11 +7336,11 @@ "Kind": "Method" }, { - "$id": "902", + "$id": "899", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "903", + "$id": "900", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7343,19 +7355,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "904", + "$id": "901", "Type": { - "$ref": "903" + "$ref": "900" }, "Value": "application/json" } }, { - "$id": "905", + "$id": "902", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "906", + "$id": "903", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7370,9 +7382,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "907", + "$id": "904", "Type": { - "$ref": "906" + "$ref": "903" }, "Value": "application/json" } @@ -7380,12 +7392,12 @@ ], "Responses": [ { - "$id": "908", + "$id": "905", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "524" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -7407,21 +7419,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "909", + "$id": "906", "Name": "list", "ResourceName": "FineTunes", "Summary": "List your organization's fine-tuning jobs", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "910", + "$id": "907", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "911", + "$id": "908", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7436,9 +7448,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "912", + "$id": "909", "Type": { - "$ref": "911" + "$ref": "908" }, "Value": "application/json" } @@ -7446,12 +7458,12 @@ ], "Responses": [ { - "$id": "913", + "$id": "910", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "573" + "$ref": "570" }, "BodyMediaType": "Json", "Headers": [], @@ -7470,22 +7482,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "914", + "$id": "911", "Name": "retrieve", "ResourceName": "FineTunes", "Summary": "Gets info about the fine-tune job.\n\n[Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "915", + "$id": "912", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job", "Type": { - "$id": "916", + "$id": "913", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7501,11 +7513,11 @@ "Kind": "Method" }, { - "$id": "917", + "$id": "914", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "918", + "$id": "915", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7520,9 +7532,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "919", + "$id": "916", "Type": { - "$ref": "918" + "$ref": "915" }, "Value": "application/json" } @@ -7530,12 +7542,12 @@ ], "Responses": [ { - "$id": "920", + "$id": "917", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "524" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -7554,22 +7566,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "921", + "$id": "918", "Name": "listEvents", "ResourceName": "FineTunes", "Summary": "Get fine-grained status updates for a fine-tune job.", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "922", + "$id": "919", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job to get events for.", "Type": { - "$id": "923", + "$id": "920", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7585,12 +7597,12 @@ "Kind": "Method" }, { - "$id": "924", + "$id": "921", "Name": "stream", "NameInRequest": "stream", "Description": "Whether to stream events for the fine-tune job. If set to true, events will be sent as\ndata-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available. The stream will terminate with a `data: [DONE]` message when the\njob is finished (succeeded, cancelled, or failed).\n\nIf set to false, only events generated so far will be returned.", "Type": { - "$id": "925", + "$id": "922", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -7606,11 +7618,11 @@ "Kind": "Method" }, { - "$id": "926", + "$id": "923", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "927", + "$id": "924", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7625,9 +7637,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "928", + "$id": "925", "Type": { - "$ref": "927" + "$ref": "924" }, "Value": "application/json" } @@ -7635,12 +7647,12 @@ ], "Responses": [ { - "$id": "929", + "$id": "926", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "578" + "$ref": "575" }, "BodyMediaType": "Json", "Headers": [], @@ -7659,22 +7671,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "930", + "$id": "927", "Name": "cancel", "ResourceName": "FineTunes", "Summary": "Immediately cancel a fine-tune job.", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "931", + "$id": "928", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job to cancel", "Type": { - "$id": "932", + "$id": "929", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7690,11 +7702,11 @@ "Kind": "Method" }, { - "$id": "933", + "$id": "930", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "934", + "$id": "931", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7709,9 +7721,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "935", + "$id": "932", "Type": { - "$ref": "934" + "$ref": "931" }, "Value": "application/json" } @@ -7719,12 +7731,12 @@ ], "Responses": [ { - "$id": "936", + "$id": "933", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "524" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -7744,31 +7756,31 @@ } ], "Protocol": { - "$id": "937" + "$id": "934" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "938", + "$id": "935", "Name": "ModelsOps", "Description": "", "Operations": [ { - "$id": "939", + "$id": "936", "Name": "list", "ResourceName": "Models", "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "940", + "$id": "937", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "941", + "$id": "938", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7783,9 +7795,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "942", + "$id": "939", "Type": { - "$ref": "941" + "$ref": "938" }, "Value": "application/json" } @@ -7793,12 +7805,12 @@ ], "Responses": [ { - "$id": "943", + "$id": "940", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "583" + "$ref": "580" }, "BodyMediaType": "Json", "Headers": [], @@ -7817,21 +7829,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "944", + "$id": "941", "Name": "retrieve", "ResourceName": "Models", "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "945", + "$id": "942", "Name": "model", "NameInRequest": "model", "Description": "The ID of the model to use for this request.", "Type": { - "$id": "946", + "$id": "943", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7847,11 +7859,11 @@ "Kind": "Method" }, { - "$id": "947", + "$id": "944", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "948", + "$id": "945", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7866,9 +7878,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "949", + "$id": "946", "Type": { - "$ref": "948" + "$ref": "945" }, "Value": "application/json" } @@ -7876,12 +7888,12 @@ ], "Responses": [ { - "$id": "950", + "$id": "947", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "588" + "$ref": "585" }, "BodyMediaType": "Json", "Headers": [], @@ -7900,21 +7912,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "951", + "$id": "948", "Name": "delete", "ResourceName": "Models", "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "952", + "$id": "949", "Name": "model", "NameInRequest": "model", "Description": "The model to delete", "Type": { - "$id": "953", + "$id": "950", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7930,11 +7942,11 @@ "Kind": "Method" }, { - "$id": "954", + "$id": "951", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "955", + "$id": "952", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7949,9 +7961,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "956", + "$id": "953", "Type": { - "$ref": "955" + "$ref": "952" }, "Value": "application/json" } @@ -7959,12 +7971,12 @@ ], "Responses": [ { - "$id": "957", + "$id": "954", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "597" + "$ref": "594" }, "BodyMediaType": "Json", "Headers": [], @@ -7984,31 +7996,31 @@ } ], "Protocol": { - "$id": "958" + "$id": "955" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "959", + "$id": "956", "Name": "Images", "Description": "", "Operations": [ { - "$id": "960", + "$id": "957", "Name": "create", "ResourceName": "Images", "Summary": "Creates an image given a prompt", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "961", + "$id": "958", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "604" + "$ref": "601" }, "Location": "Body", "IsRequired": true, @@ -8021,11 +8033,11 @@ "Kind": "Method" }, { - "$id": "962", + "$id": "959", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "963", + "$id": "960", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8040,19 +8052,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "964", + "$id": "961", "Type": { - "$ref": "963" + "$ref": "960" }, "Value": "application/json" } }, { - "$id": "965", + "$id": "962", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "966", + "$id": "963", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8067,9 +8079,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "967", + "$id": "964", "Type": { - "$ref": "966" + "$ref": "963" }, "Value": "application/json" } @@ -8077,12 +8089,12 @@ ], "Responses": [ { - "$id": "968", + "$id": "965", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "613" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8104,24 +8116,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "969", + "$id": "966", "Name": "createEdit", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "970", + "$id": "967", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "971", + "$id": "968", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "972", + "$id": "969", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8131,9 +8143,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "973", + "$id": "970", "Type": { - "$ref": "971" + "$ref": "968" }, "Value": "multipart/form-data" }, @@ -8147,11 +8159,11 @@ "Kind": "Constant" }, { - "$id": "974", + "$id": "971", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "623" + "$ref": "620" }, "Location": "Body", "IsRequired": true, @@ -8164,11 +8176,11 @@ "Kind": "Method" }, { - "$id": "975", + "$id": "972", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "976", + "$id": "973", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8183,9 +8195,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "977", + "$id": "974", "Type": { - "$ref": "976" + "$ref": "973" }, "Value": "application/json" } @@ -8193,12 +8205,12 @@ ], "Responses": [ { - "$id": "978", + "$id": "975", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "613" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8220,24 +8232,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "979", + "$id": "976", "Name": "createVariation", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "980", + "$id": "977", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "981", + "$id": "978", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "982", + "$id": "979", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8247,9 +8259,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "983", + "$id": "980", "Type": { - "$ref": "981" + "$ref": "978" }, "Value": "multipart/form-data" }, @@ -8263,11 +8275,11 @@ "Kind": "Constant" }, { - "$id": "984", + "$id": "981", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "636" + "$ref": "633" }, "Location": "Body", "IsRequired": true, @@ -8280,11 +8292,11 @@ "Kind": "Method" }, { - "$id": "985", + "$id": "982", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "986", + "$id": "983", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8299,9 +8311,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "987", + "$id": "984", "Type": { - "$ref": "986" + "$ref": "983" }, "Value": "application/json" } @@ -8309,12 +8321,12 @@ ], "Responses": [ { - "$id": "988", + "$id": "985", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "613" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8337,31 +8349,31 @@ } ], "Protocol": { - "$id": "989" + "$id": "986" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "990", + "$id": "987", "Name": "Moderations", "Description": "", "Operations": [ { - "$id": "991", + "$id": "988", "Name": "create", "ResourceName": "Moderations", "Summary": "Classifies if text violates OpenAI's Content Policy", "Parameters": [ { - "$ref": "741" + "$ref": "738" }, { - "$id": "992", + "$id": "989", "Name": "content", "NameInRequest": "content", "Type": { - "$ref": "645" + "$ref": "642" }, "Location": "Body", "IsRequired": true, @@ -8374,11 +8386,11 @@ "Kind": "Method" }, { - "$id": "993", + "$id": "990", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "994", + "$id": "991", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8393,19 +8405,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "995", + "$id": "992", "Type": { - "$ref": "994" + "$ref": "991" }, "Value": "application/json" } }, { - "$id": "996", + "$id": "993", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "997", + "$id": "994", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8420,9 +8432,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "998", + "$id": "995", "Type": { - "$ref": "997" + "$ref": "994" }, "Value": "application/json" } @@ -8430,12 +8442,12 @@ ], "Responses": [ { - "$id": "999", + "$id": "996", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "652" + "$ref": "649" }, "BodyMediaType": "Json", "Headers": [], @@ -8458,16 +8470,16 @@ } ], "Protocol": { - "$id": "1000" + "$id": "997" }, "Creatable": false, "Parent": "OpenAIClient" } ], "Auth": { - "$id": "1001", + "$id": "998", "ApiKey": { - "$id": "1002", + "$id": "999", "Name": "Authorization", "Prefix": "Bearer" } From 389bf595d176739e8791505948f8a8dd4d9683bd Mon Sep 17 00:00:00 2001 From: Mingzhe Huang Date: Thu, 18 Apr 2024 16:18:09 +0800 Subject: [PATCH 45/60] fix(generator): do not keep azure.core models Even the accessibility is set, we should not keep them since they should be referenced from Azure.Core resovle #4597 --- .../Common/Output/Models/Types/ModelTypeProvider.cs | 3 +++ src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs b/src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs index 3c390cd4de4..efe39404c03 100644 --- a/src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs +++ b/src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs @@ -48,6 +48,9 @@ internal sealed class ModelTypeProvider : SerializableObjectType protected override bool IsAbstract => !Configuration.SuppressAbstractBaseClasses.Contains(DefaultName) && _inputModel.DiscriminatorPropertyName is not null && _inputModel.DiscriminatorValue is null; public ModelTypeProviderFields Fields => _fields ??= EnsureFields(); + + public string? Namespace => _inputModel.Namespace; + private ConstructorSignature InitializationConstructorSignature => _publicConstructor ??= EnsurePublicConstructorSignature(); private ConstructorSignature SerializationConstructorSignature => _serializationConstructor ??= EnsureSerializationConstructorSignature(); diff --git a/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs b/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs index 7617027a25c..577ddc87f1c 100644 --- a/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs +++ b/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs @@ -58,7 +58,7 @@ public DpgOutputLibrary(string libraryName, IReadOnlyDictionary? _accessOverriddenModels; public IEnumerable AccessOverriddenModels => _accessOverriddenModels ??= Enums.Where(e => e.IsAccessibilityOverridden).Select(e => e.Declaration.Name) - .Concat(Models.Where(m => m.IsAccessibilityOverridden).Select(m => m.Declaration.Name)); + .Concat(Models.Where(m => m.IsAccessibilityOverridden && (m.Namespace == null || !m.Namespace.StartsWith("Azure.Core"))).Select(m => m.Declaration.Name)); private AspDotNetExtensionTypeProvider? _aspDotNetExtension; public AspDotNetExtensionTypeProvider AspDotNetExtension => _aspDotNetExtension ??= new AspDotNetExtensionTypeProvider(RestClients, Configuration.Namespace, _sourceInputModel); From 1b5c3ec9fd9858e8449846303adcdaab614ddb0a Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Fri, 19 Apr 2024 11:14:46 +0800 Subject: [PATCH 46/60] Revert "fix(generator): do not keep azure.core models" This reverts commit 389bf595d176739e8791505948f8a8dd4d9683bd. --- .../Common/Output/Models/Types/ModelTypeProvider.cs | 3 --- src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs b/src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs index efe39404c03..3c390cd4de4 100644 --- a/src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs +++ b/src/AutoRest.CSharp/Common/Output/Models/Types/ModelTypeProvider.cs @@ -48,9 +48,6 @@ internal sealed class ModelTypeProvider : SerializableObjectType protected override bool IsAbstract => !Configuration.SuppressAbstractBaseClasses.Contains(DefaultName) && _inputModel.DiscriminatorPropertyName is not null && _inputModel.DiscriminatorValue is null; public ModelTypeProviderFields Fields => _fields ??= EnsureFields(); - - public string? Namespace => _inputModel.Namespace; - private ConstructorSignature InitializationConstructorSignature => _publicConstructor ??= EnsurePublicConstructorSignature(); private ConstructorSignature SerializationConstructorSignature => _serializationConstructor ??= EnsureSerializationConstructorSignature(); diff --git a/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs b/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs index 577ddc87f1c..7617027a25c 100644 --- a/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs +++ b/src/AutoRest.CSharp/LowLevel/AutoRest/DpgOutputLibrary.cs @@ -58,7 +58,7 @@ public DpgOutputLibrary(string libraryName, IReadOnlyDictionary? _accessOverriddenModels; public IEnumerable AccessOverriddenModels => _accessOverriddenModels ??= Enums.Where(e => e.IsAccessibilityOverridden).Select(e => e.Declaration.Name) - .Concat(Models.Where(m => m.IsAccessibilityOverridden && (m.Namespace == null || !m.Namespace.StartsWith("Azure.Core"))).Select(m => m.Declaration.Name)); + .Concat(Models.Where(m => m.IsAccessibilityOverridden).Select(m => m.Declaration.Name)); private AspDotNetExtensionTypeProvider? _aspDotNetExtension; public AspDotNetExtensionTypeProvider AspDotNetExtension => _aspDotNetExtension ??= new AspDotNetExtensionTypeProvider(RestClients, Configuration.Namespace, _sourceInputModel); From c81256a0109fc0e996f564ae3c083f6e137d9aff Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Fri, 19 Apr 2024 11:31:49 +0800 Subject: [PATCH 47/60] workaround for cases when serializedName is empty --- .../Emitter.Csharp/src/type/converter.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 5d5a67673ad..27025915c6a 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -632,7 +632,10 @@ function fromSdkModelPropertyType( ): InputModelProperty { const serializedName = propertyType.kind === "property" - ? (propertyType as SdkBodyModelPropertyType).serializedName + ? (propertyType as SdkBodyModelPropertyType).serializedName == "" + ? // workaround for https://github.com/Azure/azure-rest-api-specs/blob/2405b7ed0c5c9170995121e0b436504657688b7c/specification/communication/Communication.Messages/models.tsp#L336-L338 + propertyType.name + : (propertyType as SdkBodyModelPropertyType).serializedName : ""; literalTypeContext.PropertyName = serializedName; @@ -645,7 +648,7 @@ function fromSdkModelPropertyType( ? true : false; const modelProperty: InputModelProperty = { - Name: propertyType.nameInClient, + Name: propertyType.name, SerializedName: serializedName, Description: propertyType.description ?? From eb7b8274b407d637d7001c7829005f53bb032ad1 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Fri, 19 Apr 2024 16:37:12 +0800 Subject: [PATCH 48/60] Revert "workaround for cases when serializedName is empty" This reverts commit c81256a0109fc0e996f564ae3c083f6e137d9aff. --- .../Emitter.Csharp/src/type/converter.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 27025915c6a..5d5a67673ad 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -632,10 +632,7 @@ function fromSdkModelPropertyType( ): InputModelProperty { const serializedName = propertyType.kind === "property" - ? (propertyType as SdkBodyModelPropertyType).serializedName == "" - ? // workaround for https://github.com/Azure/azure-rest-api-specs/blob/2405b7ed0c5c9170995121e0b436504657688b7c/specification/communication/Communication.Messages/models.tsp#L336-L338 - propertyType.name - : (propertyType as SdkBodyModelPropertyType).serializedName + ? (propertyType as SdkBodyModelPropertyType).serializedName : ""; literalTypeContext.PropertyName = serializedName; @@ -648,7 +645,7 @@ function fromSdkModelPropertyType( ? true : false; const modelProperty: InputModelProperty = { - Name: propertyType.name, + Name: propertyType.nameInClient, SerializedName: serializedName, Description: propertyType.description ?? From b8b1889c7c71730ba5819022d9392a7c7b1f0a37 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Fri, 26 Apr 2024 22:33:55 +0800 Subject: [PATCH 49/60] fix unit test error --- .../Emitter.Csharp/src/lib/model.ts | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index 54e5e257ba1..28c50040453 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -287,10 +287,12 @@ export function getInputType( enums: Map, literalTypeContext?: LiteralTypeContext ): InputType { - const type = + const type = getRealType( formattedType.type.kind === "ModelProperty" ? formattedType.type.type - : formattedType.type; + : formattedType.type, + context + ); logger.debug(`getInputType for kind: ${type.kind}`); const program = context.program; @@ -940,7 +942,7 @@ export function navigateModels( namespace, { model: (m) => { - const realModel = getRealType(m); + const realModel = getRealType(m, context); return ( realModel.kind === "Model" && realModel.name != "" && @@ -948,23 +950,23 @@ export function navigateModels( ); }, enum: (e) => { - const realEnum = getRealType(e); + const realEnum = getRealType(e, context); return realEnum.kind === "Enum" && computeType(realEnum); } }, { skipSubNamespaces } ); +} - // TODO: we should try to remove this when we adopt getModels - // we should avoid handling raw type definitions because they could be not correctly projected - // in the given api version - function getRealType(type: Type): Type { - if ("projector" in context.program) - return ( - ( - context.program as ProjectedProgram - ).projector.projectedTypes.get(type) ?? type - ); - return type; - } +// TODO: we should try to remove this when we adopt getModels +// we should avoid handling raw type definitions because they could be not correctly projected +// in the given api version +function getRealType(type: Type, context: SdkContext): Type { + if ("projector" in context.program) + return ( + (context.program as ProjectedProgram).projector.projectedTypes.get( + type + ) ?? type + ); + return type; } From a2fae6d0b8c6bafa84a7d91dbe7c3884e4c7a449 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sat, 27 Apr 2024 10:35:25 +0800 Subject: [PATCH 50/60] remove unnecessary property initialization since we have default options --- src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts index eccb96f0617..62c889d0074 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts @@ -74,7 +74,6 @@ export async function $onEmit(context: EmitContext) { for (const transport of logger.transports) { transport.level = options.logLevel ?? LoggerLevel.INFO; } - context.options["filter-out-core-models"] = false; if (!program.compilerOptions.noEmit && !program.hasError()) { // Write out the dotnet model to the output path From 78212b8be060e34394f37b52c53d98784f80a7e4 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sat, 27 Apr 2024 10:36:54 +0800 Subject: [PATCH 51/60] restore function location due to merge --- .../Emitter.Csharp/src/lib/utils.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts index 816adc409e3..8fd6a129acf 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/utils.ts @@ -58,6 +58,22 @@ export function getTypeName( return name; } +export function getFullNamespaceString( + namespace: Namespace | undefined +): string { + if (!namespace || !namespace.name) { + return ""; + } + + let namespaceString: string = namespace.name; + let current: Namespace | undefined = namespace.namespace; + while (current && current.name) { + namespaceString = `${current.name}.${namespaceString}`; + current = current.namespace; + } + return namespaceString; +} + export function createContentTypeOrAcceptParameter( mediaTypes: string[], name: string, @@ -92,19 +108,3 @@ export function createContentTypeOrAcceptParameter( : undefined } as InputParameter; } - -export function getFullNamespaceString( - namespace: Namespace | undefined -): string { - if (!namespace || !namespace.name) { - return ""; - } - - let namespaceString: string = namespace.name; - let current: Namespace | undefined = namespace.namespace; - while (current && current.name) { - namespaceString = `${current.name}.${namespaceString}`; - current = current.namespace; - } - return namespaceString; -} From 269deb22006b2e89a26845f88ddc130638accc53 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sat, 27 Apr 2024 10:56:18 +0800 Subject: [PATCH 52/60] try to create enum not found in tcgc through library api instead of our own --- .../Emitter.Csharp/src/lib/model.ts | 97 +++---------------- .../Emitter.Csharp/src/type/converter.ts | 71 ++++++-------- .../union/src/Generated/tspCodeModel.json | 2 - .../src/Generated/tspCodeModel.json | 2 +- 4 files changed, 49 insertions(+), 123 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index 28c50040453..1ded2421a04 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -6,14 +6,11 @@ import { SdkContext, SdkEnumType, SdkModelType, - getAccess, - getClientType, - getUsageOverride + getClientType } from "@azure-tools/typespec-client-generator-core"; import { EncodeData, Enum, - EnumMember, IntrinsicType, Model, ModelProperty, @@ -67,7 +64,6 @@ import { } from "../type/inputType.js"; import { InputTypeKind } from "../type/inputTypeKind.js"; import { LiteralTypeContext } from "../type/literalTypeContext.js"; -import { Usage } from "../type/usage.js"; import { logger } from "./logger.js"; import { capitalize, getFullNamespaceString, getTypeName } from "./utils.js"; /** @@ -486,70 +482,24 @@ export function getInputType( const name = getTypeName(context, e); let enumType = enums.get(name); - if (!enumType) { - // if it's in TCGC model cache, then construct from TCGC - if (context.modelsMap?.has(e)) { - return fromSdkEnumType( - context.modelsMap!.get(e) as SdkEnumType, - context, - enums, - addToCollection - ); - } - // TODO remove the following after https://github.com/Azure/typespec-azure/issues/128 is resolved - if (e.members.size === 0) { - throw new Error( - `Enum type '${e.name}' doesn't define any values.` - ); - } - const allowValues: InputEnumTypeValue[] = []; - const enumValueType = enumMemberType( - e.members.entries().next().value[1] - ); + if (enumType) return enumType; - for (const key of e.members.keys()) { - const option = e.members.get(key); - if (!option) { - throw Error(`No member value for $key`); - } - if (enumValueType !== enumMemberType(option)) { - throw new Error( - "The enum member value type is not consistent." - ); - } - const member: InputEnumTypeValue = { - Name: getTypeName(context, option), - Value: option.value ?? option?.name, - Description: getDoc(program, option) - }; - allowValues.push(member); - } - - enumType = { - Kind: InputTypeKind.Enum, - Name: name, - EnumValueType: enumValueType, //EnumValueType and AllowedValues should be the first field after id and name, so that it can be corrected serialized. - AllowedValues: allowValues, - Namespace: getFullNamespaceString(e.namespace), - Accessibility: getAccess(context, e), - Deprecated: getDeprecated(program, e), - Description: getDoc(program, e) ?? "", - IsExtensible: false, - IsNullable: false, - Usage: "None" - }; - setUsage(context, e, enumType); - if (addToCollection) enums.set(name, enumType); + // if it's in TCGC model cache, then construct from TCGC + if (context.modelsMap?.has(e)) { + return fromSdkEnumType( + context.modelsMap!.get(e) as SdkEnumType, + context, + enums, + addToCollection + ); } - return enumType; + const createdSdkEnumType = getClientType(context, e) as SdkEnumType; + context.modelsMap!.set(e, createdSdkEnumType); + enumType = fromSdkEnumType(createdSdkEnumType, context, enums); + if (addToCollection) enums.set(name, enumType); - function enumMemberType(member: EnumMember): string { - if (typeof member.value === "number") { - return "Float32"; - } - return "String"; - } + return enumType; } function getInputTypeForArray(elementType: Type): InputListType { @@ -666,21 +616,6 @@ export function getInputType( } } -export function setUsage( - context: SdkContext, - source: Model | Enum, - target: InputModelType | InputEnumType -) { - const sourceUsage = getUsageOverride(context, source); - if (sourceUsage === UsageFlags.Input) { - target.Usage = Usage.Input; - } else if (sourceUsage === UsageFlags.Output) { - target.Usage = Usage.Output; - } else if (sourceUsage === (UsageFlags.Input | UsageFlags.Output)) { - target.Usage = Usage.RoundTrip; - } -} - export function getUsages( context: SdkContext, ops?: HttpOperation[], @@ -958,7 +893,7 @@ export function navigateModels( ); } -// TODO: we should try to remove this when we adopt getModels +// TODO: we should try to remove this when we adopt getAllOperations // we should avoid handling raw type definitions because they could be not correctly projected // in the given api version function getRealType(type: Type, context: SdkContext): Type { diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index 5d5a67673ad..f46ce4f4535 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -2,37 +2,43 @@ // Licensed under the MIT License. See License.txt in the project root for license information. import { - IntrinsicType, - Program, - Type, - DateTimeKnownEncoding, - Model, - Enum, - DurationKnownEncoding, - getFormat -} from "@typespec/compiler"; -import { Usage } from "./usage.js"; -import { - SdkType, - SdkModelPropertyType, + SdkArrayType, SdkBodyModelPropertyType, - SdkModelType, - SdkEnumType, - SdkEnumValueType, - SdkDictionaryType, - SdkConstantType, SdkBuiltInType, - SdkArrayType, - SdkDatetimeType, - SdkUnionType, + SdkConstantType, SdkContext, - SdkTupleType, + SdkDatetimeType, + SdkDictionaryType, SdkDurationType, + SdkEnumType, + SdkEnumValueType, + SdkModelPropertyType, + SdkModelType, + SdkTupleType, + SdkType, + SdkUnionType, UsageFlags, - SdkBuiltInKinds, - isSdkBuiltInKind, - isReadOnly + isReadOnly, + isSdkBuiltInKind } from "@azure-tools/typespec-client-generator-core"; +import { + DateTimeKnownEncoding, + DurationKnownEncoding, + IntrinsicType, + Model, + Program, + Type, + getFormat +} from "@typespec/compiler"; +import { logger } from "../lib/logger.js"; +import { + getCSharpInputTypeKindByPrimitiveModelName +} from "../lib/model.js"; +import { getFullNamespaceString } from "../lib/utils.js"; +import { InputEnumTypeValue } from "./inputEnumTypeValue.js"; +import { InputIntrinsicTypeKind } from "./inputIntrinsicTypeKind.js"; +import { InputModelProperty } from "./inputModelProperty.js"; +import { InputPrimitiveTypeKind } from "./inputPrimitiveTypeKind.js"; import { InputDictionaryType, InputEnumType, @@ -44,21 +50,9 @@ import { InputType, InputUnionType } from "./inputType.js"; -import { InputModelProperty } from "./inputModelProperty.js"; -import { Visibility } from "@typespec/http"; -import { InputEnumTypeValue } from "./inputEnumTypeValue.js"; -import { - getCSharpInputTypeKindByPrimitiveModelName, - mapTypeSpecTypeToCSharpInputTypeKind, - setUsage -} from "../lib/model.js"; import { InputTypeKind } from "./inputTypeKind.js"; -import { getFullNamespaceString } from "../lib/utils.js"; -import { InputPrimitiveTypeKind } from "./inputPrimitiveTypeKind.js"; import { LiteralTypeContext } from "./literalTypeContext.js"; -import { InputIntrinsicTypeKind } from "./inputIntrinsicTypeKind.js"; -import { logger } from "../lib/logger.js"; -import { get } from "http"; +import { Usage } from "./usage.js"; function fromSdkType( sdkType: SdkType, @@ -237,7 +231,6 @@ export function fromSdkEnumType( IsNullable: enumType.nullable, Usage: fromUsageFlags(enumType.usage) }; - setUsage(context, enumType.__raw! as Enum, newInputEnumType); if (addToCollection) enums.set(enumName, newInputEnumType); inputEnumType = newInputEnumType; } diff --git a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json index c12e2a86396..75f51c5daa1 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json @@ -201,7 +201,6 @@ } ], "Namespace": "Type.Union", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -224,7 +223,6 @@ } ], "Namespace": "Type.Union", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" diff --git a/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json index 3d667526b0f..cd897dd8a5e 100644 --- a/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json @@ -225,7 +225,7 @@ "$id": "28", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "Float32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "29", From 896ba110e79135237d3996b300aa2c8f54537b6b Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sat, 27 Apr 2024 13:04:49 +0800 Subject: [PATCH 53/60] fix ts style --- src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index f46ce4f4535..d01fad91138 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -31,9 +31,7 @@ import { getFormat } from "@typespec/compiler"; import { logger } from "../lib/logger.js"; -import { - getCSharpInputTypeKindByPrimitiveModelName -} from "../lib/model.js"; +import { getCSharpInputTypeKindByPrimitiveModelName } from "../lib/model.js"; import { getFullNamespaceString } from "../lib/utils.js"; import { InputEnumTypeValue } from "./inputEnumTypeValue.js"; import { InputIntrinsicTypeKind } from "./inputIntrinsicTypeKind.js"; From dc041b66b7925468ee5ba7a073d29d14bd36c15e Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sat, 27 Apr 2024 13:16:23 +0800 Subject: [PATCH 54/60] try to navigate all models using getAllModels --- .../src/lib/clientModelBuilder.ts | 2 +- .../Emitter.Csharp/src/lib/model.ts | 24 +- .../oauth2/src/Generated/tspCodeModel.json | 171 +- .../union/src/Generated/tspCodeModel.json | 166 +- .../basic/src/Generated/tspCodeModel.json | 376 ++- .../standard/src/Generated/tspCodeModel.json | 138 +- .../datetime/src/Generated/tspCodeModel.json | 438 ++-- .../src/Generated/tspCodeModel.json | 128 +- .../src/Generated/tspCodeModel.json | 56 +- .../src/Generated/tspCodeModel.json | 1940 ++++++++------- .../src/Generated/tspCodeModel.json | 2055 ++++++++++------ .../union/src/Generated/tspCodeModel.json | 802 +++---- .../src/Generated/tspCodeModel.json | 729 +++--- .../src/Generated/tspCodeModel.json | 1318 +++++----- .../src/Generated/tspCodeModel.json | 150 +- .../src/Generated/tspCodeModel.json | 421 +--- .../src/Generated/tspCodeModel.json | 156 +- .../src/Generated/tspCodeModel.json | 186 +- .../src/Generated/tspCodeModel.json | 453 ++-- .../src/Generated/tspCodeModel.json | 134 +- .../src/Generated/tspCodeModel.json | 611 ++--- .../src/Generated/tspCodeModel.json | 217 +- .../src/Generated/tspCodeModel.json | 125 +- .../src/Generated/tspCodeModel.json | 130 +- .../src/Generated/tspCodeModel.json | 760 +++--- .../src/Generated/tspCodeModel.json | 755 +++--- .../src/Generated/tspCodeModel.json | 2135 ++++++++--------- 27 files changed, 6630 insertions(+), 7946 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts index 21c37834fc2..14a16843552 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts @@ -155,7 +155,7 @@ export function createModelForService( addChildClients(sdkContext.emitContext, client, clients); } - navigateModels(sdkContext, serviceNamespaceType, modelMap, enumMap); + navigateModels(sdkContext, modelMap, enumMap); const usages = getUsages(sdkContext, convenienceOperations, modelMap); setUsage(usages, modelMap); diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index 1ded2421a04..dbf140de08d 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -6,6 +6,7 @@ import { SdkContext, SdkEnumType, SdkModelType, + getAllModels, getClientType } from "@azure-tools/typespec-client-generator-core"; import { @@ -861,7 +862,6 @@ export function getFormattedType(program: Program, type: Type): FormattedType { // This is a temporary solution. After we uptake getAllModels we should delete this. export function navigateModels( context: SdkContext, - namespace: Namespace, models: Map, enums: Map ) { @@ -872,24 +872,10 @@ export function navigateModels( models, enums ) as any; - const skipSubNamespaces = isGlobalNamespace(context.program, namespace); - navigateTypesInNamespace( - namespace, - { - model: (m) => { - const realModel = getRealType(m, context); - return ( - realModel.kind === "Model" && - realModel.name != "" && - computeType(realModel) - ); - }, - enum: (e) => { - const realEnum = getRealType(e, context); - return realEnum.kind === "Enum" && computeType(realEnum); - } - }, - { skipSubNamespaces } + getAllModels(context).forEach((model) => + model.kind === "model" + ? fromSdkModelType(model, context, models, enums) + : fromSdkEnumType(model, context, enums) ); } diff --git a/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json index 74d6303d27e..35a6050f265 100644 --- a/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json @@ -3,67 +3,10 @@ "Name": "Authentication.OAuth2", "Description": "Illustrates clients generated with OAuth2 authentication.", "ApiVersions": [], - "Enums": [ - { - "$id": "2", - "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "3", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "4", - "Name": "implicit", - "Value": "implicit", - "Description": "implicit flow" - }, - { - "$id": "5", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "6", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "7", - "Kind": "Enum", - "Name": "MyFlow_authorizationUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "8", - "Name": "https://login.microsoftonline.com/common/oauth2/authorize", - "Value": "https://login.microsoftonline.com/common/oauth2/authorize", - "Description": "https://login.microsoftonline.com/common/oauth2/authorize" - } - ], - "Namespace": "Authentication.OAuth2", - "Description": "The MyFlow_authorizationUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - } - ], + "Enums": [], "Models": [ { - "$id": "9", + "$id": "2", "Kind": "Model", "Name": "InvalidAuth", "Namespace": "Authentication.OAuth2", @@ -71,12 +14,12 @@ "Usage": "Output", "Properties": [ { - "$id": "10", + "$id": "3", "Name": "error", "SerializedName": "error", "Description": "", "Type": { - "$id": "11", + "$id": "4", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -85,87 +28,27 @@ "IsReadOnly": false } ] - }, - { - "$id": "12", - "Kind": "Model", - "Name": "MyFlow", - "Namespace": "Authentication.OAuth2", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "13", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$id": "14", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "2" - }, - "Value": "implicit", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "15", - "Name": "authorizationUrl", - "SerializedName": "authorizationUrl", - "Description": "", - "Type": { - "$id": "16", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "7" - }, - "Value": "https://login.microsoftonline.com/common/oauth2/authorize", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "17", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "18", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "19", + "$id": "5", "Name": "OAuth2Client", "Description": "Illustrates clients generated with OAuth2 authentication.", "Operations": [ { - "$id": "20", + "$id": "6", "Name": "valid", "ResourceName": "OAuth2", "Description": "Check whether client is authenticated", "Parameters": [ { - "$id": "21", + "$id": "7", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "22", + "$id": "8", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -180,9 +63,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "23", + "$id": "9", "Type": { - "$id": "24", + "$id": "10", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -191,11 +74,11 @@ } }, { - "$id": "25", + "$id": "11", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "26", + "$id": "12", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -210,9 +93,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "27", + "$id": "13", "Type": { - "$ref": "26" + "$ref": "12" }, "Value": "application/json" } @@ -220,7 +103,7 @@ ], "Responses": [ { - "$id": "28", + "$id": "14", "StatusCodes": [ 204 ], @@ -238,20 +121,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "29", + "$id": "15", "Name": "invalid", "ResourceName": "OAuth2", "Description": "Check whether client is authenticated. Will return an invalid bearer error.", "Parameters": [ { - "$ref": "21" + "$ref": "7" }, { - "$id": "30", + "$id": "16", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "31", + "$id": "17", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -266,9 +149,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "32", + "$id": "18", "Type": { - "$ref": "31" + "$ref": "17" }, "Value": "application/json" } @@ -276,7 +159,7 @@ ], "Responses": [ { - "$id": "33", + "$id": "19", "StatusCodes": [ 204 ], @@ -285,12 +168,12 @@ "IsErrorResponse": false }, { - "$id": "34", + "$id": "20", "StatusCodes": [ 403 ], "BodyType": { - "$ref": "9" + "$ref": "2" }, "BodyMediaType": "Json", "Headers": [], @@ -310,15 +193,15 @@ } ], "Protocol": { - "$id": "35" + "$id": "21" }, "Creatable": true } ], "Auth": { - "$id": "36", + "$id": "22", "OAuth2": { - "$id": "37", + "$id": "23", "Scopes": [ "https://security.microsoft.com/.default" ] diff --git a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json index bc73363acc4..8bf6e69f846 100644 --- a/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/authentication/union/src/Generated/tspCodeModel.json @@ -3,145 +3,27 @@ "Name": "Authentication.Union", "Description": "Illustrates clients generated with ApiKey and OAuth2 authentication.", "ApiVersions": [], - "Enums": [ - { - "$id": "2", - "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "3", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "4", - "Name": "implicit", - "Value": "implicit", - "Description": "implicit flow" - }, - { - "$id": "5", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "6", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "7", - "Kind": "Enum", - "Name": "MyFlow_authorizationUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "8", - "Name": "https://login.microsoftonline.com/common/oauth2/authorize", - "Value": "https://login.microsoftonline.com/common/oauth2/authorize", - "Description": "https://login.microsoftonline.com/common/oauth2/authorize" - } - ], - "Namespace": "Authentication.Union", - "Description": "The MyFlow_authorizationUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - } - ], - "Models": [ - { - "$id": "9", - "Kind": "Model", - "Name": "MyFlow", - "Namespace": "Authentication.Union", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "10", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$id": "11", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "2" - }, - "Value": "implicit", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "12", - "Name": "authorizationUrl", - "SerializedName": "authorizationUrl", - "Description": "", - "Type": { - "$id": "13", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "7" - }, - "Value": "https://login.microsoftonline.com/common/oauth2/authorize", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "14", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "15", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - } - ], + "Enums": [], + "Models": [], "Clients": [ { - "$id": "16", + "$id": "2", "Name": "UnionClient", "Description": "Illustrates clients generated with ApiKey and OAuth2 authentication.", "Operations": [ { - "$id": "17", + "$id": "3", "Name": "validKey", "ResourceName": "Union", "Description": "Check whether client is authenticated", "Parameters": [ { - "$id": "18", + "$id": "4", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "19", + "$id": "5", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -156,9 +38,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "20", + "$id": "6", "Type": { - "$id": "21", + "$id": "7", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -167,11 +49,11 @@ } }, { - "$id": "22", + "$id": "8", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "23", + "$id": "9", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -186,9 +68,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "24", + "$id": "10", "Type": { - "$ref": "23" + "$ref": "9" }, "Value": "application/json" } @@ -196,7 +78,7 @@ ], "Responses": [ { - "$id": "25", + "$id": "11", "StatusCodes": [ 204 ], @@ -214,20 +96,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "26", + "$id": "12", "Name": "validToken", "ResourceName": "Union", "Description": "Check whether client is authenticated", "Parameters": [ { - "$ref": "18" + "$ref": "4" }, { - "$id": "27", + "$id": "13", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "28", + "$id": "14", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -242,9 +124,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "29", + "$id": "15", "Type": { - "$ref": "28" + "$ref": "14" }, "Value": "application/json" } @@ -252,7 +134,7 @@ ], "Responses": [ { - "$id": "30", + "$id": "16", "StatusCodes": [ 204 ], @@ -271,19 +153,19 @@ } ], "Protocol": { - "$id": "31" + "$id": "17" }, "Creatable": true } ], "Auth": { - "$id": "32", + "$id": "18", "ApiKey": { - "$id": "33", + "$id": "19", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "34", + "$id": "20", "Scopes": [ "https://security.microsoft.com/.default" ] diff --git a/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json index e21f7d437a9..f4b6d0cee2d 100644 --- a/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json @@ -416,60 +416,28 @@ }, { "$ref": "47" - }, - { - "$id": "52", - "Kind": "Model", - "Name": "UserExportParams", - "Namespace": "_Specs_.Azure.Core.Basic", - "Description": "The parameters for exporting a user.", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "53", - "Kind": "Model", - "Name": "ListItemInput", - "Namespace": "_Specs_.Azure.Core.Basic", - "Description": "The parameters for listing users.", - "IsNullable": false, - "Usage": "Input", - "Properties": [ - { - "$id": "54", - "Name": "bodyInput", - "SerializedName": "", - "Description": "The body of the input.", - "Type": { - "$ref": "28" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "55", + "$id": "52", "Name": "BasicClient", "Description": "Illustrates bodies templated with Azure Core", "Operations": [ { - "$id": "56", + "$id": "53", "Name": "createOrUpdate", "ResourceName": "User", "Summary": "Adds a user or updates a user's fields.", "Description": "Creates or updates a User", "Parameters": [ { - "$id": "57", + "$id": "54", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "58", + "$id": "55", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -484,9 +452,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "59", + "$id": "56", "Type": { - "$id": "60", + "$id": "57", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -495,21 +463,21 @@ } }, { - "$id": "61", + "$id": "58", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "62", + "$id": "59", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "63", + "$id": "60", "Type": { - "$id": "64", + "$id": "61", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -526,12 +494,12 @@ "Kind": "Client" }, { - "$id": "65", + "$id": "62", "Name": "id", "NameInRequest": "id", "Description": "The user's id.", "Type": { - "$id": "66", + "$id": "63", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -547,16 +515,16 @@ "Kind": "Method" }, { - "$id": "67", + "$id": "64", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "This request has a JSON Merge Patch body.", "Type": { - "$id": "68", + "$id": "65", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "69", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -566,9 +534,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "70", + "$id": "67", "Type": { - "$ref": "68" + "$ref": "65" }, "Value": "application/merge-patch+json" }, @@ -582,7 +550,7 @@ "Kind": "Constant" }, { - "$id": "71", + "$id": "68", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -600,11 +568,11 @@ "Kind": "Method" }, { - "$id": "72", + "$id": "69", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "73", + "$id": "70", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -619,9 +587,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "74", + "$id": "71", "Type": { - "$ref": "73" + "$ref": "70" }, "Value": "application/json" } @@ -629,7 +597,7 @@ ], "Responses": [ { - "$id": "75", + "$id": "72", "StatusCodes": [ 201 ], @@ -644,7 +612,7 @@ ] }, { - "$id": "76", + "$id": "73", "StatusCodes": [ 200 ], @@ -671,29 +639,29 @@ "GenerateConvenienceMethod": false }, { - "$id": "77", + "$id": "74", "Name": "createOrReplace", "ResourceName": "User", "Summary": "Adds a user or replaces a user's fields.", "Description": "Creates or replaces a User", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "78", + "$id": "75", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "79", + "$id": "76", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -705,12 +673,12 @@ "Kind": "Client" }, { - "$id": "80", + "$id": "77", "Name": "id", "NameInRequest": "id", "Description": "The user's id.", "Type": { - "$id": "81", + "$id": "78", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -726,7 +694,7 @@ "Kind": "Method" }, { - "$id": "82", + "$id": "79", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -744,11 +712,11 @@ "Kind": "Method" }, { - "$id": "83", + "$id": "80", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "84", + "$id": "81", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -763,19 +731,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "85", + "$id": "82", "Type": { - "$ref": "84" + "$ref": "81" }, "Value": "application/json" } }, { - "$id": "86", + "$id": "83", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "87", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -790,9 +758,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "88", + "$id": "85", "Type": { - "$ref": "87" + "$ref": "84" }, "Value": "application/json" } @@ -800,7 +768,7 @@ ], "Responses": [ { - "$id": "89", + "$id": "86", "StatusCodes": [ 201 ], @@ -815,7 +783,7 @@ ] }, { - "$id": "90", + "$id": "87", "StatusCodes": [ 200 ], @@ -842,29 +810,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "91", + "$id": "88", "Name": "get", "ResourceName": "User", "Summary": "Gets a user.", "Description": "Gets a User", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "92", + "$id": "89", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "93", + "$id": "90", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -876,12 +844,12 @@ "Kind": "Client" }, { - "$id": "94", + "$id": "91", "Name": "id", "NameInRequest": "id", "Description": "The user's id.", "Type": { - "$id": "95", + "$id": "92", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -897,11 +865,11 @@ "Kind": "Method" }, { - "$id": "96", + "$id": "93", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "97", + "$id": "94", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -916,9 +884,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "98", + "$id": "95", "Type": { - "$ref": "97" + "$ref": "94" }, "Value": "application/json" } @@ -926,7 +894,7 @@ ], "Responses": [ { - "$id": "99", + "$id": "96", "StatusCodes": [ 200 ], @@ -950,29 +918,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "100", + "$id": "97", "Name": "list", "ResourceName": "User", "Summary": "Lists all users.", "Description": "Lists all Users", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "101", + "$id": "98", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "102", + "$id": "99", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -984,12 +952,12 @@ "Kind": "Client" }, { - "$id": "103", + "$id": "100", "Name": "top", "NameInRequest": "top", "Description": "The number of result items to return.", "Type": { - "$id": "104", + "$id": "101", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1005,12 +973,12 @@ "Kind": "Method" }, { - "$id": "105", + "$id": "102", "Name": "skip", "NameInRequest": "skip", "Description": "The number of result items to skip.", "Type": { - "$id": "106", + "$id": "103", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1026,12 +994,12 @@ "Kind": "Method" }, { - "$id": "107", + "$id": "104", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Description": "The maximum number of result items per page.", "Type": { - "$id": "108", + "$id": "105", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1047,16 +1015,16 @@ "Kind": "Method" }, { - "$id": "109", + "$id": "106", "Name": "orderby", "NameInRequest": "orderby", "Description": "Expressions that specify the order of returned results.", "Type": { - "$id": "110", + "$id": "107", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "111", + "$id": "108", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1074,12 +1042,12 @@ "Kind": "Method" }, { - "$id": "112", + "$id": "109", "Name": "filter", "NameInRequest": "filter", "Description": "Filter the result list using the given expression.", "Type": { - "$id": "113", + "$id": "110", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1095,16 +1063,16 @@ "Kind": "Method" }, { - "$id": "114", + "$id": "111", "Name": "select", "NameInRequest": "select", "Description": "Select the specified fields to be included in the response.", "Type": { - "$id": "115", + "$id": "112", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "116", + "$id": "113", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1122,16 +1090,16 @@ "Kind": "Method" }, { - "$id": "117", + "$id": "114", "Name": "expand", "NameInRequest": "expand", "Description": "Expand the indicated resources into the response.", "Type": { - "$id": "118", + "$id": "115", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "119", + "$id": "116", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1149,11 +1117,11 @@ "Kind": "Method" }, { - "$id": "120", + "$id": "117", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "121", + "$id": "118", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1168,9 +1136,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "122", + "$id": "119", "Type": { - "$ref": "121" + "$ref": "118" }, "Value": "application/json" } @@ -1178,7 +1146,7 @@ ], "Responses": [ { - "$id": "123", + "$id": "120", "StatusCodes": [ 200 ], @@ -1199,7 +1167,7 @@ "Path": "/azure/core/basic/users", "BufferResponse": true, "Paging": { - "$id": "124", + "$id": "121", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1207,28 +1175,28 @@ "GenerateConvenienceMethod": true }, { - "$id": "125", + "$id": "122", "Name": "listWithPage", "ResourceName": "Basic", "Description": "List with Azure.Core.Page<>.", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "126", + "$id": "123", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "127", + "$id": "124", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -1240,11 +1208,11 @@ "Kind": "Client" }, { - "$id": "128", + "$id": "125", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "129", + "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1259,9 +1227,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "130", + "$id": "127", "Type": { - "$ref": "129" + "$ref": "126" }, "Value": "application/json" } @@ -1269,7 +1237,7 @@ ], "Responses": [ { - "$id": "131", + "$id": "128", "StatusCodes": [ 200 ], @@ -1290,7 +1258,7 @@ "Path": "/azure/core/basic/page", "BufferResponse": true, "Paging": { - "$id": "132", + "$id": "129", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1298,28 +1266,28 @@ "GenerateConvenienceMethod": true }, { - "$id": "133", + "$id": "130", "Name": "listWithParameters", "ResourceName": "Basic", "Description": "List with extensible enum parameter Azure.Core.Page<>.", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "134", + "$id": "131", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "135", + "$id": "132", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -1331,7 +1299,7 @@ "Kind": "Client" }, { - "$id": "136", + "$id": "133", "Name": "another", "NameInRequest": "another", "Description": "Another query parameter.", @@ -1349,7 +1317,7 @@ "Kind": "Method" }, { - "$id": "137", + "$id": "134", "Name": "bodyInput", "NameInRequest": "bodyInput", "Description": "The body of the input.", @@ -1367,11 +1335,11 @@ "Kind": "Method" }, { - "$id": "138", + "$id": "135", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "139", + "$id": "136", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1386,19 +1354,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "140", + "$id": "137", "Type": { - "$ref": "139" + "$ref": "136" }, "Value": "application/json" } }, { - "$id": "141", + "$id": "138", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "142", + "$id": "139", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1413,9 +1381,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "143", + "$id": "140", "Type": { - "$ref": "142" + "$ref": "139" }, "Value": "application/json" } @@ -1423,7 +1391,7 @@ ], "Responses": [ { - "$id": "144", + "$id": "141", "StatusCodes": [ 200 ], @@ -1447,7 +1415,7 @@ ], "BufferResponse": true, "Paging": { - "$id": "145", + "$id": "142", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1455,28 +1423,28 @@ "GenerateConvenienceMethod": true }, { - "$id": "146", + "$id": "143", "Name": "listWithCustomPageModel", "ResourceName": "Basic", "Description": "List with custom page model.", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "147", + "$id": "144", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "148", + "$id": "145", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -1488,11 +1456,11 @@ "Kind": "Client" }, { - "$id": "149", + "$id": "146", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "150", + "$id": "147", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1507,9 +1475,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "151", + "$id": "148", "Type": { - "$ref": "150" + "$ref": "147" }, "Value": "application/json" } @@ -1517,7 +1485,7 @@ ], "Responses": [ { - "$id": "152", + "$id": "149", "StatusCodes": [ 200 ], @@ -1538,7 +1506,7 @@ "Path": "/azure/core/basic/custom-page", "BufferResponse": true, "Paging": { - "$id": "153", + "$id": "150", "NextLinkName": "nextLink", "ItemName": "items" }, @@ -1546,29 +1514,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "154", + "$id": "151", "Name": "delete", "ResourceName": "User", "Summary": "Deletes a user.", "Description": "Deletes a User", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "155", + "$id": "152", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "156", + "$id": "153", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -1580,12 +1548,12 @@ "Kind": "Client" }, { - "$id": "157", + "$id": "154", "Name": "id", "NameInRequest": "id", "Description": "The user's id.", "Type": { - "$id": "158", + "$id": "155", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1601,11 +1569,11 @@ "Kind": "Method" }, { - "$id": "159", + "$id": "156", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "160", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1620,9 +1588,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "161", + "$id": "158", "Type": { - "$ref": "160" + "$ref": "157" }, "Value": "application/json" } @@ -1630,7 +1598,7 @@ ], "Responses": [ { - "$id": "162", + "$id": "159", "StatusCodes": [ 204 ], @@ -1648,29 +1616,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "163", + "$id": "160", "Name": "export", "ResourceName": "Basic", "Summary": "Exports a user.", "Description": "Exports a User", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "164", + "$id": "161", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "165", + "$id": "162", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -1682,12 +1650,12 @@ "Kind": "Client" }, { - "$id": "166", + "$id": "163", "Name": "id", "NameInRequest": "id", "Description": "The user's id.", "Type": { - "$id": "167", + "$id": "164", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1703,12 +1671,12 @@ "Kind": "Method" }, { - "$id": "168", + "$id": "165", "Name": "format", "NameInRequest": "format", "Description": "The format of the data.", "Type": { - "$id": "169", + "$id": "166", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1724,11 +1692,11 @@ "Kind": "Method" }, { - "$id": "170", + "$id": "167", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "171", + "$id": "168", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1743,9 +1711,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "172", + "$id": "169", "Type": { - "$ref": "171" + "$ref": "168" }, "Value": "application/json" } @@ -1753,7 +1721,7 @@ ], "Responses": [ { - "$id": "173", + "$id": "170", "StatusCodes": [ 200 ], @@ -1778,38 +1746,38 @@ } ], "Protocol": { - "$id": "174" + "$id": "171" }, "Creatable": true }, { - "$id": "175", + "$id": "172", "Name": "TwoModelsAsPageItem", "Description": "", "Operations": [ { - "$id": "176", + "$id": "173", "Name": "listFirstItem", "ResourceName": "TwoModelsAsPageItem", "Description": "Two operations with two different page item types should be successfully generated. Should generate model for FirstItem.", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "177", + "$id": "174", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "178", + "$id": "175", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -1821,11 +1789,11 @@ "Kind": "Client" }, { - "$id": "179", + "$id": "176", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "180", + "$id": "177", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1840,9 +1808,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "181", + "$id": "178", "Type": { - "$ref": "180" + "$ref": "177" }, "Value": "application/json" } @@ -1850,7 +1818,7 @@ ], "Responses": [ { - "$id": "182", + "$id": "179", "StatusCodes": [ 200 ], @@ -1871,7 +1839,7 @@ "Path": "/azure/core/basic/first-item", "BufferResponse": true, "Paging": { - "$id": "183", + "$id": "180", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1879,28 +1847,28 @@ "GenerateConvenienceMethod": true }, { - "$id": "184", + "$id": "181", "Name": "listSecondItem", "ResourceName": "TwoModelsAsPageItem", "Description": "Two operations with two different page item types should be successfully generated. Should generate model for SecondItem.", "Parameters": [ { - "$ref": "57" + "$ref": "54" }, { - "$id": "185", + "$id": "182", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "186", + "$id": "183", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "63" + "$ref": "60" }, "IsRequired": true, "IsApiVersion": true, @@ -1912,11 +1880,11 @@ "Kind": "Client" }, { - "$id": "187", + "$id": "184", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "188", + "$id": "185", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1931,9 +1899,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "189", + "$id": "186", "Type": { - "$ref": "188" + "$ref": "185" }, "Value": "application/json" } @@ -1941,7 +1909,7 @@ ], "Responses": [ { - "$id": "190", + "$id": "187", "StatusCodes": [ 200 ], @@ -1962,7 +1930,7 @@ "Path": "/azure/core/basic/second-item", "BufferResponse": true, "Paging": { - "$id": "191", + "$id": "188", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1971,7 +1939,7 @@ } ], "Protocol": { - "$id": "192" + "$id": "189" }, "Creatable": false, "Parent": "BasicClient" diff --git a/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json index 21ffe79ba8b..df4804d944f 100644 --- a/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/azure/core/lro/standard/src/Generated/tspCodeModel.json @@ -427,38 +427,28 @@ "IsReadOnly": false } ] - }, - { - "$id": "51", - "Kind": "Model", - "Name": "UserExportParams", - "Namespace": "_Specs_.Azure.Core.Lro.Standard", - "Description": "The parameters for exporting a user.", - "IsNullable": false, - "Usage": "None", - "Properties": [] } ], "Clients": [ { - "$id": "52", + "$id": "51", "Name": "StandardClient", "Description": "Illustrates bodies templated with Azure Core with long-running operation", "Operations": [ { - "$id": "53", + "$id": "52", "Name": "createOrReplace", "ResourceName": "User", "Summary": "Adds a user or replaces a user's fields.", "Description": "Creates or replaces a User", "Parameters": [ { - "$id": "54", + "$id": "53", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "55", + "$id": "54", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -473,9 +463,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "56", + "$id": "55", "Type": { - "$id": "57", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -484,21 +474,21 @@ } }, { - "$id": "58", + "$id": "57", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "59", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "60", + "$id": "59", "Type": { - "$id": "61", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -515,12 +505,12 @@ "Kind": "Client" }, { - "$id": "62", + "$id": "61", "Name": "name", "NameInRequest": "name", "Description": "The name of user.", "Type": { - "$id": "63", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -536,7 +526,7 @@ "Kind": "Method" }, { - "$id": "64", + "$id": "63", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -554,11 +544,11 @@ "Kind": "Method" }, { - "$id": "65", + "$id": "64", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "66", + "$id": "65", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -573,19 +563,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "67", + "$id": "66", "Type": { - "$ref": "66" + "$ref": "65" }, "Value": "application/json" } }, { - "$id": "68", + "$id": "67", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "69", + "$id": "68", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -600,9 +590,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "70", + "$id": "69", "Type": { - "$ref": "69" + "$ref": "68" }, "Value": "application/json" } @@ -610,7 +600,7 @@ ], "Responses": [ { - "$id": "71", + "$id": "70", "StatusCodes": [ 201 ], @@ -620,12 +610,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "72", + "$id": "71", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "73", + "$id": "72", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -638,7 +628,7 @@ ] }, { - "$id": "74", + "$id": "73", "StatusCodes": [ 200 ], @@ -648,12 +638,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "75", + "$id": "74", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "76", + "$id": "75", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -675,10 +665,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "77", + "$id": "76", "FinalStateVia": 2, "FinalResponse": { - "$id": "78", + "$id": "77", "StatusCodes": [ 200 ], @@ -692,29 +682,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "79", + "$id": "78", "Name": "delete", "ResourceName": "User", "Summary": "Deletes a user.", "Description": "Deletes a User", "Parameters": [ { - "$ref": "54" + "$ref": "53" }, { - "$id": "80", + "$id": "79", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "81", + "$id": "80", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "60" + "$ref": "59" }, "IsRequired": true, "IsApiVersion": true, @@ -726,12 +716,12 @@ "Kind": "Client" }, { - "$id": "82", + "$id": "81", "Name": "name", "NameInRequest": "name", "Description": "The name of user.", "Type": { - "$id": "83", + "$id": "82", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -747,11 +737,11 @@ "Kind": "Method" }, { - "$id": "84", + "$id": "83", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "85", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -766,9 +756,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "86", + "$id": "85", "Type": { - "$ref": "85" + "$ref": "84" }, "Value": "application/json" } @@ -776,7 +766,7 @@ ], "Responses": [ { - "$id": "87", + "$id": "86", "StatusCodes": [ 202 ], @@ -786,12 +776,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "88", + "$id": "87", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "89", + "$id": "88", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -810,10 +800,10 @@ "Path": "/azure/core/lro/standard/users/{name}", "BufferResponse": true, "LongRunning": { - "$id": "90", + "$id": "89", "FinalStateVia": 3, "FinalResponse": { - "$id": "91", + "$id": "90", "StatusCodes": [ 204 ], @@ -824,29 +814,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "92", + "$id": "91", "Name": "export", "ResourceName": "Standard", "Summary": "Exports a user.", "Description": "Exports a User", "Parameters": [ { - "$ref": "54" + "$ref": "53" }, { - "$id": "93", + "$id": "92", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "94", + "$id": "93", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "60" + "$ref": "59" }, "IsRequired": true, "IsApiVersion": true, @@ -858,12 +848,12 @@ "Kind": "Client" }, { - "$id": "95", + "$id": "94", "Name": "name", "NameInRequest": "name", "Description": "The name of user.", "Type": { - "$id": "96", + "$id": "95", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -879,12 +869,12 @@ "Kind": "Method" }, { - "$id": "97", + "$id": "96", "Name": "format", "NameInRequest": "format", "Description": "The format of the data.", "Type": { - "$id": "98", + "$id": "97", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -900,11 +890,11 @@ "Kind": "Method" }, { - "$id": "99", + "$id": "98", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "100", + "$id": "99", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -919,9 +909,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "101", + "$id": "100", "Type": { - "$ref": "100" + "$ref": "99" }, "Value": "application/json" } @@ -929,7 +919,7 @@ ], "Responses": [ { - "$id": "102", + "$id": "101", "StatusCodes": [ 202 ], @@ -939,12 +929,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "103", + "$id": "102", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "104", + "$id": "103", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -963,10 +953,10 @@ "Path": "/azure/core/lro/standard/users/{name}:export", "BufferResponse": true, "LongRunning": { - "$id": "105", + "$id": "104", "FinalStateVia": 3, "FinalResponse": { - "$id": "106", + "$id": "105", "StatusCodes": [ 200 ], @@ -982,7 +972,7 @@ } ], "Protocol": { - "$id": "107" + "$id": "106" }, "Creatable": true } diff --git a/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json index 4393bd71aa7..e600e196984 100644 --- a/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json @@ -130,72 +130,36 @@ "IsReadOnly": false } ] - }, - { - "$id": "18", - "Kind": "Model", - "Name": "DefaultDatetimeHeader", - "Namespace": "Encode.Datetime", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "19", - "Kind": "Model", - "Name": "Rfc3339DatetimeHeader", - "Namespace": "Encode.Datetime", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "20", - "Kind": "Model", - "Name": "Rfc7231DatetimeHeader", - "Namespace": "Encode.Datetime", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "21", - "Kind": "Model", - "Name": "UnixTimestampDatetimeHeader", - "Namespace": "Encode.Datetime", - "IsNullable": false, - "Usage": "None", - "Properties": [] } ], "Clients": [ { - "$id": "22", + "$id": "18", "Name": "DatetimeClient", "Description": "", "Operations": [], "Protocol": { - "$id": "23" + "$id": "19" }, "Creatable": true }, { - "$id": "24", + "$id": "20", "Name": "Query", "Description": "", "Operations": [ { - "$id": "25", + "$id": "21", "Name": "default", "ResourceName": "Query", "Parameters": [ { - "$id": "26", + "$id": "22", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "27", + "$id": "23", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -210,9 +174,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "28", + "$id": "24", "Type": { - "$id": "29", + "$id": "25", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -221,11 +185,11 @@ } }, { - "$id": "30", + "$id": "26", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "31", + "$id": "27", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -241,11 +205,11 @@ "Kind": "Method" }, { - "$id": "32", + "$id": "28", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "33", + "$id": "29", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -260,9 +224,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "34", + "$id": "30", "Type": { - "$ref": "33" + "$ref": "29" }, "Value": "application/json" } @@ -270,7 +234,7 @@ ], "Responses": [ { - "$id": "35", + "$id": "31", "StatusCodes": [ 204 ], @@ -288,19 +252,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "36", + "$id": "32", "Name": "rfc3339", "ResourceName": "Query", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "37", + "$id": "33", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "38", + "$id": "34", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -316,11 +280,11 @@ "Kind": "Method" }, { - "$id": "39", + "$id": "35", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "40", + "$id": "36", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -335,9 +299,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "41", + "$id": "37", "Type": { - "$ref": "40" + "$ref": "36" }, "Value": "application/json" } @@ -345,7 +309,7 @@ ], "Responses": [ { - "$id": "42", + "$id": "38", "StatusCodes": [ 204 ], @@ -363,19 +327,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "43", + "$id": "39", "Name": "rfc7231", "ResourceName": "Query", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "44", + "$id": "40", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "45", + "$id": "41", "Kind": "Primitive", "Name": "DateTimeRFC7231", "IsNullable": false @@ -391,11 +355,11 @@ "Kind": "Method" }, { - "$id": "46", + "$id": "42", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "47", + "$id": "43", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -410,9 +374,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "48", + "$id": "44", "Type": { - "$ref": "47" + "$ref": "43" }, "Value": "application/json" } @@ -420,7 +384,7 @@ ], "Responses": [ { - "$id": "49", + "$id": "45", "StatusCodes": [ 204 ], @@ -438,19 +402,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "50", + "$id": "46", "Name": "unixTimestamp", "ResourceName": "Query", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "51", + "$id": "47", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "52", + "$id": "48", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -466,11 +430,11 @@ "Kind": "Method" }, { - "$id": "53", + "$id": "49", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "54", + "$id": "50", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -485,9 +449,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "55", + "$id": "51", "Type": { - "$ref": "54" + "$ref": "50" }, "Value": "application/json" } @@ -495,7 +459,7 @@ ], "Responses": [ { - "$id": "56", + "$id": "52", "StatusCodes": [ 204 ], @@ -513,23 +477,23 @@ "GenerateConvenienceMethod": true }, { - "$id": "57", + "$id": "53", "Name": "unixTimestampArray", "ResourceName": "Query", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "58", + "$id": "54", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "59", + "$id": "55", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "60", + "$id": "56", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -548,11 +512,11 @@ "ArraySerializationDelimiter": "," }, { - "$id": "61", + "$id": "57", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "62", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -567,9 +531,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "63", + "$id": "59", "Type": { - "$ref": "62" + "$ref": "58" }, "Value": "application/json" } @@ -577,7 +541,7 @@ ], "Responses": [ { - "$id": "64", + "$id": "60", "StatusCodes": [ 204 ], @@ -596,26 +560,26 @@ } ], "Protocol": { - "$id": "65" + "$id": "61" }, "Creatable": false, "Parent": "DatetimeClient" }, { - "$id": "66", + "$id": "62", "Name": "Property", "Description": "", "Operations": [ { - "$id": "67", + "$id": "63", "Name": "default", "ResourceName": "Property", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "68", + "$id": "64", "Name": "body", "NameInRequest": "body", "Type": { @@ -632,11 +596,11 @@ "Kind": "Method" }, { - "$id": "69", + "$id": "65", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "70", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -651,19 +615,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "71", + "$id": "67", "Type": { - "$ref": "70" + "$ref": "66" }, "Value": "application/json" } }, { - "$id": "72", + "$id": "68", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "73", + "$id": "69", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -678,9 +642,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "74", + "$id": "70", "Type": { - "$ref": "73" + "$ref": "69" }, "Value": "application/json" } @@ -688,7 +652,7 @@ ], "Responses": [ { - "$id": "75", + "$id": "71", "StatusCodes": [ 200 ], @@ -715,15 +679,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "76", + "$id": "72", "Name": "rfc3339", "ResourceName": "Property", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "77", + "$id": "73", "Name": "body", "NameInRequest": "body", "Type": { @@ -740,11 +704,11 @@ "Kind": "Method" }, { - "$id": "78", + "$id": "74", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "79", + "$id": "75", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -759,19 +723,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "80", + "$id": "76", "Type": { - "$ref": "79" + "$ref": "75" }, "Value": "application/json" } }, { - "$id": "81", + "$id": "77", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "82", + "$id": "78", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -786,9 +750,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "83", + "$id": "79", "Type": { - "$ref": "82" + "$ref": "78" }, "Value": "application/json" } @@ -796,7 +760,7 @@ ], "Responses": [ { - "$id": "84", + "$id": "80", "StatusCodes": [ 200 ], @@ -823,15 +787,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "85", + "$id": "81", "Name": "rfc7231", "ResourceName": "Property", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "86", + "$id": "82", "Name": "body", "NameInRequest": "body", "Type": { @@ -848,11 +812,11 @@ "Kind": "Method" }, { - "$id": "87", + "$id": "83", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "88", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -867,19 +831,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "89", + "$id": "85", "Type": { - "$ref": "88" + "$ref": "84" }, "Value": "application/json" } }, { - "$id": "90", + "$id": "86", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "91", + "$id": "87", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -894,9 +858,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "92", + "$id": "88", "Type": { - "$ref": "91" + "$ref": "87" }, "Value": "application/json" } @@ -904,7 +868,7 @@ ], "Responses": [ { - "$id": "93", + "$id": "89", "StatusCodes": [ 200 ], @@ -931,15 +895,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "94", + "$id": "90", "Name": "unixTimestamp", "ResourceName": "Property", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "95", + "$id": "91", "Name": "body", "NameInRequest": "body", "Type": { @@ -956,11 +920,11 @@ "Kind": "Method" }, { - "$id": "96", + "$id": "92", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "97", + "$id": "93", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -975,19 +939,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "98", + "$id": "94", "Type": { - "$ref": "97" + "$ref": "93" }, "Value": "application/json" } }, { - "$id": "99", + "$id": "95", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "100", + "$id": "96", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1002,9 +966,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "101", + "$id": "97", "Type": { - "$ref": "100" + "$ref": "96" }, "Value": "application/json" } @@ -1012,7 +976,7 @@ ], "Responses": [ { - "$id": "102", + "$id": "98", "StatusCodes": [ 200 ], @@ -1039,15 +1003,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "103", + "$id": "99", "Name": "unixTimestampArray", "ResourceName": "Property", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "104", + "$id": "100", "Name": "body", "NameInRequest": "body", "Type": { @@ -1064,11 +1028,11 @@ "Kind": "Method" }, { - "$id": "105", + "$id": "101", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "106", + "$id": "102", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1083,19 +1047,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "107", + "$id": "103", "Type": { - "$ref": "106" + "$ref": "102" }, "Value": "application/json" } }, { - "$id": "108", + "$id": "104", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "109", + "$id": "105", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1110,9 +1074,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "110", + "$id": "106", "Type": { - "$ref": "109" + "$ref": "105" }, "Value": "application/json" } @@ -1120,7 +1084,7 @@ ], "Responses": [ { - "$id": "111", + "$id": "107", "StatusCodes": [ 200 ], @@ -1148,30 +1112,30 @@ } ], "Protocol": { - "$id": "112" + "$id": "108" }, "Creatable": false, "Parent": "DatetimeClient" }, { - "$id": "113", + "$id": "109", "Name": "Header", "Description": "", "Operations": [ { - "$id": "114", + "$id": "110", "Name": "default", "ResourceName": "Header", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "115", + "$id": "111", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "116", + "$id": "112", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1187,11 +1151,11 @@ "Kind": "Method" }, { - "$id": "117", + "$id": "113", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "118", + "$id": "114", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1206,9 +1170,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "119", + "$id": "115", "Type": { - "$ref": "118" + "$ref": "114" }, "Value": "application/json" } @@ -1216,7 +1180,7 @@ ], "Responses": [ { - "$id": "120", + "$id": "116", "StatusCodes": [ 204 ], @@ -1234,19 +1198,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "121", + "$id": "117", "Name": "rfc3339", "ResourceName": "Header", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "122", + "$id": "118", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "123", + "$id": "119", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -1262,11 +1226,11 @@ "Kind": "Method" }, { - "$id": "124", + "$id": "120", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "125", + "$id": "121", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1281,9 +1245,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "126", + "$id": "122", "Type": { - "$ref": "125" + "$ref": "121" }, "Value": "application/json" } @@ -1291,7 +1255,7 @@ ], "Responses": [ { - "$id": "127", + "$id": "123", "StatusCodes": [ 204 ], @@ -1309,19 +1273,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "128", + "$id": "124", "Name": "rfc7231", "ResourceName": "Header", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "129", + "$id": "125", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "130", + "$id": "126", "Kind": "Primitive", "Name": "DateTimeRFC7231", "IsNullable": false @@ -1337,11 +1301,11 @@ "Kind": "Method" }, { - "$id": "131", + "$id": "127", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "132", + "$id": "128", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1356,9 +1320,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "133", + "$id": "129", "Type": { - "$ref": "132" + "$ref": "128" }, "Value": "application/json" } @@ -1366,7 +1330,7 @@ ], "Responses": [ { - "$id": "134", + "$id": "130", "StatusCodes": [ 204 ], @@ -1384,19 +1348,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "135", + "$id": "131", "Name": "unixTimestamp", "ResourceName": "Header", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "136", + "$id": "132", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "137", + "$id": "133", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1412,11 +1376,11 @@ "Kind": "Method" }, { - "$id": "138", + "$id": "134", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "139", + "$id": "135", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1431,9 +1395,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "140", + "$id": "136", "Type": { - "$ref": "139" + "$ref": "135" }, "Value": "application/json" } @@ -1441,7 +1405,7 @@ ], "Responses": [ { - "$id": "141", + "$id": "137", "StatusCodes": [ 204 ], @@ -1459,23 +1423,23 @@ "GenerateConvenienceMethod": true }, { - "$id": "142", + "$id": "138", "Name": "unixTimestampArray", "ResourceName": "Header", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "143", + "$id": "139", "Name": "value", "NameInRequest": "value", "Type": { - "$id": "144", + "$id": "140", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "145", + "$id": "141", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1494,11 +1458,11 @@ "ArraySerializationDelimiter": "," }, { - "$id": "146", + "$id": "142", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "147", + "$id": "143", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1513,9 +1477,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "148", + "$id": "144", "Type": { - "$ref": "147" + "$ref": "143" }, "Value": "application/json" } @@ -1523,7 +1487,7 @@ ], "Responses": [ { - "$id": "149", + "$id": "145", "StatusCodes": [ 204 ], @@ -1542,30 +1506,30 @@ } ], "Protocol": { - "$id": "150" + "$id": "146" }, "Creatable": false, "Parent": "DatetimeClient" }, { - "$id": "151", + "$id": "147", "Name": "ResponseHeader", "Description": "", "Operations": [ { - "$id": "152", + "$id": "148", "Name": "default", "ResourceName": "ResponseHeader", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "153", + "$id": "149", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "154", + "$id": "150", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1580,9 +1544,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "155", + "$id": "151", "Type": { - "$ref": "154" + "$ref": "150" }, "Value": "application/json" } @@ -1590,19 +1554,19 @@ ], "Responses": [ { - "$id": "156", + "$id": "152", "StatusCodes": [ 204 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "157", + "$id": "153", "Name": "value", "NameInResponse": "value", "Description": "", "Type": { - "$id": "158", + "$id": "154", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1621,19 +1585,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "159", + "$id": "155", "Name": "rfc3339", "ResourceName": "ResponseHeader", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "160", + "$id": "156", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "161", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1648,9 +1612,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "162", + "$id": "158", "Type": { - "$ref": "161" + "$ref": "157" }, "Value": "application/json" } @@ -1658,19 +1622,19 @@ ], "Responses": [ { - "$id": "163", + "$id": "159", "StatusCodes": [ 204 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "164", + "$id": "160", "Name": "value", "NameInResponse": "value", "Description": "", "Type": { - "$id": "165", + "$id": "161", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1689,19 +1653,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "166", + "$id": "162", "Name": "rfc7231", "ResourceName": "ResponseHeader", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "167", + "$id": "163", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "168", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1716,9 +1680,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "169", + "$id": "165", "Type": { - "$ref": "168" + "$ref": "164" }, "Value": "application/json" } @@ -1726,19 +1690,19 @@ ], "Responses": [ { - "$id": "170", + "$id": "166", "StatusCodes": [ 204 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "171", + "$id": "167", "Name": "value", "NameInResponse": "value", "Description": "", "Type": { - "$id": "172", + "$id": "168", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1757,19 +1721,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "173", + "$id": "169", "Name": "unixTimestamp", "ResourceName": "ResponseHeader", "Parameters": [ { - "$ref": "26" + "$ref": "22" }, { - "$id": "174", + "$id": "170", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "175", + "$id": "171", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1784,9 +1748,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "176", + "$id": "172", "Type": { - "$ref": "175" + "$ref": "171" }, "Value": "application/json" } @@ -1794,19 +1758,19 @@ ], "Responses": [ { - "$id": "177", + "$id": "173", "StatusCodes": [ 204 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "178", + "$id": "174", "Name": "value", "NameInResponse": "value", "Description": "", "Type": { - "$id": "179", + "$id": "175", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1826,7 +1790,7 @@ } ], "Protocol": { - "$id": "180" + "$id": "176" }, "Creatable": false, "Parent": "DatetimeClient" diff --git a/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json index 26852b4296d..6fffa7e0a86 100644 --- a/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json @@ -28,84 +28,36 @@ "IsReadOnly": false } ] - }, - { - "$id": "5", - "Kind": "Model", - "Name": "PngImage", - "Namespace": "Payload.ContentNegotiation.SameBody", - "IsNullable": false, - "Usage": "Output", - "Properties": [ - { - "$id": "6", - "Name": "image", - "SerializedName": "", - "Description": "", - "Type": { - "$id": "7", - "Kind": "Primitive", - "Name": "Bytes", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "8", - "Kind": "Model", - "Name": "JpegImage", - "Namespace": "Payload.ContentNegotiation.SameBody", - "IsNullable": false, - "Usage": "Output", - "Properties": [ - { - "$id": "9", - "Name": "image", - "SerializedName": "", - "Description": "", - "Type": { - "$id": "10", - "Kind": "Primitive", - "Name": "Bytes", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "11", + "$id": "5", "Name": "ContentNegotiationClient", "Description": "", "Operations": [], "Protocol": { - "$id": "12" + "$id": "6" }, "Creatable": true }, { - "$id": "13", + "$id": "7", "Name": "SameBody", "Description": "", "Operations": [ { - "$id": "14", + "$id": "8", "Name": "getAvatarAsPng", "ResourceName": "SameBody", "Parameters": [ { - "$id": "15", + "$id": "9", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "16", + "$id": "10", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -120,9 +72,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "17", + "$id": "11", "Type": { - "$id": "18", + "$id": "12", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -131,11 +83,11 @@ } }, { - "$id": "19", + "$id": "13", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "20", + "$id": "14", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -150,9 +102,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "21", + "$id": "15", "Type": { - "$ref": "20" + "$ref": "14" }, "Value": "image/png" } @@ -160,12 +112,12 @@ ], "Responses": [ { - "$id": "22", + "$id": "16", "StatusCodes": [ 200 ], "BodyType": { - "$id": "23", + "$id": "17", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -187,19 +139,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "24", + "$id": "18", "Name": "getAvatarAsJpeg", "ResourceName": "SameBody", "Parameters": [ { - "$ref": "15" + "$ref": "9" }, { - "$id": "25", + "$id": "19", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "26", + "$id": "20", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -214,9 +166,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "27", + "$id": "21", "Type": { - "$ref": "26" + "$ref": "20" }, "Value": "image/jpeg" } @@ -224,12 +176,12 @@ ], "Responses": [ { - "$id": "28", + "$id": "22", "StatusCodes": [ 200 ], "BodyType": { - "$id": "29", + "$id": "23", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -252,30 +204,30 @@ } ], "Protocol": { - "$id": "30" + "$id": "24" }, "Creatable": false, "Parent": "ContentNegotiationClient" }, { - "$id": "31", + "$id": "25", "Name": "DifferentBody", "Description": "", "Operations": [ { - "$id": "32", + "$id": "26", "Name": "getAvatarAsPng", "ResourceName": "DifferentBody", "Parameters": [ { - "$ref": "15" + "$ref": "9" }, { - "$id": "33", + "$id": "27", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "34", + "$id": "28", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -290,9 +242,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "35", + "$id": "29", "Type": { - "$ref": "34" + "$ref": "28" }, "Value": "image/png" } @@ -300,12 +252,12 @@ ], "Responses": [ { - "$id": "36", + "$id": "30", "StatusCodes": [ 200 ], "BodyType": { - "$id": "37", + "$id": "31", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -327,19 +279,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "38", + "$id": "32", "Name": "getAvatarAsJson", "ResourceName": "DifferentBody", "Parameters": [ { - "$ref": "15" + "$ref": "9" }, { - "$id": "39", + "$id": "33", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "40", + "$id": "34", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -354,9 +306,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "41", + "$id": "35", "Type": { - "$ref": "40" + "$ref": "34" }, "Value": "application/json" } @@ -364,7 +316,7 @@ ], "Responses": [ { - "$id": "42", + "$id": "36", "StatusCodes": [ 200 ], @@ -389,7 +341,7 @@ } ], "Protocol": { - "$id": "43" + "$id": "37" }, "Creatable": false, "Parent": "ContentNegotiationClient" diff --git a/test/CadlRanchProjects/special-headers/repeatability/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/special-headers/repeatability/src/Generated/tspCodeModel.json index b98955fde86..5b2ae82ee5a 100644 --- a/test/CadlRanchProjects/special-headers/repeatability/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/special-headers/repeatability/src/Generated/tspCodeModel.json @@ -4,36 +4,26 @@ "Description": "Illustrates OASIS repeatability headers", "ApiVersions": [], "Enums": [], - "Models": [ - { - "$id": "2", - "Kind": "Model", - "Name": "RepeatableResponse", - "Namespace": "SpecialHeaders.Repeatability", - "IsNullable": false, - "Usage": "Output", - "Properties": [] - } - ], + "Models": [], "Clients": [ { - "$id": "3", + "$id": "2", "Name": "RepeatabilityClient", "Description": "Illustrates OASIS repeatability headers", "Operations": [ { - "$id": "4", + "$id": "3", "Name": "immediateSuccess", "ResourceName": "Repeatability", "Description": "Check we recognize Repeatability-Request-ID and Repeatability-First-Sent.", "Parameters": [ { - "$id": "5", + "$id": "4", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "6", + "$id": "5", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -48,9 +38,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "7", + "$id": "6", "Type": { - "$id": "8", + "$id": "7", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -59,11 +49,11 @@ } }, { - "$id": "9", + "$id": "8", "Name": "repeatabilityRequestID", "NameInRequest": "Repeatability-Request-ID", "Type": { - "$id": "10", + "$id": "9", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -79,11 +69,11 @@ "Kind": "Method" }, { - "$id": "11", + "$id": "10", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "12", + "$id": "11", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -99,11 +89,11 @@ "Kind": "Method" }, { - "$id": "13", + "$id": "12", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "14", + "$id": "13", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -118,9 +108,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "15", + "$id": "14", "Type": { - "$ref": "14" + "$ref": "13" }, "Value": "application/json" } @@ -128,28 +118,28 @@ ], "Responses": [ { - "$id": "16", + "$id": "15", "StatusCodes": [ 204 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "17", + "$id": "16", "Name": "Repeatability-Result", "NameInResponse": "repeatabilityResult", "Description": "Indicates whether the repeatable request was accepted or rejected.", "Type": { - "$id": "18", + "$id": "17", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "19", + "$id": "18", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "20", + "$id": "19", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -158,11 +148,11 @@ "IsNullable": false }, { - "$id": "21", + "$id": "20", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "22", + "$id": "21", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -188,7 +178,7 @@ } ], "Protocol": { - "$id": "23" + "$id": "22" }, "Creatable": true } diff --git a/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json index bb88e29fcfd..6893b3f498f 100644 --- a/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/special-words/src/Generated/tspCodeModel.json @@ -820,60 +820,36 @@ "IsReadOnly": false } ] - }, - { - "$id": "104", - "Kind": "Model", - "Name": "Base", - "Namespace": "SpecialWords.Models", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "105", - "Name": "name", - "SerializedName": "name", - "Description": "", - "Type": { - "$id": "106", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "107", + "$id": "104", "Name": "SpecialWordsClient", "Description": "", "Operations": [], "Protocol": { - "$id": "108" + "$id": "105" }, "Creatable": true }, { - "$id": "109", + "$id": "106", "Name": "Models", "Description": "Verify model names", "Operations": [ { - "$id": "110", + "$id": "107", "Name": "withAnd", "ResourceName": "Models", "Parameters": [ { - "$id": "111", + "$id": "108", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "112", + "$id": "109", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -888,9 +864,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "113", + "$id": "110", "Type": { - "$id": "114", + "$id": "111", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -899,7 +875,7 @@ } }, { - "$id": "115", + "$id": "112", "Name": "body", "NameInRequest": "body", "Type": { @@ -916,11 +892,11 @@ "Kind": "Method" }, { - "$id": "116", + "$id": "113", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "117", + "$id": "114", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -935,19 +911,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "118", + "$id": "115", "Type": { - "$ref": "117" + "$ref": "114" }, "Value": "application/json" } }, { - "$id": "119", + "$id": "116", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "120", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -962,9 +938,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "121", + "$id": "118", "Type": { - "$ref": "120" + "$ref": "117" }, "Value": "application/json" } @@ -972,7 +948,7 @@ ], "Responses": [ { - "$id": "122", + "$id": "119", "StatusCodes": [ 204 ], @@ -993,15 +969,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "123", + "$id": "120", "Name": "withAs", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "124", + "$id": "121", "Name": "body", "NameInRequest": "body", "Type": { @@ -1018,11 +994,11 @@ "Kind": "Method" }, { - "$id": "125", + "$id": "122", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "126", + "$id": "123", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1037,19 +1013,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "127", + "$id": "124", "Type": { - "$ref": "126" + "$ref": "123" }, "Value": "application/json" } }, { - "$id": "128", + "$id": "125", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "129", + "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1064,9 +1040,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "130", + "$id": "127", "Type": { - "$ref": "129" + "$ref": "126" }, "Value": "application/json" } @@ -1074,7 +1050,7 @@ ], "Responses": [ { - "$id": "131", + "$id": "128", "StatusCodes": [ 204 ], @@ -1095,15 +1071,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "132", + "$id": "129", "Name": "withAssert", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "133", + "$id": "130", "Name": "body", "NameInRequest": "body", "Type": { @@ -1120,11 +1096,11 @@ "Kind": "Method" }, { - "$id": "134", + "$id": "131", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "135", + "$id": "132", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1139,19 +1115,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "136", + "$id": "133", "Type": { - "$ref": "135" + "$ref": "132" }, "Value": "application/json" } }, { - "$id": "137", + "$id": "134", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "138", + "$id": "135", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1166,9 +1142,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "139", + "$id": "136", "Type": { - "$ref": "138" + "$ref": "135" }, "Value": "application/json" } @@ -1176,7 +1152,7 @@ ], "Responses": [ { - "$id": "140", + "$id": "137", "StatusCodes": [ 204 ], @@ -1197,15 +1173,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "141", + "$id": "138", "Name": "withAsync", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "142", + "$id": "139", "Name": "body", "NameInRequest": "body", "Type": { @@ -1222,11 +1198,11 @@ "Kind": "Method" }, { - "$id": "143", + "$id": "140", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "144", + "$id": "141", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1241,19 +1217,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "145", + "$id": "142", "Type": { - "$ref": "144" + "$ref": "141" }, "Value": "application/json" } }, { - "$id": "146", + "$id": "143", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "147", + "$id": "144", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1268,9 +1244,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "148", + "$id": "145", "Type": { - "$ref": "147" + "$ref": "144" }, "Value": "application/json" } @@ -1278,7 +1254,7 @@ ], "Responses": [ { - "$id": "149", + "$id": "146", "StatusCodes": [ 204 ], @@ -1299,15 +1275,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "150", + "$id": "147", "Name": "withAwait", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "151", + "$id": "148", "Name": "body", "NameInRequest": "body", "Type": { @@ -1324,11 +1300,11 @@ "Kind": "Method" }, { - "$id": "152", + "$id": "149", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "153", + "$id": "150", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1343,19 +1319,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "154", + "$id": "151", "Type": { - "$ref": "153" + "$ref": "150" }, "Value": "application/json" } }, { - "$id": "155", + "$id": "152", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "156", + "$id": "153", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1370,9 +1346,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "157", + "$id": "154", "Type": { - "$ref": "156" + "$ref": "153" }, "Value": "application/json" } @@ -1380,7 +1356,7 @@ ], "Responses": [ { - "$id": "158", + "$id": "155", "StatusCodes": [ 204 ], @@ -1401,15 +1377,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "159", + "$id": "156", "Name": "withBreak", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "160", + "$id": "157", "Name": "body", "NameInRequest": "body", "Type": { @@ -1426,11 +1402,11 @@ "Kind": "Method" }, { - "$id": "161", + "$id": "158", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "162", + "$id": "159", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1445,19 +1421,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "163", + "$id": "160", "Type": { - "$ref": "162" + "$ref": "159" }, "Value": "application/json" } }, { - "$id": "164", + "$id": "161", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "165", + "$id": "162", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1472,9 +1448,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "166", + "$id": "163", "Type": { - "$ref": "165" + "$ref": "162" }, "Value": "application/json" } @@ -1482,7 +1458,7 @@ ], "Responses": [ { - "$id": "167", + "$id": "164", "StatusCodes": [ 204 ], @@ -1503,15 +1479,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "168", + "$id": "165", "Name": "withClass", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "169", + "$id": "166", "Name": "body", "NameInRequest": "body", "Type": { @@ -1528,11 +1504,11 @@ "Kind": "Method" }, { - "$id": "170", + "$id": "167", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "171", + "$id": "168", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1547,19 +1523,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "172", + "$id": "169", "Type": { - "$ref": "171" + "$ref": "168" }, "Value": "application/json" } }, { - "$id": "173", + "$id": "170", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "174", + "$id": "171", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1574,9 +1550,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "172", "Type": { - "$ref": "174" + "$ref": "171" }, "Value": "application/json" } @@ -1584,7 +1560,7 @@ ], "Responses": [ { - "$id": "176", + "$id": "173", "StatusCodes": [ 204 ], @@ -1605,15 +1581,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "177", + "$id": "174", "Name": "withConstructor", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "178", + "$id": "175", "Name": "body", "NameInRequest": "body", "Type": { @@ -1630,11 +1606,11 @@ "Kind": "Method" }, { - "$id": "179", + "$id": "176", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "180", + "$id": "177", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1649,19 +1625,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "181", + "$id": "178", "Type": { - "$ref": "180" + "$ref": "177" }, "Value": "application/json" } }, { - "$id": "182", + "$id": "179", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "183", + "$id": "180", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1676,9 +1652,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "184", + "$id": "181", "Type": { - "$ref": "183" + "$ref": "180" }, "Value": "application/json" } @@ -1686,7 +1662,7 @@ ], "Responses": [ { - "$id": "185", + "$id": "182", "StatusCodes": [ 204 ], @@ -1707,15 +1683,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "186", + "$id": "183", "Name": "withContinue", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "187", + "$id": "184", "Name": "body", "NameInRequest": "body", "Type": { @@ -1732,11 +1708,11 @@ "Kind": "Method" }, { - "$id": "188", + "$id": "185", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "189", + "$id": "186", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1751,19 +1727,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "190", + "$id": "187", "Type": { - "$ref": "189" + "$ref": "186" }, "Value": "application/json" } }, { - "$id": "191", + "$id": "188", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "192", + "$id": "189", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1778,9 +1754,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "193", + "$id": "190", "Type": { - "$ref": "192" + "$ref": "189" }, "Value": "application/json" } @@ -1788,7 +1764,7 @@ ], "Responses": [ { - "$id": "194", + "$id": "191", "StatusCodes": [ 204 ], @@ -1809,15 +1785,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "195", + "$id": "192", "Name": "withDef", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "196", + "$id": "193", "Name": "body", "NameInRequest": "body", "Type": { @@ -1834,11 +1810,11 @@ "Kind": "Method" }, { - "$id": "197", + "$id": "194", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "198", + "$id": "195", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1853,19 +1829,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "199", + "$id": "196", "Type": { - "$ref": "198" + "$ref": "195" }, "Value": "application/json" } }, { - "$id": "200", + "$id": "197", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "201", + "$id": "198", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1880,9 +1856,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "202", + "$id": "199", "Type": { - "$ref": "201" + "$ref": "198" }, "Value": "application/json" } @@ -1890,7 +1866,7 @@ ], "Responses": [ { - "$id": "203", + "$id": "200", "StatusCodes": [ 204 ], @@ -1911,15 +1887,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "204", + "$id": "201", "Name": "withDel", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "205", + "$id": "202", "Name": "body", "NameInRequest": "body", "Type": { @@ -1936,11 +1912,11 @@ "Kind": "Method" }, { - "$id": "206", + "$id": "203", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "207", + "$id": "204", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1955,19 +1931,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "208", + "$id": "205", "Type": { - "$ref": "207" + "$ref": "204" }, "Value": "application/json" } }, { - "$id": "209", + "$id": "206", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "210", + "$id": "207", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1982,9 +1958,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "211", + "$id": "208", "Type": { - "$ref": "210" + "$ref": "207" }, "Value": "application/json" } @@ -1992,7 +1968,7 @@ ], "Responses": [ { - "$id": "212", + "$id": "209", "StatusCodes": [ 204 ], @@ -2013,15 +1989,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "213", + "$id": "210", "Name": "withElif", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "214", + "$id": "211", "Name": "body", "NameInRequest": "body", "Type": { @@ -2038,11 +2014,11 @@ "Kind": "Method" }, { - "$id": "215", + "$id": "212", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "216", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2057,19 +2033,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "217", + "$id": "214", "Type": { - "$ref": "216" + "$ref": "213" }, "Value": "application/json" } }, { - "$id": "218", + "$id": "215", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "219", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2084,9 +2060,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "220", + "$id": "217", "Type": { - "$ref": "219" + "$ref": "216" }, "Value": "application/json" } @@ -2094,7 +2070,7 @@ ], "Responses": [ { - "$id": "221", + "$id": "218", "StatusCodes": [ 204 ], @@ -2115,15 +2091,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "222", + "$id": "219", "Name": "withElse", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "223", + "$id": "220", "Name": "body", "NameInRequest": "body", "Type": { @@ -2140,11 +2116,11 @@ "Kind": "Method" }, { - "$id": "224", + "$id": "221", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "225", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2159,19 +2135,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "223", "Type": { - "$ref": "225" + "$ref": "222" }, "Value": "application/json" } }, { - "$id": "227", + "$id": "224", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "228", + "$id": "225", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2186,9 +2162,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "229", + "$id": "226", "Type": { - "$ref": "228" + "$ref": "225" }, "Value": "application/json" } @@ -2196,7 +2172,7 @@ ], "Responses": [ { - "$id": "230", + "$id": "227", "StatusCodes": [ 204 ], @@ -2217,15 +2193,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "231", + "$id": "228", "Name": "withExcept", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "232", + "$id": "229", "Name": "body", "NameInRequest": "body", "Type": { @@ -2242,11 +2218,11 @@ "Kind": "Method" }, { - "$id": "233", + "$id": "230", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "234", + "$id": "231", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2261,19 +2237,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "235", + "$id": "232", "Type": { - "$ref": "234" + "$ref": "231" }, "Value": "application/json" } }, { - "$id": "236", + "$id": "233", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "237", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2288,9 +2264,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "238", + "$id": "235", "Type": { - "$ref": "237" + "$ref": "234" }, "Value": "application/json" } @@ -2298,7 +2274,7 @@ ], "Responses": [ { - "$id": "239", + "$id": "236", "StatusCodes": [ 204 ], @@ -2319,15 +2295,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "240", + "$id": "237", "Name": "withExec", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "241", + "$id": "238", "Name": "body", "NameInRequest": "body", "Type": { @@ -2344,11 +2320,11 @@ "Kind": "Method" }, { - "$id": "242", + "$id": "239", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "243", + "$id": "240", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2363,19 +2339,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "244", + "$id": "241", "Type": { - "$ref": "243" + "$ref": "240" }, "Value": "application/json" } }, { - "$id": "245", + "$id": "242", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "246", + "$id": "243", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2390,9 +2366,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "247", + "$id": "244", "Type": { - "$ref": "246" + "$ref": "243" }, "Value": "application/json" } @@ -2400,7 +2376,7 @@ ], "Responses": [ { - "$id": "248", + "$id": "245", "StatusCodes": [ 204 ], @@ -2421,15 +2397,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "249", + "$id": "246", "Name": "withFinally", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "250", + "$id": "247", "Name": "body", "NameInRequest": "body", "Type": { @@ -2446,11 +2422,11 @@ "Kind": "Method" }, { - "$id": "251", + "$id": "248", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "252", + "$id": "249", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2465,19 +2441,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "253", + "$id": "250", "Type": { - "$ref": "252" + "$ref": "249" }, "Value": "application/json" } }, { - "$id": "254", + "$id": "251", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "255", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2492,9 +2468,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "253", "Type": { - "$ref": "255" + "$ref": "252" }, "Value": "application/json" } @@ -2502,7 +2478,7 @@ ], "Responses": [ { - "$id": "257", + "$id": "254", "StatusCodes": [ 204 ], @@ -2523,15 +2499,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "258", + "$id": "255", "Name": "withFor", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "259", + "$id": "256", "Name": "body", "NameInRequest": "body", "Type": { @@ -2548,11 +2524,11 @@ "Kind": "Method" }, { - "$id": "260", + "$id": "257", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "261", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2567,19 +2543,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "262", + "$id": "259", "Type": { - "$ref": "261" + "$ref": "258" }, "Value": "application/json" } }, { - "$id": "263", + "$id": "260", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "264", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2594,9 +2570,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "265", + "$id": "262", "Type": { - "$ref": "264" + "$ref": "261" }, "Value": "application/json" } @@ -2604,7 +2580,7 @@ ], "Responses": [ { - "$id": "266", + "$id": "263", "StatusCodes": [ 204 ], @@ -2625,15 +2601,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "267", + "$id": "264", "Name": "withFrom", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "268", + "$id": "265", "Name": "body", "NameInRequest": "body", "Type": { @@ -2650,11 +2626,11 @@ "Kind": "Method" }, { - "$id": "269", + "$id": "266", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "270", + "$id": "267", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2669,19 +2645,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "271", + "$id": "268", "Type": { - "$ref": "270" + "$ref": "267" }, "Value": "application/json" } }, { - "$id": "272", + "$id": "269", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "273", + "$id": "270", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2696,9 +2672,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "274", + "$id": "271", "Type": { - "$ref": "273" + "$ref": "270" }, "Value": "application/json" } @@ -2706,7 +2682,7 @@ ], "Responses": [ { - "$id": "275", + "$id": "272", "StatusCodes": [ 204 ], @@ -2727,15 +2703,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "276", + "$id": "273", "Name": "withGlobal", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "277", + "$id": "274", "Name": "body", "NameInRequest": "body", "Type": { @@ -2752,11 +2728,11 @@ "Kind": "Method" }, { - "$id": "278", + "$id": "275", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "279", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2771,19 +2747,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "280", + "$id": "277", "Type": { - "$ref": "279" + "$ref": "276" }, "Value": "application/json" } }, { - "$id": "281", + "$id": "278", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "282", + "$id": "279", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2798,9 +2774,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "283", + "$id": "280", "Type": { - "$ref": "282" + "$ref": "279" }, "Value": "application/json" } @@ -2808,7 +2784,7 @@ ], "Responses": [ { - "$id": "284", + "$id": "281", "StatusCodes": [ 204 ], @@ -2829,15 +2805,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "285", + "$id": "282", "Name": "withIf", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "286", + "$id": "283", "Name": "body", "NameInRequest": "body", "Type": { @@ -2854,11 +2830,11 @@ "Kind": "Method" }, { - "$id": "287", + "$id": "284", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "288", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2873,19 +2849,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "289", + "$id": "286", "Type": { - "$ref": "288" + "$ref": "285" }, "Value": "application/json" } }, { - "$id": "290", + "$id": "287", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "291", + "$id": "288", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2900,9 +2876,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "289", "Type": { - "$ref": "291" + "$ref": "288" }, "Value": "application/json" } @@ -2910,7 +2886,7 @@ ], "Responses": [ { - "$id": "293", + "$id": "290", "StatusCodes": [ 204 ], @@ -2931,15 +2907,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "294", + "$id": "291", "Name": "withImport", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "295", + "$id": "292", "Name": "body", "NameInRequest": "body", "Type": { @@ -2956,11 +2932,11 @@ "Kind": "Method" }, { - "$id": "296", + "$id": "293", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "297", + "$id": "294", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2975,19 +2951,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "298", + "$id": "295", "Type": { - "$ref": "297" + "$ref": "294" }, "Value": "application/json" } }, { - "$id": "299", + "$id": "296", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "300", + "$id": "297", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3002,9 +2978,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "301", + "$id": "298", "Type": { - "$ref": "300" + "$ref": "297" }, "Value": "application/json" } @@ -3012,7 +2988,7 @@ ], "Responses": [ { - "$id": "302", + "$id": "299", "StatusCodes": [ 204 ], @@ -3033,15 +3009,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "303", + "$id": "300", "Name": "withIn", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "304", + "$id": "301", "Name": "body", "NameInRequest": "body", "Type": { @@ -3058,11 +3034,11 @@ "Kind": "Method" }, { - "$id": "305", + "$id": "302", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "306", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3077,19 +3053,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "307", + "$id": "304", "Type": { - "$ref": "306" + "$ref": "303" }, "Value": "application/json" } }, { - "$id": "308", + "$id": "305", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "309", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3104,9 +3080,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "310", + "$id": "307", "Type": { - "$ref": "309" + "$ref": "306" }, "Value": "application/json" } @@ -3114,7 +3090,7 @@ ], "Responses": [ { - "$id": "311", + "$id": "308", "StatusCodes": [ 204 ], @@ -3135,15 +3111,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "312", + "$id": "309", "Name": "withIs", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "313", + "$id": "310", "Name": "body", "NameInRequest": "body", "Type": { @@ -3160,11 +3136,11 @@ "Kind": "Method" }, { - "$id": "314", + "$id": "311", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "315", + "$id": "312", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3179,19 +3155,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "316", + "$id": "313", "Type": { - "$ref": "315" + "$ref": "312" }, "Value": "application/json" } }, { - "$id": "317", + "$id": "314", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "318", + "$id": "315", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3206,9 +3182,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "319", + "$id": "316", "Type": { - "$ref": "318" + "$ref": "315" }, "Value": "application/json" } @@ -3216,7 +3192,7 @@ ], "Responses": [ { - "$id": "320", + "$id": "317", "StatusCodes": [ 204 ], @@ -3237,15 +3213,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "321", + "$id": "318", "Name": "withLambda", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "322", + "$id": "319", "Name": "body", "NameInRequest": "body", "Type": { @@ -3262,11 +3238,11 @@ "Kind": "Method" }, { - "$id": "323", + "$id": "320", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "324", + "$id": "321", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3281,19 +3257,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "325", + "$id": "322", "Type": { - "$ref": "324" + "$ref": "321" }, "Value": "application/json" } }, { - "$id": "326", + "$id": "323", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "327", + "$id": "324", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3308,9 +3284,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "328", + "$id": "325", "Type": { - "$ref": "327" + "$ref": "324" }, "Value": "application/json" } @@ -3318,7 +3294,7 @@ ], "Responses": [ { - "$id": "329", + "$id": "326", "StatusCodes": [ 204 ], @@ -3339,15 +3315,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "330", + "$id": "327", "Name": "withNot", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "331", + "$id": "328", "Name": "body", "NameInRequest": "body", "Type": { @@ -3364,11 +3340,11 @@ "Kind": "Method" }, { - "$id": "332", + "$id": "329", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "333", + "$id": "330", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3383,19 +3359,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "334", + "$id": "331", "Type": { - "$ref": "333" + "$ref": "330" }, "Value": "application/json" } }, { - "$id": "335", + "$id": "332", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "336", + "$id": "333", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3410,9 +3386,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "337", + "$id": "334", "Type": { - "$ref": "336" + "$ref": "333" }, "Value": "application/json" } @@ -3420,7 +3396,7 @@ ], "Responses": [ { - "$id": "338", + "$id": "335", "StatusCodes": [ 204 ], @@ -3441,15 +3417,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "339", + "$id": "336", "Name": "withOr", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "340", + "$id": "337", "Name": "body", "NameInRequest": "body", "Type": { @@ -3466,11 +3442,11 @@ "Kind": "Method" }, { - "$id": "341", + "$id": "338", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "342", + "$id": "339", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3485,19 +3461,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "343", + "$id": "340", "Type": { - "$ref": "342" + "$ref": "339" }, "Value": "application/json" } }, { - "$id": "344", + "$id": "341", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "345", + "$id": "342", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3512,9 +3488,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "346", + "$id": "343", "Type": { - "$ref": "345" + "$ref": "342" }, "Value": "application/json" } @@ -3522,7 +3498,7 @@ ], "Responses": [ { - "$id": "347", + "$id": "344", "StatusCodes": [ 204 ], @@ -3543,15 +3519,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "348", + "$id": "345", "Name": "withPass", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "349", + "$id": "346", "Name": "body", "NameInRequest": "body", "Type": { @@ -3568,11 +3544,11 @@ "Kind": "Method" }, { - "$id": "350", + "$id": "347", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "351", + "$id": "348", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3587,19 +3563,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "352", + "$id": "349", "Type": { - "$ref": "351" + "$ref": "348" }, "Value": "application/json" } }, { - "$id": "353", + "$id": "350", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "354", + "$id": "351", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3614,9 +3590,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "355", + "$id": "352", "Type": { - "$ref": "354" + "$ref": "351" }, "Value": "application/json" } @@ -3624,7 +3600,7 @@ ], "Responses": [ { - "$id": "356", + "$id": "353", "StatusCodes": [ 204 ], @@ -3645,15 +3621,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "357", + "$id": "354", "Name": "withRaise", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "358", + "$id": "355", "Name": "body", "NameInRequest": "body", "Type": { @@ -3670,11 +3646,11 @@ "Kind": "Method" }, { - "$id": "359", + "$id": "356", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "360", + "$id": "357", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3689,19 +3665,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "361", + "$id": "358", "Type": { - "$ref": "360" + "$ref": "357" }, "Value": "application/json" } }, { - "$id": "362", + "$id": "359", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "363", + "$id": "360", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3716,9 +3692,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "364", + "$id": "361", "Type": { - "$ref": "363" + "$ref": "360" }, "Value": "application/json" } @@ -3726,7 +3702,7 @@ ], "Responses": [ { - "$id": "365", + "$id": "362", "StatusCodes": [ 204 ], @@ -3747,15 +3723,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "366", + "$id": "363", "Name": "withReturn", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "367", + "$id": "364", "Name": "body", "NameInRequest": "body", "Type": { @@ -3772,11 +3748,11 @@ "Kind": "Method" }, { - "$id": "368", + "$id": "365", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "369", + "$id": "366", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3791,19 +3767,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "370", + "$id": "367", "Type": { - "$ref": "369" + "$ref": "366" }, "Value": "application/json" } }, { - "$id": "371", + "$id": "368", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "372", + "$id": "369", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3818,9 +3794,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "373", + "$id": "370", "Type": { - "$ref": "372" + "$ref": "369" }, "Value": "application/json" } @@ -3828,7 +3804,7 @@ ], "Responses": [ { - "$id": "374", + "$id": "371", "StatusCodes": [ 204 ], @@ -3849,15 +3825,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "375", + "$id": "372", "Name": "withTry", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "376", + "$id": "373", "Name": "body", "NameInRequest": "body", "Type": { @@ -3874,11 +3850,11 @@ "Kind": "Method" }, { - "$id": "377", + "$id": "374", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "378", + "$id": "375", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3893,19 +3869,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "379", + "$id": "376", "Type": { - "$ref": "378" + "$ref": "375" }, "Value": "application/json" } }, { - "$id": "380", + "$id": "377", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "381", + "$id": "378", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3920,9 +3896,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "382", + "$id": "379", "Type": { - "$ref": "381" + "$ref": "378" }, "Value": "application/json" } @@ -3930,7 +3906,7 @@ ], "Responses": [ { - "$id": "383", + "$id": "380", "StatusCodes": [ 204 ], @@ -3951,15 +3927,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "384", + "$id": "381", "Name": "withWhile", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "385", + "$id": "382", "Name": "body", "NameInRequest": "body", "Type": { @@ -3976,11 +3952,11 @@ "Kind": "Method" }, { - "$id": "386", + "$id": "383", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "387", + "$id": "384", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3995,19 +3971,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "388", + "$id": "385", "Type": { - "$ref": "387" + "$ref": "384" }, "Value": "application/json" } }, { - "$id": "389", + "$id": "386", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "390", + "$id": "387", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4022,9 +3998,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "391", + "$id": "388", "Type": { - "$ref": "390" + "$ref": "387" }, "Value": "application/json" } @@ -4032,7 +4008,7 @@ ], "Responses": [ { - "$id": "392", + "$id": "389", "StatusCodes": [ 204 ], @@ -4053,15 +4029,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "393", + "$id": "390", "Name": "withWith", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "394", + "$id": "391", "Name": "body", "NameInRequest": "body", "Type": { @@ -4078,11 +4054,11 @@ "Kind": "Method" }, { - "$id": "395", + "$id": "392", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "396", + "$id": "393", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4097,19 +4073,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "397", + "$id": "394", "Type": { - "$ref": "396" + "$ref": "393" }, "Value": "application/json" } }, { - "$id": "398", + "$id": "395", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "399", + "$id": "396", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4124,9 +4100,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "400", + "$id": "397", "Type": { - "$ref": "399" + "$ref": "396" }, "Value": "application/json" } @@ -4134,7 +4110,7 @@ ], "Responses": [ { - "$id": "401", + "$id": "398", "StatusCodes": [ 204 ], @@ -4155,15 +4131,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "402", + "$id": "399", "Name": "withYield", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "403", + "$id": "400", "Name": "body", "NameInRequest": "body", "Type": { @@ -4180,11 +4156,11 @@ "Kind": "Method" }, { - "$id": "404", + "$id": "401", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "405", + "$id": "402", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4199,19 +4175,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "406", + "$id": "403", "Type": { - "$ref": "405" + "$ref": "402" }, "Value": "application/json" } }, { - "$id": "407", + "$id": "404", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "408", + "$id": "405", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4226,9 +4202,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "409", + "$id": "406", "Type": { - "$ref": "408" + "$ref": "405" }, "Value": "application/json" } @@ -4236,7 +4212,7 @@ ], "Responses": [ { - "$id": "410", + "$id": "407", "StatusCodes": [ 204 ], @@ -4258,26 +4234,26 @@ } ], "Protocol": { - "$id": "411" + "$id": "408" }, "Creatable": false, "Parent": "SpecialWordsClient" }, { - "$id": "412", + "$id": "409", "Name": "ModelProperties", "Description": "Verify model names", "Operations": [ { - "$id": "413", + "$id": "410", "Name": "sameAsModel", "ResourceName": "ModelProperties", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "414", + "$id": "411", "Name": "body", "NameInRequest": "body", "Type": { @@ -4294,11 +4270,11 @@ "Kind": "Method" }, { - "$id": "415", + "$id": "412", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "416", + "$id": "413", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4313,19 +4289,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "417", + "$id": "414", "Type": { - "$ref": "416" + "$ref": "413" }, "Value": "application/json" } }, { - "$id": "418", + "$id": "415", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "419", + "$id": "416", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4340,9 +4316,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "420", + "$id": "417", "Type": { - "$ref": "419" + "$ref": "416" }, "Value": "application/json" } @@ -4350,7 +4326,7 @@ ], "Responses": [ { - "$id": "421", + "$id": "418", "StatusCodes": [ 204 ], @@ -4372,30 +4348,30 @@ } ], "Protocol": { - "$id": "422" + "$id": "419" }, "Creatable": false, "Parent": "SpecialWordsClient" }, { - "$id": "423", + "$id": "420", "Name": "Operations", "Description": "Test reserved words as operation name.", "Operations": [ { - "$id": "424", + "$id": "421", "Name": "and", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "425", + "$id": "422", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "426", + "$id": "423", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4410,9 +4386,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "427", + "$id": "424", "Type": { - "$ref": "426" + "$ref": "423" }, "Value": "application/json" } @@ -4420,7 +4396,7 @@ ], "Responses": [ { - "$id": "428", + "$id": "425", "StatusCodes": [ 204 ], @@ -4438,19 +4414,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "429", + "$id": "426", "Name": "as", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "430", + "$id": "427", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "431", + "$id": "428", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4465,9 +4441,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "432", + "$id": "429", "Type": { - "$ref": "431" + "$ref": "428" }, "Value": "application/json" } @@ -4475,7 +4451,7 @@ ], "Responses": [ { - "$id": "433", + "$id": "430", "StatusCodes": [ 204 ], @@ -4493,19 +4469,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "434", + "$id": "431", "Name": "assert", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "435", + "$id": "432", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "436", + "$id": "433", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4520,9 +4496,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "437", + "$id": "434", "Type": { - "$ref": "436" + "$ref": "433" }, "Value": "application/json" } @@ -4530,7 +4506,7 @@ ], "Responses": [ { - "$id": "438", + "$id": "435", "StatusCodes": [ 204 ], @@ -4548,19 +4524,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "439", + "$id": "436", "Name": "async", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "440", + "$id": "437", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "441", + "$id": "438", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4575,9 +4551,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "442", + "$id": "439", "Type": { - "$ref": "441" + "$ref": "438" }, "Value": "application/json" } @@ -4585,7 +4561,7 @@ ], "Responses": [ { - "$id": "443", + "$id": "440", "StatusCodes": [ 204 ], @@ -4603,19 +4579,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "444", + "$id": "441", "Name": "await", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "445", + "$id": "442", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "446", + "$id": "443", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4630,9 +4606,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "447", + "$id": "444", "Type": { - "$ref": "446" + "$ref": "443" }, "Value": "application/json" } @@ -4640,7 +4616,7 @@ ], "Responses": [ { - "$id": "448", + "$id": "445", "StatusCodes": [ 204 ], @@ -4658,19 +4634,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "449", + "$id": "446", "Name": "break", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "450", + "$id": "447", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "451", + "$id": "448", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4685,9 +4661,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "452", + "$id": "449", "Type": { - "$ref": "451" + "$ref": "448" }, "Value": "application/json" } @@ -4695,7 +4671,7 @@ ], "Responses": [ { - "$id": "453", + "$id": "450", "StatusCodes": [ 204 ], @@ -4713,19 +4689,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "454", + "$id": "451", "Name": "class", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "455", + "$id": "452", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "456", + "$id": "453", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4740,9 +4716,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "457", + "$id": "454", "Type": { - "$ref": "456" + "$ref": "453" }, "Value": "application/json" } @@ -4750,7 +4726,7 @@ ], "Responses": [ { - "$id": "458", + "$id": "455", "StatusCodes": [ 204 ], @@ -4768,19 +4744,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "459", + "$id": "456", "Name": "constructor", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "460", + "$id": "457", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "461", + "$id": "458", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4795,9 +4771,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "462", + "$id": "459", "Type": { - "$ref": "461" + "$ref": "458" }, "Value": "application/json" } @@ -4805,7 +4781,7 @@ ], "Responses": [ { - "$id": "463", + "$id": "460", "StatusCodes": [ 204 ], @@ -4823,19 +4799,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "464", + "$id": "461", "Name": "continue", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "465", + "$id": "462", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "466", + "$id": "463", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4850,9 +4826,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "467", + "$id": "464", "Type": { - "$ref": "466" + "$ref": "463" }, "Value": "application/json" } @@ -4860,7 +4836,7 @@ ], "Responses": [ { - "$id": "468", + "$id": "465", "StatusCodes": [ 204 ], @@ -4878,19 +4854,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "469", + "$id": "466", "Name": "def", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "470", + "$id": "467", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "471", + "$id": "468", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4905,9 +4881,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "472", + "$id": "469", "Type": { - "$ref": "471" + "$ref": "468" }, "Value": "application/json" } @@ -4915,7 +4891,7 @@ ], "Responses": [ { - "$id": "473", + "$id": "470", "StatusCodes": [ 204 ], @@ -4933,19 +4909,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "474", + "$id": "471", "Name": "del", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "475", + "$id": "472", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "476", + "$id": "473", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4960,9 +4936,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "477", + "$id": "474", "Type": { - "$ref": "476" + "$ref": "473" }, "Value": "application/json" } @@ -4970,7 +4946,7 @@ ], "Responses": [ { - "$id": "478", + "$id": "475", "StatusCodes": [ 204 ], @@ -4988,19 +4964,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "479", + "$id": "476", "Name": "elif", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "480", + "$id": "477", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "481", + "$id": "478", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5015,9 +4991,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "482", + "$id": "479", "Type": { - "$ref": "481" + "$ref": "478" }, "Value": "application/json" } @@ -5025,7 +5001,7 @@ ], "Responses": [ { - "$id": "483", + "$id": "480", "StatusCodes": [ 204 ], @@ -5043,19 +5019,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "484", + "$id": "481", "Name": "else", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "485", + "$id": "482", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "486", + "$id": "483", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5070,9 +5046,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "487", + "$id": "484", "Type": { - "$ref": "486" + "$ref": "483" }, "Value": "application/json" } @@ -5080,7 +5056,7 @@ ], "Responses": [ { - "$id": "488", + "$id": "485", "StatusCodes": [ 204 ], @@ -5098,19 +5074,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "489", + "$id": "486", "Name": "except", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "490", + "$id": "487", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "491", + "$id": "488", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5125,9 +5101,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "492", + "$id": "489", "Type": { - "$ref": "491" + "$ref": "488" }, "Value": "application/json" } @@ -5135,7 +5111,7 @@ ], "Responses": [ { - "$id": "493", + "$id": "490", "StatusCodes": [ 204 ], @@ -5153,19 +5129,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "494", + "$id": "491", "Name": "exec", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "495", + "$id": "492", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "496", + "$id": "493", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5180,9 +5156,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "497", + "$id": "494", "Type": { - "$ref": "496" + "$ref": "493" }, "Value": "application/json" } @@ -5190,7 +5166,7 @@ ], "Responses": [ { - "$id": "498", + "$id": "495", "StatusCodes": [ 204 ], @@ -5208,19 +5184,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "499", + "$id": "496", "Name": "finally", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "500", + "$id": "497", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "501", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5235,9 +5211,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "502", + "$id": "499", "Type": { - "$ref": "501" + "$ref": "498" }, "Value": "application/json" } @@ -5245,7 +5221,7 @@ ], "Responses": [ { - "$id": "503", + "$id": "500", "StatusCodes": [ 204 ], @@ -5263,19 +5239,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "504", + "$id": "501", "Name": "for", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "505", + "$id": "502", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "506", + "$id": "503", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5290,9 +5266,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "507", + "$id": "504", "Type": { - "$ref": "506" + "$ref": "503" }, "Value": "application/json" } @@ -5300,7 +5276,7 @@ ], "Responses": [ { - "$id": "508", + "$id": "505", "StatusCodes": [ 204 ], @@ -5318,19 +5294,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "509", + "$id": "506", "Name": "from", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "510", + "$id": "507", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "511", + "$id": "508", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5345,9 +5321,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "512", + "$id": "509", "Type": { - "$ref": "511" + "$ref": "508" }, "Value": "application/json" } @@ -5355,7 +5331,7 @@ ], "Responses": [ { - "$id": "513", + "$id": "510", "StatusCodes": [ 204 ], @@ -5373,19 +5349,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "514", + "$id": "511", "Name": "global", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "515", + "$id": "512", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "516", + "$id": "513", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5400,9 +5376,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "517", + "$id": "514", "Type": { - "$ref": "516" + "$ref": "513" }, "Value": "application/json" } @@ -5410,7 +5386,7 @@ ], "Responses": [ { - "$id": "518", + "$id": "515", "StatusCodes": [ 204 ], @@ -5428,19 +5404,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "519", + "$id": "516", "Name": "if", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "520", + "$id": "517", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "521", + "$id": "518", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5455,9 +5431,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "522", + "$id": "519", "Type": { - "$ref": "521" + "$ref": "518" }, "Value": "application/json" } @@ -5465,7 +5441,7 @@ ], "Responses": [ { - "$id": "523", + "$id": "520", "StatusCodes": [ 204 ], @@ -5483,19 +5459,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "524", + "$id": "521", "Name": "import", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "525", + "$id": "522", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "526", + "$id": "523", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5510,9 +5486,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "527", + "$id": "524", "Type": { - "$ref": "526" + "$ref": "523" }, "Value": "application/json" } @@ -5520,7 +5496,7 @@ ], "Responses": [ { - "$id": "528", + "$id": "525", "StatusCodes": [ 204 ], @@ -5538,19 +5514,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "529", + "$id": "526", "Name": "in", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "530", + "$id": "527", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "531", + "$id": "528", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5565,9 +5541,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "532", + "$id": "529", "Type": { - "$ref": "531" + "$ref": "528" }, "Value": "application/json" } @@ -5575,7 +5551,7 @@ ], "Responses": [ { - "$id": "533", + "$id": "530", "StatusCodes": [ 204 ], @@ -5593,19 +5569,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "534", + "$id": "531", "Name": "is", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "535", + "$id": "532", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "536", + "$id": "533", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5620,9 +5596,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "537", + "$id": "534", "Type": { - "$ref": "536" + "$ref": "533" }, "Value": "application/json" } @@ -5630,7 +5606,7 @@ ], "Responses": [ { - "$id": "538", + "$id": "535", "StatusCodes": [ 204 ], @@ -5648,19 +5624,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "539", + "$id": "536", "Name": "lambda", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "540", + "$id": "537", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "541", + "$id": "538", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5675,9 +5651,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "542", + "$id": "539", "Type": { - "$ref": "541" + "$ref": "538" }, "Value": "application/json" } @@ -5685,7 +5661,7 @@ ], "Responses": [ { - "$id": "543", + "$id": "540", "StatusCodes": [ 204 ], @@ -5703,19 +5679,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "544", + "$id": "541", "Name": "not", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "545", + "$id": "542", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "546", + "$id": "543", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5730,9 +5706,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "547", + "$id": "544", "Type": { - "$ref": "546" + "$ref": "543" }, "Value": "application/json" } @@ -5740,7 +5716,7 @@ ], "Responses": [ { - "$id": "548", + "$id": "545", "StatusCodes": [ 204 ], @@ -5758,19 +5734,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "549", + "$id": "546", "Name": "or", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "550", + "$id": "547", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "551", + "$id": "548", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5785,9 +5761,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "552", + "$id": "549", "Type": { - "$ref": "551" + "$ref": "548" }, "Value": "application/json" } @@ -5795,7 +5771,7 @@ ], "Responses": [ { - "$id": "553", + "$id": "550", "StatusCodes": [ 204 ], @@ -5813,19 +5789,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "554", + "$id": "551", "Name": "pass", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "555", + "$id": "552", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "556", + "$id": "553", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5840,9 +5816,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "557", + "$id": "554", "Type": { - "$ref": "556" + "$ref": "553" }, "Value": "application/json" } @@ -5850,7 +5826,7 @@ ], "Responses": [ { - "$id": "558", + "$id": "555", "StatusCodes": [ 204 ], @@ -5868,19 +5844,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "559", + "$id": "556", "Name": "raise", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "560", + "$id": "557", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "561", + "$id": "558", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5895,9 +5871,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "562", + "$id": "559", "Type": { - "$ref": "561" + "$ref": "558" }, "Value": "application/json" } @@ -5905,7 +5881,7 @@ ], "Responses": [ { - "$id": "563", + "$id": "560", "StatusCodes": [ 204 ], @@ -5923,19 +5899,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "564", + "$id": "561", "Name": "return", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "565", + "$id": "562", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "566", + "$id": "563", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5950,9 +5926,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "567", + "$id": "564", "Type": { - "$ref": "566" + "$ref": "563" }, "Value": "application/json" } @@ -5960,7 +5936,7 @@ ], "Responses": [ { - "$id": "568", + "$id": "565", "StatusCodes": [ 204 ], @@ -5978,19 +5954,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "569", + "$id": "566", "Name": "try", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "570", + "$id": "567", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "571", + "$id": "568", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6005,9 +5981,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "572", + "$id": "569", "Type": { - "$ref": "571" + "$ref": "568" }, "Value": "application/json" } @@ -6015,7 +5991,7 @@ ], "Responses": [ { - "$id": "573", + "$id": "570", "StatusCodes": [ 204 ], @@ -6033,19 +6009,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "574", + "$id": "571", "Name": "while", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "575", + "$id": "572", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "576", + "$id": "573", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6060,9 +6036,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "577", + "$id": "574", "Type": { - "$ref": "576" + "$ref": "573" }, "Value": "application/json" } @@ -6070,7 +6046,7 @@ ], "Responses": [ { - "$id": "578", + "$id": "575", "StatusCodes": [ 204 ], @@ -6088,19 +6064,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "579", + "$id": "576", "Name": "with", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "580", + "$id": "577", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "581", + "$id": "578", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6115,9 +6091,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "582", + "$id": "579", "Type": { - "$ref": "581" + "$ref": "578" }, "Value": "application/json" } @@ -6125,7 +6101,7 @@ ], "Responses": [ { - "$id": "583", + "$id": "580", "StatusCodes": [ 204 ], @@ -6143,19 +6119,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "584", + "$id": "581", "Name": "yield", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "585", + "$id": "582", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "586", + "$id": "583", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6170,9 +6146,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "587", + "$id": "584", "Type": { - "$ref": "586" + "$ref": "583" }, "Value": "application/json" } @@ -6180,7 +6156,7 @@ ], "Responses": [ { - "$id": "588", + "$id": "585", "StatusCodes": [ 204 ], @@ -6199,30 +6175,30 @@ } ], "Protocol": { - "$id": "589" + "$id": "586" }, "Creatable": false, "Parent": "SpecialWordsClient" }, { - "$id": "590", + "$id": "587", "Name": "Parameters", "Description": "Verify reserved words as parameter name.", "Operations": [ { - "$id": "591", + "$id": "588", "Name": "withAnd", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "592", + "$id": "589", "Name": "and", "NameInRequest": "and", "Type": { - "$id": "593", + "$id": "590", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6238,11 +6214,11 @@ "Kind": "Method" }, { - "$id": "594", + "$id": "591", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "595", + "$id": "592", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6257,9 +6233,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "596", + "$id": "593", "Type": { - "$ref": "595" + "$ref": "592" }, "Value": "application/json" } @@ -6267,7 +6243,7 @@ ], "Responses": [ { - "$id": "597", + "$id": "594", "StatusCodes": [ 204 ], @@ -6285,19 +6261,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "598", + "$id": "595", "Name": "withAs", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "599", + "$id": "596", "Name": "as", "NameInRequest": "as", "Type": { - "$id": "600", + "$id": "597", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6313,11 +6289,11 @@ "Kind": "Method" }, { - "$id": "601", + "$id": "598", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "602", + "$id": "599", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6332,9 +6308,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "603", + "$id": "600", "Type": { - "$ref": "602" + "$ref": "599" }, "Value": "application/json" } @@ -6342,7 +6318,7 @@ ], "Responses": [ { - "$id": "604", + "$id": "601", "StatusCodes": [ 204 ], @@ -6360,19 +6336,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "605", + "$id": "602", "Name": "withAssert", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "606", + "$id": "603", "Name": "assert", "NameInRequest": "assert", "Type": { - "$id": "607", + "$id": "604", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6388,11 +6364,11 @@ "Kind": "Method" }, { - "$id": "608", + "$id": "605", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "609", + "$id": "606", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6407,9 +6383,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "610", + "$id": "607", "Type": { - "$ref": "609" + "$ref": "606" }, "Value": "application/json" } @@ -6417,7 +6393,7 @@ ], "Responses": [ { - "$id": "611", + "$id": "608", "StatusCodes": [ 204 ], @@ -6435,19 +6411,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "612", + "$id": "609", "Name": "withAsync", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "613", + "$id": "610", "Name": "async", "NameInRequest": "async", "Type": { - "$id": "614", + "$id": "611", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6463,11 +6439,11 @@ "Kind": "Method" }, { - "$id": "615", + "$id": "612", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "616", + "$id": "613", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6482,9 +6458,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "617", + "$id": "614", "Type": { - "$ref": "616" + "$ref": "613" }, "Value": "application/json" } @@ -6492,7 +6468,7 @@ ], "Responses": [ { - "$id": "618", + "$id": "615", "StatusCodes": [ 204 ], @@ -6510,19 +6486,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "619", + "$id": "616", "Name": "withAwait", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "620", + "$id": "617", "Name": "await", "NameInRequest": "await", "Type": { - "$id": "621", + "$id": "618", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6538,11 +6514,11 @@ "Kind": "Method" }, { - "$id": "622", + "$id": "619", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "623", + "$id": "620", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6557,9 +6533,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "624", + "$id": "621", "Type": { - "$ref": "623" + "$ref": "620" }, "Value": "application/json" } @@ -6567,7 +6543,7 @@ ], "Responses": [ { - "$id": "625", + "$id": "622", "StatusCodes": [ 204 ], @@ -6585,19 +6561,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "626", + "$id": "623", "Name": "withBreak", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "627", + "$id": "624", "Name": "break", "NameInRequest": "break", "Type": { - "$id": "628", + "$id": "625", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6613,11 +6589,11 @@ "Kind": "Method" }, { - "$id": "629", + "$id": "626", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "630", + "$id": "627", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6632,9 +6608,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "631", + "$id": "628", "Type": { - "$ref": "630" + "$ref": "627" }, "Value": "application/json" } @@ -6642,7 +6618,7 @@ ], "Responses": [ { - "$id": "632", + "$id": "629", "StatusCodes": [ 204 ], @@ -6660,19 +6636,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "633", + "$id": "630", "Name": "withClass", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "634", + "$id": "631", "Name": "class", "NameInRequest": "class", "Type": { - "$id": "635", + "$id": "632", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6688,11 +6664,11 @@ "Kind": "Method" }, { - "$id": "636", + "$id": "633", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "637", + "$id": "634", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6707,9 +6683,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "638", + "$id": "635", "Type": { - "$ref": "637" + "$ref": "634" }, "Value": "application/json" } @@ -6717,7 +6693,7 @@ ], "Responses": [ { - "$id": "639", + "$id": "636", "StatusCodes": [ 204 ], @@ -6735,19 +6711,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "640", + "$id": "637", "Name": "withConstructor", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "641", + "$id": "638", "Name": "constructor", "NameInRequest": "constructor", "Type": { - "$id": "642", + "$id": "639", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6763,11 +6739,11 @@ "Kind": "Method" }, { - "$id": "643", + "$id": "640", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "644", + "$id": "641", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6782,9 +6758,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "645", + "$id": "642", "Type": { - "$ref": "644" + "$ref": "641" }, "Value": "application/json" } @@ -6792,7 +6768,7 @@ ], "Responses": [ { - "$id": "646", + "$id": "643", "StatusCodes": [ 204 ], @@ -6810,19 +6786,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "647", + "$id": "644", "Name": "withContinue", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "648", + "$id": "645", "Name": "continue", "NameInRequest": "continue", "Type": { - "$id": "649", + "$id": "646", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6838,11 +6814,11 @@ "Kind": "Method" }, { - "$id": "650", + "$id": "647", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "651", + "$id": "648", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6857,9 +6833,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "652", + "$id": "649", "Type": { - "$ref": "651" + "$ref": "648" }, "Value": "application/json" } @@ -6867,7 +6843,7 @@ ], "Responses": [ { - "$id": "653", + "$id": "650", "StatusCodes": [ 204 ], @@ -6885,19 +6861,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "654", + "$id": "651", "Name": "withDef", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "655", + "$id": "652", "Name": "def", "NameInRequest": "def", "Type": { - "$id": "656", + "$id": "653", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6913,11 +6889,11 @@ "Kind": "Method" }, { - "$id": "657", + "$id": "654", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "658", + "$id": "655", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6932,9 +6908,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "659", + "$id": "656", "Type": { - "$ref": "658" + "$ref": "655" }, "Value": "application/json" } @@ -6942,7 +6918,7 @@ ], "Responses": [ { - "$id": "660", + "$id": "657", "StatusCodes": [ 204 ], @@ -6960,19 +6936,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "661", + "$id": "658", "Name": "withDel", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "662", + "$id": "659", "Name": "del", "NameInRequest": "del", "Type": { - "$id": "663", + "$id": "660", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6988,11 +6964,11 @@ "Kind": "Method" }, { - "$id": "664", + "$id": "661", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "665", + "$id": "662", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7007,9 +6983,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "666", + "$id": "663", "Type": { - "$ref": "665" + "$ref": "662" }, "Value": "application/json" } @@ -7017,7 +6993,7 @@ ], "Responses": [ { - "$id": "667", + "$id": "664", "StatusCodes": [ 204 ], @@ -7035,19 +7011,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "668", + "$id": "665", "Name": "withElif", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "669", + "$id": "666", "Name": "elif", "NameInRequest": "elif", "Type": { - "$id": "670", + "$id": "667", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7063,11 +7039,11 @@ "Kind": "Method" }, { - "$id": "671", + "$id": "668", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "672", + "$id": "669", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7082,9 +7058,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "673", + "$id": "670", "Type": { - "$ref": "672" + "$ref": "669" }, "Value": "application/json" } @@ -7092,7 +7068,7 @@ ], "Responses": [ { - "$id": "674", + "$id": "671", "StatusCodes": [ 204 ], @@ -7110,19 +7086,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "675", + "$id": "672", "Name": "withElse", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "676", + "$id": "673", "Name": "else", "NameInRequest": "else", "Type": { - "$id": "677", + "$id": "674", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7138,11 +7114,11 @@ "Kind": "Method" }, { - "$id": "678", + "$id": "675", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "679", + "$id": "676", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7157,9 +7133,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "680", + "$id": "677", "Type": { - "$ref": "679" + "$ref": "676" }, "Value": "application/json" } @@ -7167,7 +7143,7 @@ ], "Responses": [ { - "$id": "681", + "$id": "678", "StatusCodes": [ 204 ], @@ -7185,19 +7161,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "682", + "$id": "679", "Name": "withExcept", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "683", + "$id": "680", "Name": "except", "NameInRequest": "except", "Type": { - "$id": "684", + "$id": "681", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7213,11 +7189,11 @@ "Kind": "Method" }, { - "$id": "685", + "$id": "682", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "686", + "$id": "683", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7232,9 +7208,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "687", + "$id": "684", "Type": { - "$ref": "686" + "$ref": "683" }, "Value": "application/json" } @@ -7242,7 +7218,7 @@ ], "Responses": [ { - "$id": "688", + "$id": "685", "StatusCodes": [ 204 ], @@ -7260,19 +7236,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "689", + "$id": "686", "Name": "withExec", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "690", + "$id": "687", "Name": "exec", "NameInRequest": "exec", "Type": { - "$id": "691", + "$id": "688", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7288,11 +7264,11 @@ "Kind": "Method" }, { - "$id": "692", + "$id": "689", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "693", + "$id": "690", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7307,9 +7283,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "694", + "$id": "691", "Type": { - "$ref": "693" + "$ref": "690" }, "Value": "application/json" } @@ -7317,7 +7293,7 @@ ], "Responses": [ { - "$id": "695", + "$id": "692", "StatusCodes": [ 204 ], @@ -7335,19 +7311,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "696", + "$id": "693", "Name": "withFinally", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "697", + "$id": "694", "Name": "finally", "NameInRequest": "finally", "Type": { - "$id": "698", + "$id": "695", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7363,11 +7339,11 @@ "Kind": "Method" }, { - "$id": "699", + "$id": "696", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "700", + "$id": "697", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7382,9 +7358,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "701", + "$id": "698", "Type": { - "$ref": "700" + "$ref": "697" }, "Value": "application/json" } @@ -7392,7 +7368,7 @@ ], "Responses": [ { - "$id": "702", + "$id": "699", "StatusCodes": [ 204 ], @@ -7410,19 +7386,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "703", + "$id": "700", "Name": "withFor", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "704", + "$id": "701", "Name": "for", "NameInRequest": "for", "Type": { - "$id": "705", + "$id": "702", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7438,11 +7414,11 @@ "Kind": "Method" }, { - "$id": "706", + "$id": "703", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "707", + "$id": "704", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7457,9 +7433,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "708", + "$id": "705", "Type": { - "$ref": "707" + "$ref": "704" }, "Value": "application/json" } @@ -7467,7 +7443,7 @@ ], "Responses": [ { - "$id": "709", + "$id": "706", "StatusCodes": [ 204 ], @@ -7485,19 +7461,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "710", + "$id": "707", "Name": "withFrom", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "711", + "$id": "708", "Name": "from", "NameInRequest": "from", "Type": { - "$id": "712", + "$id": "709", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7513,11 +7489,11 @@ "Kind": "Method" }, { - "$id": "713", + "$id": "710", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "714", + "$id": "711", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7532,9 +7508,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "715", + "$id": "712", "Type": { - "$ref": "714" + "$ref": "711" }, "Value": "application/json" } @@ -7542,7 +7518,7 @@ ], "Responses": [ { - "$id": "716", + "$id": "713", "StatusCodes": [ 204 ], @@ -7560,19 +7536,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "717", + "$id": "714", "Name": "withGlobal", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "718", + "$id": "715", "Name": "global", "NameInRequest": "global", "Type": { - "$id": "719", + "$id": "716", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7588,11 +7564,11 @@ "Kind": "Method" }, { - "$id": "720", + "$id": "717", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "721", + "$id": "718", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7607,9 +7583,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "722", + "$id": "719", "Type": { - "$ref": "721" + "$ref": "718" }, "Value": "application/json" } @@ -7617,7 +7593,7 @@ ], "Responses": [ { - "$id": "723", + "$id": "720", "StatusCodes": [ 204 ], @@ -7635,19 +7611,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "724", + "$id": "721", "Name": "withIf", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "725", + "$id": "722", "Name": "if", "NameInRequest": "if", "Type": { - "$id": "726", + "$id": "723", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7663,11 +7639,11 @@ "Kind": "Method" }, { - "$id": "727", + "$id": "724", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "728", + "$id": "725", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7682,9 +7658,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "729", + "$id": "726", "Type": { - "$ref": "728" + "$ref": "725" }, "Value": "application/json" } @@ -7692,7 +7668,7 @@ ], "Responses": [ { - "$id": "730", + "$id": "727", "StatusCodes": [ 204 ], @@ -7710,19 +7686,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "731", + "$id": "728", "Name": "withImport", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "732", + "$id": "729", "Name": "import", "NameInRequest": "import", "Type": { - "$id": "733", + "$id": "730", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7738,11 +7714,11 @@ "Kind": "Method" }, { - "$id": "734", + "$id": "731", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "735", + "$id": "732", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7757,9 +7733,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "736", + "$id": "733", "Type": { - "$ref": "735" + "$ref": "732" }, "Value": "application/json" } @@ -7767,7 +7743,7 @@ ], "Responses": [ { - "$id": "737", + "$id": "734", "StatusCodes": [ 204 ], @@ -7785,19 +7761,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "738", + "$id": "735", "Name": "withIn", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "739", + "$id": "736", "Name": "in", "NameInRequest": "in", "Type": { - "$id": "740", + "$id": "737", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7813,11 +7789,11 @@ "Kind": "Method" }, { - "$id": "741", + "$id": "738", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "742", + "$id": "739", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7832,9 +7808,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "743", + "$id": "740", "Type": { - "$ref": "742" + "$ref": "739" }, "Value": "application/json" } @@ -7842,7 +7818,7 @@ ], "Responses": [ { - "$id": "744", + "$id": "741", "StatusCodes": [ 204 ], @@ -7860,19 +7836,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "745", + "$id": "742", "Name": "withIs", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "746", + "$id": "743", "Name": "is", "NameInRequest": "is", "Type": { - "$id": "747", + "$id": "744", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7888,11 +7864,11 @@ "Kind": "Method" }, { - "$id": "748", + "$id": "745", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "749", + "$id": "746", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7907,9 +7883,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "750", + "$id": "747", "Type": { - "$ref": "749" + "$ref": "746" }, "Value": "application/json" } @@ -7917,7 +7893,7 @@ ], "Responses": [ { - "$id": "751", + "$id": "748", "StatusCodes": [ 204 ], @@ -7935,19 +7911,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "752", + "$id": "749", "Name": "withLambda", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "753", + "$id": "750", "Name": "lambda", "NameInRequest": "lambda", "Type": { - "$id": "754", + "$id": "751", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7963,11 +7939,11 @@ "Kind": "Method" }, { - "$id": "755", + "$id": "752", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "756", + "$id": "753", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7982,9 +7958,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "757", + "$id": "754", "Type": { - "$ref": "756" + "$ref": "753" }, "Value": "application/json" } @@ -7992,7 +7968,7 @@ ], "Responses": [ { - "$id": "758", + "$id": "755", "StatusCodes": [ 204 ], @@ -8010,19 +7986,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "759", + "$id": "756", "Name": "withNot", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "760", + "$id": "757", "Name": "not", "NameInRequest": "not", "Type": { - "$id": "761", + "$id": "758", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8038,11 +8014,11 @@ "Kind": "Method" }, { - "$id": "762", + "$id": "759", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "763", + "$id": "760", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8057,9 +8033,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "764", + "$id": "761", "Type": { - "$ref": "763" + "$ref": "760" }, "Value": "application/json" } @@ -8067,7 +8043,7 @@ ], "Responses": [ { - "$id": "765", + "$id": "762", "StatusCodes": [ 204 ], @@ -8085,19 +8061,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "766", + "$id": "763", "Name": "withOr", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "767", + "$id": "764", "Name": "or", "NameInRequest": "or", "Type": { - "$id": "768", + "$id": "765", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8113,11 +8089,11 @@ "Kind": "Method" }, { - "$id": "769", + "$id": "766", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "770", + "$id": "767", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8132,9 +8108,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "771", + "$id": "768", "Type": { - "$ref": "770" + "$ref": "767" }, "Value": "application/json" } @@ -8142,7 +8118,7 @@ ], "Responses": [ { - "$id": "772", + "$id": "769", "StatusCodes": [ 204 ], @@ -8160,19 +8136,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "773", + "$id": "770", "Name": "withPass", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "774", + "$id": "771", "Name": "pass", "NameInRequest": "pass", "Type": { - "$id": "775", + "$id": "772", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8188,11 +8164,11 @@ "Kind": "Method" }, { - "$id": "776", + "$id": "773", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "777", + "$id": "774", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8207,9 +8183,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "778", + "$id": "775", "Type": { - "$ref": "777" + "$ref": "774" }, "Value": "application/json" } @@ -8217,7 +8193,7 @@ ], "Responses": [ { - "$id": "779", + "$id": "776", "StatusCodes": [ 204 ], @@ -8235,19 +8211,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "780", + "$id": "777", "Name": "withRaise", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "781", + "$id": "778", "Name": "raise", "NameInRequest": "raise", "Type": { - "$id": "782", + "$id": "779", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8263,11 +8239,11 @@ "Kind": "Method" }, { - "$id": "783", + "$id": "780", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "784", + "$id": "781", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8282,9 +8258,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "785", + "$id": "782", "Type": { - "$ref": "784" + "$ref": "781" }, "Value": "application/json" } @@ -8292,7 +8268,7 @@ ], "Responses": [ { - "$id": "786", + "$id": "783", "StatusCodes": [ 204 ], @@ -8310,19 +8286,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "787", + "$id": "784", "Name": "withReturn", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "788", + "$id": "785", "Name": "return", "NameInRequest": "return", "Type": { - "$id": "789", + "$id": "786", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8338,11 +8314,11 @@ "Kind": "Method" }, { - "$id": "790", + "$id": "787", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "791", + "$id": "788", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8357,9 +8333,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "792", + "$id": "789", "Type": { - "$ref": "791" + "$ref": "788" }, "Value": "application/json" } @@ -8367,7 +8343,7 @@ ], "Responses": [ { - "$id": "793", + "$id": "790", "StatusCodes": [ 204 ], @@ -8385,19 +8361,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "794", + "$id": "791", "Name": "withTry", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "795", + "$id": "792", "Name": "try", "NameInRequest": "try", "Type": { - "$id": "796", + "$id": "793", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8413,11 +8389,11 @@ "Kind": "Method" }, { - "$id": "797", + "$id": "794", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "798", + "$id": "795", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8432,9 +8408,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "799", + "$id": "796", "Type": { - "$ref": "798" + "$ref": "795" }, "Value": "application/json" } @@ -8442,7 +8418,7 @@ ], "Responses": [ { - "$id": "800", + "$id": "797", "StatusCodes": [ 204 ], @@ -8460,19 +8436,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "801", + "$id": "798", "Name": "withWhile", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "802", + "$id": "799", "Name": "while", "NameInRequest": "while", "Type": { - "$id": "803", + "$id": "800", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8488,11 +8464,11 @@ "Kind": "Method" }, { - "$id": "804", + "$id": "801", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "805", + "$id": "802", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8507,9 +8483,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "806", + "$id": "803", "Type": { - "$ref": "805" + "$ref": "802" }, "Value": "application/json" } @@ -8517,7 +8493,7 @@ ], "Responses": [ { - "$id": "807", + "$id": "804", "StatusCodes": [ 204 ], @@ -8535,19 +8511,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "808", + "$id": "805", "Name": "withWith", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "809", + "$id": "806", "Name": "with", "NameInRequest": "with", "Type": { - "$id": "810", + "$id": "807", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8563,11 +8539,11 @@ "Kind": "Method" }, { - "$id": "811", + "$id": "808", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "812", + "$id": "809", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8582,9 +8558,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "813", + "$id": "810", "Type": { - "$ref": "812" + "$ref": "809" }, "Value": "application/json" } @@ -8592,7 +8568,7 @@ ], "Responses": [ { - "$id": "814", + "$id": "811", "StatusCodes": [ 204 ], @@ -8610,19 +8586,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "815", + "$id": "812", "Name": "withYield", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "816", + "$id": "813", "Name": "yield", "NameInRequest": "yield", "Type": { - "$id": "817", + "$id": "814", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8638,11 +8614,11 @@ "Kind": "Method" }, { - "$id": "818", + "$id": "815", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "819", + "$id": "816", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8657,9 +8633,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "820", + "$id": "817", "Type": { - "$ref": "819" + "$ref": "816" }, "Value": "application/json" } @@ -8667,7 +8643,7 @@ ], "Responses": [ { - "$id": "821", + "$id": "818", "StatusCodes": [ 204 ], @@ -8685,19 +8661,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "822", + "$id": "819", "Name": "withCancellationToken", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "823", + "$id": "820", "Name": "cancellationToken", "NameInRequest": "cancellationToken", "Type": { - "$id": "824", + "$id": "821", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8713,11 +8689,11 @@ "Kind": "Method" }, { - "$id": "825", + "$id": "822", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "826", + "$id": "823", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8732,9 +8708,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "827", + "$id": "824", "Type": { - "$ref": "826" + "$ref": "823" }, "Value": "application/json" } @@ -8742,7 +8718,7 @@ ], "Responses": [ { - "$id": "828", + "$id": "825", "StatusCodes": [ 204 ], @@ -8761,7 +8737,7 @@ } ], "Protocol": { - "$id": "829" + "$id": "826" }, "Creatable": false, "Parent": "SpecialWordsClient" diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json index 5d23ec47d82..e58d6eab452 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json @@ -1147,23 +1147,518 @@ { "$id": "144", "Kind": "Model", - "Name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", + "Name": "SpreadRecordForNonDiscriminatedUnion3", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "145", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "146", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "147", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$id": "148", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "139" + }, + "IsNullable": false + }, + { + "$ref": "132" + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "149", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "150", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "151", + "Kind": "Model", + "Name": "SpreadRecordForNonDiscriminatedUnion2", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "152", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "153", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "154", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$ref": "139" + }, + { + "$ref": "132" + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "155", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "156", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "157", + "Kind": "Model", + "Name": "SpreadRecordForNonDiscriminatedUnion", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "158", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "159", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "160", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$ref": "127" + }, + { + "$ref": "132" + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "161", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "162", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "163", + "Kind": "Model", + "Name": "SpreadRecordForDiscriminatedUnion", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "164", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "165", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "166", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$ref": "127" + }, + { + "$ref": "132" + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "167", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "168", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "169", + "Kind": "Model", + "Name": "SpreadRecordForUnion", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "170", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "171", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "172", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$id": "173", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + { + "$id": "174", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "175", + "Name": "flag", + "SerializedName": "flag", + "Description": "The name property", + "Type": { + "$id": "176", + "Kind": "Primitive", + "Name": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "177", + "Kind": "Model", + "Name": "MultipleSpreadRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record and Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "178", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "179", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "180", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$id": "181", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + { + "$id": "182", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "183", + "Name": "flag", + "SerializedName": "flag", + "Description": "The name property", + "Type": { + "$id": "184", + "Kind": "Primitive", + "Name": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "185", + "Kind": "Model", + "Name": "SpreadModelArrayRecord", + "Namespace": "Type.Property.AdditionalProperties", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "186", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "187", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "188", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "73" + }, + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "189", + "Name": "knownProp", + "SerializedName": "knownProp", + "Description": "", + "Type": { + "$id": "190", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "73" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "191", + "Kind": "Model", + "Name": "SpreadModelRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the same known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "192", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "193", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$ref": "73" + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "194", + "Name": "knownProp", + "SerializedName": "knownProp", + "Description": "", + "Type": { + "$ref": "73" + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "195", + "Kind": "Model", + "Name": "SpreadFloatRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the same known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "196", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "197", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "198", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "199", + "Name": "id", + "SerializedName": "id", + "Description": "The id property", + "Type": { + "$id": "200", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "201", + "Kind": "Model", + "Name": "SpreadStringRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the same known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "202", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "203", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "204", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "205", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "206", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "207", + "Kind": "Model", + "Name": "IsUnknownAdditionalPropertiesDiscriminatedDerived", "Namespace": "Type.Property.AdditionalProperties", "Description": "The derived discriminated type", "IsNullable": false, "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { - "$ref": "19" + "$ref": "38" }, "Properties": [ { - "$id": "145", + "$id": "208", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "146", + "$id": "209", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1172,12 +1667,12 @@ "IsReadOnly": false }, { - "$id": "147", + "$id": "210", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "148", + "$id": "211", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -1188,25 +1683,25 @@ ] }, { - "$id": "149", + "$id": "212", "Kind": "Model", - "Name": "IsUnknownAdditionalPropertiesDiscriminatedDerived", + "Name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", "Namespace": "Type.Property.AdditionalProperties", "Description": "The derived discriminated type", "IsNullable": false, "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { - "$ref": "38" + "$ref": "19" }, "Properties": [ { - "$id": "150", + "$id": "213", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "151", + "$id": "214", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1215,12 +1710,12 @@ "IsReadOnly": false }, { - "$id": "152", + "$id": "215", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "153", + "$id": "216", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -1233,33 +1728,33 @@ ], "Clients": [ { - "$id": "154", + "$id": "217", "Name": "AdditionalPropertiesClient", "Description": "", "Operations": [], "Protocol": { - "$id": "155" + "$id": "218" }, "Creatable": true }, { - "$id": "156", + "$id": "219", "Name": "ExtendsUnknown", "Description": "", "Operations": [ { - "$id": "157", + "$id": "220", "Name": "get", "ResourceName": "ExtendsUnknown", "Description": "Get call", "Parameters": [ { - "$id": "158", + "$id": "221", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "159", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1274,9 +1769,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "160", + "$id": "223", "Type": { - "$id": "161", + "$id": "224", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1285,11 +1780,11 @@ } }, { - "$id": "162", + "$id": "225", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "163", + "$id": "226", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1304,9 +1799,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "164", + "$id": "227", "Type": { - "$ref": "163" + "$ref": "226" }, "Value": "application/json" } @@ -1314,7 +1809,7 @@ ], "Responses": [ { - "$id": "165", + "$id": "228", "StatusCodes": [ 200 ], @@ -1338,16 +1833,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "166", + "$id": "229", "Name": "put", "ResourceName": "ExtendsUnknown", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "167", + "$id": "230", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1365,11 +1860,11 @@ "Kind": "Method" }, { - "$id": "168", + "$id": "231", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "169", + "$id": "232", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1384,19 +1879,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "170", + "$id": "233", "Type": { - "$ref": "169" + "$ref": "232" }, "Value": "application/json" } }, { - "$id": "171", + "$id": "234", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "172", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1411,9 +1906,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "173", + "$id": "236", "Type": { - "$ref": "172" + "$ref": "235" }, "Value": "application/json" } @@ -1421,7 +1916,7 @@ ], "Responses": [ { - "$id": "174", + "$id": "237", "StatusCodes": [ 204 ], @@ -1443,31 +1938,31 @@ } ], "Protocol": { - "$id": "175" + "$id": "238" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "176", + "$id": "239", "Name": "ExtendsUnknownDerived", "Description": "", "Operations": [ { - "$id": "177", + "$id": "240", "Name": "get", "ResourceName": "ExtendsUnknownDerived", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "178", + "$id": "241", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "179", + "$id": "242", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1482,9 +1977,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "180", + "$id": "243", "Type": { - "$ref": "179" + "$ref": "242" }, "Value": "application/json" } @@ -1492,7 +1987,7 @@ ], "Responses": [ { - "$id": "181", + "$id": "244", "StatusCodes": [ 200 ], @@ -1516,16 +2011,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "182", + "$id": "245", "Name": "put", "ResourceName": "ExtendsUnknownDerived", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "183", + "$id": "246", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1543,11 +2038,11 @@ "Kind": "Method" }, { - "$id": "184", + "$id": "247", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "185", + "$id": "248", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1562,19 +2057,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "186", + "$id": "249", "Type": { - "$ref": "185" + "$ref": "248" }, "Value": "application/json" } }, { - "$id": "187", + "$id": "250", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "188", + "$id": "251", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1589,9 +2084,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "189", + "$id": "252", "Type": { - "$ref": "188" + "$ref": "251" }, "Value": "application/json" } @@ -1599,7 +2094,7 @@ ], "Responses": [ { - "$id": "190", + "$id": "253", "StatusCodes": [ 204 ], @@ -1621,31 +2116,31 @@ } ], "Protocol": { - "$id": "191" + "$id": "254" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "192", + "$id": "255", "Name": "ExtendsUnknownDiscriminated", "Description": "", "Operations": [ { - "$id": "193", + "$id": "256", "Name": "get", "ResourceName": "ExtendsUnknownDiscriminated", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "194", + "$id": "257", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "195", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1660,9 +2155,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "196", + "$id": "259", "Type": { - "$ref": "195" + "$ref": "258" }, "Value": "application/json" } @@ -1670,7 +2165,7 @@ ], "Responses": [ { - "$id": "197", + "$id": "260", "StatusCodes": [ 200 ], @@ -1694,16 +2189,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "198", + "$id": "261", "Name": "put", "ResourceName": "ExtendsUnknownDiscriminated", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "199", + "$id": "262", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1721,11 +2216,11 @@ "Kind": "Method" }, { - "$id": "200", + "$id": "263", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "201", + "$id": "264", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1740,19 +2235,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "202", + "$id": "265", "Type": { - "$ref": "201" + "$ref": "264" }, "Value": "application/json" } }, { - "$id": "203", + "$id": "266", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "204", + "$id": "267", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1767,9 +2262,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "205", + "$id": "268", "Type": { - "$ref": "204" + "$ref": "267" }, "Value": "application/json" } @@ -1777,7 +2272,7 @@ ], "Responses": [ { - "$id": "206", + "$id": "269", "StatusCodes": [ 204 ], @@ -1799,31 +2294,31 @@ } ], "Protocol": { - "$id": "207" + "$id": "270" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "208", + "$id": "271", "Name": "IsUnknown", "Description": "", "Operations": [ { - "$id": "209", + "$id": "272", "Name": "get", "ResourceName": "IsUnknown", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "210", + "$id": "273", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "211", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1838,9 +2333,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "212", + "$id": "275", "Type": { - "$ref": "211" + "$ref": "274" }, "Value": "application/json" } @@ -1848,7 +2343,7 @@ ], "Responses": [ { - "$id": "213", + "$id": "276", "StatusCodes": [ 200 ], @@ -1872,16 +2367,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "214", + "$id": "277", "Name": "put", "ResourceName": "IsUnknown", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "215", + "$id": "278", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1899,11 +2394,11 @@ "Kind": "Method" }, { - "$id": "216", + "$id": "279", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "217", + "$id": "280", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1918,19 +2413,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "218", + "$id": "281", "Type": { - "$ref": "217" + "$ref": "280" }, "Value": "application/json" } }, { - "$id": "219", + "$id": "282", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "220", + "$id": "283", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1945,9 +2440,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "221", + "$id": "284", "Type": { - "$ref": "220" + "$ref": "283" }, "Value": "application/json" } @@ -1955,7 +2450,7 @@ ], "Responses": [ { - "$id": "222", + "$id": "285", "StatusCodes": [ 204 ], @@ -1977,31 +2472,31 @@ } ], "Protocol": { - "$id": "223" + "$id": "286" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "224", + "$id": "287", "Name": "IsUnknownDerived", "Description": "", "Operations": [ { - "$id": "225", + "$id": "288", "Name": "get", "ResourceName": "IsUnknownDerived", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "226", + "$id": "289", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "227", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2016,9 +2511,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "228", + "$id": "291", "Type": { - "$ref": "227" + "$ref": "290" }, "Value": "application/json" } @@ -2026,7 +2521,7 @@ ], "Responses": [ { - "$id": "229", + "$id": "292", "StatusCodes": [ 200 ], @@ -2050,16 +2545,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "230", + "$id": "293", "Name": "put", "ResourceName": "IsUnknownDerived", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "231", + "$id": "294", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2077,11 +2572,11 @@ "Kind": "Method" }, { - "$id": "232", + "$id": "295", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "233", + "$id": "296", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2096,19 +2591,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "234", + "$id": "297", "Type": { - "$ref": "233" + "$ref": "296" }, "Value": "application/json" } }, { - "$id": "235", + "$id": "298", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "236", + "$id": "299", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2123,9 +2618,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "237", + "$id": "300", "Type": { - "$ref": "236" + "$ref": "299" }, "Value": "application/json" } @@ -2133,7 +2628,7 @@ ], "Responses": [ { - "$id": "238", + "$id": "301", "StatusCodes": [ 204 ], @@ -2155,31 +2650,31 @@ } ], "Protocol": { - "$id": "239" + "$id": "302" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "240", + "$id": "303", "Name": "IsUnknownDiscriminated", "Description": "", "Operations": [ { - "$id": "241", + "$id": "304", "Name": "get", "ResourceName": "IsUnknownDiscriminated", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "242", + "$id": "305", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "243", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2194,9 +2689,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "244", + "$id": "307", "Type": { - "$ref": "243" + "$ref": "306" }, "Value": "application/json" } @@ -2204,7 +2699,7 @@ ], "Responses": [ { - "$id": "245", + "$id": "308", "StatusCodes": [ 200 ], @@ -2228,16 +2723,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "246", + "$id": "309", "Name": "put", "ResourceName": "IsUnknownDiscriminated", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "247", + "$id": "310", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2255,11 +2750,11 @@ "Kind": "Method" }, { - "$id": "248", + "$id": "311", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "249", + "$id": "312", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2274,19 +2769,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "250", + "$id": "313", "Type": { - "$ref": "249" + "$ref": "312" }, "Value": "application/json" } }, { - "$id": "251", + "$id": "314", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "252", + "$id": "315", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2301,9 +2796,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "253", + "$id": "316", "Type": { - "$ref": "252" + "$ref": "315" }, "Value": "application/json" } @@ -2311,7 +2806,7 @@ ], "Responses": [ { - "$id": "254", + "$id": "317", "StatusCodes": [ 204 ], @@ -2333,31 +2828,31 @@ } ], "Protocol": { - "$id": "255" + "$id": "318" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "256", + "$id": "319", "Name": "ExtendsString", "Description": "", "Operations": [ { - "$id": "257", + "$id": "320", "Name": "get", "ResourceName": "ExtendsString", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "258", + "$id": "321", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "259", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2372,9 +2867,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "260", + "$id": "323", "Type": { - "$ref": "259" + "$ref": "322" }, "Value": "application/json" } @@ -2382,7 +2877,7 @@ ], "Responses": [ { - "$id": "261", + "$id": "324", "StatusCodes": [ 200 ], @@ -2406,16 +2901,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "262", + "$id": "325", "Name": "put", "ResourceName": "ExtendsString", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "263", + "$id": "326", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2433,11 +2928,11 @@ "Kind": "Method" }, { - "$id": "264", + "$id": "327", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "265", + "$id": "328", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2452,19 +2947,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "266", + "$id": "329", "Type": { - "$ref": "265" + "$ref": "328" }, "Value": "application/json" } }, { - "$id": "267", + "$id": "330", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "268", + "$id": "331", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2479,9 +2974,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "269", + "$id": "332", "Type": { - "$ref": "268" + "$ref": "331" }, "Value": "application/json" } @@ -2489,7 +2984,7 @@ ], "Responses": [ { - "$id": "270", + "$id": "333", "StatusCodes": [ 204 ], @@ -2511,31 +3006,31 @@ } ], "Protocol": { - "$id": "271" + "$id": "334" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "272", + "$id": "335", "Name": "IsString", "Description": "", "Operations": [ { - "$id": "273", + "$id": "336", "Name": "get", "ResourceName": "IsString", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "274", + "$id": "337", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "275", + "$id": "338", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2550,9 +3045,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "276", + "$id": "339", "Type": { - "$ref": "275" + "$ref": "338" }, "Value": "application/json" } @@ -2560,7 +3055,7 @@ ], "Responses": [ { - "$id": "277", + "$id": "340", "StatusCodes": [ 200 ], @@ -2584,16 +3079,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "278", + "$id": "341", "Name": "put", "ResourceName": "IsString", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "279", + "$id": "342", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2611,11 +3106,11 @@ "Kind": "Method" }, { - "$id": "280", + "$id": "343", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "281", + "$id": "344", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2630,19 +3125,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "282", + "$id": "345", "Type": { - "$ref": "281" + "$ref": "344" }, "Value": "application/json" } }, { - "$id": "283", + "$id": "346", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "284", + "$id": "347", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2657,9 +3152,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "285", + "$id": "348", "Type": { - "$ref": "284" + "$ref": "347" }, "Value": "application/json" } @@ -2667,7 +3162,7 @@ ], "Responses": [ { - "$id": "286", + "$id": "349", "StatusCodes": [ 204 ], @@ -2689,31 +3184,31 @@ } ], "Protocol": { - "$id": "287" + "$id": "350" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "288", + "$id": "351", "Name": "SpreadString", "Description": "", "Operations": [ { - "$id": "289", + "$id": "352", "Name": "get", "ResourceName": "SpreadString", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "290", + "$id": "353", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "291", + "$id": "354", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2728,9 +3223,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "355", "Type": { - "$ref": "291" + "$ref": "354" }, "Value": "application/json" } @@ -2738,22 +3233,22 @@ ], "Responses": [ { - "$id": "293", + "$id": "356", "StatusCodes": [ 200 ], "BodyType": { - "$id": "294", + "$id": "357", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "295", + "$id": "358", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "296", + "$id": "359", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2777,31 +3272,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "297", + "$id": "360", "Name": "put", "ResourceName": "SpreadString", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "298", + "$id": "361", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "299", + "$id": "362", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "300", + "$id": "363", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "301", + "$id": "364", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2819,11 +3314,11 @@ "Kind": "Method" }, { - "$id": "302", + "$id": "365", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "303", + "$id": "366", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2838,19 +3333,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "304", + "$id": "367", "Type": { - "$ref": "303" + "$ref": "366" }, "Value": "application/json" } }, { - "$id": "305", + "$id": "368", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "306", + "$id": "369", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2865,9 +3360,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "307", + "$id": "370", "Type": { - "$ref": "306" + "$ref": "369" }, "Value": "application/json" } @@ -2875,7 +3370,7 @@ ], "Responses": [ { - "$id": "308", + "$id": "371", "StatusCodes": [ 204 ], @@ -2897,31 +3392,31 @@ } ], "Protocol": { - "$id": "309" + "$id": "372" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "310", + "$id": "373", "Name": "ExtendsFloat", "Description": "", "Operations": [ { - "$id": "311", + "$id": "374", "Name": "get", "ResourceName": "ExtendsFloat", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "312", + "$id": "375", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "313", + "$id": "376", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2936,9 +3431,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "314", + "$id": "377", "Type": { - "$ref": "313" + "$ref": "376" }, "Value": "application/json" } @@ -2946,7 +3441,7 @@ ], "Responses": [ { - "$id": "315", + "$id": "378", "StatusCodes": [ 200 ], @@ -2970,16 +3465,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "316", + "$id": "379", "Name": "put", "ResourceName": "ExtendsFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "317", + "$id": "380", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2997,11 +3492,11 @@ "Kind": "Method" }, { - "$id": "318", + "$id": "381", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "319", + "$id": "382", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3016,19 +3511,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "320", + "$id": "383", "Type": { - "$ref": "319" + "$ref": "382" }, "Value": "application/json" } }, { - "$id": "321", + "$id": "384", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "322", + "$id": "385", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3043,9 +3538,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "323", + "$id": "386", "Type": { - "$ref": "322" + "$ref": "385" }, "Value": "application/json" } @@ -3053,7 +3548,7 @@ ], "Responses": [ { - "$id": "324", + "$id": "387", "StatusCodes": [ 204 ], @@ -3075,31 +3570,31 @@ } ], "Protocol": { - "$id": "325" + "$id": "388" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "326", + "$id": "389", "Name": "IsFloat", "Description": "", "Operations": [ { - "$id": "327", + "$id": "390", "Name": "get", "ResourceName": "IsFloat", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "328", + "$id": "391", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "329", + "$id": "392", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3114,9 +3609,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "330", + "$id": "393", "Type": { - "$ref": "329" + "$ref": "392" }, "Value": "application/json" } @@ -3124,7 +3619,7 @@ ], "Responses": [ { - "$id": "331", + "$id": "394", "StatusCodes": [ 200 ], @@ -3148,16 +3643,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "332", + "$id": "395", "Name": "put", "ResourceName": "IsFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "333", + "$id": "396", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3175,11 +3670,11 @@ "Kind": "Method" }, { - "$id": "334", + "$id": "397", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "335", + "$id": "398", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3194,19 +3689,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "336", + "$id": "399", "Type": { - "$ref": "335" + "$ref": "398" }, "Value": "application/json" } }, { - "$id": "337", + "$id": "400", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "338", + "$id": "401", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3221,9 +3716,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "339", + "$id": "402", "Type": { - "$ref": "338" + "$ref": "401" }, "Value": "application/json" } @@ -3231,7 +3726,7 @@ ], "Responses": [ { - "$id": "340", + "$id": "403", "StatusCodes": [ 204 ], @@ -3253,31 +3748,31 @@ } ], "Protocol": { - "$id": "341" + "$id": "404" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "342", + "$id": "405", "Name": "SpreadFloat", "Description": "", "Operations": [ { - "$id": "343", + "$id": "406", "Name": "get", "ResourceName": "SpreadFloat", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "344", + "$id": "407", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "345", + "$id": "408", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3292,9 +3787,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "346", + "$id": "409", "Type": { - "$ref": "345" + "$ref": "408" }, "Value": "application/json" } @@ -3302,22 +3797,22 @@ ], "Responses": [ { - "$id": "347", + "$id": "410", "StatusCodes": [ 200 ], "BodyType": { - "$id": "348", + "$id": "411", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "349", + "$id": "412", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "350", + "$id": "413", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -3341,31 +3836,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "351", + "$id": "414", "Name": "put", "ResourceName": "SpreadFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "352", + "$id": "415", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "353", + "$id": "416", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "354", + "$id": "417", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "355", + "$id": "418", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -3383,11 +3878,11 @@ "Kind": "Method" }, { - "$id": "356", + "$id": "419", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "357", + "$id": "420", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3402,19 +3897,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "358", + "$id": "421", "Type": { - "$ref": "357" + "$ref": "420" }, "Value": "application/json" } }, { - "$id": "359", + "$id": "422", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "360", + "$id": "423", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3429,9 +3924,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "361", + "$id": "424", "Type": { - "$ref": "360" + "$ref": "423" }, "Value": "application/json" } @@ -3439,7 +3934,7 @@ ], "Responses": [ { - "$id": "362", + "$id": "425", "StatusCodes": [ 204 ], @@ -3461,31 +3956,31 @@ } ], "Protocol": { - "$id": "363" + "$id": "426" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "364", + "$id": "427", "Name": "ExtendsModel", "Description": "", "Operations": [ { - "$id": "365", + "$id": "428", "Name": "get", "ResourceName": "ExtendsModel", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "366", + "$id": "429", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "367", + "$id": "430", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3500,9 +3995,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "368", + "$id": "431", "Type": { - "$ref": "367" + "$ref": "430" }, "Value": "application/json" } @@ -3510,7 +4005,7 @@ ], "Responses": [ { - "$id": "369", + "$id": "432", "StatusCodes": [ 200 ], @@ -3534,16 +4029,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "370", + "$id": "433", "Name": "put", "ResourceName": "ExtendsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "371", + "$id": "434", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3561,11 +4056,11 @@ "Kind": "Method" }, { - "$id": "372", + "$id": "435", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "373", + "$id": "436", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3580,19 +4075,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "374", + "$id": "437", "Type": { - "$ref": "373" + "$ref": "436" }, "Value": "application/json" } }, { - "$id": "375", + "$id": "438", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "376", + "$id": "439", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3607,9 +4102,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "377", + "$id": "440", "Type": { - "$ref": "376" + "$ref": "439" }, "Value": "application/json" } @@ -3617,7 +4112,7 @@ ], "Responses": [ { - "$id": "378", + "$id": "441", "StatusCodes": [ 204 ], @@ -3639,31 +4134,31 @@ } ], "Protocol": { - "$id": "379" + "$id": "442" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "380", + "$id": "443", "Name": "IsModel", "Description": "", "Operations": [ { - "$id": "381", + "$id": "444", "Name": "get", "ResourceName": "IsModel", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "382", + "$id": "445", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "383", + "$id": "446", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3678,9 +4173,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "384", + "$id": "447", "Type": { - "$ref": "383" + "$ref": "446" }, "Value": "application/json" } @@ -3688,7 +4183,7 @@ ], "Responses": [ { - "$id": "385", + "$id": "448", "StatusCodes": [ 200 ], @@ -3712,16 +4207,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "386", + "$id": "449", "Name": "put", "ResourceName": "IsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "387", + "$id": "450", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3739,11 +4234,11 @@ "Kind": "Method" }, { - "$id": "388", + "$id": "451", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "389", + "$id": "452", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3758,19 +4253,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "390", + "$id": "453", "Type": { - "$ref": "389" + "$ref": "452" }, "Value": "application/json" } }, { - "$id": "391", + "$id": "454", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "392", + "$id": "455", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3785,9 +4280,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "393", + "$id": "456", "Type": { - "$ref": "392" + "$ref": "455" }, "Value": "application/json" } @@ -3795,7 +4290,7 @@ ], "Responses": [ { - "$id": "394", + "$id": "457", "StatusCodes": [ 204 ], @@ -3817,31 +4312,31 @@ } ], "Protocol": { - "$id": "395" + "$id": "458" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "396", + "$id": "459", "Name": "SpreadModel", "Description": "", "Operations": [ { - "$id": "397", + "$id": "460", "Name": "get", "ResourceName": "SpreadModel", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "398", + "$id": "461", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "399", + "$id": "462", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3856,9 +4351,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "400", + "$id": "463", "Type": { - "$ref": "399" + "$ref": "462" }, "Value": "application/json" } @@ -3866,16 +4361,16 @@ ], "Responses": [ { - "$id": "401", + "$id": "464", "StatusCodes": [ 200 ], "BodyType": { - "$id": "402", + "$id": "465", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "403", + "$id": "466", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3902,25 +4397,25 @@ "GenerateConvenienceMethod": true }, { - "$id": "404", + "$id": "467", "Name": "put", "ResourceName": "SpreadModel", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "405", + "$id": "468", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "406", + "$id": "469", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "407", + "$id": "470", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3941,11 +4436,11 @@ "Kind": "Method" }, { - "$id": "408", + "$id": "471", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "409", + "$id": "472", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3960,19 +4455,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "410", + "$id": "473", "Type": { - "$ref": "409" + "$ref": "472" }, "Value": "application/json" } }, { - "$id": "411", + "$id": "474", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "412", + "$id": "475", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3987,9 +4482,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "413", + "$id": "476", "Type": { - "$ref": "412" + "$ref": "475" }, "Value": "application/json" } @@ -3997,7 +4492,7 @@ ], "Responses": [ { - "$id": "414", + "$id": "477", "StatusCodes": [ 204 ], @@ -4019,31 +4514,31 @@ } ], "Protocol": { - "$id": "415" + "$id": "478" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "416", + "$id": "479", "Name": "ExtendsModelArray", "Description": "", "Operations": [ { - "$id": "417", + "$id": "480", "Name": "get", "ResourceName": "ExtendsModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "418", + "$id": "481", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "419", + "$id": "482", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4058,9 +4553,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "420", + "$id": "483", "Type": { - "$ref": "419" + "$ref": "482" }, "Value": "application/json" } @@ -4068,7 +4563,7 @@ ], "Responses": [ { - "$id": "421", + "$id": "484", "StatusCodes": [ 200 ], @@ -4092,16 +4587,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "422", + "$id": "485", "Name": "put", "ResourceName": "ExtendsModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "423", + "$id": "486", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4119,11 +4614,11 @@ "Kind": "Method" }, { - "$id": "424", + "$id": "487", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "425", + "$id": "488", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4138,19 +4633,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "426", + "$id": "489", "Type": { - "$ref": "425" + "$ref": "488" }, "Value": "application/json" } }, { - "$id": "427", + "$id": "490", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "428", + "$id": "491", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4165,9 +4660,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "429", + "$id": "492", "Type": { - "$ref": "428" + "$ref": "491" }, "Value": "application/json" } @@ -4175,7 +4670,7 @@ ], "Responses": [ { - "$id": "430", + "$id": "493", "StatusCodes": [ 204 ], @@ -4197,31 +4692,31 @@ } ], "Protocol": { - "$id": "431" + "$id": "494" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "432", + "$id": "495", "Name": "IsModelArray", "Description": "", "Operations": [ { - "$id": "433", + "$id": "496", "Name": "get", "ResourceName": "IsModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "434", + "$id": "497", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "435", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4236,9 +4731,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "436", + "$id": "499", "Type": { - "$ref": "435" + "$ref": "498" }, "Value": "application/json" } @@ -4246,7 +4741,7 @@ ], "Responses": [ { - "$id": "437", + "$id": "500", "StatusCodes": [ 200 ], @@ -4270,16 +4765,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "438", + "$id": "501", "Name": "put", "ResourceName": "IsModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "439", + "$id": "502", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4297,11 +4792,11 @@ "Kind": "Method" }, { - "$id": "440", + "$id": "503", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "441", + "$id": "504", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4316,19 +4811,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "442", + "$id": "505", "Type": { - "$ref": "441" + "$ref": "504" }, "Value": "application/json" } }, { - "$id": "443", + "$id": "506", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "444", + "$id": "507", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4343,9 +4838,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "445", + "$id": "508", "Type": { - "$ref": "444" + "$ref": "507" }, "Value": "application/json" } @@ -4353,7 +4848,7 @@ ], "Responses": [ { - "$id": "446", + "$id": "509", "StatusCodes": [ 204 ], @@ -4375,31 +4870,31 @@ } ], "Protocol": { - "$id": "447" + "$id": "510" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "448", + "$id": "511", "Name": "SpreadModelArray", "Description": "", "Operations": [ { - "$id": "449", + "$id": "512", "Name": "get", "ResourceName": "SpreadModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "450", + "$id": "513", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "451", + "$id": "514", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4414,9 +4909,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "452", + "$id": "515", "Type": { - "$ref": "451" + "$ref": "514" }, "Value": "application/json" } @@ -4424,22 +4919,22 @@ ], "Responses": [ { - "$id": "453", + "$id": "516", "StatusCodes": [ 200 ], "BodyType": { - "$id": "454", + "$id": "517", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "455", + "$id": "518", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "456", + "$id": "519", "Kind": "Array", "Name": "Array", "ElementType": { @@ -4466,31 +4961,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "457", + "$id": "520", "Name": "put", "ResourceName": "SpreadModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "458", + "$id": "521", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "459", + "$id": "522", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "460", + "$id": "523", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "461", + "$id": "524", "Kind": "Array", "Name": "Array", "ElementType": { @@ -4511,11 +5006,11 @@ "Kind": "Method" }, { - "$id": "462", + "$id": "525", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "463", + "$id": "526", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4530,19 +5025,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "464", + "$id": "527", "Type": { - "$ref": "463" + "$ref": "526" }, "Value": "application/json" } }, { - "$id": "465", + "$id": "528", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "466", + "$id": "529", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4557,9 +5052,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "467", + "$id": "530", "Type": { - "$ref": "466" + "$ref": "529" }, "Value": "application/json" } @@ -4567,7 +5062,7 @@ ], "Responses": [ { - "$id": "468", + "$id": "531", "StatusCodes": [ 204 ], @@ -4589,31 +5084,31 @@ } ], "Protocol": { - "$id": "469" + "$id": "532" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "470", + "$id": "533", "Name": "SpreadDifferentString", "Description": "", "Operations": [ { - "$id": "471", + "$id": "534", "Name": "get", "ResourceName": "SpreadDifferentString", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "472", + "$id": "535", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "473", + "$id": "536", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4628,9 +5123,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "474", + "$id": "537", "Type": { - "$ref": "473" + "$ref": "536" }, "Value": "application/json" } @@ -4638,22 +5133,22 @@ ], "Responses": [ { - "$id": "475", + "$id": "538", "StatusCodes": [ 200 ], "BodyType": { - "$id": "476", + "$id": "539", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "477", + "$id": "540", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "478", + "$id": "541", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4677,31 +5172,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "479", + "$id": "542", "Name": "put", "ResourceName": "SpreadDifferentString", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "480", + "$id": "543", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "481", + "$id": "544", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "482", + "$id": "545", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "483", + "$id": "546", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4719,11 +5214,11 @@ "Kind": "Method" }, { - "$id": "484", + "$id": "547", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "485", + "$id": "548", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4738,19 +5233,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "486", + "$id": "549", "Type": { - "$ref": "485" + "$ref": "548" }, "Value": "application/json" } }, { - "$id": "487", + "$id": "550", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "488", + "$id": "551", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4765,9 +5260,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "489", + "$id": "552", "Type": { - "$ref": "488" + "$ref": "551" }, "Value": "application/json" } @@ -4775,7 +5270,7 @@ ], "Responses": [ { - "$id": "490", + "$id": "553", "StatusCodes": [ 204 ], @@ -4797,31 +5292,31 @@ } ], "Protocol": { - "$id": "491" + "$id": "554" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "492", + "$id": "555", "Name": "SpreadDifferentFloat", "Description": "", "Operations": [ { - "$id": "493", + "$id": "556", "Name": "get", "ResourceName": "SpreadDifferentFloat", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "494", + "$id": "557", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "495", + "$id": "558", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4836,9 +5331,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "496", + "$id": "559", "Type": { - "$ref": "495" + "$ref": "558" }, "Value": "application/json" } @@ -4846,22 +5341,22 @@ ], "Responses": [ { - "$id": "497", + "$id": "560", "StatusCodes": [ 200 ], "BodyType": { - "$id": "498", + "$id": "561", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "499", + "$id": "562", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "500", + "$id": "563", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -4885,31 +5380,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "501", + "$id": "564", "Name": "put", "ResourceName": "SpreadDifferentFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "502", + "$id": "565", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "503", + "$id": "566", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "504", + "$id": "567", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "505", + "$id": "568", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -4927,11 +5422,11 @@ "Kind": "Method" }, { - "$id": "506", + "$id": "569", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "507", + "$id": "570", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4946,19 +5441,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "508", + "$id": "571", "Type": { - "$ref": "507" + "$ref": "570" }, "Value": "application/json" } }, { - "$id": "509", + "$id": "572", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "510", + "$id": "573", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4973,9 +5468,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "511", + "$id": "574", "Type": { - "$ref": "510" + "$ref": "573" }, "Value": "application/json" } @@ -4983,7 +5478,7 @@ ], "Responses": [ { - "$id": "512", + "$id": "575", "StatusCodes": [ 204 ], @@ -5005,31 +5500,31 @@ } ], "Protocol": { - "$id": "513" + "$id": "576" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "514", + "$id": "577", "Name": "SpreadDifferentModel", "Description": "", "Operations": [ { - "$id": "515", + "$id": "578", "Name": "get", "ResourceName": "SpreadDifferentModel", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "516", + "$id": "579", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "517", + "$id": "580", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5044,9 +5539,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "518", + "$id": "581", "Type": { - "$ref": "517" + "$ref": "580" }, "Value": "application/json" } @@ -5054,16 +5549,16 @@ ], "Responses": [ { - "$id": "519", + "$id": "582", "StatusCodes": [ 200 ], "BodyType": { - "$id": "520", + "$id": "583", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "521", + "$id": "584", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5090,25 +5585,25 @@ "GenerateConvenienceMethod": true }, { - "$id": "522", + "$id": "585", "Name": "put", "ResourceName": "SpreadDifferentModel", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "523", + "$id": "586", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "524", + "$id": "587", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "525", + "$id": "588", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5129,11 +5624,11 @@ "Kind": "Method" }, { - "$id": "526", + "$id": "589", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "527", + "$id": "590", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5148,19 +5643,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "528", + "$id": "591", "Type": { - "$ref": "527" + "$ref": "590" }, "Value": "application/json" } }, { - "$id": "529", + "$id": "592", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "530", + "$id": "593", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5175,9 +5670,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "531", + "$id": "594", "Type": { - "$ref": "530" + "$ref": "593" }, "Value": "application/json" } @@ -5185,7 +5680,7 @@ ], "Responses": [ { - "$id": "532", + "$id": "595", "StatusCodes": [ 204 ], @@ -5207,31 +5702,31 @@ } ], "Protocol": { - "$id": "533" + "$id": "596" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "534", + "$id": "597", "Name": "SpreadDifferentModelArray", "Description": "", "Operations": [ { - "$id": "535", + "$id": "598", "Name": "get", "ResourceName": "SpreadDifferentModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "536", + "$id": "599", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "537", + "$id": "600", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5246,9 +5741,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "538", + "$id": "601", "Type": { - "$ref": "537" + "$ref": "600" }, "Value": "application/json" } @@ -5256,22 +5751,22 @@ ], "Responses": [ { - "$id": "539", + "$id": "602", "StatusCodes": [ 200 ], "BodyType": { - "$id": "540", + "$id": "603", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "541", + "$id": "604", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "542", + "$id": "605", "Kind": "Array", "Name": "Array", "ElementType": { @@ -5298,31 +5793,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "543", + "$id": "606", "Name": "put", "ResourceName": "SpreadDifferentModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "544", + "$id": "607", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "545", + "$id": "608", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "546", + "$id": "609", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "547", + "$id": "610", "Kind": "Array", "Name": "Array", "ElementType": { @@ -5343,11 +5838,11 @@ "Kind": "Method" }, { - "$id": "548", + "$id": "611", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "549", + "$id": "612", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5362,19 +5857,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "550", + "$id": "613", "Type": { - "$ref": "549" + "$ref": "612" }, "Value": "application/json" } }, { - "$id": "551", + "$id": "614", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "552", + "$id": "615", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5389,9 +5884,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "553", + "$id": "616", "Type": { - "$ref": "552" + "$ref": "615" }, "Value": "application/json" } @@ -5399,7 +5894,7 @@ ], "Responses": [ { - "$id": "554", + "$id": "617", "StatusCodes": [ 204 ], @@ -5421,31 +5916,31 @@ } ], "Protocol": { - "$id": "555" + "$id": "618" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "556", + "$id": "619", "Name": "ExtendsDifferentSpreadString", "Description": "", "Operations": [ { - "$id": "557", + "$id": "620", "Name": "get", "ResourceName": "ExtendsDifferentSpreadString", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "558", + "$id": "621", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "559", + "$id": "622", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5460,9 +5955,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "560", + "$id": "623", "Type": { - "$ref": "559" + "$ref": "622" }, "Value": "application/json" } @@ -5470,7 +5965,7 @@ ], "Responses": [ { - "$id": "561", + "$id": "624", "StatusCodes": [ 200 ], @@ -5494,16 +5989,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "562", + "$id": "625", "Name": "put", "ResourceName": "ExtendsDifferentSpreadString", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "563", + "$id": "626", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5521,11 +6016,11 @@ "Kind": "Method" }, { - "$id": "564", + "$id": "627", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "565", + "$id": "628", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5540,19 +6035,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "566", + "$id": "629", "Type": { - "$ref": "565" + "$ref": "628" }, "Value": "application/json" } }, { - "$id": "567", + "$id": "630", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "568", + "$id": "631", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5567,9 +6062,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "569", + "$id": "632", "Type": { - "$ref": "568" + "$ref": "631" }, "Value": "application/json" } @@ -5577,7 +6072,7 @@ ], "Responses": [ { - "$id": "570", + "$id": "633", "StatusCodes": [ 204 ], @@ -5599,31 +6094,31 @@ } ], "Protocol": { - "$id": "571" + "$id": "634" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "572", + "$id": "635", "Name": "ExtendsDifferentSpreadFloat", "Description": "", "Operations": [ { - "$id": "573", + "$id": "636", "Name": "get", "ResourceName": "ExtendsDifferentSpreadFloat", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "574", + "$id": "637", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "575", + "$id": "638", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5638,9 +6133,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "576", + "$id": "639", "Type": { - "$ref": "575" + "$ref": "638" }, "Value": "application/json" } @@ -5648,7 +6143,7 @@ ], "Responses": [ { - "$id": "577", + "$id": "640", "StatusCodes": [ 200 ], @@ -5672,16 +6167,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "578", + "$id": "641", "Name": "put", "ResourceName": "ExtendsDifferentSpreadFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "579", + "$id": "642", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5699,11 +6194,11 @@ "Kind": "Method" }, { - "$id": "580", + "$id": "643", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "581", + "$id": "644", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5718,19 +6213,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "582", + "$id": "645", "Type": { - "$ref": "581" + "$ref": "644" }, "Value": "application/json" } }, { - "$id": "583", + "$id": "646", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "584", + "$id": "647", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5745,9 +6240,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "585", + "$id": "648", "Type": { - "$ref": "584" + "$ref": "647" }, "Value": "application/json" } @@ -5755,7 +6250,7 @@ ], "Responses": [ { - "$id": "586", + "$id": "649", "StatusCodes": [ 204 ], @@ -5777,31 +6272,31 @@ } ], "Protocol": { - "$id": "587" + "$id": "650" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "588", + "$id": "651", "Name": "ExtendsDifferentSpreadModel", "Description": "", "Operations": [ { - "$id": "589", + "$id": "652", "Name": "get", "ResourceName": "ExtendsDifferentSpreadModel", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "590", + "$id": "653", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "591", + "$id": "654", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5816,9 +6311,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "592", + "$id": "655", "Type": { - "$ref": "591" + "$ref": "654" }, "Value": "application/json" } @@ -5826,7 +6321,7 @@ ], "Responses": [ { - "$id": "593", + "$id": "656", "StatusCodes": [ 200 ], @@ -5850,16 +6345,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "594", + "$id": "657", "Name": "put", "ResourceName": "ExtendsDifferentSpreadModel", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "595", + "$id": "658", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5877,11 +6372,11 @@ "Kind": "Method" }, { - "$id": "596", + "$id": "659", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "597", + "$id": "660", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5896,19 +6391,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "598", + "$id": "661", "Type": { - "$ref": "597" + "$ref": "660" }, "Value": "application/json" } }, { - "$id": "599", + "$id": "662", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "600", + "$id": "663", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5923,9 +6418,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "601", + "$id": "664", "Type": { - "$ref": "600" + "$ref": "663" }, "Value": "application/json" } @@ -5933,7 +6428,7 @@ ], "Responses": [ { - "$id": "602", + "$id": "665", "StatusCodes": [ 204 ], @@ -5955,31 +6450,31 @@ } ], "Protocol": { - "$id": "603" + "$id": "666" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "604", + "$id": "667", "Name": "ExtendsDifferentSpreadModelArray", "Description": "", "Operations": [ { - "$id": "605", + "$id": "668", "Name": "get", "ResourceName": "ExtendsDifferentSpreadModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "606", + "$id": "669", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "607", + "$id": "670", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5994,9 +6489,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "608", + "$id": "671", "Type": { - "$ref": "607" + "$ref": "670" }, "Value": "application/json" } @@ -6004,7 +6499,7 @@ ], "Responses": [ { - "$id": "609", + "$id": "672", "StatusCodes": [ 200 ], @@ -6028,16 +6523,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "610", + "$id": "673", "Name": "put", "ResourceName": "ExtendsDifferentSpreadModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "611", + "$id": "674", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -6055,11 +6550,11 @@ "Kind": "Method" }, { - "$id": "612", + "$id": "675", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "613", + "$id": "676", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6074,19 +6569,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "614", + "$id": "677", "Type": { - "$ref": "613" + "$ref": "676" }, "Value": "application/json" } }, { - "$id": "615", + "$id": "678", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "616", + "$id": "679", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6101,9 +6596,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "617", + "$id": "680", "Type": { - "$ref": "616" + "$ref": "679" }, "Value": "application/json" } @@ -6111,7 +6606,7 @@ ], "Responses": [ { - "$id": "618", + "$id": "681", "StatusCodes": [ 204 ], @@ -6133,31 +6628,31 @@ } ], "Protocol": { - "$id": "619" + "$id": "682" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "620", + "$id": "683", "Name": "MultipleSpread", "Description": "", "Operations": [ { - "$id": "621", + "$id": "684", "Name": "get", "ResourceName": "MultipleSpread", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "622", + "$id": "685", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "623", + "$id": "686", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6172,9 +6667,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "624", + "$id": "687", "Type": { - "$ref": "623" + "$ref": "686" }, "Value": "application/json" } @@ -6182,33 +6677,33 @@ ], "Responses": [ { - "$id": "625", + "$id": "688", "StatusCodes": [ 200 ], "BodyType": { - "$id": "626", + "$id": "689", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "627", + "$id": "690", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "628", + "$id": "691", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "629", + "$id": "692", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "630", + "$id": "693", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -6235,42 +6730,42 @@ "GenerateConvenienceMethod": true }, { - "$id": "631", + "$id": "694", "Name": "put", "ResourceName": "MultipleSpread", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "632", + "$id": "695", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "633", + "$id": "696", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "634", + "$id": "697", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "635", + "$id": "698", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "636", + "$id": "699", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "637", + "$id": "700", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -6291,11 +6786,11 @@ "Kind": "Method" }, { - "$id": "638", + "$id": "701", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "639", + "$id": "702", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6310,19 +6805,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "640", + "$id": "703", "Type": { - "$ref": "639" + "$ref": "702" }, "Value": "application/json" } }, { - "$id": "641", + "$id": "704", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "642", + "$id": "705", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6337,9 +6832,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "643", + "$id": "706", "Type": { - "$ref": "642" + "$ref": "705" }, "Value": "application/json" } @@ -6347,7 +6842,7 @@ ], "Responses": [ { - "$id": "644", + "$id": "707", "StatusCodes": [ 204 ], @@ -6369,31 +6864,31 @@ } ], "Protocol": { - "$id": "645" + "$id": "708" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "646", + "$id": "709", "Name": "SpreadRecordUnion", "Description": "", "Operations": [ { - "$id": "647", + "$id": "710", "Name": "get", "ResourceName": "SpreadRecordUnion", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "648", + "$id": "711", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "649", + "$id": "712", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6408,9 +6903,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "650", + "$id": "713", "Type": { - "$ref": "649" + "$ref": "712" }, "Value": "application/json" } @@ -6418,33 +6913,33 @@ ], "Responses": [ { - "$id": "651", + "$id": "714", "StatusCodes": [ 200 ], "BodyType": { - "$id": "652", + "$id": "715", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "653", + "$id": "716", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "654", + "$id": "717", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "655", + "$id": "718", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "656", + "$id": "719", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -6471,42 +6966,42 @@ "GenerateConvenienceMethod": true }, { - "$id": "657", + "$id": "720", "Name": "put", "ResourceName": "SpreadRecordUnion", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "658", + "$id": "721", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "659", + "$id": "722", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "660", + "$id": "723", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "661", + "$id": "724", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "662", + "$id": "725", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "663", + "$id": "726", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -6527,11 +7022,11 @@ "Kind": "Method" }, { - "$id": "664", + "$id": "727", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "665", + "$id": "728", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6546,19 +7041,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "666", + "$id": "729", "Type": { - "$ref": "665" + "$ref": "728" }, "Value": "application/json" } }, { - "$id": "667", + "$id": "730", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "668", + "$id": "731", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6573,9 +7068,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "669", + "$id": "732", "Type": { - "$ref": "668" + "$ref": "731" }, "Value": "application/json" } @@ -6583,7 +7078,7 @@ ], "Responses": [ { - "$id": "670", + "$id": "733", "StatusCodes": [ 204 ], @@ -6605,31 +7100,31 @@ } ], "Protocol": { - "$id": "671" + "$id": "734" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "672", + "$id": "735", "Name": "SpreadRecordDiscriminatedUnion", "Description": "", "Operations": [ { - "$id": "673", + "$id": "736", "Name": "get", "ResourceName": "SpreadRecordDiscriminatedUnion", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "674", + "$id": "737", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "675", + "$id": "738", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6644,9 +7139,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "676", + "$id": "739", "Type": { - "$ref": "675" + "$ref": "738" }, "Value": "application/json" } @@ -6654,22 +7149,22 @@ ], "Responses": [ { - "$id": "677", + "$id": "740", "StatusCodes": [ 200 ], "BodyType": { - "$id": "678", + "$id": "741", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "679", + "$id": "742", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "680", + "$id": "743", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ @@ -6701,31 +7196,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "681", + "$id": "744", "Name": "put", "ResourceName": "SpreadRecordDiscriminatedUnion", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "682", + "$id": "745", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "683", + "$id": "746", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "684", + "$id": "747", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "685", + "$id": "748", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ @@ -6751,11 +7246,11 @@ "Kind": "Method" }, { - "$id": "686", + "$id": "749", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "687", + "$id": "750", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6770,19 +7265,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "688", + "$id": "751", "Type": { - "$ref": "687" + "$ref": "750" }, "Value": "application/json" } }, { - "$id": "689", + "$id": "752", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "690", + "$id": "753", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6797,9 +7292,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "691", + "$id": "754", "Type": { - "$ref": "690" + "$ref": "753" }, "Value": "application/json" } @@ -6807,7 +7302,7 @@ ], "Responses": [ { - "$id": "692", + "$id": "755", "StatusCodes": [ 204 ], @@ -6829,31 +7324,31 @@ } ], "Protocol": { - "$id": "693" + "$id": "756" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "694", + "$id": "757", "Name": "SpreadRecordNonDiscriminatedUnion", "Description": "", "Operations": [ { - "$id": "695", + "$id": "758", "Name": "get", "ResourceName": "SpreadRecordNonDiscriminatedUnion", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "696", + "$id": "759", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "697", + "$id": "760", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6868,9 +7363,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "698", + "$id": "761", "Type": { - "$ref": "697" + "$ref": "760" }, "Value": "application/json" } @@ -6878,22 +7373,22 @@ ], "Responses": [ { - "$id": "699", + "$id": "762", "StatusCodes": [ 200 ], "BodyType": { - "$id": "700", + "$id": "763", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "701", + "$id": "764", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "702", + "$id": "765", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ @@ -6925,31 +7420,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "703", + "$id": "766", "Name": "put", "ResourceName": "SpreadRecordNonDiscriminatedUnion", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "704", + "$id": "767", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "705", + "$id": "768", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "706", + "$id": "769", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "707", + "$id": "770", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ @@ -6975,11 +7470,11 @@ "Kind": "Method" }, { - "$id": "708", + "$id": "771", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "709", + "$id": "772", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6994,19 +7489,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "710", + "$id": "773", "Type": { - "$ref": "709" + "$ref": "772" }, "Value": "application/json" } }, { - "$id": "711", + "$id": "774", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "712", + "$id": "775", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7021,9 +7516,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "713", + "$id": "776", "Type": { - "$ref": "712" + "$ref": "775" }, "Value": "application/json" } @@ -7031,7 +7526,7 @@ ], "Responses": [ { - "$id": "714", + "$id": "777", "StatusCodes": [ 204 ], @@ -7053,31 +7548,31 @@ } ], "Protocol": { - "$id": "715" + "$id": "778" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "716", + "$id": "779", "Name": "SpreadRecordNonDiscriminatedUnion2", "Description": "", "Operations": [ { - "$id": "717", + "$id": "780", "Name": "get", "ResourceName": "SpreadRecordNonDiscriminatedUnion2", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "718", + "$id": "781", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "719", + "$id": "782", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7092,9 +7587,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "720", + "$id": "783", "Type": { - "$ref": "719" + "$ref": "782" }, "Value": "application/json" } @@ -7102,22 +7597,22 @@ ], "Responses": [ { - "$id": "721", + "$id": "784", "StatusCodes": [ 200 ], "BodyType": { - "$id": "722", + "$id": "785", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "723", + "$id": "786", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "724", + "$id": "787", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ @@ -7149,31 +7644,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "725", + "$id": "788", "Name": "put", "ResourceName": "SpreadRecordNonDiscriminatedUnion2", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "726", + "$id": "789", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "727", + "$id": "790", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "728", + "$id": "791", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "729", + "$id": "792", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ @@ -7199,11 +7694,11 @@ "Kind": "Method" }, { - "$id": "730", + "$id": "793", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "731", + "$id": "794", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7218,19 +7713,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "732", + "$id": "795", "Type": { - "$ref": "731" + "$ref": "794" }, "Value": "application/json" } }, { - "$id": "733", + "$id": "796", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "734", + "$id": "797", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7245,9 +7740,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "735", + "$id": "798", "Type": { - "$ref": "734" + "$ref": "797" }, "Value": "application/json" } @@ -7255,7 +7750,7 @@ ], "Responses": [ { - "$id": "736", + "$id": "799", "StatusCodes": [ 204 ], @@ -7277,31 +7772,31 @@ } ], "Protocol": { - "$id": "737" + "$id": "800" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "738", + "$id": "801", "Name": "SpreadRecordNonDiscriminatedUnion3", "Description": "", "Operations": [ { - "$id": "739", + "$id": "802", "Name": "get", "ResourceName": "SpreadRecordNonDiscriminatedUnion3", "Description": "Get call", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "740", + "$id": "803", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "741", + "$id": "804", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7316,9 +7811,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "742", + "$id": "805", "Type": { - "$ref": "741" + "$ref": "804" }, "Value": "application/json" } @@ -7326,27 +7821,27 @@ ], "Responses": [ { - "$id": "743", + "$id": "806", "StatusCodes": [ 200 ], "BodyType": { - "$id": "744", + "$id": "807", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "745", + "$id": "808", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "746", + "$id": "809", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "747", + "$id": "810", "Kind": "Array", "Name": "Array", "ElementType": { @@ -7379,36 +7874,36 @@ "GenerateConvenienceMethod": true }, { - "$id": "748", + "$id": "811", "Name": "put", "ResourceName": "SpreadRecordNonDiscriminatedUnion3", "Description": "Put operation", "Parameters": [ { - "$ref": "158" + "$ref": "221" }, { - "$id": "749", + "$id": "812", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "750", + "$id": "813", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "751", + "$id": "814", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "752", + "$id": "815", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "753", + "$id": "816", "Kind": "Array", "Name": "Array", "ElementType": { @@ -7435,11 +7930,11 @@ "Kind": "Method" }, { - "$id": "754", + "$id": "817", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "755", + "$id": "818", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7454,19 +7949,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "756", + "$id": "819", "Type": { - "$ref": "755" + "$ref": "818" }, "Value": "application/json" } }, { - "$id": "757", + "$id": "820", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "758", + "$id": "821", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7481,9 +7976,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "759", + "$id": "822", "Type": { - "$ref": "758" + "$ref": "821" }, "Value": "application/json" } @@ -7491,7 +7986,7 @@ ], "Responses": [ { - "$id": "760", + "$id": "823", "StatusCodes": [ 204 ], @@ -7513,7 +8008,7 @@ } ], "Protocol": { - "$id": "761" + "$id": "824" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" diff --git a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json index 75f51c5daa1..f00fbc0873c 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json @@ -182,55 +182,11 @@ "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" - }, - { - "$id": "28", - "Kind": "Enum", - "Name": "LR", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "29", - "Name": "left", - "Value": "left" - }, - { - "$id": "30", - "Name": "right", - "Value": "right" - } - ], - "Namespace": "Type.Union", - "IsExtensible": false, - "IsNullable": false, - "Usage": "RoundTrip" - }, - { - "$id": "31", - "Kind": "Enum", - "Name": "UD", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "32", - "Name": "up", - "Value": "up" - }, - { - "$id": "33", - "Name": "down", - "Value": "down" - } - ], - "Namespace": "Type.Union", - "IsExtensible": false, - "IsNullable": false, - "Usage": "RoundTrip" } ], "Models": [ { - "$id": "34", + "$id": "28", "Kind": "Model", "Name": "GetResponse9", "Namespace": "Type.Union", @@ -238,7 +194,7 @@ "Usage": "Output", "Properties": [ { - "$id": "35", + "$id": "29", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -251,7 +207,7 @@ ] }, { - "$id": "36", + "$id": "30", "Kind": "Model", "Name": "SendRequest9", "Namespace": "Type.Union", @@ -259,7 +215,7 @@ "Usage": "Input", "Properties": [ { - "$id": "37", + "$id": "31", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -272,7 +228,7 @@ ] }, { - "$id": "38", + "$id": "32", "Kind": "Model", "Name": "GetResponse8", "Namespace": "Type.Union", @@ -280,7 +236,7 @@ "Usage": "Output", "Properties": [ { - "$id": "39", + "$id": "33", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -293,7 +249,7 @@ ] }, { - "$id": "40", + "$id": "34", "Kind": "Model", "Name": "SendRequest8", "Namespace": "Type.Union", @@ -301,7 +257,7 @@ "Usage": "Input", "Properties": [ { - "$id": "41", + "$id": "35", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -314,7 +270,7 @@ ] }, { - "$id": "42", + "$id": "36", "Kind": "Model", "Name": "GetResponse7", "Namespace": "Type.Union", @@ -322,7 +278,7 @@ "Usage": "Output", "Properties": [ { - "$id": "43", + "$id": "37", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -335,7 +291,7 @@ ] }, { - "$id": "44", + "$id": "38", "Kind": "Model", "Name": "SendRequest7", "Namespace": "Type.Union", @@ -343,7 +299,7 @@ "Usage": "Input", "Properties": [ { - "$id": "45", + "$id": "39", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -356,7 +312,7 @@ ] }, { - "$id": "46", + "$id": "40", "Kind": "Model", "Name": "GetResponse6", "Namespace": "Type.Union", @@ -364,7 +320,7 @@ "Usage": "Output", "Properties": [ { - "$id": "47", + "$id": "41", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -377,7 +333,7 @@ ] }, { - "$id": "48", + "$id": "42", "Kind": "Model", "Name": "SendRequest6", "Namespace": "Type.Union", @@ -385,7 +341,7 @@ "Usage": "Input", "Properties": [ { - "$id": "49", + "$id": "43", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -398,7 +354,7 @@ ] }, { - "$id": "50", + "$id": "44", "Kind": "Model", "Name": "GetResponse5", "Namespace": "Type.Union", @@ -406,7 +362,7 @@ "Usage": "Output", "Properties": [ { - "$id": "51", + "$id": "45", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -419,7 +375,7 @@ ] }, { - "$id": "52", + "$id": "46", "Kind": "Model", "Name": "SendRequest5", "Namespace": "Type.Union", @@ -427,7 +383,7 @@ "Usage": "Input", "Properties": [ { - "$id": "53", + "$id": "47", "Name": "prop", "SerializedName": "prop", "Description": "", @@ -440,7 +396,7 @@ ] }, { - "$id": "54", + "$id": "48", "Kind": "Model", "Name": "GetResponse4", "Namespace": "Type.Union", @@ -448,17 +404,17 @@ "Usage": "Output", "Properties": [ { - "$id": "55", + "$id": "49", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "56", + "$id": "50", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "57", + "$id": "51", "Kind": "Model", "Name": "Cat", "Namespace": "Type.Union", @@ -466,12 +422,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "58", + "$id": "52", "Name": "name", "SerializedName": "name", "Description": "", "Type": { - "$id": "59", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -482,7 +438,7 @@ ] }, { - "$id": "60", + "$id": "54", "Kind": "Model", "Name": "Dog", "Namespace": "Type.Union", @@ -490,12 +446,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "61", + "$id": "55", "Name": "bark", "SerializedName": "bark", "Description": "", "Type": { - "$id": "62", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -514,13 +470,13 @@ ] }, { - "$ref": "57" + "$ref": "51" }, { - "$ref": "60" + "$ref": "54" }, { - "$id": "63", + "$id": "57", "Kind": "Model", "Name": "SendRequest4", "Namespace": "Type.Union", @@ -528,20 +484,20 @@ "Usage": "Input", "Properties": [ { - "$id": "64", + "$id": "58", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "65", + "$id": "59", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "57" + "$ref": "51" }, { - "$ref": "60" + "$ref": "54" } ], "IsNullable": false @@ -552,7 +508,7 @@ ] }, { - "$id": "66", + "$id": "60", "Kind": "Model", "Name": "GetResponse3", "Namespace": "Type.Union", @@ -560,12 +516,12 @@ "Usage": "Output", "Properties": [ { - "$id": "67", + "$id": "61", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "68", + "$id": "62", "Kind": "Model", "Name": "EnumsOnlyCases", "Namespace": "Type.Union", @@ -573,7 +529,7 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "69", + "$id": "63", "Name": "lr", "SerializedName": "lr", "Description": "This should be receive/send the left variant", @@ -584,7 +540,7 @@ "IsReadOnly": false }, { - "$id": "70", + "$id": "64", "Name": "ud", "SerializedName": "ud", "Description": "This should be receive/send the up variant", @@ -602,10 +558,10 @@ ] }, { - "$ref": "68" + "$ref": "62" }, { - "$id": "71", + "$id": "65", "Kind": "Model", "Name": "SendRequest3", "Namespace": "Type.Union", @@ -613,12 +569,12 @@ "Usage": "Input", "Properties": [ { - "$id": "72", + "$id": "66", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "68" + "$ref": "62" }, "IsRequired": true, "IsReadOnly": false @@ -626,7 +582,7 @@ ] }, { - "$id": "73", + "$id": "67", "Kind": "Model", "Name": "GetResponse2", "Namespace": "Type.Union", @@ -634,12 +590,12 @@ "Usage": "Output", "Properties": [ { - "$id": "74", + "$id": "68", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "75", + "$id": "69", "Kind": "Model", "Name": "StringAndArrayCases", "Namespace": "Type.Union", @@ -647,27 +603,27 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "76", + "$id": "70", "Name": "string", "SerializedName": "string", "Description": "This should be receive/send the string variant", "Type": { - "$id": "77", + "$id": "71", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "78", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "79", + "$id": "73", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "80", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -681,27 +637,27 @@ "IsReadOnly": false }, { - "$id": "81", + "$id": "75", "Name": "array", "SerializedName": "array", "Description": "This should be receive/send the array variant", "Type": { - "$id": "82", + "$id": "76", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "83", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "84", + "$id": "78", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "85", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -722,10 +678,10 @@ ] }, { - "$ref": "75" + "$ref": "69" }, { - "$id": "86", + "$id": "80", "Kind": "Model", "Name": "SendRequest2", "Namespace": "Type.Union", @@ -733,12 +689,12 @@ "Usage": "Input", "Properties": [ { - "$id": "87", + "$id": "81", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "75" + "$ref": "69" }, "IsRequired": true, "IsReadOnly": false @@ -746,7 +702,7 @@ ] }, { - "$id": "88", + "$id": "82", "Kind": "Model", "Name": "GetResponse1", "Namespace": "Type.Union", @@ -754,12 +710,12 @@ "Usage": "Output", "Properties": [ { - "$id": "89", + "$id": "83", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "90", + "$id": "84", "Kind": "Model", "Name": "MixedLiteralsCases", "Namespace": "Type.Union", @@ -767,21 +723,21 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "91", + "$id": "85", "Name": "stringLiteral", "SerializedName": "stringLiteral", "Description": "This should be receive/send the \"a\" variant", "Type": { - "$id": "92", + "$id": "86", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "93", + "$id": "87", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "94", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -790,11 +746,11 @@ "IsNullable": false }, { - "$id": "95", + "$id": "89", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "96", + "$id": "90", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -803,11 +759,11 @@ "IsNullable": false }, { - "$id": "97", + "$id": "91", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "98", + "$id": "92", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -816,11 +772,11 @@ "IsNullable": false }, { - "$id": "99", + "$id": "93", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "100", + "$id": "94", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -835,21 +791,21 @@ "IsReadOnly": false }, { - "$id": "101", + "$id": "95", "Name": "intLiteral", "SerializedName": "intLiteral", "Description": "This should be receive/send the 2 variant", "Type": { - "$id": "102", + "$id": "96", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "103", + "$id": "97", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "104", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -858,11 +814,11 @@ "IsNullable": false }, { - "$id": "105", + "$id": "99", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "106", + "$id": "100", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -871,11 +827,11 @@ "IsNullable": false }, { - "$id": "107", + "$id": "101", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "108", + "$id": "102", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -884,11 +840,11 @@ "IsNullable": false }, { - "$id": "109", + "$id": "103", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "110", + "$id": "104", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -903,21 +859,21 @@ "IsReadOnly": false }, { - "$id": "111", + "$id": "105", "Name": "floatLiteral", "SerializedName": "floatLiteral", "Description": "This should be receive/send the 3.3 variant", "Type": { - "$id": "112", + "$id": "106", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "113", + "$id": "107", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "114", + "$id": "108", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -926,11 +882,11 @@ "IsNullable": false }, { - "$id": "115", + "$id": "109", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "116", + "$id": "110", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -939,11 +895,11 @@ "IsNullable": false }, { - "$id": "117", + "$id": "111", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "118", + "$id": "112", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -952,11 +908,11 @@ "IsNullable": false }, { - "$id": "119", + "$id": "113", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "120", + "$id": "114", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -971,21 +927,21 @@ "IsReadOnly": false }, { - "$id": "121", + "$id": "115", "Name": "booleanLiteral", "SerializedName": "booleanLiteral", "Description": "This should be receive/send the true variant", "Type": { - "$id": "122", + "$id": "116", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "123", + "$id": "117", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "124", + "$id": "118", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -994,11 +950,11 @@ "IsNullable": false }, { - "$id": "125", + "$id": "119", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "126", + "$id": "120", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1007,11 +963,11 @@ "IsNullable": false }, { - "$id": "127", + "$id": "121", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "128", + "$id": "122", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -1020,11 +976,11 @@ "IsNullable": false }, { - "$id": "129", + "$id": "123", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "130", + "$id": "124", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1046,10 +1002,10 @@ ] }, { - "$ref": "90" + "$ref": "84" }, { - "$id": "131", + "$id": "125", "Kind": "Model", "Name": "SendRequest1", "Namespace": "Type.Union", @@ -1057,12 +1013,12 @@ "Usage": "Input", "Properties": [ { - "$id": "132", + "$id": "126", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "90" + "$ref": "84" }, "IsRequired": true, "IsReadOnly": false @@ -1070,7 +1026,7 @@ ] }, { - "$id": "133", + "$id": "127", "Kind": "Model", "Name": "GetResponse", "Namespace": "Type.Union", @@ -1078,12 +1034,12 @@ "Usage": "Output", "Properties": [ { - "$id": "134", + "$id": "128", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "135", + "$id": "129", "Kind": "Model", "Name": "MixedTypesCases", "Namespace": "Type.Union", @@ -1091,24 +1047,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "136", + "$id": "130", "Name": "model", "SerializedName": "model", "Description": "This should be receive/send the Cat variant", "Type": { - "$id": "137", + "$id": "131", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "57" + "$ref": "51" }, { - "$id": "138", + "$id": "132", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "139", + "$id": "133", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1117,13 +1073,13 @@ "IsNullable": false }, { - "$id": "140", + "$id": "134", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "141", + "$id": "135", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1135,24 +1091,24 @@ "IsReadOnly": false }, { - "$id": "142", + "$id": "136", "Name": "literal", "SerializedName": "literal", "Description": "This should be receive/send the \"a\" variant", "Type": { - "$id": "143", + "$id": "137", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "57" + "$ref": "51" }, { - "$id": "144", + "$id": "138", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "145", + "$id": "139", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1161,13 +1117,13 @@ "IsNullable": false }, { - "$id": "146", + "$id": "140", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "147", + "$id": "141", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1179,24 +1135,24 @@ "IsReadOnly": false }, { - "$id": "148", + "$id": "142", "Name": "int", "SerializedName": "int", "Description": "This should be receive/send the int variant", "Type": { - "$id": "149", + "$id": "143", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "57" + "$ref": "51" }, { - "$id": "150", + "$id": "144", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "151", + "$id": "145", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1205,13 +1161,13 @@ "IsNullable": false }, { - "$id": "152", + "$id": "146", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "153", + "$id": "147", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1223,24 +1179,24 @@ "IsReadOnly": false }, { - "$id": "154", + "$id": "148", "Name": "boolean", "SerializedName": "boolean", "Description": "This should be receive/send the boolean variant", "Type": { - "$id": "155", + "$id": "149", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "57" + "$ref": "51" }, { - "$id": "156", + "$id": "150", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "157", + "$id": "151", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1249,13 +1205,13 @@ "IsNullable": false }, { - "$id": "158", + "$id": "152", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "159", + "$id": "153", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1274,10 +1230,10 @@ ] }, { - "$ref": "135" + "$ref": "129" }, { - "$id": "160", + "$id": "154", "Kind": "Model", "Name": "SendRequest", "Namespace": "Type.Union", @@ -1285,12 +1241,12 @@ "Usage": "Input", "Properties": [ { - "$id": "161", + "$id": "155", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "135" + "$ref": "129" }, "IsRequired": true, "IsReadOnly": false @@ -1300,32 +1256,32 @@ ], "Clients": [ { - "$id": "162", + "$id": "156", "Name": "UnionClient", "Description": "", "Operations": [], "Protocol": { - "$id": "163" + "$id": "157" }, "Creatable": true }, { - "$id": "164", + "$id": "158", "Name": "StringsOnly", "Description": "Describe union of string \"a\" | \"b\" | \"c\"", "Operations": [ { - "$id": "165", + "$id": "159", "Name": "get", "ResourceName": "StringsOnly", "Parameters": [ { - "$id": "166", + "$id": "160", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "167", + "$id": "161", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1340,9 +1296,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "168", + "$id": "162", "Type": { - "$id": "169", + "$id": "163", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1351,11 +1307,11 @@ } }, { - "$id": "170", + "$id": "164", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "171", + "$id": "165", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1370,9 +1326,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "172", + "$id": "166", "Type": { - "$ref": "171" + "$ref": "165" }, "Value": "application/json" } @@ -1380,12 +1336,12 @@ ], "Responses": [ { - "$id": "173", + "$id": "167", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "34" + "$ref": "28" }, "BodyMediaType": "Json", "Headers": [], @@ -1404,19 +1360,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "174", + "$id": "168", "Name": "send", "ResourceName": "StringsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "175", + "$id": "169", "Name": "SendRequest9", "NameInRequest": "", "Type": { - "$ref": "36" + "$ref": "30" }, "Location": "Body", "IsRequired": true, @@ -1429,11 +1385,11 @@ "Kind": "Spread" }, { - "$id": "176", + "$id": "170", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "177", + "$id": "171", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1448,19 +1404,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "178", + "$id": "172", "Type": { - "$ref": "177" + "$ref": "171" }, "Value": "application/json" } }, { - "$id": "179", + "$id": "173", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "180", + "$id": "174", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1475,9 +1431,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "181", + "$id": "175", "Type": { - "$ref": "180" + "$ref": "174" }, "Value": "application/json" } @@ -1485,7 +1441,7 @@ ], "Responses": [ { - "$id": "182", + "$id": "176", "StatusCodes": [ 204 ], @@ -1507,30 +1463,30 @@ } ], "Protocol": { - "$id": "183" + "$id": "177" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "184", + "$id": "178", "Name": "StringExtensible", "Description": "Describe union of string string | \"b\" | \"c\"", "Operations": [ { - "$id": "185", + "$id": "179", "Name": "get", "ResourceName": "StringExtensible", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "186", + "$id": "180", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "187", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1545,9 +1501,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "188", + "$id": "182", "Type": { - "$ref": "187" + "$ref": "181" }, "Value": "application/json" } @@ -1555,12 +1511,12 @@ ], "Responses": [ { - "$id": "189", + "$id": "183", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "38" + "$ref": "32" }, "BodyMediaType": "Json", "Headers": [], @@ -1579,19 +1535,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "190", + "$id": "184", "Name": "send", "ResourceName": "StringExtensible", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "191", + "$id": "185", "Name": "SendRequest8", "NameInRequest": "", "Type": { - "$ref": "40" + "$ref": "34" }, "Location": "Body", "IsRequired": true, @@ -1604,11 +1560,11 @@ "Kind": "Spread" }, { - "$id": "192", + "$id": "186", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "193", + "$id": "187", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1623,19 +1579,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "194", + "$id": "188", "Type": { - "$ref": "193" + "$ref": "187" }, "Value": "application/json" } }, { - "$id": "195", + "$id": "189", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "196", + "$id": "190", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1650,9 +1606,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "197", + "$id": "191", "Type": { - "$ref": "196" + "$ref": "190" }, "Value": "application/json" } @@ -1660,7 +1616,7 @@ ], "Responses": [ { - "$id": "198", + "$id": "192", "StatusCodes": [ 204 ], @@ -1682,30 +1638,30 @@ } ], "Protocol": { - "$id": "199" + "$id": "193" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "200", + "$id": "194", "Name": "StringExtensibleNamed", "Description": "Describe union of string string | \"b\" | \"c\" but where the union is named and some of the variants are named", "Operations": [ { - "$id": "201", + "$id": "195", "Name": "get", "ResourceName": "StringExtensibleNamed", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "202", + "$id": "196", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "203", + "$id": "197", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1720,9 +1676,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "204", + "$id": "198", "Type": { - "$ref": "203" + "$ref": "197" }, "Value": "application/json" } @@ -1730,12 +1686,12 @@ ], "Responses": [ { - "$id": "205", + "$id": "199", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "42" + "$ref": "36" }, "BodyMediaType": "Json", "Headers": [], @@ -1754,19 +1710,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "206", + "$id": "200", "Name": "send", "ResourceName": "StringExtensibleNamed", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "207", + "$id": "201", "Name": "SendRequest7", "NameInRequest": "", "Type": { - "$ref": "44" + "$ref": "38" }, "Location": "Body", "IsRequired": true, @@ -1779,11 +1735,11 @@ "Kind": "Spread" }, { - "$id": "208", + "$id": "202", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "209", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1798,19 +1754,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "210", + "$id": "204", "Type": { - "$ref": "209" + "$ref": "203" }, "Value": "application/json" } }, { - "$id": "211", + "$id": "205", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "212", + "$id": "206", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1825,9 +1781,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "213", + "$id": "207", "Type": { - "$ref": "212" + "$ref": "206" }, "Value": "application/json" } @@ -1835,7 +1791,7 @@ ], "Responses": [ { - "$id": "214", + "$id": "208", "StatusCodes": [ 204 ], @@ -1857,30 +1813,30 @@ } ], "Protocol": { - "$id": "215" + "$id": "209" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "216", + "$id": "210", "Name": "IntsOnly", "Description": "Describe union of integer 1 | 2 | 3", "Operations": [ { - "$id": "217", + "$id": "211", "Name": "get", "ResourceName": "IntsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "218", + "$id": "212", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "219", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1895,9 +1851,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "220", + "$id": "214", "Type": { - "$ref": "219" + "$ref": "213" }, "Value": "application/json" } @@ -1905,12 +1861,12 @@ ], "Responses": [ { - "$id": "221", + "$id": "215", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "46" + "$ref": "40" }, "BodyMediaType": "Json", "Headers": [], @@ -1929,19 +1885,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "222", + "$id": "216", "Name": "send", "ResourceName": "IntsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "223", + "$id": "217", "Name": "SendRequest6", "NameInRequest": "", "Type": { - "$ref": "48" + "$ref": "42" }, "Location": "Body", "IsRequired": true, @@ -1954,11 +1910,11 @@ "Kind": "Spread" }, { - "$id": "224", + "$id": "218", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "225", + "$id": "219", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1973,19 +1929,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "220", "Type": { - "$ref": "225" + "$ref": "219" }, "Value": "application/json" } }, { - "$id": "227", + "$id": "221", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "228", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2000,9 +1956,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "229", + "$id": "223", "Type": { - "$ref": "228" + "$ref": "222" }, "Value": "application/json" } @@ -2010,7 +1966,7 @@ ], "Responses": [ { - "$id": "230", + "$id": "224", "StatusCodes": [ 204 ], @@ -2032,30 +1988,30 @@ } ], "Protocol": { - "$id": "231" + "$id": "225" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "232", + "$id": "226", "Name": "FloatsOnly", "Description": "Describe union of floats 1.1 | 2.2 | 3.3", "Operations": [ { - "$id": "233", + "$id": "227", "Name": "get", "ResourceName": "FloatsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "234", + "$id": "228", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "235", + "$id": "229", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2070,9 +2026,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "236", + "$id": "230", "Type": { - "$ref": "235" + "$ref": "229" }, "Value": "application/json" } @@ -2080,12 +2036,12 @@ ], "Responses": [ { - "$id": "237", + "$id": "231", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "50" + "$ref": "44" }, "BodyMediaType": "Json", "Headers": [], @@ -2104,19 +2060,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "238", + "$id": "232", "Name": "send", "ResourceName": "FloatsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "239", + "$id": "233", "Name": "SendRequest5", "NameInRequest": "", "Type": { - "$ref": "52" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2129,11 +2085,11 @@ "Kind": "Spread" }, { - "$id": "240", + "$id": "234", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "241", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2148,19 +2104,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "242", + "$id": "236", "Type": { - "$ref": "241" + "$ref": "235" }, "Value": "application/json" } }, { - "$id": "243", + "$id": "237", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "244", + "$id": "238", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2175,9 +2131,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "245", + "$id": "239", "Type": { - "$ref": "244" + "$ref": "238" }, "Value": "application/json" } @@ -2185,7 +2141,7 @@ ], "Responses": [ { - "$id": "246", + "$id": "240", "StatusCodes": [ 204 ], @@ -2207,30 +2163,30 @@ } ], "Protocol": { - "$id": "247" + "$id": "241" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "248", + "$id": "242", "Name": "ModelsOnly", "Description": "Describe union of models", "Operations": [ { - "$id": "249", + "$id": "243", "Name": "get", "ResourceName": "ModelsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "250", + "$id": "244", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "251", + "$id": "245", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2245,9 +2201,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "252", + "$id": "246", "Type": { - "$ref": "251" + "$ref": "245" }, "Value": "application/json" } @@ -2255,12 +2211,12 @@ ], "Responses": [ { - "$id": "253", + "$id": "247", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "54" + "$ref": "48" }, "BodyMediaType": "Json", "Headers": [], @@ -2279,19 +2235,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "254", + "$id": "248", "Name": "send", "ResourceName": "ModelsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "255", + "$id": "249", "Name": "SendRequest4", "NameInRequest": "", "Type": { - "$ref": "63" + "$ref": "57" }, "Location": "Body", "IsRequired": true, @@ -2304,11 +2260,11 @@ "Kind": "Spread" }, { - "$id": "256", + "$id": "250", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "257", + "$id": "251", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2323,19 +2279,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "258", + "$id": "252", "Type": { - "$ref": "257" + "$ref": "251" }, "Value": "application/json" } }, { - "$id": "259", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "260", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2350,9 +2306,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "261", + "$id": "255", "Type": { - "$ref": "260" + "$ref": "254" }, "Value": "application/json" } @@ -2360,7 +2316,7 @@ ], "Responses": [ { - "$id": "262", + "$id": "256", "StatusCodes": [ 204 ], @@ -2382,30 +2338,30 @@ } ], "Protocol": { - "$id": "263" + "$id": "257" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "264", + "$id": "258", "Name": "EnumsOnly", "Description": "Describe union of 2 different enums", "Operations": [ { - "$id": "265", + "$id": "259", "Name": "get", "ResourceName": "EnumsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "266", + "$id": "260", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "267", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2420,9 +2376,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "268", + "$id": "262", "Type": { - "$ref": "267" + "$ref": "261" }, "Value": "application/json" } @@ -2430,12 +2386,12 @@ ], "Responses": [ { - "$id": "269", + "$id": "263", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "66" + "$ref": "60" }, "BodyMediaType": "Json", "Headers": [], @@ -2454,19 +2410,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "270", + "$id": "264", "Name": "send", "ResourceName": "EnumsOnly", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "271", + "$id": "265", "Name": "SendRequest3", "NameInRequest": "", "Type": { - "$ref": "71" + "$ref": "65" }, "Location": "Body", "IsRequired": true, @@ -2479,11 +2435,11 @@ "Kind": "Spread" }, { - "$id": "272", + "$id": "266", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "273", + "$id": "267", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2498,19 +2454,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "274", + "$id": "268", "Type": { - "$ref": "273" + "$ref": "267" }, "Value": "application/json" } }, { - "$id": "275", + "$id": "269", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "276", + "$id": "270", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2525,9 +2481,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "277", + "$id": "271", "Type": { - "$ref": "276" + "$ref": "270" }, "Value": "application/json" } @@ -2535,7 +2491,7 @@ ], "Responses": [ { - "$id": "278", + "$id": "272", "StatusCodes": [ 204 ], @@ -2557,30 +2513,30 @@ } ], "Protocol": { - "$id": "279" + "$id": "273" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "280", + "$id": "274", "Name": "StringAndArray", "Description": "Describe union of a string and an array of strings", "Operations": [ { - "$id": "281", + "$id": "275", "Name": "get", "ResourceName": "StringAndArray", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "282", + "$id": "276", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "283", + "$id": "277", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2595,9 +2551,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "284", + "$id": "278", "Type": { - "$ref": "283" + "$ref": "277" }, "Value": "application/json" } @@ -2605,12 +2561,12 @@ ], "Responses": [ { - "$id": "285", + "$id": "279", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "73" + "$ref": "67" }, "BodyMediaType": "Json", "Headers": [], @@ -2629,19 +2585,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "286", + "$id": "280", "Name": "send", "ResourceName": "StringAndArray", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "287", + "$id": "281", "Name": "SendRequest2", "NameInRequest": "", "Type": { - "$ref": "86" + "$ref": "80" }, "Location": "Body", "IsRequired": true, @@ -2654,11 +2610,11 @@ "Kind": "Spread" }, { - "$id": "288", + "$id": "282", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "289", + "$id": "283", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2673,19 +2629,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "290", + "$id": "284", "Type": { - "$ref": "289" + "$ref": "283" }, "Value": "application/json" } }, { - "$id": "291", + "$id": "285", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "292", + "$id": "286", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2700,9 +2656,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "293", + "$id": "287", "Type": { - "$ref": "292" + "$ref": "286" }, "Value": "application/json" } @@ -2710,7 +2666,7 @@ ], "Responses": [ { - "$id": "294", + "$id": "288", "StatusCodes": [ 204 ], @@ -2732,30 +2688,30 @@ } ], "Protocol": { - "$id": "295" + "$id": "289" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "296", + "$id": "290", "Name": "MixedLiterals", "Description": "Describe union of floats \"a\" | 2 | 3.3", "Operations": [ { - "$id": "297", + "$id": "291", "Name": "get", "ResourceName": "MixedLiterals", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "298", + "$id": "292", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "299", + "$id": "293", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2770,9 +2726,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "300", + "$id": "294", "Type": { - "$ref": "299" + "$ref": "293" }, "Value": "application/json" } @@ -2780,12 +2736,12 @@ ], "Responses": [ { - "$id": "301", + "$id": "295", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "88" + "$ref": "82" }, "BodyMediaType": "Json", "Headers": [], @@ -2804,19 +2760,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "302", + "$id": "296", "Name": "send", "ResourceName": "MixedLiterals", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "303", + "$id": "297", "Name": "SendRequest1", "NameInRequest": "", "Type": { - "$ref": "131" + "$ref": "125" }, "Location": "Body", "IsRequired": true, @@ -2829,11 +2785,11 @@ "Kind": "Spread" }, { - "$id": "304", + "$id": "298", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "305", + "$id": "299", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2848,19 +2804,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "306", + "$id": "300", "Type": { - "$ref": "305" + "$ref": "299" }, "Value": "application/json" } }, { - "$id": "307", + "$id": "301", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "308", + "$id": "302", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2875,9 +2831,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "309", + "$id": "303", "Type": { - "$ref": "308" + "$ref": "302" }, "Value": "application/json" } @@ -2885,7 +2841,7 @@ ], "Responses": [ { - "$id": "310", + "$id": "304", "StatusCodes": [ 204 ], @@ -2907,30 +2863,30 @@ } ], "Protocol": { - "$id": "311" + "$id": "305" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "312", + "$id": "306", "Name": "MixedTypes", "Description": "Describe union of floats \"a\" | 2 | 3.3", "Operations": [ { - "$id": "313", + "$id": "307", "Name": "get", "ResourceName": "MixedTypes", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "314", + "$id": "308", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "315", + "$id": "309", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2945,9 +2901,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "316", + "$id": "310", "Type": { - "$ref": "315" + "$ref": "309" }, "Value": "application/json" } @@ -2955,12 +2911,12 @@ ], "Responses": [ { - "$id": "317", + "$id": "311", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "133" + "$ref": "127" }, "BodyMediaType": "Json", "Headers": [], @@ -2979,19 +2935,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "318", + "$id": "312", "Name": "send", "ResourceName": "MixedTypes", "Parameters": [ { - "$ref": "166" + "$ref": "160" }, { - "$id": "319", + "$id": "313", "Name": "SendRequest", "NameInRequest": "", "Type": { - "$ref": "160" + "$ref": "154" }, "Location": "Body", "IsRequired": true, @@ -3004,11 +2960,11 @@ "Kind": "Spread" }, { - "$id": "320", + "$id": "314", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "321", + "$id": "315", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3023,19 +2979,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "322", + "$id": "316", "Type": { - "$ref": "321" + "$ref": "315" }, "Value": "application/json" } }, { - "$id": "323", + "$id": "317", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "324", + "$id": "318", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3050,9 +3006,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "325", + "$id": "319", "Type": { - "$ref": "324" + "$ref": "318" }, "Value": "application/json" } @@ -3060,7 +3016,7 @@ ], "Responses": [ { - "$id": "326", + "$id": "320", "StatusCodes": [ 204 ], @@ -3082,7 +3038,7 @@ } ], "Protocol": { - "$id": "327" + "$id": "321" }, "Creatable": false, "Parent": "UnionClient" diff --git a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json index fa26e3b5d15..9b6c22e3f52 100644 --- a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json @@ -1105,189 +1105,36 @@ }, { "$ref": "135" - }, - { - "$id": "142", - "Kind": "Model", - "Name": "Job", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "143", - "Name": "jobId", - "SerializedName": "jobId", - "Description": "The job ID.", - "Type": { - "$id": "144", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "145", - "Name": "createdDateTime", - "SerializedName": "createdDateTime", - "Description": "The creation date time of the job.", - "Type": { - "$id": "146", - "Kind": "Primitive", - "Name": "DateTimeRFC3339", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "147", - "Name": "lastUpdatedDateTime", - "SerializedName": "lastUpdatedDateTime", - "Description": "The the last date time the job was updated.", - "Type": { - "$id": "148", - "Kind": "Primitive", - "Name": "DateTimeRFC3339", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "149", - "Name": "expirationDateTime", - "SerializedName": "expirationDateTime", - "Description": "The expiration date time of the job.", - "Type": { - "$id": "150", - "Kind": "Primitive", - "Name": "DateTimeRFC3339", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": true - }, - { - "$id": "151", - "Name": "status", - "SerializedName": "status", - "Description": "The job status.", - "Type": { - "$ref": "12" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "152", - "Name": "warnings", - "SerializedName": "warnings", - "Description": "The warnings that were encountered while executing the job.", - "Type": { - "$id": "153", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$ref": "99" - }, - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "154", - "Name": "errors", - "SerializedName": "errors", - "Description": "The errors encountered while executing the job.", - "Type": { - "$ref": "52" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "155", - "Kind": "Model", - "Name": "ExportedProject", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "156", - "Kind": "Model", - "Name": "ListQueryParams", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "157", - "Kind": "Model", - "Name": "ExportParams", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "158", - "Kind": "Model", - "Name": "SwapDeploymentsParams", - "Namespace": "AuthoringTypeSpec", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "159", - "Name": "body", - "SerializedName": "", - "Description": "The body schema of the operation.", - "Type": { - "$ref": "82" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "160", + "$id": "142", "Name": "AuthoringTypeSpecClient", "Description": "", "Operations": [], "Protocol": { - "$id": "161" + "$id": "143" }, "Creatable": true }, { - "$id": "162", + "$id": "144", "Name": "Projects", "Description": "", "Operations": [ { - "$id": "163", + "$id": "145", "Name": "createOrUpdate", "ResourceName": "Project", "Description": "Creates a new project or updates an existing one.", "Parameters": [ { - "$id": "164", + "$id": "146", "Name": "Endpoint", "NameInRequest": "Endpoint", "Type": { - "$id": "165", + "$id": "147", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1303,21 +1150,21 @@ "Kind": "Client" }, { - "$id": "166", + "$id": "148", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "167", + "$id": "149", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "168", + "$id": "150", "Type": { - "$id": "169", + "$id": "151", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1334,11 +1181,11 @@ "Kind": "Client" }, { - "$id": "170", + "$id": "152", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "171", + "$id": "153", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1354,7 +1201,7 @@ "Kind": "Method" }, { - "$id": "172", + "$id": "154", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -1372,11 +1219,11 @@ "Kind": "Method" }, { - "$id": "173", + "$id": "155", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "174", + "$id": "156", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1391,19 +1238,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "157", "Type": { - "$ref": "174" + "$ref": "156" }, "Value": "application/json" } }, { - "$id": "176", + "$id": "158", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "177", + "$id": "159", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1418,9 +1265,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "178", + "$id": "160", "Type": { - "$ref": "177" + "$ref": "159" }, "Value": "application/json" } @@ -1428,7 +1275,7 @@ ], "Responses": [ { - "$id": "179", + "$id": "161", "StatusCodes": [ 201 ], @@ -1438,12 +1285,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "180", + "$id": "162", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "181", + "$id": "163", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1456,7 +1303,7 @@ ] }, { - "$id": "182", + "$id": "164", "StatusCodes": [ 200 ], @@ -1466,12 +1313,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "183", + "$id": "165", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "184", + "$id": "166", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1493,10 +1340,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "185", + "$id": "167", "FinalStateVia": 2, "FinalResponse": { - "$id": "186", + "$id": "168", "StatusCodes": [ 200 ], @@ -1510,28 +1357,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "187", + "$id": "169", "Name": "get", "ResourceName": "Project", "Description": "Gets the details of a project.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "188", + "$id": "170", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "189", + "$id": "171", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -1543,11 +1390,11 @@ "Kind": "Client" }, { - "$id": "190", + "$id": "172", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "191", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1563,11 +1410,11 @@ "Kind": "Method" }, { - "$id": "192", + "$id": "174", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "193", + "$id": "175", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1582,9 +1429,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "194", + "$id": "176", "Type": { - "$ref": "193" + "$ref": "175" }, "Value": "application/json" } @@ -1592,7 +1439,7 @@ ], "Responses": [ { - "$id": "195", + "$id": "177", "StatusCodes": [ 200 ], @@ -1616,28 +1463,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "196", + "$id": "178", "Name": "delete", "ResourceName": "Project", "Description": "Deletes a project.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "197", + "$id": "179", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "198", + "$id": "180", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -1649,11 +1496,11 @@ "Kind": "Client" }, { - "$id": "199", + "$id": "181", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "200", + "$id": "182", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1669,11 +1516,11 @@ "Kind": "Method" }, { - "$id": "201", + "$id": "183", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "184", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1688,9 +1535,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "185", "Type": { - "$ref": "202" + "$ref": "184" }, "Value": "application/json" } @@ -1698,7 +1545,7 @@ ], "Responses": [ { - "$id": "204", + "$id": "186", "StatusCodes": [ 202 ], @@ -1708,12 +1555,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "205", + "$id": "187", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "206", + "$id": "188", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1732,10 +1579,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}", "BufferResponse": true, "LongRunning": { - "$id": "207", + "$id": "189", "FinalStateVia": 3, "FinalResponse": { - "$id": "208", + "$id": "190", "StatusCodes": [ 204 ], @@ -1746,28 +1593,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "209", + "$id": "191", "Name": "list", "ResourceName": "Project", "Description": "Lists the existing projects.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "210", + "$id": "192", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "211", + "$id": "193", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -1779,11 +1626,11 @@ "Kind": "Client" }, { - "$id": "212", + "$id": "194", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "213", + "$id": "195", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1798,9 +1645,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "214", + "$id": "196", "Type": { - "$ref": "213" + "$ref": "195" }, "Value": "application/json" } @@ -1808,7 +1655,7 @@ ], "Responses": [ { - "$id": "215", + "$id": "197", "StatusCodes": [ 200 ], @@ -1829,7 +1676,7 @@ "Path": "/authoring/analyze-text/projects", "BufferResponse": true, "Paging": { - "$id": "216", + "$id": "198", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1837,28 +1684,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "217", + "$id": "199", "Name": "export", "ResourceName": "Projects", "Description": "Triggers a job to export a project's data.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "218", + "$id": "200", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "219", + "$id": "201", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -1870,11 +1717,11 @@ "Kind": "Client" }, { - "$id": "220", + "$id": "202", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "221", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1890,11 +1737,11 @@ "Kind": "Method" }, { - "$id": "222", + "$id": "204", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "223", + "$id": "205", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1910,11 +1757,11 @@ "Kind": "Method" }, { - "$id": "224", + "$id": "206", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "225", + "$id": "207", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1929,9 +1776,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "208", "Type": { - "$ref": "225" + "$ref": "207" }, "Value": "application/json" } @@ -1939,19 +1786,19 @@ ], "Responses": [ { - "$id": "227", + "$id": "209", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "228", + "$id": "210", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "229", + "$id": "211", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1967,10 +1814,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}:export", "BufferResponse": true, "LongRunning": { - "$id": "230", + "$id": "212", "FinalStateVia": 3, "FinalResponse": { - "$id": "231", + "$id": "213", "StatusCodes": [ 200 ], @@ -1981,28 +1828,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "232", + "$id": "214", "Name": "importx", "ResourceName": "Projects", "Description": "Triggers a job to export a project's data.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "233", + "$id": "215", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "234", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -2014,11 +1861,11 @@ "Kind": "Client" }, { - "$id": "235", + "$id": "217", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "236", + "$id": "218", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2034,11 +1881,11 @@ "Kind": "Method" }, { - "$id": "237", + "$id": "219", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "238", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2053,9 +1900,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "239", + "$id": "221", "Type": { - "$ref": "238" + "$ref": "220" }, "Value": "application/json" } @@ -2063,19 +1910,19 @@ ], "Responses": [ { - "$id": "240", + "$id": "222", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "241", + "$id": "223", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "242", + "$id": "224", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2091,10 +1938,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}:importx", "BufferResponse": true, "LongRunning": { - "$id": "243", + "$id": "225", "FinalStateVia": 3, "FinalResponse": { - "$id": "244", + "$id": "226", "StatusCodes": [ 200 ], @@ -2105,28 +1952,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "245", + "$id": "227", "Name": "train", "ResourceName": "Projects", "Description": "Triggers a training job for a project.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "246", + "$id": "228", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "247", + "$id": "229", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -2138,11 +1985,11 @@ "Kind": "Client" }, { - "$id": "248", + "$id": "230", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "249", + "$id": "231", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2158,7 +2005,7 @@ "Kind": "Method" }, { - "$id": "250", + "$id": "232", "Name": "body", "NameInRequest": "body", "Type": { @@ -2175,11 +2022,11 @@ "Kind": "Method" }, { - "$id": "251", + "$id": "233", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "252", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2194,19 +2041,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "253", + "$id": "235", "Type": { - "$ref": "252" + "$ref": "234" }, "Value": "application/json" } }, { - "$id": "254", + "$id": "236", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "255", + "$id": "237", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2221,9 +2068,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "238", "Type": { - "$ref": "255" + "$ref": "237" }, "Value": "application/json" } @@ -2231,19 +2078,19 @@ ], "Responses": [ { - "$id": "257", + "$id": "239", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "258", + "$id": "240", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "259", + "$id": "241", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2262,10 +2109,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "260", + "$id": "242", "FinalStateVia": 3, "FinalResponse": { - "$id": "261", + "$id": "243", "StatusCodes": [ 200 ], @@ -2277,39 +2124,39 @@ } ], "Protocol": { - "$id": "262" + "$id": "244" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "263", + "$id": "245", "Name": "Deployments", "Description": "", "Operations": [ { - "$id": "264", + "$id": "246", "Name": "getDeployment", "ResourceName": "Deployment", "Description": "Gets the details of a deployment.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "265", + "$id": "247", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "266", + "$id": "248", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -2321,11 +2168,11 @@ "Kind": "Client" }, { - "$id": "267", + "$id": "249", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "268", + "$id": "250", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2341,11 +2188,11 @@ "Kind": "Method" }, { - "$id": "269", + "$id": "251", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "270", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2361,11 +2208,11 @@ "Kind": "Method" }, { - "$id": "271", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "272", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2380,9 +2227,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "255", "Type": { - "$ref": "272" + "$ref": "254" }, "Value": "application/json" } @@ -2390,7 +2237,7 @@ ], "Responses": [ { - "$id": "274", + "$id": "256", "StatusCodes": [ 200 ], @@ -2414,28 +2261,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "275", + "$id": "257", "Name": "deployProject", "ResourceName": "Deployment", "Description": "Creates a new deployment or replaces an existing one.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "276", + "$id": "258", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "277", + "$id": "259", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -2447,11 +2294,11 @@ "Kind": "Client" }, { - "$id": "278", + "$id": "260", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "279", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2467,11 +2314,11 @@ "Kind": "Method" }, { - "$id": "280", + "$id": "262", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "281", + "$id": "263", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2487,7 +2334,7 @@ "Kind": "Method" }, { - "$id": "282", + "$id": "264", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -2505,11 +2352,11 @@ "Kind": "Method" }, { - "$id": "283", + "$id": "265", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "284", + "$id": "266", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2524,19 +2371,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "285", + "$id": "267", "Type": { - "$ref": "284" + "$ref": "266" }, "Value": "application/json" } }, { - "$id": "286", + "$id": "268", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "287", + "$id": "269", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2551,9 +2398,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "288", + "$id": "270", "Type": { - "$ref": "287" + "$ref": "269" }, "Value": "application/json" } @@ -2561,7 +2408,7 @@ ], "Responses": [ { - "$id": "289", + "$id": "271", "StatusCodes": [ 201 ], @@ -2571,12 +2418,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "290", + "$id": "272", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "291", + "$id": "273", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2589,7 +2436,7 @@ ] }, { - "$id": "292", + "$id": "274", "StatusCodes": [ 200 ], @@ -2599,12 +2446,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "293", + "$id": "275", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "294", + "$id": "276", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2626,10 +2473,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "295", + "$id": "277", "FinalStateVia": 2, "FinalResponse": { - "$id": "296", + "$id": "278", "StatusCodes": [ 200 ], @@ -2643,28 +2490,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "297", + "$id": "279", "Name": "deleteDeployment", "ResourceName": "Deployment", "Description": "Deletes a project deployment.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "298", + "$id": "280", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "299", + "$id": "281", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -2676,11 +2523,11 @@ "Kind": "Client" }, { - "$id": "300", + "$id": "282", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "301", + "$id": "283", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2696,11 +2543,11 @@ "Kind": "Method" }, { - "$id": "302", + "$id": "284", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "303", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2716,11 +2563,11 @@ "Kind": "Method" }, { - "$id": "304", + "$id": "286", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "305", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2735,9 +2582,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "306", + "$id": "288", "Type": { - "$ref": "305" + "$ref": "287" }, "Value": "application/json" } @@ -2745,7 +2592,7 @@ ], "Responses": [ { - "$id": "307", + "$id": "289", "StatusCodes": [ 202 ], @@ -2755,12 +2602,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "308", + "$id": "290", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "309", + "$id": "291", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2779,10 +2626,10 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments/{deploymentName}", "BufferResponse": true, "LongRunning": { - "$id": "310", + "$id": "292", "FinalStateVia": 3, "FinalResponse": { - "$id": "311", + "$id": "293", "StatusCodes": [ 204 ], @@ -2793,28 +2640,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "312", + "$id": "294", "Name": "list", "ResourceName": "Deployment", "Description": "Lists the existing deployments.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "313", + "$id": "295", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "314", + "$id": "296", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -2826,11 +2673,11 @@ "Kind": "Client" }, { - "$id": "315", + "$id": "297", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "316", + "$id": "298", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2846,11 +2693,11 @@ "Kind": "Method" }, { - "$id": "317", + "$id": "299", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "318", + "$id": "300", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2865,9 +2712,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "319", + "$id": "301", "Type": { - "$ref": "318" + "$ref": "300" }, "Value": "application/json" } @@ -2875,7 +2722,7 @@ ], "Responses": [ { - "$id": "320", + "$id": "302", "StatusCodes": [ 200 ], @@ -2896,7 +2743,7 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments", "BufferResponse": true, "Paging": { - "$id": "321", + "$id": "303", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -2904,28 +2751,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "322", + "$id": "304", "Name": "swapDeployments", "ResourceName": "Deployments", "Description": "Swaps two existing deployments with each other.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "323", + "$id": "305", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "324", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -2937,11 +2784,11 @@ "Kind": "Client" }, { - "$id": "325", + "$id": "307", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "326", + "$id": "308", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2957,7 +2804,7 @@ "Kind": "Method" }, { - "$id": "327", + "$id": "309", "Name": "body", "NameInRequest": "body", "Description": "The body schema of the operation.", @@ -2975,11 +2822,11 @@ "Kind": "Method" }, { - "$id": "328", + "$id": "310", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "329", + "$id": "311", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2994,19 +2841,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "330", + "$id": "312", "Type": { - "$ref": "329" + "$ref": "311" }, "Value": "application/json" } }, { - "$id": "331", + "$id": "313", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "332", + "$id": "314", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3021,9 +2868,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "333", + "$id": "315", "Type": { - "$ref": "332" + "$ref": "314" }, "Value": "application/json" } @@ -3031,19 +2878,19 @@ ], "Responses": [ { - "$id": "334", + "$id": "316", "StatusCodes": [ 202 ], "BodyMediaType": "Json", "Headers": [ { - "$id": "335", + "$id": "317", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "336", + "$id": "318", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -3062,10 +2909,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "337", + "$id": "319", "FinalStateVia": 3, "FinalResponse": { - "$id": "338", + "$id": "320", "StatusCodes": [ 200 ], @@ -3077,39 +2924,39 @@ } ], "Protocol": { - "$id": "339" + "$id": "321" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "340", + "$id": "322", "Name": "Jobs", "Description": "", "Operations": [ { - "$id": "341", + "$id": "323", "Name": "getDeploymentStatus", "ResourceName": "DeploymentJob", "Description": "Gets the status of an existing deployment job.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "342", + "$id": "324", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "343", + "$id": "325", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -3121,11 +2968,11 @@ "Kind": "Client" }, { - "$id": "344", + "$id": "326", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "345", + "$id": "327", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3141,11 +2988,11 @@ "Kind": "Method" }, { - "$id": "346", + "$id": "328", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "347", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3161,11 +3008,11 @@ "Kind": "Method" }, { - "$id": "348", + "$id": "330", "Name": "jobId", "NameInRequest": "jobId", "Type": { - "$id": "349", + "$id": "331", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3181,11 +3028,11 @@ "Kind": "Method" }, { - "$id": "350", + "$id": "332", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "351", + "$id": "333", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3200,9 +3047,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "352", + "$id": "334", "Type": { - "$ref": "351" + "$ref": "333" }, "Value": "application/json" } @@ -3210,7 +3057,7 @@ ], "Responses": [ { - "$id": "353", + "$id": "335", "StatusCodes": [ 200 ], @@ -3234,28 +3081,28 @@ "GenerateConvenienceMethod": true }, { - "$id": "354", + "$id": "336", "Name": "getSwapDeploymentsStatus", "ResourceName": "SwapDeploymentsJob", "Description": "Gets the status of an existing swap deployment job.", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "355", + "$id": "337", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "356", + "$id": "338", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -3267,11 +3114,11 @@ "Kind": "Client" }, { - "$id": "357", + "$id": "339", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "358", + "$id": "340", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3287,11 +3134,11 @@ "Kind": "Method" }, { - "$id": "359", + "$id": "341", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "360", + "$id": "342", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3307,11 +3154,11 @@ "Kind": "Method" }, { - "$id": "361", + "$id": "343", "Name": "jobId", "NameInRequest": "jobId", "Type": { - "$id": "362", + "$id": "344", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3327,11 +3174,11 @@ "Kind": "Method" }, { - "$id": "363", + "$id": "345", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "364", + "$id": "346", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3346,9 +3193,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "365", + "$id": "347", "Type": { - "$ref": "364" + "$ref": "346" }, "Value": "application/json" } @@ -3356,7 +3203,7 @@ ], "Responses": [ { - "$id": "366", + "$id": "348", "StatusCodes": [ 200 ], @@ -3381,30 +3228,30 @@ } ], "Protocol": { - "$id": "367" + "$id": "349" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" }, { - "$id": "368", + "$id": "350", "Name": "Global", "Description": "", "Operations": [ { - "$id": "369", + "$id": "351", "Name": "getSupportedLanguages", "ResourceName": "Global", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "370", + "$id": "352", "Name": "top", "NameInRequest": "top", "Type": { - "$id": "371", + "$id": "353", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3420,11 +3267,11 @@ "Kind": "Method" }, { - "$id": "372", + "$id": "354", "Name": "skip", "NameInRequest": "skip", "Type": { - "$id": "373", + "$id": "355", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3440,11 +3287,11 @@ "Kind": "Method" }, { - "$id": "374", + "$id": "356", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Type": { - "$id": "375", + "$id": "357", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3460,19 +3307,19 @@ "Kind": "Method" }, { - "$id": "376", + "$id": "358", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "377", + "$id": "359", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -3484,11 +3331,11 @@ "Kind": "Client" }, { - "$id": "378", + "$id": "360", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "379", + "$id": "361", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3503,9 +3350,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "380", + "$id": "362", "Type": { - "$ref": "379" + "$ref": "361" }, "Value": "application/json" } @@ -3513,7 +3360,7 @@ ], "Responses": [ { - "$id": "381", + "$id": "363", "StatusCodes": [ 200 ], @@ -3534,7 +3381,7 @@ "Path": "/authoring/analyze-text/projects/global/languages", "BufferResponse": true, "Paging": { - "$id": "382", + "$id": "364", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -3542,19 +3389,19 @@ "GenerateConvenienceMethod": false }, { - "$id": "383", + "$id": "365", "Name": "listTrainingConfigVersions", "ResourceName": "Global", "Parameters": [ { - "$ref": "164" + "$ref": "146" }, { - "$id": "384", + "$id": "366", "Name": "top", "NameInRequest": "top", "Type": { - "$id": "385", + "$id": "367", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3570,11 +3417,11 @@ "Kind": "Method" }, { - "$id": "386", + "$id": "368", "Name": "skip", "NameInRequest": "skip", "Type": { - "$id": "387", + "$id": "369", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3590,11 +3437,11 @@ "Kind": "Method" }, { - "$id": "388", + "$id": "370", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Type": { - "$id": "389", + "$id": "371", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3610,19 +3457,19 @@ "Kind": "Method" }, { - "$id": "390", + "$id": "372", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "391", + "$id": "373", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "168" + "$ref": "150" }, "IsRequired": true, "IsApiVersion": true, @@ -3634,11 +3481,11 @@ "Kind": "Client" }, { - "$id": "392", + "$id": "374", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "393", + "$id": "375", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3653,9 +3500,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "394", + "$id": "376", "Type": { - "$ref": "393" + "$ref": "375" }, "Value": "application/json" } @@ -3663,7 +3510,7 @@ ], "Responses": [ { - "$id": "395", + "$id": "377", "StatusCodes": [ 200 ], @@ -3684,7 +3531,7 @@ "Path": "/authoring/analyze-text/projects/global/training-config-versions", "BufferResponse": true, "Paging": { - "$id": "396", + "$id": "378", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -3693,7 +3540,7 @@ } ], "Protocol": { - "$id": "397" + "$id": "379" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json index f8fb998fa04..97155664e9a 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json @@ -394,86 +394,11 @@ { "$id": "54", "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "55", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "56", - "Name": "implicit", - "Value": "implicit", - "Description": "implicit flow" - }, - { - "$id": "57", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "58", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "59", - "Kind": "Enum", - "Name": "AuthFlow_tokenUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "60", - "Name": "https://api.example.com/oauth2/token", - "Value": "https://api.example.com/oauth2/token", - "Description": "https://api.example.com/oauth2/token" - } - ], - "Namespace": "FirstTestTypeSpec", - "Description": "The AuthFlow_tokenUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "61", - "Kind": "Enum", - "Name": "AuthFlow_refreshUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "62", - "Name": "https://api.example.com/oauth2/refresh", - "Value": "https://api.example.com/oauth2/refresh", - "Description": "https://api.example.com/oauth2/refresh" - } - ], - "Namespace": "FirstTestTypeSpec", - "Description": "The AuthFlow_refreshUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "63", - "Kind": "Enum", "Name": "Versions", "EnumValueType": "String", "AllowedValues": [ { - "$id": "64", + "$id": "55", "Name": "2022-05-15-preview", "Value": "2022-05-15-preview" } @@ -486,7 +411,7 @@ ], "Models": [ { - "$id": "65", + "$id": "56", "Kind": "Model", "Name": "Thing", "Namespace": "FirstTestTypeSpec", @@ -495,12 +420,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "66", + "$id": "57", "Name": "name", "SerializedName": "name", "Description": "name of the Thing", "Type": { - "$id": "67", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -509,27 +434,27 @@ "IsReadOnly": false }, { - "$id": "68", + "$id": "59", "Name": "requiredUnion", "SerializedName": "requiredUnion", "Description": "required Union", "Type": { - "$id": "69", + "$id": "60", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "70", + "$id": "61", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "71", + "$id": "62", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "72", + "$id": "63", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -537,7 +462,7 @@ "IsNullable": false }, { - "$id": "73", + "$id": "64", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -549,12 +474,12 @@ "IsReadOnly": false }, { - "$id": "74", + "$id": "65", "Name": "requiredLiteralString", "SerializedName": "requiredLiteralString", "Description": "required literal string", "Type": { - "$id": "75", + "$id": "66", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -567,12 +492,12 @@ "IsReadOnly": false }, { - "$id": "76", + "$id": "67", "Name": "requiredLiteralInt", "SerializedName": "requiredLiteralInt", "Description": "required literal int", "Type": { - "$id": "77", + "$id": "68", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -585,12 +510,12 @@ "IsReadOnly": false }, { - "$id": "78", + "$id": "69", "Name": "requiredLiteralFloat", "SerializedName": "requiredLiteralFloat", "Description": "required literal float", "Type": { - "$id": "79", + "$id": "70", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -603,16 +528,16 @@ "IsReadOnly": false }, { - "$id": "80", + "$id": "71", "Name": "requiredLiteralBool", "SerializedName": "requiredLiteralBool", "Description": "required literal bool", "Type": { - "$id": "81", + "$id": "72", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "82", + "$id": "73", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -624,12 +549,12 @@ "IsReadOnly": false }, { - "$id": "83", + "$id": "74", "Name": "optionalLiteralString", "SerializedName": "optionalLiteralString", "Description": "optional literal string", "Type": { - "$id": "84", + "$id": "75", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -642,12 +567,12 @@ "IsReadOnly": false }, { - "$id": "85", + "$id": "76", "Name": "optionalLiteralInt", "SerializedName": "optionalLiteralInt", "Description": "optional literal int", "Type": { - "$id": "86", + "$id": "77", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -660,12 +585,12 @@ "IsReadOnly": false }, { - "$id": "87", + "$id": "78", "Name": "optionalLiteralFloat", "SerializedName": "optionalLiteralFloat", "Description": "optional literal float", "Type": { - "$id": "88", + "$id": "79", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -678,16 +603,16 @@ "IsReadOnly": false }, { - "$id": "89", + "$id": "80", "Name": "optionalLiteralBool", "SerializedName": "optionalLiteralBool", "Description": "optional literal bool", "Type": { - "$id": "90", + "$id": "81", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "91", + "$id": "82", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -699,12 +624,12 @@ "IsReadOnly": false }, { - "$id": "92", + "$id": "83", "Name": "requiredBadDescription", "SerializedName": "requiredBadDescription", "Description": "description with xml <|endoftext|>", "Type": { - "$id": "93", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -713,16 +638,16 @@ "IsReadOnly": false }, { - "$id": "94", + "$id": "85", "Name": "optionalNullableList", "SerializedName": "optionalNullableList", "Description": "optional nullable collection", "Type": { - "$id": "95", + "$id": "86", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "96", + "$id": "87", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -733,16 +658,16 @@ "IsReadOnly": false }, { - "$id": "97", + "$id": "88", "Name": "requiredNullableList", "SerializedName": "requiredNullableList", "Description": "required nullable collection", "Type": { - "$id": "98", + "$id": "89", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "99", + "$id": "90", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -755,7 +680,7 @@ ] }, { - "$id": "100", + "$id": "91", "Kind": "Model", "Name": "Friend", "Namespace": "FirstTestTypeSpec", @@ -764,12 +689,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "101", + "$id": "92", "Name": "name", "SerializedName": "name", "Description": "name of the NotFriend", "Type": { - "$id": "102", + "$id": "93", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -780,7 +705,7 @@ ] }, { - "$id": "103", + "$id": "94", "Kind": "Model", "Name": "ModelWithFormat", "Namespace": "FirstTestTypeSpec", @@ -788,12 +713,12 @@ "Usage": "Input", "Properties": [ { - "$id": "104", + "$id": "95", "Name": "sourceUrl", "SerializedName": "sourceUrl", "Description": "url format", "Type": { - "$id": "105", + "$id": "96", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -802,12 +727,12 @@ "IsReadOnly": false }, { - "$id": "106", + "$id": "97", "Name": "guid", "SerializedName": "guid", "Description": "uuid format", "Type": { - "$id": "107", + "$id": "98", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -818,7 +743,7 @@ ] }, { - "$id": "108", + "$id": "99", "Kind": "Model", "Name": "ProjectedModel", "Namespace": "FirstTestTypeSpec", @@ -827,12 +752,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "109", + "$id": "100", "Name": "name", "SerializedName": "name", "Description": "name of the ModelWithProjectedName", "Type": { - "$id": "110", + "$id": "101", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -843,7 +768,7 @@ ] }, { - "$id": "111", + "$id": "102", "Kind": "Model", "Name": "ReturnsAnonymousModelResponse", "Namespace": "FirstTestTypeSpec", @@ -852,7 +777,7 @@ "Properties": [] }, { - "$id": "112", + "$id": "103", "Kind": "Model", "Name": "Extension", "Namespace": "FirstTestTypeSpec", @@ -860,7 +785,7 @@ "IsNullable": false, "Usage": "Input", "BaseModel": { - "$id": "113", + "$id": "104", "Kind": "Model", "Name": "Element", "Namespace": "FirstTestTypeSpec", @@ -869,16 +794,16 @@ "Usage": "Input", "Properties": [ { - "$id": "114", + "$id": "105", "Name": "extension", "SerializedName": "extension", "Description": "", "Type": { - "$id": "115", + "$id": "106", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "112" + "$ref": "103" }, "IsNullable": false }, @@ -889,12 +814,12 @@ }, "Properties": [ { - "$id": "116", + "$id": "107", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "117", + "$id": "108", "Kind": "Primitive", "Name": "SByte", "IsNullable": false @@ -905,10 +830,10 @@ ] }, { - "$ref": "113" + "$ref": "104" }, { - "$id": "118", + "$id": "109", "Kind": "Model", "Name": "Extendible", "Namespace": "FirstTestTypeSpec", @@ -917,16 +842,16 @@ "Usage": "Input", "Properties": [ { - "$id": "119", + "$id": "110", "Name": "extension", "SerializedName": "extension", "Description": "Additional Content defined by implementations", "Type": { - "$id": "120", + "$id": "111", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "121", + "$id": "112", "Kind": "Model", "Name": "ThereLevelExtension", "Namespace": "FirstTestTypeSpec", @@ -934,7 +859,7 @@ "IsNullable": false, "Usage": "Input", "BaseModel": { - "$id": "122", + "$id": "113", "Kind": "Model", "Name": "ThereLevelElement", "Namespace": "FirstTestTypeSpec", @@ -943,16 +868,16 @@ "Usage": "Input", "Properties": [ { - "$id": "123", + "$id": "114", "Name": "extension", "SerializedName": "extension", "Description": "", "Type": { - "$id": "124", + "$id": "115", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "121" + "$ref": "112" }, "IsNullable": false }, @@ -963,12 +888,12 @@ }, "Properties": [ { - "$id": "125", + "$id": "116", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "126", + "$id": "117", "Kind": "Primitive", "Name": "SByte", "IsNullable": false @@ -986,13 +911,13 @@ ] }, { - "$ref": "121" + "$ref": "112" }, { - "$ref": "122" + "$ref": "113" }, { - "$id": "127", + "$id": "118", "Kind": "Model", "Name": "ChildModel", "Namespace": "FirstTestTypeSpec", @@ -1000,7 +925,7 @@ "IsNullable": false, "Usage": "Input", "BaseModel": { - "$id": "128", + "$id": "119", "Kind": "Model", "Name": "BaseModel", "Namespace": "FirstTestTypeSpec", @@ -1009,12 +934,12 @@ "Usage": "Input", "Properties": [ { - "$id": "129", + "$id": "120", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "130", + "$id": "121", "Kind": "Primitive", "Name": "SByte", "IsNullable": false @@ -1026,16 +951,16 @@ }, "Properties": [ { - "$id": "131", + "$id": "122", "Name": "parent", "SerializedName": "parent", "Description": "", "Type": { - "$id": "132", + "$id": "123", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "128" + "$ref": "119" }, "IsNullable": false }, @@ -1045,10 +970,10 @@ ] }, { - "$ref": "128" + "$ref": "119" }, { - "$id": "133", + "$id": "124", "Kind": "Model", "Name": "ContainSelf", "Namespace": "FirstTestTypeSpec", @@ -1057,12 +982,12 @@ "Usage": "Input", "Properties": [ { - "$id": "134", + "$id": "125", "Name": "self", "SerializedName": "self", "Description": "", "Type": { - "$ref": "133" + "$ref": "124" }, "IsRequired": true, "IsReadOnly": false @@ -1070,7 +995,7 @@ ] }, { - "$id": "135", + "$id": "126", "Kind": "Model", "Name": "ModelWithProjectedEnum", "Namespace": "FirstTestTypeSpec", @@ -1078,7 +1003,7 @@ "Usage": "Input", "Properties": [ { - "$id": "136", + "$id": "127", "Name": "enumProperty", "SerializedName": "enumProperty", "Description": "enum with projected name used in a model", @@ -1091,7 +1016,7 @@ ] }, { - "$id": "137", + "$id": "128", "Kind": "Model", "Name": "AzureLocationModel", "Namespace": "FirstTestTypeSpec", @@ -1099,12 +1024,12 @@ "Usage": "Input", "Properties": [ { - "$id": "138", + "$id": "129", "Name": "location", "SerializedName": "location", "Description": "", "Type": { - "$id": "139", + "$id": "130", "Kind": "Primitive", "Name": "AzureLocation", "IsNullable": false @@ -1115,7 +1040,7 @@ ] }, { - "$id": "140", + "$id": "131", "Kind": "Model", "Name": "RoundTripModel", "Namespace": "FirstTestTypeSpec", @@ -1124,12 +1049,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "141", + "$id": "132", "Name": "requiredString", "SerializedName": "requiredString", "Description": "Required string, illustrating a reference type property.", "Type": { - "$id": "142", + "$id": "133", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1138,12 +1063,12 @@ "IsReadOnly": false }, { - "$id": "143", + "$id": "134", "Name": "requiredInt", "SerializedName": "requiredInt", "Description": "Required int, illustrating a value type property.", "Type": { - "$id": "144", + "$id": "135", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1152,12 +1077,12 @@ "IsReadOnly": false }, { - "$id": "145", + "$id": "136", "Name": "requiredCollection", "SerializedName": "requiredCollection", "Description": "Required collection of enums", "Type": { - "$id": "146", + "$id": "137", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1169,16 +1094,16 @@ "IsReadOnly": false }, { - "$id": "147", + "$id": "138", "Name": "requiredDictionary", "SerializedName": "requiredDictionary", "Description": "Required dictionary of enums", "Type": { - "$id": "148", + "$id": "139", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "149", + "$id": "140", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1192,18 +1117,18 @@ "IsReadOnly": false }, { - "$id": "150", + "$id": "141", "Name": "requiredModel", "SerializedName": "requiredModel", "Description": "Required model", "Type": { - "$ref": "65" + "$ref": "56" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "151", + "$id": "142", "Name": "intExtensibleEnum", "SerializedName": "intExtensibleEnum", "Description": "this is an int based extensible enum", @@ -1214,12 +1139,12 @@ "IsReadOnly": false }, { - "$id": "152", + "$id": "143", "Name": "intExtensibleEnumCollection", "SerializedName": "intExtensibleEnumCollection", "Description": "this is a collection of int based extensible enum", "Type": { - "$id": "153", + "$id": "144", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1231,7 +1156,7 @@ "IsReadOnly": false }, { - "$id": "154", + "$id": "145", "Name": "floatExtensibleEnum", "SerializedName": "floatExtensibleEnum", "Description": "this is a float based extensible enum", @@ -1242,12 +1167,12 @@ "IsReadOnly": false }, { - "$id": "155", + "$id": "146", "Name": "floatExtensibleEnumCollection", "SerializedName": "floatExtensibleEnumCollection", "Description": "this is a collection of float based extensible enum", "Type": { - "$id": "156", + "$id": "147", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1259,7 +1184,7 @@ "IsReadOnly": false }, { - "$id": "157", + "$id": "148", "Name": "floatFixedEnum", "SerializedName": "floatFixedEnum", "Description": "this is a float based fixed enum", @@ -1270,12 +1195,12 @@ "IsReadOnly": false }, { - "$id": "158", + "$id": "149", "Name": "floatFixedEnumCollection", "SerializedName": "floatFixedEnumCollection", "Description": "this is a collection of float based fixed enum", "Type": { - "$id": "159", + "$id": "150", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1287,7 +1212,7 @@ "IsReadOnly": false }, { - "$id": "160", + "$id": "151", "Name": "intFixedEnum", "SerializedName": "intFixedEnum", "Description": "this is a int based fixed enum", @@ -1298,12 +1223,12 @@ "IsReadOnly": false }, { - "$id": "161", + "$id": "152", "Name": "intFixedEnumCollection", "SerializedName": "intFixedEnumCollection", "Description": "this is a collection of int based fixed enum", "Type": { - "$id": "162", + "$id": "153", "Kind": "Array", "Name": "Array", "ElementType": { @@ -1315,7 +1240,7 @@ "IsReadOnly": false }, { - "$id": "163", + "$id": "154", "Name": "stringFixedEnum", "SerializedName": "stringFixedEnum", "Description": "this is a string based fixed enum", @@ -1326,12 +1251,12 @@ "IsReadOnly": false }, { - "$id": "164", + "$id": "155", "Name": "requiredUnknown", "SerializedName": "requiredUnknown", "Description": "required unknown", "Type": { - "$id": "165", + "$id": "156", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1340,12 +1265,12 @@ "IsReadOnly": false }, { - "$id": "166", + "$id": "157", "Name": "optionalUnknown", "SerializedName": "optionalUnknown", "Description": "optional unknown", "Type": { - "$id": "167", + "$id": "158", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1354,22 +1279,22 @@ "IsReadOnly": false }, { - "$id": "168", + "$id": "159", "Name": "requiredRecordUnknown", "SerializedName": "requiredRecordUnknown", "Description": "required record of unknown", "Type": { - "$id": "169", + "$id": "160", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "170", + "$id": "161", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "171", + "$id": "162", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1380,22 +1305,22 @@ "IsReadOnly": false }, { - "$id": "172", + "$id": "163", "Name": "optionalRecordUnknown", "SerializedName": "optionalRecordUnknown", "Description": "optional record of unknown", "Type": { - "$id": "173", + "$id": "164", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "174", + "$id": "165", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "175", + "$id": "166", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1406,22 +1331,22 @@ "IsReadOnly": false }, { - "$id": "176", + "$id": "167", "Name": "readOnlyRequiredRecordUnknown", "SerializedName": "readOnlyRequiredRecordUnknown", "Description": "required readonly record of unknown", "Type": { - "$id": "177", + "$id": "168", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "178", + "$id": "169", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "179", + "$id": "170", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1432,22 +1357,22 @@ "IsReadOnly": true }, { - "$id": "180", + "$id": "171", "Name": "readOnlyOptionalRecordUnknown", "SerializedName": "readOnlyOptionalRecordUnknown", "Description": "optional readonly record of unknown", "Type": { - "$id": "181", + "$id": "172", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "182", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "183", + "$id": "174", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1458,12 +1383,12 @@ "IsReadOnly": true }, { - "$id": "184", + "$id": "175", "Name": "modelWithRequiredNullable", "SerializedName": "modelWithRequiredNullable", "Description": "this is a model with required nullable properties", "Type": { - "$id": "185", + "$id": "176", "Kind": "Model", "Name": "ModelWithRequiredNullableProperties", "Namespace": "FirstTestTypeSpec", @@ -1472,12 +1397,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "186", + "$id": "177", "Name": "requiredNullablePrimitive", "SerializedName": "requiredNullablePrimitive", "Description": "required nullable primitive type", "Type": { - "$id": "187", + "$id": "178", "Kind": "Primitive", "Name": "Int32", "IsNullable": true @@ -1486,7 +1411,7 @@ "IsReadOnly": false }, { - "$id": "188", + "$id": "179", "Name": "requiredExtensibleEnum", "SerializedName": "requiredExtensibleEnum", "Description": "required nullable extensible enum type", @@ -1497,7 +1422,7 @@ "IsReadOnly": false }, { - "$id": "189", + "$id": "180", "Name": "requiredFixedEnum", "SerializedName": "requiredFixedEnum", "Description": "required nullable fixed enum type", @@ -1515,106 +1440,27 @@ ] }, { - "$ref": "185" - }, - { - "$id": "190", - "Kind": "Model", - "Name": "AuthFlow", - "Namespace": "FirstTestTypeSpec", - "Description": "The auth flow model", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "191", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$id": "192", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "54" - }, - "Value": "clientCredentials", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "193", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "194", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "59" - }, - "Value": "https://api.example.com/oauth2/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "195", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "196", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "61" - }, - "Value": "https://api.example.com/oauth2/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "197", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "198", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] + "$ref": "176" } ], "Clients": [ { - "$id": "199", + "$id": "181", "Name": "FirstTestTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "200", + "$id": "182", "Name": "topAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level method", "Parameters": [ { - "$id": "201", + "$id": "183", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "202", + "$id": "184", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1630,11 +1476,11 @@ "Kind": "Client" }, { - "$id": "203", + "$id": "185", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "204", + "$id": "186", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1650,11 +1496,11 @@ "Kind": "Method" }, { - "$id": "205", + "$id": "187", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "206", + "$id": "188", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1669,9 +1515,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "207", + "$id": "189", "Type": { - "$ref": "206" + "$ref": "188" }, "Value": "application/json" } @@ -1679,12 +1525,12 @@ ], "Responses": [ { - "$id": "208", + "$id": "190", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1703,20 +1549,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "209", + "$id": "191", "Name": "topAction2", "ResourceName": "FirstTestTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "210", + "$id": "192", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "211", + "$id": "193", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1731,9 +1577,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "212", + "$id": "194", "Type": { - "$ref": "211" + "$ref": "193" }, "Value": "application/json" } @@ -1741,12 +1587,12 @@ ], "Responses": [ { - "$id": "213", + "$id": "195", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1765,20 +1611,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "214", + "$id": "196", "Name": "patchAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "215", + "$id": "197", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "65" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -1791,11 +1637,11 @@ "Kind": "Method" }, { - "$id": "216", + "$id": "198", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "217", + "$id": "199", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1810,19 +1656,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "218", + "$id": "200", "Type": { - "$ref": "217" + "$ref": "199" }, "Value": "application/json" } }, { - "$id": "219", + "$id": "201", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "220", + "$id": "202", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1837,9 +1683,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "221", + "$id": "203", "Type": { - "$ref": "220" + "$ref": "202" }, "Value": "application/json" } @@ -1847,12 +1693,12 @@ ], "Responses": [ { - "$id": "222", + "$id": "204", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1874,21 +1720,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "223", + "$id": "205", "Name": "anonymousBody", "ResourceName": "FirstTestTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "224", + "$id": "206", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", "Type": { - "$ref": "65" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -1901,11 +1747,11 @@ "Kind": "Method" }, { - "$id": "225", + "$id": "207", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "226", + "$id": "208", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1920,19 +1766,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "227", + "$id": "209", "Type": { - "$ref": "226" + "$ref": "208" }, "Value": "application/json" } }, { - "$id": "228", + "$id": "210", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "229", + "$id": "211", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1947,9 +1793,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "230", + "$id": "212", "Type": { - "$ref": "229" + "$ref": "211" }, "Value": "application/json" } @@ -1957,12 +1803,12 @@ ], "Responses": [ { - "$id": "231", + "$id": "213", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1984,21 +1830,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "232", + "$id": "214", "Name": "friendlyModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "233", + "$id": "215", "Name": "Friend", "NameInRequest": "NotFriend", "Description": "this is not a friendly model but with a friendly name", "Type": { - "$ref": "100" + "$ref": "91" }, "Location": "Body", "IsRequired": true, @@ -2011,11 +1857,11 @@ "Kind": "Method" }, { - "$id": "234", + "$id": "216", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "235", + "$id": "217", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2030,19 +1876,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "236", + "$id": "218", "Type": { - "$ref": "235" + "$ref": "217" }, "Value": "application/json" } }, { - "$id": "237", + "$id": "219", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "238", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2057,9 +1903,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "239", + "$id": "221", "Type": { - "$ref": "238" + "$ref": "220" }, "Value": "application/json" } @@ -2067,12 +1913,12 @@ ], "Responses": [ { - "$id": "240", + "$id": "222", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "100" + "$ref": "91" }, "BodyMediaType": "Json", "Headers": [], @@ -2094,19 +1940,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "241", + "$id": "223", "Name": "addTimeHeader", "ResourceName": "FirstTestTypeSpec", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "242", + "$id": "224", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "243", + "$id": "225", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -2122,11 +1968,11 @@ "Kind": "Method" }, { - "$id": "244", + "$id": "226", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "245", + "$id": "227", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2141,9 +1987,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "246", + "$id": "228", "Type": { - "$ref": "245" + "$ref": "227" }, "Value": "application/json" } @@ -2151,7 +1997,7 @@ ], "Responses": [ { - "$id": "247", + "$id": "229", "StatusCodes": [ 204 ], @@ -2169,20 +2015,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "248", + "$id": "230", "Name": "stringFormat", "ResourceName": "FirstTestTypeSpec", "Description": "paramete has string format.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "249", + "$id": "231", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "250", + "$id": "232", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -2198,11 +2044,11 @@ "Kind": "Method" }, { - "$id": "251", + "$id": "233", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "103" + "$ref": "94" }, "Location": "Body", "IsRequired": true, @@ -2215,11 +2061,11 @@ "Kind": "Method" }, { - "$id": "252", + "$id": "234", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "253", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2234,19 +2080,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "254", + "$id": "236", "Type": { - "$ref": "253" + "$ref": "235" }, "Value": "application/json" } }, { - "$id": "255", + "$id": "237", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "256", + "$id": "238", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2261,9 +2107,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "257", + "$id": "239", "Type": { - "$ref": "256" + "$ref": "238" }, "Value": "application/json" } @@ -2271,7 +2117,7 @@ ], "Responses": [ { - "$id": "258", + "$id": "240", "StatusCodes": [ 204 ], @@ -2292,21 +2138,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "259", + "$id": "241", "Name": "projectedNameModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its projected name", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "260", + "$id": "242", "Name": "ProjectedModel", "NameInRequest": "ModelWithProjectedName", "Description": "this is a model with a projected name", "Type": { - "$ref": "108" + "$ref": "99" }, "Location": "Body", "IsRequired": true, @@ -2319,11 +2165,11 @@ "Kind": "Method" }, { - "$id": "261", + "$id": "243", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "262", + "$id": "244", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2338,19 +2184,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "263", + "$id": "245", "Type": { - "$ref": "262" + "$ref": "244" }, "Value": "application/json" } }, { - "$id": "264", + "$id": "246", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "265", + "$id": "247", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2365,9 +2211,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "266", + "$id": "248", "Type": { - "$ref": "265" + "$ref": "247" }, "Value": "application/json" } @@ -2375,12 +2221,12 @@ ], "Responses": [ { - "$id": "267", + "$id": "249", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "99" }, "BodyMediaType": "Json", "Headers": [], @@ -2402,20 +2248,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "268", + "$id": "250", "Name": "returnsAnonymousModel", "ResourceName": "FirstTestTypeSpec", "Description": "return anonymous model", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "269", + "$id": "251", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "270", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2430,9 +2276,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "271", + "$id": "253", "Type": { - "$ref": "270" + "$ref": "252" }, "Value": "application/json" } @@ -2440,12 +2286,12 @@ ], "Responses": [ { - "$id": "272", + "$id": "254", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "111" + "$ref": "102" }, "BodyMediaType": "Json", "Headers": [], @@ -2464,20 +2310,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "273", + "$id": "255", "Name": "headAsBoolean", "ResourceName": "FirstTestTypeSpec", "Description": "head as boolean.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "274", + "$id": "256", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "275", + "$id": "257", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2493,11 +2339,11 @@ "Kind": "Method" }, { - "$id": "276", + "$id": "258", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "277", + "$id": "259", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2512,9 +2358,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "278", + "$id": "260", "Type": { - "$ref": "277" + "$ref": "259" }, "Value": "application/json" } @@ -2522,7 +2368,7 @@ ], "Responses": [ { - "$id": "279", + "$id": "261", "StatusCodes": [ 204 ], @@ -2540,20 +2386,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "280", + "$id": "262", "Name": "stringBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is string.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "281", + "$id": "263", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "282", + "$id": "264", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2569,11 +2415,11 @@ "Kind": "Method" }, { - "$id": "283", + "$id": "265", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "284", + "$id": "266", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2588,19 +2434,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "285", + "$id": "267", "Type": { - "$ref": "284" + "$ref": "266" }, "Value": "application/json" } }, { - "$id": "286", + "$id": "268", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "287", + "$id": "269", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2615,9 +2461,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "288", + "$id": "270", "Type": { - "$ref": "287" + "$ref": "269" }, "Value": "application/json" } @@ -2625,7 +2471,7 @@ ], "Responses": [ { - "$id": "289", + "$id": "271", "StatusCodes": [ 204 ], @@ -2646,20 +2492,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "290", + "$id": "272", "Name": "boolBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is bool.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "291", + "$id": "273", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "292", + "$id": "274", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2675,11 +2521,11 @@ "Kind": "Method" }, { - "$id": "293", + "$id": "275", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "294", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2694,19 +2540,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "295", + "$id": "277", "Type": { - "$ref": "294" + "$ref": "276" }, "Value": "application/json" } }, { - "$id": "296", + "$id": "278", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "297", + "$id": "279", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2721,9 +2567,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "298", + "$id": "280", "Type": { - "$ref": "297" + "$ref": "279" }, "Value": "application/json" } @@ -2731,7 +2577,7 @@ ], "Responses": [ { - "$id": "299", + "$id": "281", "StatusCodes": [ 204 ], @@ -2752,20 +2598,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "300", + "$id": "282", "Name": "dateTimeBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is datetime.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "301", + "$id": "283", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "302", + "$id": "284", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -2781,11 +2627,11 @@ "Kind": "Method" }, { - "$id": "303", + "$id": "285", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "304", + "$id": "286", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2800,19 +2646,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "305", + "$id": "287", "Type": { - "$ref": "304" + "$ref": "286" }, "Value": "application/json" } }, { - "$id": "306", + "$id": "288", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "307", + "$id": "289", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2827,9 +2673,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "308", + "$id": "290", "Type": { - "$ref": "307" + "$ref": "289" }, "Value": "application/json" } @@ -2837,7 +2683,7 @@ ], "Responses": [ { - "$id": "309", + "$id": "291", "StatusCodes": [ 204 ], @@ -2858,20 +2704,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "310", + "$id": "292", "Name": "returnString", "ResourceName": "FirstTestTypeSpec", "Description": "The return type is datetime.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "311", + "$id": "293", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "312", + "$id": "294", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2886,9 +2732,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "313", + "$id": "295", "Type": { - "$ref": "312" + "$ref": "294" }, "Value": "application/json" } @@ -2896,12 +2742,12 @@ ], "Responses": [ { - "$id": "314", + "$id": "296", "StatusCodes": [ 200 ], "BodyType": { - "$id": "315", + "$id": "297", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2923,19 +2769,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "316", + "$id": "298", "Name": "returnUnknown", "ResourceName": "FirstTestTypeSpec", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "317", + "$id": "299", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "318", + "$id": "300", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2950,9 +2796,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "319", + "$id": "301", "Type": { - "$ref": "318" + "$ref": "300" }, "Value": "application/json" } @@ -2960,12 +2806,12 @@ ], "Responses": [ { - "$id": "320", + "$id": "302", "StatusCodes": [ 200 ], "BodyType": { - "$id": "321", + "$id": "303", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -2987,20 +2833,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "322", + "$id": "304", "Name": "recursiveExtension", "ResourceName": "FirstTestTypeSpec", "Description": "test parent reference child", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "323", + "$id": "305", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "112" + "$ref": "103" }, "Location": "Body", "IsRequired": true, @@ -3013,11 +2859,11 @@ "Kind": "Method" }, { - "$id": "324", + "$id": "306", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "325", + "$id": "307", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3032,19 +2878,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "326", + "$id": "308", "Type": { - "$ref": "325" + "$ref": "307" }, "Value": "application/json" } }, { - "$id": "327", + "$id": "309", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "328", + "$id": "310", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3059,9 +2905,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "329", + "$id": "311", "Type": { - "$ref": "328" + "$ref": "310" }, "Value": "application/json" } @@ -3069,7 +2915,7 @@ ], "Responses": [ { - "$id": "330", + "$id": "312", "StatusCodes": [ 204 ], @@ -3090,20 +2936,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "331", + "$id": "313", "Name": "threeLevelRecursive", "ResourceName": "FirstTestTypeSpec", "Description": "test three level recursive extension", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "332", + "$id": "314", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "118" + "$ref": "109" }, "Location": "Body", "IsRequired": true, @@ -3116,11 +2962,11 @@ "Kind": "Method" }, { - "$id": "333", + "$id": "315", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "334", + "$id": "316", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3135,19 +2981,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "335", + "$id": "317", "Type": { - "$ref": "334" + "$ref": "316" }, "Value": "application/json" } }, { - "$id": "336", + "$id": "318", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "337", + "$id": "319", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3162,9 +3008,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "338", + "$id": "320", "Type": { - "$ref": "337" + "$ref": "319" }, "Value": "application/json" } @@ -3172,7 +3018,7 @@ ], "Responses": [ { - "$id": "339", + "$id": "321", "StatusCodes": [ 204 ], @@ -3193,20 +3039,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "340", + "$id": "322", "Name": "recursiveModels", "ResourceName": "FirstTestTypeSpec", "Description": "test child reference parent", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "341", + "$id": "323", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "127" + "$ref": "118" }, "Location": "Body", "IsRequired": true, @@ -3219,11 +3065,11 @@ "Kind": "Method" }, { - "$id": "342", + "$id": "324", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "343", + "$id": "325", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3238,19 +3084,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "344", + "$id": "326", "Type": { - "$ref": "343" + "$ref": "325" }, "Value": "application/json" } }, { - "$id": "345", + "$id": "327", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "346", + "$id": "328", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3265,9 +3111,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "347", + "$id": "329", "Type": { - "$ref": "346" + "$ref": "328" }, "Value": "application/json" } @@ -3275,7 +3121,7 @@ ], "Responses": [ { - "$id": "348", + "$id": "330", "StatusCodes": [ 204 ], @@ -3296,20 +3142,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "349", + "$id": "331", "Name": "ContainSelfModels", "ResourceName": "FirstTestTypeSpec", "Description": "test contain self models", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "350", + "$id": "332", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "133" + "$ref": "124" }, "Location": "Body", "IsRequired": true, @@ -3322,11 +3168,11 @@ "Kind": "Method" }, { - "$id": "351", + "$id": "333", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "352", + "$id": "334", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3341,19 +3187,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "353", + "$id": "335", "Type": { - "$ref": "352" + "$ref": "334" }, "Value": "application/json" } }, { - "$id": "354", + "$id": "336", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "355", + "$id": "337", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3368,9 +3214,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "356", + "$id": "338", "Type": { - "$ref": "355" + "$ref": "337" }, "Value": "application/json" } @@ -3378,7 +3224,7 @@ ], "Responses": [ { - "$id": "357", + "$id": "339", "StatusCodes": [ 204 ], @@ -3399,16 +3245,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "358", + "$id": "340", "Name": "enumParameter", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "359", + "$id": "341", "Name": "p1", "NameInRequest": "p1", "Type": { @@ -3425,11 +3271,11 @@ "Kind": "Method" }, { - "$id": "360", + "$id": "342", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "361", + "$id": "343", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3444,9 +3290,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "362", + "$id": "344", "Type": { - "$ref": "361" + "$ref": "343" }, "Value": "application/json" } @@ -3454,7 +3300,7 @@ ], "Responses": [ { - "$id": "363", + "$id": "345", "StatusCodes": [ 204 ], @@ -3472,20 +3318,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "364", + "$id": "346", "Name": "bodyIsModelWithProjectedEnum", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "365", + "$id": "347", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "135" + "$ref": "126" }, "Location": "Body", "IsRequired": true, @@ -3498,11 +3344,11 @@ "Kind": "Method" }, { - "$id": "366", + "$id": "348", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "367", + "$id": "349", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3517,19 +3363,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "368", + "$id": "350", "Type": { - "$ref": "367" + "$ref": "349" }, "Value": "application/json" } }, { - "$id": "369", + "$id": "351", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "370", + "$id": "352", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3544,9 +3390,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "371", + "$id": "353", "Type": { - "$ref": "370" + "$ref": "352" }, "Value": "application/json" } @@ -3554,7 +3400,7 @@ ], "Responses": [ { - "$id": "372", + "$id": "354", "StatusCodes": [ 204 ], @@ -3575,30 +3421,30 @@ "GenerateConvenienceMethod": true }, { - "$id": "373", + "$id": "355", "Name": "optionalDictionary", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "374", + "$id": "356", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "375", + "$id": "357", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "376", + "$id": "358", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "377", + "$id": "359", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3616,11 +3462,11 @@ "Kind": "Method" }, { - "$id": "378", + "$id": "360", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "379", + "$id": "361", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3635,19 +3481,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "380", + "$id": "362", "Type": { - "$ref": "379" + "$ref": "361" }, "Value": "application/json" } }, { - "$id": "381", + "$id": "363", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "382", + "$id": "364", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3662,9 +3508,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "383", + "$id": "365", "Type": { - "$ref": "382" + "$ref": "364" }, "Value": "application/json" } @@ -3672,7 +3518,7 @@ ], "Responses": [ { - "$id": "384", + "$id": "366", "StatusCodes": [ 204 ], @@ -3693,20 +3539,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "385", + "$id": "367", "Name": "azureLocationOp", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "386", + "$id": "368", "Name": "location", "NameInRequest": "location", "Type": { - "$id": "387", + "$id": "369", "Kind": "Primitive", "Name": "AzureLocation", "IsNullable": false @@ -3722,11 +3568,11 @@ "Kind": "Method" }, { - "$id": "388", + "$id": "370", "Name": "regenLocation", "NameInRequest": "regen-location", "Type": { - "$id": "389", + "$id": "371", "Kind": "Primitive", "Name": "AzureLocation", "IsNullable": false @@ -3742,11 +3588,11 @@ "Kind": "Method" }, { - "$id": "390", + "$id": "372", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "137" + "$ref": "128" }, "Location": "Body", "IsRequired": false, @@ -3759,11 +3605,11 @@ "Kind": "Method" }, { - "$id": "391", + "$id": "373", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "392", + "$id": "374", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3778,19 +3624,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "393", + "$id": "375", "Type": { - "$ref": "392" + "$ref": "374" }, "Value": "application/json" } }, { - "$id": "394", + "$id": "376", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "395", + "$id": "377", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3805,9 +3651,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "396", + "$id": "378", "Type": { - "$ref": "395" + "$ref": "377" }, "Value": "application/json" } @@ -3815,7 +3661,7 @@ ], "Responses": [ { - "$id": "397", + "$id": "379", "StatusCodes": [ 204 ], @@ -3837,41 +3683,41 @@ } ], "Protocol": { - "$id": "398" + "$id": "380" }, "Creatable": true }, { - "$id": "399", + "$id": "381", "Name": "Hello", "Description": "", "Operations": [], "Protocol": { - "$id": "400" + "$id": "382" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "401", + "$id": "383", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "402", + "$id": "384", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "403", + "$id": "385", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "404", + "$id": "386", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3887,11 +3733,11 @@ "Kind": "Method" }, { - "$id": "405", + "$id": "387", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "406", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3907,11 +3753,11 @@ "Kind": "Method" }, { - "$id": "407", + "$id": "389", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "408", + "$id": "390", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3927,11 +3773,11 @@ "Kind": "Method" }, { - "$id": "409", + "$id": "391", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "410", + "$id": "392", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3946,9 +3792,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "411", + "$id": "393", "Type": { - "$ref": "410" + "$ref": "392" }, "Value": "application/json" } @@ -3956,12 +3802,12 @@ ], "Responses": [ { - "$id": "412", + "$id": "394", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -3981,31 +3827,31 @@ } ], "Protocol": { - "$id": "413" + "$id": "395" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "414", + "$id": "396", "Name": "HelloDemo2", "Description": "", "Operations": [ { - "$id": "415", + "$id": "397", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "416", + "$id": "398", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "417", + "$id": "399", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4021,15 +3867,15 @@ "Kind": "Method" }, { - "$id": "418", + "$id": "400", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "419", + "$id": "401", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "420", + "$id": "402", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4039,9 +3885,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "421", + "$id": "403", "Type": { - "$ref": "419" + "$ref": "401" }, "Value": "text/plain" }, @@ -4055,11 +3901,11 @@ "Kind": "Constant" }, { - "$id": "422", + "$id": "404", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "423", + "$id": "405", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4075,11 +3921,11 @@ "Kind": "Method" }, { - "$id": "424", + "$id": "406", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "140" + "$ref": "131" }, "Location": "Body", "IsRequired": true, @@ -4092,11 +3938,11 @@ "Kind": "Method" }, { - "$id": "425", + "$id": "407", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "426", + "$id": "408", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4111,9 +3957,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "427", + "$id": "409", "Type": { - "$ref": "426" + "$ref": "408" }, "Value": "application/json" } @@ -4121,12 +3967,12 @@ ], "Responses": [ { - "$id": "428", + "$id": "410", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "140" + "$ref": "131" }, "BodyMediaType": "Json", "Headers": [], @@ -4148,20 +3994,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "429", + "$id": "411", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "430", + "$id": "412", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "431", + "$id": "413", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4177,11 +4023,11 @@ "Kind": "Method" }, { - "$id": "432", + "$id": "414", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "433", + "$id": "415", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4197,11 +4043,11 @@ "Kind": "Method" }, { - "$id": "434", + "$id": "416", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "140" + "$ref": "131" }, "Location": "Body", "IsRequired": true, @@ -4214,11 +4060,11 @@ "Kind": "Method" }, { - "$id": "435", + "$id": "417", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "436", + "$id": "418", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4233,19 +4079,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "437", + "$id": "419", "Type": { - "$ref": "436" + "$ref": "418" }, "Value": "application/json" } }, { - "$id": "438", + "$id": "420", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "439", + "$id": "421", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4260,9 +4106,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "440", + "$id": "422", "Type": { - "$ref": "439" + "$ref": "421" }, "Value": "application/json" } @@ -4270,12 +4116,12 @@ ], "Responses": [ { - "$id": "441", + "$id": "423", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "140" + "$ref": "131" }, "BodyMediaType": "Json", "Headers": [], @@ -4297,20 +4143,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "442", + "$id": "424", "Name": "helloDemoAgain", "ResourceName": "Demo2", "Description": "Return hi in demo2", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "443", + "$id": "425", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "444", + "$id": "426", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4325,9 +4171,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "445", + "$id": "427", "Type": { - "$ref": "444" + "$ref": "426" }, "Value": "application/json" } @@ -4335,12 +4181,12 @@ ], "Responses": [ { - "$id": "446", + "$id": "428", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4359,20 +4205,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "447", + "$id": "429", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "448", + "$id": "430", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "65" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -4385,11 +4231,11 @@ "Kind": "Method" }, { - "$id": "449", + "$id": "431", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "450", + "$id": "432", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4404,19 +4250,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "451", + "$id": "433", "Type": { - "$ref": "450" + "$ref": "432" }, "Value": "application/json" } }, { - "$id": "452", + "$id": "434", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "453", + "$id": "435", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4431,9 +4277,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "454", + "$id": "436", "Type": { - "$ref": "453" + "$ref": "435" }, "Value": "application/json" } @@ -4441,12 +4287,12 @@ ], "Responses": [ { - "$id": "455", + "$id": "437", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4468,24 +4314,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "456", + "$id": "438", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "457", + "$id": "439", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "458", + "$id": "440", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "459", + "$id": "441", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4495,9 +4341,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "460", + "$id": "442", "Type": { - "$ref": "458" + "$ref": "440" }, "Value": "test" }, @@ -4511,15 +4357,15 @@ "Kind": "Constant" }, { - "$id": "461", + "$id": "443", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "462", + "$id": "444", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "463", + "$id": "445", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -4529,9 +4375,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "464", + "$id": "446", "Type": { - "$ref": "462" + "$ref": "444" }, "Value": 123 }, @@ -4545,15 +4391,15 @@ "Kind": "Constant" }, { - "$id": "465", + "$id": "447", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "466", + "$id": "448", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "467", + "$id": "449", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4563,9 +4409,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "468", + "$id": "450", "Type": { - "$ref": "466" + "$ref": "448" }, "Value": true }, @@ -4579,11 +4425,11 @@ "Kind": "Constant" }, { - "$id": "469", + "$id": "451", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "470", + "$id": "452", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4598,9 +4444,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "471", + "$id": "453", "Type": { - "$ref": "470" + "$ref": "452" }, "Value": "application/json" } @@ -4608,12 +4454,12 @@ ], "Responses": [ { - "$id": "472", + "$id": "454", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4633,27 +4479,27 @@ } ], "Protocol": { - "$id": "473" + "$id": "455" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "474", + "$id": "456", "Name": "EnumTest", "Description": "", "Operations": [ { - "$id": "475", + "$id": "457", "Name": "createUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "476", + "$id": "458", "Name": "input", "NameInRequest": "input", "Type": { @@ -4670,11 +4516,11 @@ "Kind": "Method" }, { - "$id": "477", + "$id": "459", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "478", + "$id": "460", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4689,19 +4535,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "479", + "$id": "461", "Type": { - "$ref": "478" + "$ref": "460" }, "Value": "application/json" } }, { - "$id": "480", + "$id": "462", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "481", + "$id": "463", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4716,9 +4562,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "482", + "$id": "464", "Type": { - "$ref": "481" + "$ref": "463" }, "Value": "application/json" } @@ -4726,7 +4572,7 @@ ], "Responses": [ { - "$id": "483", + "$id": "465", "StatusCodes": [ 204 ], @@ -4748,31 +4594,31 @@ } ], "Protocol": { - "$id": "484" + "$id": "466" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "485", + "$id": "467", "Name": "ProtocolAndConvenient", "Description": "", "Operations": [ { - "$id": "486", + "$id": "468", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "487", + "$id": "469", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "65" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -4785,11 +4631,11 @@ "Kind": "Method" }, { - "$id": "488", + "$id": "470", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "489", + "$id": "471", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4804,19 +4650,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "490", + "$id": "472", "Type": { - "$ref": "489" + "$ref": "471" }, "Value": "application/json" } }, { - "$id": "491", + "$id": "473", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "492", + "$id": "474", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4831,9 +4677,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "493", + "$id": "475", "Type": { - "$ref": "492" + "$ref": "474" }, "Value": "application/json" } @@ -4841,12 +4687,12 @@ ], "Responses": [ { - "$id": "494", + "$id": "476", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4868,20 +4714,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "495", + "$id": "477", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "496", + "$id": "478", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "497", + "$id": "479", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4896,9 +4742,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "498", + "$id": "480", "Type": { - "$ref": "497" + "$ref": "479" }, "Value": "application/json" } @@ -4906,7 +4752,7 @@ ], "Responses": [ { - "$id": "499", + "$id": "481", "StatusCodes": [ 204 ], @@ -4925,31 +4771,31 @@ } ], "Protocol": { - "$id": "500" + "$id": "482" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "501", + "$id": "483", "Name": "Entity", "Description": "", "Operations": [ { - "$id": "502", + "$id": "484", "Name": "doSomething", "ResourceName": "Entity", "Description": "doSomething for entity", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "503", + "$id": "485", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "504", + "$id": "486", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4965,11 +4811,11 @@ "Kind": "Method" }, { - "$id": "505", + "$id": "487", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "506", + "$id": "488", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4984,9 +4830,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "507", + "$id": "489", "Type": { - "$ref": "506" + "$ref": "488" }, "Value": "application/json" } @@ -4994,12 +4840,12 @@ ], "Responses": [ { - "$id": "508", + "$id": "490", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -5019,31 +4865,31 @@ } ], "Protocol": { - "$id": "509" + "$id": "491" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "510", + "$id": "492", "Name": "Glossary", "Description": "", "Operations": [ { - "$id": "511", + "$id": "493", "Name": "doSomething", "ResourceName": "Glossary", "Description": "doSomething for glossary", "Parameters": [ { - "$ref": "201" + "$ref": "183" }, { - "$id": "512", + "$id": "494", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "513", + "$id": "495", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5059,11 +4905,11 @@ "Kind": "Method" }, { - "$id": "514", + "$id": "496", "Name": "h1", "NameInRequest": "h1", "Type": { - "$id": "515", + "$id": "497", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5079,11 +4925,11 @@ "Kind": "Method" }, { - "$id": "516", + "$id": "498", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "517", + "$id": "499", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5098,9 +4944,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "518", + "$id": "500", "Type": { - "$ref": "517" + "$ref": "499" }, "Value": "application/json" } @@ -5108,12 +4954,12 @@ ], "Responses": [ { - "$id": "519", + "$id": "501", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -5133,20 +4979,20 @@ } ], "Protocol": { - "$id": "520" + "$id": "502" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" } ], "Auth": { - "$id": "521", + "$id": "503", "ApiKey": { - "$id": "522", + "$id": "504", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "523", + "$id": "505", "Scopes": [ "https://api.example.com/.default" ] diff --git a/test/TestProjects/LatestVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/LatestVersion-TypeSpec/src/Generated/tspCodeModel.json index 9effe65312b..aad5c86d08a 100644 --- a/test/TestProjects/LatestVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/LatestVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -399,75 +399,57 @@ }, { "$ref": "42" - }, - { - "$id": "51", - "Kind": "Model", - "Name": "ExportParams", - "Namespace": "TypeSpec.Versioning.Latest", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "52", - "Kind": "Model", - "Name": "ListQueryParams", - "Namespace": "TypeSpec.Versioning.Latest", - "IsNullable": false, - "Usage": "None", - "Properties": [] } ], "Clients": [ { - "$id": "53", + "$id": "51", "Name": "LatestClient", "Description": "", "Operations": [], "Protocol": { - "$id": "54" + "$id": "52" }, "Creatable": true }, { - "$id": "55", + "$id": "53", "Name": "ResourceOperations", "Description": "", "Operations": [], "Protocol": { - "$id": "56" + "$id": "54" }, "Creatable": false, "Parent": "LatestClient" }, { - "$id": "57", + "$id": "55", "Name": "VersioningOp", "Description": "", "Operations": [ { - "$id": "58", + "$id": "56", "Name": "export", "ResourceName": "VersioningOp", "Description": "Long-running resource action operation template.", "Parameters": [ { - "$id": "59", + "$id": "57", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "60", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "61", + "$id": "59", "Type": { - "$id": "62", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -484,11 +466,11 @@ "Kind": "Client" }, { - "$id": "63", + "$id": "61", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "64", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -504,11 +486,11 @@ "Kind": "Method" }, { - "$id": "65", + "$id": "63", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "66", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -524,11 +506,11 @@ "Kind": "Method" }, { - "$id": "67", + "$id": "65", "Name": "projectedFileFormat", "NameInRequest": "projectedFileFormat", "Type": { - "$id": "68", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -544,11 +526,11 @@ "Kind": "Method" }, { - "$id": "69", + "$id": "67", "Name": "maxLines", "NameInRequest": "maxLines", "Type": { - "$id": "70", + "$id": "68", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -564,11 +546,11 @@ "Kind": "Method" }, { - "$id": "71", + "$id": "69", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "72", + "$id": "70", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -583,9 +565,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "73", + "$id": "71", "Type": { - "$ref": "72" + "$ref": "70" }, "Value": "application/json" } @@ -593,7 +575,7 @@ ], "Responses": [ { - "$id": "74", + "$id": "72", "StatusCodes": [ 202 ], @@ -603,12 +585,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "75", + "$id": "73", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "76", + "$id": "74", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -627,10 +609,10 @@ "Path": "/versioning/resources/{name}:export", "BufferResponse": true, "LongRunning": { - "$id": "77", + "$id": "75", "FinalStateVia": 3, "FinalResponse": { - "$id": "78", + "$id": "76", "StatusCodes": [ 200 ], @@ -645,25 +627,25 @@ "GenerateConvenienceMethod": true }, { - "$id": "79", + "$id": "77", "Name": "list", "ResourceName": "Resource", "Description": "Resource list operation template.", "Parameters": [ { - "$id": "80", + "$id": "78", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "81", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "61" + "$ref": "59" }, "IsRequired": true, "IsApiVersion": true, @@ -675,16 +657,16 @@ "Kind": "Client" }, { - "$id": "82", + "$id": "80", "Name": "select", "NameInRequest": "select", "Description": "Select the specified fields to be included in the response.", "Type": { - "$id": "83", + "$id": "81", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "84", + "$id": "82", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -702,12 +684,12 @@ "Kind": "Method" }, { - "$id": "85", + "$id": "83", "Name": "filter", "NameInRequest": "filter", "Description": "Filter the result list using the given expression.", "Type": { - "$id": "86", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -723,11 +705,11 @@ "Kind": "Method" }, { - "$id": "87", + "$id": "85", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "88", + "$id": "86", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -742,9 +724,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "89", + "$id": "87", "Type": { - "$ref": "88" + "$ref": "86" }, "Value": "application/json" } @@ -752,7 +734,7 @@ ], "Responses": [ { - "$id": "90", + "$id": "88", "StatusCodes": [ 200 ], @@ -773,7 +755,7 @@ "Path": "/versioning/resources", "BufferResponse": true, "Paging": { - "$id": "91", + "$id": "89", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -781,25 +763,25 @@ "GenerateConvenienceMethod": true }, { - "$id": "92", + "$id": "90", "Name": "createLongRunning", "ResourceName": "Resource", "Description": "Long-running resource create or replace operation template.", "Parameters": [ { - "$id": "93", + "$id": "91", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "94", + "$id": "92", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "61" + "$ref": "59" }, "IsRequired": true, "IsApiVersion": true, @@ -811,11 +793,11 @@ "Kind": "Client" }, { - "$id": "95", + "$id": "93", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "96", + "$id": "94", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -831,7 +813,7 @@ "Kind": "Method" }, { - "$id": "97", + "$id": "95", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -849,11 +831,11 @@ "Kind": "Method" }, { - "$id": "98", + "$id": "96", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "99", + "$id": "97", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -868,19 +850,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "100", + "$id": "98", "Type": { - "$ref": "99" + "$ref": "97" }, "Value": "application/json" } }, { - "$id": "101", + "$id": "99", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "102", + "$id": "100", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -895,9 +877,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "103", + "$id": "101", "Type": { - "$ref": "102" + "$ref": "100" }, "Value": "application/json" } @@ -905,7 +887,7 @@ ], "Responses": [ { - "$id": "104", + "$id": "102", "StatusCodes": [ 201 ], @@ -915,12 +897,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "105", + "$id": "103", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "106", + "$id": "104", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -933,7 +915,7 @@ ] }, { - "$id": "107", + "$id": "105", "StatusCodes": [ 200 ], @@ -943,12 +925,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "108", + "$id": "106", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "109", + "$id": "107", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -970,10 +952,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "110", + "$id": "108", "FinalStateVia": 2, "FinalResponse": { - "$id": "111", + "$id": "109", "StatusCodes": [ 200 ], @@ -988,7 +970,7 @@ } ], "Protocol": { - "$id": "112" + "$id": "110" }, "Creatable": false, "Parent": "LatestClient" diff --git a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json index 231cebf0f42..fa89cba0ca1 100644 --- a/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Lro-TypeSpec/src/Generated/tspCodeModel.json @@ -41,86 +41,11 @@ "IsExtensible": true, "IsNullable": false, "Usage": "Output" - }, - { - "$id": "8", - "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "9", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "10", - "Name": "implicit", - "Value": "implicit", - "Description": "implicit flow" - }, - { - "$id": "11", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "12", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "13", - "Kind": "Enum", - "Name": "AuthFlow_tokenUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "14", - "Name": "https://api.example.com/oauth2/token", - "Value": "https://api.example.com/oauth2/token", - "Description": "https://api.example.com/oauth2/token" - } - ], - "Namespace": "lro", - "Description": "The AuthFlow_tokenUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "15", - "Kind": "Enum", - "Name": "AuthFlow_refreshUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "16", - "Name": "https://api.example.com/oauth2/refresh", - "Value": "https://api.example.com/oauth2/refresh", - "Description": "https://api.example.com/oauth2/refresh" - } - ], - "Namespace": "lro", - "Description": "The AuthFlow_refreshUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" } ], "Models": [ { - "$id": "17", + "$id": "8", "Kind": "Model", "Name": "RadiologyInsightsResult", "Namespace": "lro", @@ -129,12 +54,12 @@ "Usage": "Output", "Properties": [ { - "$id": "18", + "$id": "9", "Name": "id", "SerializedName": "id", "Description": "The unique ID of the operation.", "Type": { - "$id": "19", + "$id": "10", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -143,7 +68,7 @@ "IsReadOnly": true }, { - "$id": "20", + "$id": "11", "Name": "status", "SerializedName": "status", "Description": "The status of the operation", @@ -154,12 +79,12 @@ "IsReadOnly": true }, { - "$id": "21", + "$id": "12", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The date and time when the processing job was created.", "Type": { - "$id": "22", + "$id": "13", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -168,12 +93,12 @@ "IsReadOnly": true }, { - "$id": "23", + "$id": "14", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The date and time when the processing job is set to expire.", "Type": { - "$id": "24", + "$id": "15", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -182,12 +107,12 @@ "IsReadOnly": true }, { - "$id": "25", + "$id": "16", "Name": "lastUpdateDateTime", "SerializedName": "lastUpdateDateTime", "Description": "The date and time when the processing job was last updated.", "Type": { - "$id": "26", + "$id": "17", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -196,12 +121,12 @@ "IsReadOnly": true }, { - "$id": "27", + "$id": "18", "Name": "error", "SerializedName": "error", "Description": "Error object that describes the error when status is \"Failed\".", "Type": { - "$id": "28", + "$id": "19", "Kind": "Model", "Name": "Error", "Namespace": "Azure.Core.Foundations", @@ -210,12 +135,12 @@ "Usage": "Output", "Properties": [ { - "$id": "29", + "$id": "20", "Name": "code", "SerializedName": "code", "Description": "One of a server-defined set of error codes.", "Type": { - "$id": "30", + "$id": "21", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -224,12 +149,12 @@ "IsReadOnly": false }, { - "$id": "31", + "$id": "22", "Name": "message", "SerializedName": "message", "Description": "A human-readable representation of the error.", "Type": { - "$id": "32", + "$id": "23", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -238,12 +163,12 @@ "IsReadOnly": false }, { - "$id": "33", + "$id": "24", "Name": "target", "SerializedName": "target", "Description": "The target of the error.", "Type": { - "$id": "34", + "$id": "25", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -252,16 +177,16 @@ "IsReadOnly": false }, { - "$id": "35", + "$id": "26", "Name": "details", "SerializedName": "details", "Description": "An array of details about specific errors that led to this reported error.", "Type": { - "$id": "36", + "$id": "27", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "28" + "$ref": "19" }, "IsNullable": false }, @@ -269,12 +194,12 @@ "IsReadOnly": false }, { - "$id": "37", + "$id": "28", "Name": "innererror", "SerializedName": "innererror", "Description": "An object containing more specific information than the current object about the error.", "Type": { - "$id": "38", + "$id": "29", "Kind": "Model", "Name": "InnerError", "Namespace": "Azure.Core.Foundations", @@ -283,12 +208,12 @@ "Usage": "Output", "Properties": [ { - "$id": "39", + "$id": "30", "Name": "code", "SerializedName": "code", "Description": "One of a server-defined set of error codes.", "Type": { - "$id": "40", + "$id": "31", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -297,12 +222,12 @@ "IsReadOnly": false }, { - "$id": "41", + "$id": "32", "Name": "innererror", "SerializedName": "innererror", "Description": "Inner error.", "Type": { - "$ref": "38" + "$ref": "29" }, "IsRequired": false, "IsReadOnly": false @@ -318,12 +243,12 @@ "IsReadOnly": false }, { - "$id": "42", + "$id": "33", "Name": "result", "SerializedName": "result", "Description": "The result of the operation.", "Type": { - "$id": "43", + "$id": "34", "Kind": "Model", "Name": "RadiologyInsightsInferenceResult", "Namespace": "lro", @@ -332,12 +257,12 @@ "Usage": "Output", "Properties": [ { - "$id": "44", + "$id": "35", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "45", + "$id": "36", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -353,16 +278,16 @@ ] }, { - "$ref": "28" + "$ref": "19" }, { - "$ref": "38" + "$ref": "29" }, { - "$ref": "43" + "$ref": "34" }, { - "$id": "46", + "$id": "37", "Kind": "Model", "Name": "RadiologyInsightsData", "Namespace": "lro", @@ -371,16 +296,16 @@ "Usage": "Input", "Properties": [ { - "$id": "47", + "$id": "38", "Name": "patients", "SerializedName": "patients", "Description": "The list of patients, including their clinical information and data.", "Type": { - "$id": "48", + "$id": "39", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "49", + "$id": "40", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -391,12 +316,12 @@ "IsReadOnly": false }, { - "$id": "50", + "$id": "41", "Name": "configuration", "SerializedName": "configuration", "Description": "Configuration affecting the Radiology Insights model's inference.", "Type": { - "$id": "51", + "$id": "42", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -407,7 +332,7 @@ ] }, { - "$id": "52", + "$id": "43", "Kind": "Model", "Name": "HealthInsightsOperationStatusError", "Namespace": "lro", @@ -416,12 +341,12 @@ "Usage": "Output", "Properties": [ { - "$id": "53", + "$id": "44", "Name": "id", "SerializedName": "id", "Description": "The unique ID of the operation.", "Type": { - "$id": "54", + "$id": "45", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -430,7 +355,7 @@ "IsReadOnly": true }, { - "$id": "55", + "$id": "46", "Name": "status", "SerializedName": "status", "Description": "The status of the operation", @@ -441,12 +366,12 @@ "IsReadOnly": true }, { - "$id": "56", + "$id": "47", "Name": "createdDateTime", "SerializedName": "createdDateTime", "Description": "The date and time when the processing job was created.", "Type": { - "$id": "57", + "$id": "48", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -455,12 +380,12 @@ "IsReadOnly": true }, { - "$id": "58", + "$id": "49", "Name": "expirationDateTime", "SerializedName": "expirationDateTime", "Description": "The date and time when the processing job is set to expire.", "Type": { - "$id": "59", + "$id": "50", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -469,12 +394,12 @@ "IsReadOnly": true }, { - "$id": "60", + "$id": "51", "Name": "lastUpdateDateTime", "SerializedName": "lastUpdateDateTime", "Description": "The date and time when the processing job was last updated.", "Type": { - "$id": "61", + "$id": "52", "Kind": "Primitive", "Name": "DateTimeRFC3339", "IsNullable": false @@ -483,180 +408,48 @@ "IsReadOnly": true }, { - "$id": "62", + "$id": "53", "Name": "error", "SerializedName": "error", "Description": "Error object that describes the error when status is \"Failed\".", "Type": { - "$ref": "28" + "$ref": "19" }, "IsRequired": false, "IsReadOnly": false } ] - }, - { - "$id": "63", - "Kind": "Model", - "Name": "AuthFlow", - "Namespace": "lro", - "Description": "The auth flow model", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "64", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$id": "65", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "8" - }, - "Value": "clientCredentials", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "66", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "67", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "13" - }, - "Value": "https://api.example.com/oauth2/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "68", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "69", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "15" - }, - "Value": "https://api.example.com/oauth2/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "70", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "71", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "72", - "Kind": "Model", - "Name": "HealthInsightsRetryAfterTrait", - "Namespace": "lro", - "Description": "Health Insights retry after trait", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "73", - "Name": "retryAfter", - "SerializedName": "retryAfter", - "Description": "The retry-after header.", - "Type": { - "$id": "74", - "Kind": "Model", - "Name": "HealthInsightsRetryAfterTraitRetryAfter", - "Namespace": "lro", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "75", - "Name": "response", - "SerializedName": "response", - "Description": "", - "Type": { - "$id": "76", - "Kind": "Model", - "Name": "RetryAfterHeader", - "Namespace": "Azure.Core.Foundations", - "Description": "The retry-after envelope.", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$ref": "74" - }, - { - "$ref": "76" } ], "Clients": [ { - "$id": "77", + "$id": "54", "Name": "lroClient", "Description": "", "Operations": [], "Protocol": { - "$id": "78" + "$id": "55" }, "Creatable": true }, { - "$id": "79", + "$id": "56", "Name": "LegacyLro", "Description": "", "Operations": [ { - "$id": "80", + "$id": "57", "Name": "getJob", "ResourceName": "LegacyLro", "Summary": "Get Radiology Insights job details", "Description": "Gets the status and details of the Radiology Insights job.", "Parameters": [ { - "$id": "81", + "$id": "58", "Name": "lroEndpoint", "NameInRequest": "lroEndpoint", "Type": { - "$id": "82", + "$id": "59", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -672,12 +465,12 @@ "Kind": "Client" }, { - "$id": "83", + "$id": "60", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "84", + "$id": "61", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -693,12 +486,12 @@ "Kind": "Method" }, { - "$id": "85", + "$id": "62", "Name": "id", "NameInRequest": "id", "Description": "A processing job identifier.", "Type": { - "$id": "86", + "$id": "63", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -714,11 +507,11 @@ "Kind": "Method" }, { - "$id": "87", + "$id": "64", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "88", + "$id": "65", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -733,9 +526,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "89", + "$id": "66", "Type": { - "$ref": "88" + "$ref": "65" }, "Value": "application/json" } @@ -743,22 +536,22 @@ ], "Responses": [ { - "$id": "90", + "$id": "67", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "8" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "91", + "$id": "68", "Name": "Retry-After", "NameInResponse": "retryAfter", "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "Type": { - "$id": "92", + "$id": "69", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -780,22 +573,22 @@ "GenerateConvenienceMethod": false }, { - "$id": "93", + "$id": "70", "Name": "createJob", "ResourceName": "LegacyLro", "Summary": "Create Radiology Insights job", "Description": "Creates a Radiology Insights job with the given request body.", "Parameters": [ { - "$ref": "81" + "$ref": "58" }, { - "$id": "94", + "$id": "71", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "95", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -811,12 +604,12 @@ "Kind": "Method" }, { - "$id": "96", + "$id": "73", "Name": "repeatabilityRequestId", "NameInRequest": "Repeatability-Request-ID", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "97", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -832,12 +625,12 @@ "Kind": "Method" }, { - "$id": "98", + "$id": "75", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Description": "Specifies the date and time at which the request was first created.", "Type": { - "$id": "99", + "$id": "76", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -853,12 +646,12 @@ "Kind": "Method" }, { - "$id": "100", + "$id": "77", "Name": "RadiologyInsightsData", "NameInRequest": "RadiologyInsightsData", "Description": "The body of the Radiology Insights request.", "Type": { - "$ref": "46" + "$ref": "37" }, "Location": "Body", "IsRequired": true, @@ -871,11 +664,11 @@ "Kind": "Method" }, { - "$id": "101", + "$id": "78", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "102", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -890,19 +683,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "103", + "$id": "80", "Type": { - "$ref": "102" + "$ref": "79" }, "Value": "application/json" } }, { - "$id": "104", + "$id": "81", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "105", + "$id": "82", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -917,9 +710,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "106", + "$id": "83", "Type": { - "$ref": "105" + "$ref": "82" }, "Value": "application/json" } @@ -927,55 +720,55 @@ ], "Responses": [ { - "$id": "107", + "$id": "84", "StatusCodes": [ 202 ], "BodyType": { - "$ref": "52" + "$ref": "43" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "108", + "$id": "85", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "109", + "$id": "86", "Kind": "Primitive", "Name": "Uri", "IsNullable": false } }, { - "$id": "110", + "$id": "87", "Name": "Retry-After", "NameInResponse": "retryAfter", "Description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "Type": { - "$id": "111", + "$id": "88", "Kind": "Primitive", "Name": "Int32", "IsNullable": false } }, { - "$id": "112", + "$id": "89", "Name": "Repeatability-Result", "NameInResponse": "repeatabilityResult", "Description": "Indicates whether the repeatable request was accepted or rejected.", "Type": { - "$id": "113", + "$id": "90", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "114", + "$id": "91", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "115", + "$id": "92", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -984,11 +777,11 @@ "IsNullable": false }, { - "$id": "116", + "$id": "93", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "117", + "$id": "94", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1016,15 +809,15 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "118", + "$id": "95", "FinalStateVia": 3, "FinalResponse": { - "$id": "119", + "$id": "96", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "8" }, "BodyMediaType": "Json" }, @@ -1035,20 +828,20 @@ } ], "Protocol": { - "$id": "120" + "$id": "97" }, "Creatable": false, "Parent": "lroClient" } ], "Auth": { - "$id": "121", + "$id": "98", "ApiKey": { - "$id": "122", + "$id": "99", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "123", + "$id": "100", "Scopes": [ "https://api.example.com/.default" ] diff --git a/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json index b3b4a30640d..026278ea5b7 100644 --- a/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/MediaTypes-TypeSpec/src/Generated/tspCodeModel.json @@ -3,10 +3,60 @@ "Name": "MultipleMediaTypes", "Description": "Play with produces/consumes and media-types in general.", "ApiVersions": [], - "Enums": [], - "Models": [ + "Enums": [ { "$id": "2", + "Kind": "Enum", + "Name": "OneBinaryBodyTwoContentTypesRequest", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "3", + "Name": "application/json; serialization=Avro", + "Value": "application/json; serialization=Avro" + }, + { + "$id": "4", + "Name": "application/octet-stream", + "Value": "application/octet-stream" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Input" + }, + { + "$id": "5", + "Kind": "Enum", + "Name": "OneStringBodyThreeContentTypesRequest", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "6", + "Name": "application/json", + "Value": "application/json" + }, + { + "$id": "7", + "Name": "application/octet-stream", + "Value": "application/octet-stream" + }, + { + "$id": "8", + "Name": "text/plain", + "Value": "text/plain" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Input" + } + ], + "Models": [ + { + "$id": "9", "Kind": "Model", "Name": "Body", "Namespace": "MultipleMediaTypes", @@ -14,12 +64,12 @@ "Usage": "Input", "Properties": [ { - "$id": "3", + "$id": "10", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "4", + "$id": "11", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -32,21 +82,21 @@ ], "Clients": [ { - "$id": "5", + "$id": "12", "Name": "MultipleMediaTypesClient", "Description": "Play with produces/consumes and media-types in general.", "Operations": [ { - "$id": "6", + "$id": "13", "Name": "oneBinaryBodyTwoContentTypes", "ResourceName": "MultipleMediaTypes", "Parameters": [ { - "$id": "7", + "$id": "14", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "8", + "$id": "15", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -62,20 +112,20 @@ "Kind": "Client" }, { - "$id": "9", + "$id": "16", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "10", + "$id": "17", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "11", + "$id": "18", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "12", + "$id": "19", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -84,11 +134,11 @@ "IsNullable": false }, { - "$id": "13", + "$id": "20", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "14", + "$id": "21", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -110,11 +160,11 @@ "Kind": "Constant" }, { - "$id": "15", + "$id": "22", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "16", + "$id": "23", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -130,11 +180,11 @@ "Kind": "Method" }, { - "$id": "17", + "$id": "24", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "18", + "$id": "25", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -149,9 +199,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "19", + "$id": "26", "Type": { - "$ref": "18" + "$ref": "25" }, "Value": "application/json" } @@ -159,7 +209,7 @@ ], "Responses": [ { - "$id": "20", + "$id": "27", "StatusCodes": [ 204 ], @@ -181,28 +231,28 @@ "GenerateConvenienceMethod": true }, { - "$id": "21", + "$id": "28", "Name": "oneStringBodyThreeContentTypes", "ResourceName": "MultipleMediaTypes", "Parameters": [ { - "$ref": "7" + "$ref": "14" }, { - "$id": "22", + "$id": "29", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "23", + "$id": "30", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "24", + "$id": "31", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "25", + "$id": "32", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -211,11 +261,11 @@ "IsNullable": false }, { - "$id": "26", + "$id": "33", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "27", + "$id": "34", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -224,11 +274,11 @@ "IsNullable": false }, { - "$id": "28", + "$id": "35", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "29", + "$id": "36", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -250,11 +300,11 @@ "Kind": "Constant" }, { - "$id": "30", + "$id": "37", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "31", + "$id": "38", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -270,11 +320,11 @@ "Kind": "Method" }, { - "$id": "32", + "$id": "39", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "33", + "$id": "40", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -289,9 +339,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "34", + "$id": "41", "Type": { - "$ref": "33" + "$ref": "40" }, "Value": "application/json" } @@ -299,7 +349,7 @@ ], "Responses": [ { - "$id": "35", + "$id": "42", "StatusCodes": [ 204 ], @@ -322,23 +372,23 @@ "GenerateConvenienceMethod": true }, { - "$id": "36", + "$id": "43", "Name": "oneModelBodyOneContentType", "ResourceName": "MultipleMediaTypes", "Parameters": [ { - "$ref": "7" + "$ref": "14" }, { - "$id": "37", + "$id": "44", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "38", + "$id": "45", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "39", + "$id": "46", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -348,9 +398,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "40", + "$id": "47", "Type": { - "$ref": "38" + "$ref": "45" }, "Value": "application/json" }, @@ -364,11 +414,11 @@ "Kind": "Constant" }, { - "$id": "41", + "$id": "48", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "2" + "$ref": "9" }, "Location": "Body", "IsRequired": true, @@ -381,11 +431,11 @@ "Kind": "Method" }, { - "$id": "42", + "$id": "49", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "43", + "$id": "50", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -400,9 +450,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "44", + "$id": "51", "Type": { - "$ref": "43" + "$ref": "50" }, "Value": "application/json" } @@ -410,7 +460,7 @@ ], "Responses": [ { - "$id": "45", + "$id": "52", "StatusCodes": [ 204 ], @@ -432,7 +482,7 @@ } ], "Protocol": { - "$id": "46" + "$id": "53" }, "Creatable": true } diff --git a/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json index b739fc9c59c..3f62ef93c33 100644 --- a/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -171,107 +171,37 @@ }, { "$ref": "14" - }, - { - "$id": "23", - "Kind": "Model", - "Name": "Error", - "Namespace": "MixApiVersion", - "Description": "Error", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "24", - "Name": "code", - "SerializedName": "code", - "Description": "", - "Type": { - "$id": "25", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "26", - "Name": "message", - "SerializedName": "message", - "Description": "", - "Type": { - "$id": "27", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "28", - "Kind": "Model", - "Name": "PetId", - "Namespace": "MixApiVersion", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "29", - "Kind": "Model", - "Name": "NotModifiedPet", - "Namespace": "MixApiVersion", - "Description": "Not modified", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "30", - "Name": "body", - "SerializedName": "", - "Description": "", - "Type": { - "$ref": "4" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "31", + "$id": "23", "Name": "MixApiVersionClient", "Description": "", "Operations": [], "Protocol": { - "$id": "32" + "$id": "24" }, "Creatable": true }, { - "$id": "33", + "$id": "25", "Name": "Pets", "Description": "Manage your pets. You can delete or get the Pet from pet store.", "Operations": [ { - "$id": "34", + "$id": "26", "Name": "delete", "ResourceName": "Pet", "Summary": "delete.", "Description": "Delete a pet.", "Parameters": [ { - "$id": "35", + "$id": "27", "Name": "petStoreUrl", "NameInRequest": "petStoreUrl", "Type": { - "$id": "36", + "$id": "28", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -287,21 +217,21 @@ "Kind": "Client" }, { - "$id": "37", + "$id": "29", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "38", + "$id": "30", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "39", + "$id": "31", "Type": { - "$id": "40", + "$id": "32", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -318,12 +248,12 @@ "Kind": "Client" }, { - "$id": "41", + "$id": "33", "Name": "name", "NameInRequest": "name", "Description": "pet name", "Type": { - "$id": "42", + "$id": "34", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -339,11 +269,11 @@ "Kind": "Method" }, { - "$id": "43", + "$id": "35", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "44", + "$id": "36", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -358,9 +288,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "45", + "$id": "37", "Type": { - "$ref": "44" + "$ref": "36" }, "Value": "application/json" } @@ -368,7 +298,7 @@ ], "Responses": [ { - "$id": "46", + "$id": "38", "StatusCodes": [ 204 ], @@ -386,21 +316,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "47", + "$id": "39", "Name": "read", "ResourceName": "Pets", "Description": "Returns a pet. Supports eTags.", "Parameters": [ { - "$ref": "35" + "$ref": "27" }, { - "$id": "48", + "$id": "40", "Name": "petId", "NameInRequest": "petId", "Description": "The id of pet.", "Type": { - "$id": "49", + "$id": "41", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -416,11 +346,11 @@ "Kind": "Method" }, { - "$id": "50", + "$id": "42", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "51", + "$id": "43", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -435,9 +365,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "52", + "$id": "44", "Type": { - "$ref": "51" + "$ref": "43" }, "Value": "application/json" } @@ -445,7 +375,7 @@ ], "Responses": [ { - "$id": "53", + "$id": "45", "StatusCodes": [ 200 ], @@ -460,7 +390,7 @@ ] }, { - "$id": "54", + "$id": "46", "StatusCodes": [ 304 ], @@ -484,23 +414,23 @@ "GenerateConvenienceMethod": false }, { - "$id": "55", + "$id": "47", "Name": "create", "ResourceName": "Pets", "Parameters": [ { - "$ref": "35" + "$ref": "27" }, { - "$id": "56", + "$id": "48", "Name": "apiVersion", "NameInRequest": "apiVersion", "Type": { - "$id": "57", + "$id": "49", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "58", + "$id": "50", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -510,9 +440,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "59", + "$id": "51", "Type": { - "$ref": "57" + "$ref": "49" }, "Value": "2022-07-09" }, @@ -526,7 +456,7 @@ "Kind": "Constant" }, { - "$id": "60", + "$id": "52", "Name": "pet", "NameInRequest": "pet", "Type": { @@ -543,11 +473,11 @@ "Kind": "Method" }, { - "$id": "61", + "$id": "53", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "62", + "$id": "54", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -562,19 +492,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "63", + "$id": "55", "Type": { - "$ref": "62" + "$ref": "54" }, "Value": "application/json" } }, { - "$id": "64", + "$id": "56", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "65", + "$id": "57", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -589,9 +519,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "66", + "$id": "58", "Type": { - "$ref": "65" + "$ref": "57" }, "Value": "application/json" } @@ -599,7 +529,7 @@ ], "Responses": [ { - "$id": "67", + "$id": "59", "StatusCodes": [ 200 ], @@ -627,40 +557,40 @@ } ], "Protocol": { - "$id": "68" + "$id": "60" }, "Creatable": false, "Parent": "MixApiVersionClient" }, { - "$id": "69", + "$id": "61", "Name": "ListPetToysResponse", "Description": "", "Operations": [ { - "$id": "70", + "$id": "62", "Name": "listPet", "ResourceName": "Toy", "Summary": "Gets ledger entries from a collection corresponding to a range.", "Description": "A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned.", "Parameters": [ { - "$ref": "35" + "$ref": "27" }, { - "$id": "71", + "$id": "63", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "72", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "39" + "$ref": "31" }, "IsRequired": true, "IsApiVersion": true, @@ -672,11 +602,11 @@ "Kind": "Client" }, { - "$id": "73", + "$id": "65", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "74", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -691,9 +621,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "75", + "$id": "67", "Type": { - "$ref": "74" + "$ref": "66" }, "Value": "application/json" } @@ -701,7 +631,7 @@ ], "Responses": [ { - "$id": "76", + "$id": "68", "StatusCodes": [ 200 ], @@ -722,7 +652,7 @@ "Path": "/pets/toys/Toy", "BufferResponse": true, "Paging": { - "$id": "77", + "$id": "69", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -731,7 +661,7 @@ } ], "Protocol": { - "$id": "78" + "$id": "70" }, "Creatable": false, "Parent": "MixApiVersionClient" diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index 7c7d730c2aa..498797f6195 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -2783,25 +2783,25 @@ { "$id": "362", "Kind": "Model", - "Name": "DerivedModelWithDiscriminatorA", + "Name": "FirstDerivedOutputModel", "Namespace": "ModelsTypeSpec", - "Description": "Deriver model with discriminator property.", + "Description": "First derived model as an output", "IsNullable": false, - "DiscriminatorValue": "A", - "Usage": "RoundTrip", + "DiscriminatorValue": "first", + "Usage": "Output", "BaseModel": { - "$ref": "124" + "$ref": "34" }, "Properties": [ { "$id": "363", - "Name": "requiredString", - "SerializedName": "requiredString", - "Description": "Required string.", + "Name": "first", + "SerializedName": "first", + "Description": "", "Type": { "$id": "364", "Kind": "Primitive", - "Name": "String", + "Name": "Boolean", "IsNullable": false }, "IsRequired": true, @@ -2812,25 +2812,25 @@ { "$id": "365", "Kind": "Model", - "Name": "DerivedModelWithDiscriminatorB", + "Name": "SecondDerivedOutputModel", "Namespace": "ModelsTypeSpec", - "Description": "Deriver model with discriminator property.", + "Description": "Second derived model as an output", "IsNullable": false, - "DiscriminatorValue": "B", - "Usage": "RoundTrip", + "DiscriminatorValue": "second", + "Usage": "Output", "BaseModel": { - "$ref": "124" + "$ref": "34" }, "Properties": [ { "$id": "366", - "Name": "requiredInt", - "SerializedName": "requiredInt", - "Description": "Required int.", + "Name": "second", + "SerializedName": "second", + "Description": "", "Type": { "$id": "367", "Kind": "Primitive", - "Name": "Int32", + "Name": "Boolean", "IsNullable": false }, "IsRequired": true, @@ -2841,25 +2841,25 @@ { "$id": "368", "Kind": "Model", - "Name": "FirstDerivedOutputModel", + "Name": "DerivedModelWithDiscriminatorA", "Namespace": "ModelsTypeSpec", - "Description": "First derived model as an output", + "Description": "Deriver model with discriminator property.", "IsNullable": false, - "DiscriminatorValue": "first", - "Usage": "Output", + "DiscriminatorValue": "A", + "Usage": "RoundTrip", "BaseModel": { - "$ref": "34" + "$ref": "124" }, "Properties": [ { "$id": "369", - "Name": "first", - "SerializedName": "first", - "Description": "", + "Name": "requiredString", + "SerializedName": "requiredString", + "Description": "Required string.", "Type": { "$id": "370", "Kind": "Primitive", - "Name": "Boolean", + "Name": "String", "IsNullable": false }, "IsRequired": true, @@ -2870,64 +2870,25 @@ { "$id": "371", "Kind": "Model", - "Name": "SecondDerivedOutputModel", + "Name": "DerivedModelWithDiscriminatorB", "Namespace": "ModelsTypeSpec", - "Description": "Second derived model as an output", + "Description": "Deriver model with discriminator property.", "IsNullable": false, - "DiscriminatorValue": "second", - "Usage": "Output", + "DiscriminatorValue": "B", + "Usage": "RoundTrip", "BaseModel": { - "$ref": "34" + "$ref": "124" }, "Properties": [ { "$id": "372", - "Name": "second", - "SerializedName": "second", - "Description": "", + "Name": "requiredInt", + "SerializedName": "requiredInt", + "Description": "Required int.", "Type": { "$id": "373", "Kind": "Primitive", - "Name": "Boolean", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "374", - "Kind": "Model", - "Name": "Foo", - "Namespace": "ModelsTypeSpec", - "Description": "This is a model.", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "375", - "Name": "id", - "SerializedName": "id", - "Description": "id of Foo", - "Type": { - "$id": "376", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "377", - "Name": "name", - "SerializedName": "name", - "Description": "name of Foo", - "Type": { - "$id": "378", - "Kind": "Primitive", - "Name": "String", + "Name": "Int32", "IsNullable": false }, "IsRequired": true, @@ -2938,21 +2899,21 @@ ], "Clients": [ { - "$id": "379", + "$id": "374", "Name": "ModelsTypeSpecClient", "Description": "CADL project to test various types of models.", "Operations": [ { - "$id": "380", + "$id": "375", "Name": "putBaseModelWithDiscriminatorDefinedOnBase", "ResourceName": "ModelsTypeSpec", "Parameters": [ { - "$id": "381", + "$id": "376", "Name": "endpoint", "NameInRequest": "endpoint", "Type": { - "$id": "382", + "$id": "377", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -2968,7 +2929,7 @@ "Kind": "Client" }, { - "$id": "383", + "$id": "378", "Name": "body", "NameInRequest": "body", "Type": { @@ -2985,11 +2946,11 @@ "Kind": "Method" }, { - "$id": "384", + "$id": "379", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "385", + "$id": "380", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3004,19 +2965,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "386", + "$id": "381", "Type": { - "$ref": "385" + "$ref": "380" }, "Value": "application/json" } }, { - "$id": "387", + "$id": "382", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "388", + "$id": "383", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3031,9 +2992,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "389", + "$id": "384", "Type": { - "$ref": "388" + "$ref": "383" }, "Value": "application/json" } @@ -3041,7 +3002,7 @@ ], "Responses": [ { - "$id": "390", + "$id": "385", "StatusCodes": [ 200 ], @@ -3068,19 +3029,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "391", + "$id": "386", "Name": "getOutputDiscriminatorModel", "ResourceName": "ModelsTypeSpec", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "392", + "$id": "387", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "393", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3095,9 +3056,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "394", + "$id": "389", "Type": { - "$ref": "393" + "$ref": "388" }, "Value": "application/json" } @@ -3105,7 +3066,7 @@ ], "Responses": [ { - "$id": "395", + "$id": "390", "StatusCodes": [ 200 ], @@ -3129,16 +3090,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "396", + "$id": "391", "Name": "inputToRoundTrip", "ResourceName": "ModelsTypeSpec", "Description": "Input model that has property of its own type", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "397", + "$id": "392", "Name": "input", "NameInRequest": "input", "Type": { @@ -3155,11 +3116,11 @@ "Kind": "Method" }, { - "$id": "398", + "$id": "393", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "399", + "$id": "394", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3174,19 +3135,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "400", + "$id": "395", "Type": { - "$ref": "399" + "$ref": "394" }, "Value": "application/json" } }, { - "$id": "401", + "$id": "396", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "402", + "$id": "397", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3201,9 +3162,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "403", + "$id": "398", "Type": { - "$ref": "402" + "$ref": "397" }, "Value": "application/json" } @@ -3211,7 +3172,7 @@ ], "Responses": [ { - "$id": "404", + "$id": "399", "StatusCodes": [ 200 ], @@ -3238,16 +3199,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "405", + "$id": "400", "Name": "inputToRoundTripPrimitive", "ResourceName": "ModelsTypeSpec", "Description": "Input to RoundTripPrimitive", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "406", + "$id": "401", "Name": "input", "NameInRequest": "input", "Type": { @@ -3264,11 +3225,11 @@ "Kind": "Method" }, { - "$id": "407", + "$id": "402", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "408", + "$id": "403", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3283,19 +3244,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "409", + "$id": "404", "Type": { - "$ref": "408" + "$ref": "403" }, "Value": "application/json" } }, { - "$id": "410", + "$id": "405", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "411", + "$id": "406", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3310,9 +3271,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "412", + "$id": "407", "Type": { - "$ref": "411" + "$ref": "406" }, "Value": "application/json" } @@ -3320,7 +3281,7 @@ ], "Responses": [ { - "$id": "413", + "$id": "408", "StatusCodes": [ 200 ], @@ -3347,16 +3308,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "414", + "$id": "409", "Name": "inputToRoundTripOptional", "ResourceName": "ModelsTypeSpec", "Description": "Input to RoundTripOptional", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "415", + "$id": "410", "Name": "input", "NameInRequest": "input", "Type": { @@ -3373,11 +3334,11 @@ "Kind": "Method" }, { - "$id": "416", + "$id": "411", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "417", + "$id": "412", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3392,19 +3353,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "418", + "$id": "413", "Type": { - "$ref": "417" + "$ref": "412" }, "Value": "application/json" } }, { - "$id": "419", + "$id": "414", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "420", + "$id": "415", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3419,9 +3380,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "421", + "$id": "416", "Type": { - "$ref": "420" + "$ref": "415" }, "Value": "application/json" } @@ -3429,7 +3390,7 @@ ], "Responses": [ { - "$id": "422", + "$id": "417", "StatusCodes": [ 200 ], @@ -3456,17 +3417,17 @@ "GenerateConvenienceMethod": true }, { - "$id": "423", + "$id": "418", "Name": "inputToRoundTripReadOnly", "ResourceName": "ModelsTypeSpec", "Deprecated": "deprecated for test", "Description": "Input to RoundTripReadOnly", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "424", + "$id": "419", "Name": "input", "NameInRequest": "input", "Type": { @@ -3483,11 +3444,11 @@ "Kind": "Method" }, { - "$id": "425", + "$id": "420", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "426", + "$id": "421", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3502,19 +3463,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "427", + "$id": "422", "Type": { - "$ref": "426" + "$ref": "421" }, "Value": "application/json" } }, { - "$id": "428", + "$id": "423", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "429", + "$id": "424", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3529,9 +3490,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "430", + "$id": "425", "Type": { - "$ref": "429" + "$ref": "424" }, "Value": "application/json" } @@ -3539,7 +3500,7 @@ ], "Responses": [ { - "$id": "431", + "$id": "426", "StatusCodes": [ 200 ], @@ -3566,16 +3527,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "432", + "$id": "427", "Name": "roundTripToOutput", "ResourceName": "ModelsTypeSpec", "Description": "RoundTrip to Output", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "433", + "$id": "428", "Name": "input", "NameInRequest": "input", "Type": { @@ -3592,11 +3553,11 @@ "Kind": "Method" }, { - "$id": "434", + "$id": "429", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "435", + "$id": "430", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3611,19 +3572,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "436", + "$id": "431", "Type": { - "$ref": "435" + "$ref": "430" }, "Value": "application/json" } }, { - "$id": "437", + "$id": "432", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "438", + "$id": "433", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3638,9 +3599,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "439", + "$id": "434", "Type": { - "$ref": "438" + "$ref": "433" }, "Value": "application/json" } @@ -3648,7 +3609,7 @@ ], "Responses": [ { - "$id": "440", + "$id": "435", "StatusCodes": [ 200 ], @@ -3675,16 +3636,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "441", + "$id": "436", "Name": "InputRecursive", "ResourceName": "ModelsTypeSpec", "Description": "Input recursive model", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "442", + "$id": "437", "Name": "input", "NameInRequest": "input", "Type": { @@ -3701,11 +3662,11 @@ "Kind": "Method" }, { - "$id": "443", + "$id": "438", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "444", + "$id": "439", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3720,19 +3681,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "445", + "$id": "440", "Type": { - "$ref": "444" + "$ref": "439" }, "Value": "application/json" } }, { - "$id": "446", + "$id": "441", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "447", + "$id": "442", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3747,9 +3708,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "448", + "$id": "443", "Type": { - "$ref": "447" + "$ref": "442" }, "Value": "application/json" } @@ -3757,7 +3718,7 @@ ], "Responses": [ { - "$id": "449", + "$id": "444", "StatusCodes": [ 200 ], @@ -3778,16 +3739,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "450", + "$id": "445", "Name": "roundTripRecursive", "ResourceName": "ModelsTypeSpec", "Description": "RoundTrip recursive model", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "451", + "$id": "446", "Name": "input", "NameInRequest": "input", "Type": { @@ -3804,11 +3765,11 @@ "Kind": "Method" }, { - "$id": "452", + "$id": "447", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "453", + "$id": "448", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3823,19 +3784,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "454", + "$id": "449", "Type": { - "$ref": "453" + "$ref": "448" }, "Value": "application/json" } }, { - "$id": "455", + "$id": "450", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "456", + "$id": "451", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3850,9 +3811,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "457", + "$id": "452", "Type": { - "$ref": "456" + "$ref": "451" }, "Value": "application/json" } @@ -3860,7 +3821,7 @@ ], "Responses": [ { - "$id": "458", + "$id": "453", "StatusCodes": [ 200 ], @@ -3887,20 +3848,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "459", + "$id": "454", "Name": "selfReference", "ResourceName": "ModelsTypeSpec", "Description": "Returns model that has property of its own type", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "460", + "$id": "455", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "461", + "$id": "456", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3915,9 +3876,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "462", + "$id": "457", "Type": { - "$ref": "461" + "$ref": "456" }, "Value": "application/json" } @@ -3925,7 +3886,7 @@ ], "Responses": [ { - "$id": "463", + "$id": "458", "StatusCodes": [ 200 ], @@ -3949,16 +3910,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "464", + "$id": "459", "Name": "fixedFloatEnum", "ResourceName": "ModelsTypeSpec", "Description": "Returns model that has property of its own type", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "465", + "$id": "460", "Name": "input", "NameInRequest": "input", "Type": { @@ -3975,11 +3936,11 @@ "Kind": "Method" }, { - "$id": "466", + "$id": "461", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "467", + "$id": "462", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3994,9 +3955,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "468", + "$id": "463", "Type": { - "$ref": "467" + "$ref": "462" }, "Value": "application/json" } @@ -4004,7 +3965,7 @@ ], "Responses": [ { - "$id": "469", + "$id": "464", "StatusCodes": [ 200 ], @@ -4028,16 +3989,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "470", + "$id": "465", "Name": "extenisbleIntEnum", "ResourceName": "ModelsTypeSpec", "Description": "Returns model that has property of its own type", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "471", + "$id": "466", "Name": "input", "NameInRequest": "input", "Type": { @@ -4054,11 +4015,11 @@ "Kind": "Method" }, { - "$id": "472", + "$id": "467", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "473", + "$id": "468", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4073,9 +4034,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "474", + "$id": "469", "Type": { - "$ref": "473" + "$ref": "468" }, "Value": "application/json" } @@ -4083,7 +4044,7 @@ ], "Responses": [ { - "$id": "475", + "$id": "470", "StatusCodes": [ 200 ], @@ -4107,16 +4068,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "476", + "$id": "471", "Name": "roundTripToOutputWithNoUseBase", "ResourceName": "ModelsTypeSpec", "Description": "Returns RoundTripOnNoUse", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "477", + "$id": "472", "Name": "input", "NameInRequest": "input", "Type": { @@ -4133,11 +4094,11 @@ "Kind": "Method" }, { - "$id": "478", + "$id": "473", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "479", + "$id": "474", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4152,19 +4113,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "480", + "$id": "475", "Type": { - "$ref": "479" + "$ref": "474" }, "Value": "application/json" } }, { - "$id": "481", + "$id": "476", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "482", + "$id": "477", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4179,9 +4140,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "483", + "$id": "478", "Type": { - "$ref": "482" + "$ref": "477" }, "Value": "application/json" } @@ -4189,7 +4150,7 @@ ], "Responses": [ { - "$id": "484", + "$id": "479", "StatusCodes": [ 200 ], @@ -4216,30 +4177,30 @@ "GenerateConvenienceMethod": true }, { - "$id": "485", + "$id": "480", "Name": "analyzeConversation", "ResourceName": "ModelsTypeSpec", "Description": "Resource collection action operation template.", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "486", + "$id": "481", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "487", + "$id": "482", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "488", + "$id": "483", "Type": { - "$id": "489", + "$id": "484", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4256,11 +4217,11 @@ "Kind": "Client" }, { - "$id": "490", + "$id": "485", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "491", + "$id": "486", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4275,9 +4236,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "492", + "$id": "487", "Type": { - "$ref": "491" + "$ref": "486" }, "Value": "application/json" } @@ -4285,7 +4246,7 @@ ], "Responses": [ { - "$id": "493", + "$id": "488", "StatusCodes": [ 200 ], @@ -4309,19 +4270,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "494", + "$id": "489", "Name": "getSingleBase", "ResourceName": "ModelsTypeSpec", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "495", + "$id": "490", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "496", + "$id": "491", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4336,9 +4297,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "497", + "$id": "492", "Type": { - "$ref": "496" + "$ref": "491" }, "Value": "application/json" } @@ -4346,7 +4307,7 @@ ], "Responses": [ { - "$id": "498", + "$id": "493", "StatusCodes": [ 200 ], @@ -4370,15 +4331,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "499", + "$id": "494", "Name": "genericType", "ResourceName": "ModelsTypeSpec", "Parameters": [ { - "$ref": "381" + "$ref": "376" }, { - "$id": "500", + "$id": "495", "Name": "input", "NameInRequest": "input", "Type": { @@ -4395,11 +4356,11 @@ "Kind": "Method" }, { - "$id": "501", + "$id": "496", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "502", + "$id": "497", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4414,19 +4375,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "503", + "$id": "498", "Type": { - "$ref": "502" + "$ref": "497" }, "Value": "application/json" } }, { - "$id": "504", + "$id": "499", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "505", + "$id": "500", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4441,9 +4402,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "506", + "$id": "501", "Type": { - "$ref": "505" + "$ref": "500" }, "Value": "application/json" } @@ -4451,7 +4412,7 @@ ], "Responses": [ { - "$id": "507", + "$id": "502", "StatusCodes": [ 204 ], @@ -4473,7 +4434,7 @@ } ], "Protocol": { - "$id": "508" + "$id": "503" }, "Creatable": true } diff --git a/test/TestProjects/OldestVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/OldestVersion-TypeSpec/src/Generated/tspCodeModel.json index a53743602c3..f369b243abc 100644 --- a/test/TestProjects/OldestVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/OldestVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -399,75 +399,57 @@ }, { "$ref": "42" - }, - { - "$id": "51", - "Kind": "Model", - "Name": "ExportParams", - "Namespace": "TypeSpec.Versioning.Oldest", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "52", - "Kind": "Model", - "Name": "ListQueryParams", - "Namespace": "TypeSpec.Versioning.Oldest", - "IsNullable": false, - "Usage": "None", - "Properties": [] } ], "Clients": [ { - "$id": "53", + "$id": "51", "Name": "OldestClient", "Description": "", "Operations": [], "Protocol": { - "$id": "54" + "$id": "52" }, "Creatable": true }, { - "$id": "55", + "$id": "53", "Name": "ResourceOperations", "Description": "", "Operations": [], "Protocol": { - "$id": "56" + "$id": "54" }, "Creatable": false, "Parent": "OldestClient" }, { - "$id": "57", + "$id": "55", "Name": "VersioningOp", "Description": "", "Operations": [ { - "$id": "58", + "$id": "56", "Name": "export", "ResourceName": "VersioningOp", "Description": "Long-running resource action operation template.", "Parameters": [ { - "$id": "59", + "$id": "57", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "60", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "61", + "$id": "59", "Type": { - "$id": "62", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -484,11 +466,11 @@ "Kind": "Client" }, { - "$id": "63", + "$id": "61", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "64", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -504,11 +486,11 @@ "Kind": "Method" }, { - "$id": "65", + "$id": "63", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "66", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -524,11 +506,11 @@ "Kind": "Method" }, { - "$id": "67", + "$id": "65", "Name": "removedQueryParam", "NameInRequest": "removedQueryParam", "Type": { - "$id": "68", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -544,11 +526,11 @@ "Kind": "Method" }, { - "$id": "69", + "$id": "67", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "70", + "$id": "68", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -563,9 +545,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "71", + "$id": "69", "Type": { - "$ref": "70" + "$ref": "68" }, "Value": "application/json" } @@ -573,7 +555,7 @@ ], "Responses": [ { - "$id": "72", + "$id": "70", "StatusCodes": [ 202 ], @@ -583,12 +565,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "73", + "$id": "71", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "74", + "$id": "72", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -607,10 +589,10 @@ "Path": "/versioning/resources/{name}:export", "BufferResponse": true, "LongRunning": { - "$id": "75", + "$id": "73", "FinalStateVia": 3, "FinalResponse": { - "$id": "76", + "$id": "74", "StatusCodes": [ 200 ], @@ -625,25 +607,25 @@ "GenerateConvenienceMethod": true }, { - "$id": "77", + "$id": "75", "Name": "list", "ResourceName": "Resource", "Description": "Resource list operation template.", "Parameters": [ { - "$id": "78", + "$id": "76", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "79", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "61" + "$ref": "59" }, "IsRequired": true, "IsApiVersion": true, @@ -655,16 +637,16 @@ "Kind": "Client" }, { - "$id": "80", + "$id": "78", "Name": "select", "NameInRequest": "select", "Description": "Select the specified fields to be included in the response.", "Type": { - "$id": "81", + "$id": "79", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "82", + "$id": "80", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -682,11 +664,11 @@ "Kind": "Method" }, { - "$id": "83", + "$id": "81", "Name": "expand", "NameInRequest": "expand", "Type": { - "$id": "84", + "$id": "82", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -702,11 +684,11 @@ "Kind": "Method" }, { - "$id": "85", + "$id": "83", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "86", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -721,9 +703,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "87", + "$id": "85", "Type": { - "$ref": "86" + "$ref": "84" }, "Value": "application/json" } @@ -731,7 +713,7 @@ ], "Responses": [ { - "$id": "88", + "$id": "86", "StatusCodes": [ 200 ], @@ -752,7 +734,7 @@ "Path": "/versioning/resources", "BufferResponse": true, "Paging": { - "$id": "89", + "$id": "87", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -760,25 +742,25 @@ "GenerateConvenienceMethod": true }, { - "$id": "90", + "$id": "88", "Name": "create", "ResourceName": "Resource", "Description": "Create or replace operation template.", "Parameters": [ { - "$id": "91", + "$id": "89", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "92", + "$id": "90", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "61" + "$ref": "59" }, "IsRequired": true, "IsApiVersion": true, @@ -790,11 +772,11 @@ "Kind": "Client" }, { - "$id": "93", + "$id": "91", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "94", + "$id": "92", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -810,7 +792,7 @@ "Kind": "Method" }, { - "$id": "95", + "$id": "93", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -828,11 +810,11 @@ "Kind": "Method" }, { - "$id": "96", + "$id": "94", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "97", + "$id": "95", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -847,19 +829,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "98", + "$id": "96", "Type": { - "$ref": "97" + "$ref": "95" }, "Value": "application/json" } }, { - "$id": "99", + "$id": "97", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "100", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -874,9 +856,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "101", + "$id": "99", "Type": { - "$ref": "100" + "$ref": "98" }, "Value": "application/json" } @@ -884,7 +866,7 @@ ], "Responses": [ { - "$id": "102", + "$id": "100", "StatusCodes": [ 201 ], @@ -899,7 +881,7 @@ ] }, { - "$id": "103", + "$id": "101", "StatusCodes": [ 200 ], @@ -927,7 +909,7 @@ } ], "Protocol": { - "$id": "104" + "$id": "102" }, "Creatable": false, "Parent": "OldestClient" diff --git a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json index 26fb2b38726..71fe949722b 100644 --- a/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Pagination-TypeSpec/src/Generated/tspCodeModel.json @@ -51,86 +51,11 @@ { "$id": "8", "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "9", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "10", - "Name": "implicit", - "Value": "implicit", - "Description": "implicit flow" - }, - { - "$id": "11", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "12", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "13", - "Kind": "Enum", - "Name": "AuthFlow_tokenUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "14", - "Name": "https://pagnation.azure.com/token", - "Value": "https://pagnation.azure.com/token", - "Description": "https://pagnation.azure.com/token" - } - ], - "Namespace": "Pagination", - "Description": "The AuthFlow_tokenUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "15", - "Kind": "Enum", - "Name": "AuthFlow_refreshUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "16", - "Name": "https://pagination.azure.com/refresh", - "Value": "https://pagination.azure.com/refresh", - "Description": "https://pagination.azure.com/refresh" - } - ], - "Namespace": "Pagination", - "Description": "The AuthFlow_refreshUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "17", - "Kind": "Enum", "Name": "Versions", "EnumValueType": "String", "AllowedValues": [ { - "$id": "18", + "$id": "9", "Name": "2022-05-13", "Value": "2022-05-13" } @@ -143,7 +68,7 @@ ], "Models": [ { - "$id": "19", + "$id": "10", "Kind": "Model", "Name": "ListLedgerEntryInputBody", "Namespace": "Pagination", @@ -152,12 +77,12 @@ "Usage": "Input", "Properties": [ { - "$id": "20", + "$id": "11", "Name": "requiredString", "SerializedName": "requiredString", "Description": "Required string", "Type": { - "$id": "21", + "$id": "12", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -166,12 +91,12 @@ "IsReadOnly": false }, { - "$id": "22", + "$id": "13", "Name": "requiredInt", "SerializedName": "requiredInt", "Description": "Required int", "Type": { - "$id": "23", + "$id": "14", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -182,7 +107,7 @@ ] }, { - "$id": "24", + "$id": "15", "Kind": "Model", "Name": "PagedLedgerEntries", "Namespace": "Pagination", @@ -191,16 +116,16 @@ "Usage": "Output", "Properties": [ { - "$id": "25", + "$id": "16", "Name": "entries", "SerializedName": "entries", "Description": "Array of ledger entries", "Type": { - "$id": "26", + "$id": "17", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "27", + "$id": "18", "Kind": "Model", "Name": "LedgerEntry", "Namespace": "Pagination", @@ -208,12 +133,12 @@ "Usage": "Output", "Properties": [ { - "$id": "28", + "$id": "19", "Name": "contents", "SerializedName": "contents", "Description": "Contents of the ledger entry.", "Type": { - "$id": "29", + "$id": "20", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -222,12 +147,12 @@ "IsReadOnly": false }, { - "$id": "30", + "$id": "21", "Name": "collectionId", "SerializedName": "collectionId", "Description": "", "Type": { - "$id": "31", + "$id": "22", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -236,12 +161,12 @@ "IsReadOnly": true }, { - "$id": "32", + "$id": "23", "Name": "transactionId", "SerializedName": "transactionId", "Description": "", "Type": { - "$id": "33", + "$id": "24", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -257,12 +182,12 @@ "IsReadOnly": false }, { - "$id": "34", + "$id": "25", "Name": "customNextLink", "SerializedName": "customNextLink", "Description": "Path to retrieve next page of ledger entries", "Type": { - "$id": "35", + "$id": "26", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -273,10 +198,10 @@ ] }, { - "$ref": "27" + "$ref": "18" }, { - "$id": "36", + "$id": "27", "Kind": "Model", "Name": "PagedDimensionValueListItem", "Namespace": "Azure.Core.Foundations", @@ -285,16 +210,16 @@ "Usage": "Output", "Properties": [ { - "$id": "37", + "$id": "28", "Name": "value", "SerializedName": "value", "Description": "The DimensionValueListItem items on this page", "Type": { - "$id": "38", + "$id": "29", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "39", + "$id": "30", "Kind": "Model", "Name": "DimensionValueListItem", "Namespace": "Pagination", @@ -302,16 +227,16 @@ "Usage": "Output", "Properties": [ { - "$id": "40", + "$id": "31", "Name": "value", "SerializedName": "value", "Description": "", "Type": { - "$id": "41", + "$id": "32", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "42", + "$id": "33", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -329,12 +254,12 @@ "IsReadOnly": false }, { - "$id": "43", + "$id": "34", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "44", + "$id": "35", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -345,10 +270,10 @@ ] }, { - "$ref": "39" + "$ref": "30" }, { - "$id": "45", + "$id": "36", "Kind": "Model", "Name": "PagedLedgerEntry", "Namespace": "Azure.Core", @@ -357,16 +282,16 @@ "Usage": "Output", "Properties": [ { - "$id": "46", + "$id": "37", "Name": "value", "SerializedName": "value", "Description": "The LedgerEntry items on this page", "Type": { - "$id": "47", + "$id": "38", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "27" + "$ref": "18" }, "IsNullable": false }, @@ -374,12 +299,12 @@ "IsReadOnly": false }, { - "$id": "48", + "$id": "39", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "49", + "$id": "40", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -390,7 +315,7 @@ ] }, { - "$id": "50", + "$id": "41", "Kind": "Model", "Name": "PagedTextBlocklist", "Namespace": "Azure.Core.Foundations", @@ -399,16 +324,16 @@ "Usage": "Output", "Properties": [ { - "$id": "51", + "$id": "42", "Name": "value", "SerializedName": "value", "Description": "The TextBlocklist items on this page", "Type": { - "$id": "52", + "$id": "43", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "53", + "$id": "44", "Kind": "Model", "Name": "TextBlocklist", "Namespace": "Pagination", @@ -417,12 +342,12 @@ "Usage": "Output", "Properties": [ { - "$id": "54", + "$id": "45", "Name": "blocklistName", "SerializedName": "blocklistName", "Description": "Text blocklist name. Only supports the following characters: 0-9 A-Z a-z - . _ ~", "Type": { - "$id": "55", + "$id": "46", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -431,12 +356,12 @@ "IsReadOnly": false }, { - "$id": "56", + "$id": "47", "Name": "description", "SerializedName": "description", "Description": "Text blocklist description.", "Type": { - "$id": "57", + "$id": "48", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -452,12 +377,12 @@ "IsReadOnly": false }, { - "$id": "58", + "$id": "49", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "59", + "$id": "50", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -468,10 +393,10 @@ ] }, { - "$ref": "53" + "$ref": "44" }, { - "$id": "60", + "$id": "51", "Kind": "Model", "Name": "PagedTextBlockItem", "Namespace": "Azure.Core.Foundations", @@ -480,16 +405,16 @@ "Usage": "Output", "Properties": [ { - "$id": "61", + "$id": "52", "Name": "value", "SerializedName": "value", "Description": "The TextBlockItem items on this page", "Type": { - "$id": "62", + "$id": "53", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "63", + "$id": "54", "Kind": "Model", "Name": "TextBlockItem", "Namespace": "Pagination", @@ -498,12 +423,12 @@ "Usage": "Output", "Properties": [ { - "$id": "64", + "$id": "55", "Name": "blockItemId", "SerializedName": "blockItemId", "Description": "Block Item Id. It will be uuid.", "Type": { - "$id": "65", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -512,12 +437,12 @@ "IsReadOnly": false }, { - "$id": "66", + "$id": "57", "Name": "description", "SerializedName": "description", "Description": "Block item description.", "Type": { - "$id": "67", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -526,12 +451,12 @@ "IsReadOnly": false }, { - "$id": "68", + "$id": "59", "Name": "text", "SerializedName": "text", "Description": "Block item content.", "Type": { - "$id": "69", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -547,12 +472,12 @@ "IsReadOnly": false }, { - "$id": "70", + "$id": "61", "Name": "nextLink", "SerializedName": "nextLink", "Description": "The link to the next page of items", "Type": { - "$id": "71", + "$id": "62", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -563,10 +488,10 @@ ] }, { - "$ref": "63" + "$ref": "54" }, { - "$id": "72", + "$id": "63", "Kind": "Model", "Name": "BatchPoolListResult", "Namespace": "Pagination", @@ -575,16 +500,16 @@ "Usage": "Output", "Properties": [ { - "$id": "73", + "$id": "64", "Name": "value", "SerializedName": "value", "Description": "The list of Pools.", "Type": { - "$id": "74", + "$id": "65", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "75", + "$id": "66", "Kind": "Model", "Name": "BatchPool", "Namespace": "Pagination", @@ -593,12 +518,12 @@ "Usage": "Output", "Properties": [ { - "$id": "76", + "$id": "67", "Name": "id", "SerializedName": "id", "Description": "A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case).", "Type": { - "$id": "77", + "$id": "68", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -607,12 +532,12 @@ "IsReadOnly": true }, { - "$id": "78", + "$id": "69", "Name": "displayName", "SerializedName": "displayName", "Description": "The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.", "Type": { - "$id": "79", + "$id": "70", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -621,12 +546,12 @@ "IsReadOnly": true }, { - "$id": "80", + "$id": "71", "Name": "url", "SerializedName": "url", "Description": "The URL of the Pool.", "Type": { - "$id": "81", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -642,12 +567,12 @@ "IsReadOnly": false }, { - "$id": "82", + "$id": "73", "Name": "odata.nextLink", "SerializedName": "odata.nextLink", "Description": "The URL to get the next set of results.", "Type": { - "$id": "83", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -658,158 +583,10 @@ ] }, { - "$ref": "75" - }, - { - "$id": "84", - "Kind": "Model", - "Name": "AuthFlow", - "Namespace": "Pagination", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "85", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$id": "86", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "8" - }, - "Value": "clientCredentials", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "87", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "88", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "13" - }, - "Value": "https://pagnation.azure.com/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "89", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "90", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "15" - }, - "Value": "https://pagination.azure.com/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "91", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "92", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "93", - "Kind": "Model", - "Name": "ListLedgerEntryInput", - "Namespace": "Pagination", - "Description": "Input model for the ListPaginationLedgerEntries", - "IsNullable": false, - "Usage": "Input", - "Properties": [ - { - "$id": "94", - "Name": "bodyInput", - "SerializedName": "", - "Description": "Body parameter", - "Type": { - "$ref": "19" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "95", - "Kind": "Model", - "Name": "MetricDimensions", - "Namespace": "Pagination", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "96", - "Kind": "Model", - "Name": "TestRuns", - "Namespace": "Pagination", - "Description": "Load test run model", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "97", - "Kind": "Model", - "Name": "Dimension", - "Namespace": "Pagination", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "98", - "Kind": "Model", - "Name": "BatchRequestHeaders", - "Namespace": "Pagination", - "Description": "Client related response header values", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "99", - "Kind": "Model", - "Name": "BatchResponseHeaders", - "Namespace": "Pagination", - "Description": "Client related response header values", - "IsNullable": false, - "Usage": "None", - "Properties": [] + "$ref": "66" }, { - "$id": "100", + "$id": "75", "Kind": "Model", "Name": "BatchError", "Namespace": "Pagination", @@ -818,12 +595,12 @@ "Usage": "Output", "Properties": [ { - "$id": "101", + "$id": "76", "Name": "code", "SerializedName": "code", "Description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", "Type": { - "$id": "102", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -836,23 +613,23 @@ ], "Clients": [ { - "$id": "103", + "$id": "78", "Name": "PaginationClient", "Description": "", "Operations": [ { - "$id": "104", + "$id": "79", "Name": "ListPaginationLedgerEntries", "ResourceName": "LedgerEntry", "Summary": "Gets ledger entries from a collection corresponding to a range.", "Description": "A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned.", "Parameters": [ { - "$id": "105", + "$id": "80", "Name": "pagnationUri", "NameInRequest": "pagnationUri", "Type": { - "$id": "106", + "$id": "81", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -868,21 +645,21 @@ "Kind": "Client" }, { - "$id": "107", + "$id": "82", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "108", + "$id": "83", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "109", + "$id": "84", "Type": { - "$id": "110", + "$id": "85", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -899,12 +676,12 @@ "Kind": "Client" }, { - "$id": "111", + "$id": "86", "Name": "bodyInput", "NameInRequest": "bodyInput", "Description": "Body parameter", "Type": { - "$ref": "19" + "$ref": "10" }, "Location": "Body", "IsRequired": true, @@ -917,11 +694,11 @@ "Kind": "Method" }, { - "$id": "112", + "$id": "87", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "113", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -936,19 +713,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "114", + "$id": "89", "Type": { - "$ref": "113" + "$ref": "88" }, "Value": "application/json" } }, { - "$id": "115", + "$id": "90", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "116", + "$id": "91", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -963,9 +740,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "117", + "$id": "92", "Type": { - "$ref": "116" + "$ref": "91" }, "Value": "application/json" } @@ -973,12 +750,12 @@ ], "Responses": [ { - "$id": "118", + "$id": "93", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "24" + "$ref": "15" }, "BodyMediaType": "Json", "Headers": [], @@ -997,7 +774,7 @@ ], "BufferResponse": true, "Paging": { - "$id": "119", + "$id": "94", "NextLinkName": "customNextLink", "ItemName": "entries" }, @@ -1006,39 +783,39 @@ } ], "Protocol": { - "$id": "120" + "$id": "95" }, "Creatable": true }, { - "$id": "121", + "$id": "96", "Name": "AdditionalParameter", "Description": "", "Operations": [ { - "$id": "122", + "$id": "97", "Name": "ListMetricDimensionValues", "ResourceName": "DimensionValueListItem", "Summary": "List the dimension values for the given metric dimension name.", "Description": "List the dimension values for the given metric dimension name.", "Parameters": [ { - "$ref": "105" + "$ref": "80" }, { - "$id": "123", + "$id": "98", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "124", + "$id": "99", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "109" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1050,12 +827,12 @@ "Kind": "Client" }, { - "$id": "125", + "$id": "100", "Name": "testRunId", "NameInRequest": "testRunId", "Description": "Unique test run name as identifier", "Type": { - "$id": "126", + "$id": "101", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1071,12 +848,12 @@ "Kind": "Method" }, { - "$id": "127", + "$id": "102", "Name": "name", "NameInRequest": "name", "Description": "Dimension name", "Type": { - "$id": "128", + "$id": "103", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1092,7 +869,7 @@ "Kind": "Method" }, { - "$id": "129", + "$id": "104", "Name": "interval", "NameInRequest": "interval", "Description": "The interval (i.e. timegrain) of the query.", @@ -1110,12 +887,12 @@ "Kind": "Method" }, { - "$id": "130", + "$id": "105", "Name": "metricName", "NameInRequest": "metricName", "Description": "Metric name", "Type": { - "$id": "131", + "$id": "106", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1131,12 +908,12 @@ "Kind": "Method" }, { - "$id": "132", + "$id": "107", "Name": "metricNamespace", "NameInRequest": "metricNamespace", "Description": "Metric namespace to query metric definitions for.", "Type": { - "$id": "133", + "$id": "108", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1152,12 +929,12 @@ "Kind": "Method" }, { - "$id": "134", + "$id": "109", "Name": "timespan", "NameInRequest": "timespan", "Description": "The timespan of the query. It is a string with the following format\n'startDateTime_ISO/endDateTime_ISO'.", "Type": { - "$id": "135", + "$id": "110", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1173,11 +950,11 @@ "Kind": "Method" }, { - "$id": "136", + "$id": "111", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "137", + "$id": "112", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1192,9 +969,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "138", + "$id": "113", "Type": { - "$ref": "137" + "$ref": "112" }, "Value": "application/json" } @@ -1202,12 +979,12 @@ ], "Responses": [ { - "$id": "139", + "$id": "114", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "36" + "$ref": "27" }, "BodyMediaType": "Json", "Headers": [], @@ -1223,7 +1000,7 @@ "Path": "/app/test-runs/{testRunId}/metric-dimensions/{name}/values", "BufferResponse": true, "Paging": { - "$id": "140", + "$id": "115", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1232,39 +1009,39 @@ } ], "Protocol": { - "$id": "141" + "$id": "116" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "142", + "$id": "117", "Name": "UseFoundationsResourceList", "Description": "", "Operations": [ { - "$id": "143", + "$id": "118", "Name": "list", "ResourceName": "LedgerEntry", "Description": "List upload detail for the discovery resource.", "Parameters": [ { - "$ref": "105" + "$ref": "80" }, { - "$id": "144", + "$id": "119", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "145", + "$id": "120", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "109" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1276,11 +1053,11 @@ "Kind": "Client" }, { - "$id": "146", + "$id": "121", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "147", + "$id": "122", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1295,9 +1072,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "148", + "$id": "123", "Type": { - "$ref": "147" + "$ref": "122" }, "Value": "application/json" } @@ -1305,12 +1082,12 @@ ], "Responses": [ { - "$id": "149", + "$id": "124", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "45" + "$ref": "36" }, "BodyMediaType": "Json", "Headers": [], @@ -1326,7 +1103,7 @@ "Path": "/app/adp/transactions", "BufferResponse": true, "Paging": { - "$id": "150", + "$id": "125", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1335,40 +1112,40 @@ } ], "Protocol": { - "$id": "151" + "$id": "126" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "152", + "$id": "127", "Name": "TwoTypesItem", "Description": "", "Operations": [ { - "$id": "153", + "$id": "128", "Name": "listTextBlocklists", "ResourceName": "TextBlocklist", "Summary": "Get All Text Blocklists", "Description": "Get all text blocklists details.", "Parameters": [ { - "$ref": "105" + "$ref": "80" }, { - "$id": "154", + "$id": "129", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "155", + "$id": "130", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "109" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1380,11 +1157,11 @@ "Kind": "Client" }, { - "$id": "156", + "$id": "131", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "157", + "$id": "132", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1399,9 +1176,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "158", + "$id": "133", "Type": { - "$ref": "157" + "$ref": "132" }, "Value": "application/json" } @@ -1409,12 +1186,12 @@ ], "Responses": [ { - "$id": "159", + "$id": "134", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "50" + "$ref": "41" }, "BodyMediaType": "Json", "Headers": [], @@ -1430,7 +1207,7 @@ "Path": "/app/text/blocklists", "BufferResponse": true, "Paging": { - "$id": "160", + "$id": "135", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1438,29 +1215,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "161", + "$id": "136", "Name": "listTextBlocklistItems", "ResourceName": "TextBlockItem", "Summary": "Get All BlockItems By blocklistName", "Description": "Get all blockItems in a text blocklist", "Parameters": [ { - "$ref": "105" + "$ref": "80" }, { - "$id": "162", + "$id": "137", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "163", + "$id": "138", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "109" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1472,12 +1249,12 @@ "Kind": "Client" }, { - "$id": "164", + "$id": "139", "Name": "blocklistName", "NameInRequest": "blocklistName", "Description": "Text blocklist name. Only supports the following characters: 0-9 A-Z a-z - . _ ~", "Type": { - "$id": "165", + "$id": "140", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1493,12 +1270,12 @@ "Kind": "Method" }, { - "$id": "166", + "$id": "141", "Name": "top", "NameInRequest": "top", "Description": "The number of result items to return.", "Type": { - "$id": "167", + "$id": "142", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1514,12 +1291,12 @@ "Kind": "Method" }, { - "$id": "168", + "$id": "143", "Name": "skip", "NameInRequest": "skip", "Description": "The number of result items to skip.", "Type": { - "$id": "169", + "$id": "144", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1535,12 +1312,12 @@ "Kind": "Method" }, { - "$id": "170", + "$id": "145", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Description": "The maximum number of result items per page.", "Type": { - "$id": "171", + "$id": "146", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1556,11 +1333,11 @@ "Kind": "Method" }, { - "$id": "172", + "$id": "147", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "173", + "$id": "148", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1575,9 +1352,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "174", + "$id": "149", "Type": { - "$ref": "173" + "$ref": "148" }, "Value": "application/json" } @@ -1585,12 +1362,12 @@ ], "Responses": [ { - "$id": "175", + "$id": "150", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "60" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -1606,7 +1383,7 @@ "Path": "/app/text/blocklists/{blocklistName}/blockItems", "BufferResponse": true, "Paging": { - "$id": "176", + "$id": "151", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1615,39 +1392,39 @@ } ], "Protocol": { - "$id": "177" + "$id": "152" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "178", + "$id": "153", "Name": "Pools", "Description": "", "Operations": [ { - "$id": "179", + "$id": "154", "Name": "listPools", "ResourceName": "Pools", "Description": "Lists all of the Pools in the specified Account.", "Parameters": [ { - "$ref": "105" + "$ref": "80" }, { - "$id": "180", + "$id": "155", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "181", + "$id": "156", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "109" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1659,12 +1436,12 @@ "Kind": "Client" }, { - "$id": "182", + "$id": "157", "Name": "$filter", "NameInRequest": "$filter", "Description": "An OData $filter clause. For more information on constructing this filter, see\nhttps://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools.", "Type": { - "$id": "183", + "$id": "158", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1680,16 +1457,16 @@ "Kind": "Method" }, { - "$id": "184", + "$id": "159", "Name": "$select", "NameInRequest": "$select", "Description": "An OData $select clause.", "Type": { - "$id": "185", + "$id": "160", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "186", + "$id": "161", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1708,16 +1485,16 @@ "ArraySerializationDelimiter": "," }, { - "$id": "187", + "$id": "162", "Name": "$expand", "NameInRequest": "$expand", "Description": "An OData $expand clause.", "Type": { - "$id": "188", + "$id": "163", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "189", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1736,11 +1513,11 @@ "ArraySerializationDelimiter": "," }, { - "$id": "190", + "$id": "165", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "191", + "$id": "166", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1755,9 +1532,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "192", + "$id": "167", "Type": { - "$ref": "191" + "$ref": "166" }, "Value": "application/json" } @@ -1765,12 +1542,12 @@ ], "Responses": [ { - "$id": "193", + "$id": "168", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "72" + "$ref": "63" }, "BodyMediaType": "Json", "Headers": [], @@ -1786,7 +1563,7 @@ "Path": "/app/pools", "BufferResponse": true, "Paging": { - "$id": "194", + "$id": "169", "NextLinkName": "odata.nextLink", "ItemName": "value" }, @@ -1795,16 +1572,16 @@ } ], "Protocol": { - "$id": "195" + "$id": "170" }, "Creatable": false, "Parent": "PaginationClient" } ], "Auth": { - "$id": "196", + "$id": "171", "OAuth2": { - "$id": "197", + "$id": "172", "Scopes": [ "https://pagination.azure.com/.default" ] diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json index edc3e57f86d..10b22106341 100644 --- a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json @@ -125,58 +125,6 @@ { "$id": "17", "Kind": "Model", - "Name": "Toy", - "Namespace": "PetStore", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "18", - "Name": "id", - "SerializedName": "id", - "Description": "", - "Type": { - "$id": "19", - "Kind": "Primitive", - "Name": "Int64", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "20", - "Name": "petId", - "SerializedName": "petId", - "Description": "", - "Type": { - "$id": "21", - "Kind": "Primitive", - "Name": "Int64", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "22", - "Name": "name", - "SerializedName": "name", - "Description": "", - "Type": { - "$id": "23", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "24", - "Kind": "Model", "Name": "Error", "Namespace": "PetStore", "Description": "Error", @@ -184,12 +132,12 @@ "Usage": "Output", "Properties": [ { - "$id": "25", + "$id": "18", "Name": "code", "SerializedName": "code", "Description": "", "Type": { - "$id": "26", + "$id": "19", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -198,12 +146,12 @@ "IsReadOnly": false }, { - "$id": "27", + "$id": "20", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "28", + "$id": "21", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -214,16 +162,7 @@ ] }, { - "$id": "29", - "Kind": "Model", - "Name": "PetId", - "Namespace": "PetStore", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "30", + "$id": "22", "Kind": "Model", "Name": "Shark", "Namespace": "PetStore", @@ -236,12 +175,12 @@ }, "Properties": [ { - "$id": "31", + "$id": "23", "Name": "bite", "SerializedName": "bite", "Description": "The bite of the shark", "Type": { - "$id": "32", + "$id": "24", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -252,7 +191,7 @@ ] }, { - "$id": "33", + "$id": "25", "Kind": "Model", "Name": "Tuna", "Namespace": "PetStore", @@ -265,12 +204,12 @@ }, "Properties": [ { - "$id": "34", + "$id": "26", "Name": "fat", "SerializedName": "fat", "Description": "The amount of fat of the tuna", "Type": { - "$id": "35", + "$id": "27", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -283,33 +222,33 @@ ], "Clients": [ { - "$id": "36", + "$id": "28", "Name": "PetStoreClient", "Description": "", "Operations": [], "Protocol": { - "$id": "37" + "$id": "29" }, "Creatable": true }, { - "$id": "38", + "$id": "30", "Name": "Pets", "Description": "Manage your pets. You can delete or get the Pet from pet store.", "Operations": [ { - "$id": "39", + "$id": "31", "Name": "delete", "ResourceName": "Pets", "Summary": "delete.", "Description": "Delete a pet.", "Parameters": [ { - "$id": "40", + "$id": "32", "Name": "petStoreUrl", "NameInRequest": "petStoreUrl", "Type": { - "$id": "41", + "$id": "33", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -325,12 +264,12 @@ "Kind": "Client" }, { - "$id": "42", + "$id": "34", "Name": "petId", "NameInRequest": "petId", "Description": "The id of pet.", "Type": { - "$id": "43", + "$id": "35", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -346,11 +285,11 @@ "Kind": "Method" }, { - "$id": "44", + "$id": "36", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "45", + "$id": "37", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -365,9 +304,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "46", + "$id": "38", "Type": { - "$ref": "45" + "$ref": "37" }, "Value": "application/json" } @@ -375,7 +314,7 @@ ], "Responses": [ { - "$id": "47", + "$id": "39", "StatusCodes": [ 200 ], @@ -393,21 +332,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "48", + "$id": "40", "Name": "read", "ResourceName": "Pets", "Description": "Returns a pet. Supports eTags.", "Parameters": [ { - "$ref": "40" + "$ref": "32" }, { - "$id": "49", + "$id": "41", "Name": "petId", "NameInRequest": "petId", "Description": "The id of pet.", "Type": { - "$id": "50", + "$id": "42", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -423,11 +362,11 @@ "Kind": "Method" }, { - "$id": "51", + "$id": "43", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "52", + "$id": "44", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -442,9 +381,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "53", + "$id": "45", "Type": { - "$ref": "52" + "$ref": "44" }, "Value": "application/json" } @@ -452,7 +391,7 @@ ], "Responses": [ { - "$id": "54", + "$id": "46", "StatusCodes": [ 200 ], @@ -467,7 +406,7 @@ ] }, { - "$id": "55", + "$id": "47", "StatusCodes": [ 304 ], @@ -491,15 +430,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "56", + "$id": "48", "Name": "create", "ResourceName": "Pets", "Parameters": [ { - "$ref": "40" + "$ref": "32" }, { - "$id": "57", + "$id": "49", "Name": "pet", "NameInRequest": "pet", "Type": { @@ -516,11 +455,11 @@ "Kind": "Method" }, { - "$id": "58", + "$id": "50", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "59", + "$id": "51", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -535,19 +474,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "60", + "$id": "52", "Type": { - "$ref": "59" + "$ref": "51" }, "Value": "application/json" } }, { - "$id": "61", + "$id": "53", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "62", + "$id": "54", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -562,9 +501,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "63", + "$id": "55", "Type": { - "$ref": "62" + "$ref": "54" }, "Value": "application/json" } @@ -572,7 +511,7 @@ ], "Responses": [ { - "$id": "64", + "$id": "56", "StatusCodes": [ 200 ], @@ -599,15 +538,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "65", + "$id": "57", "Name": "getPetByKind", "ResourceName": "Pets", "Parameters": [ { - "$ref": "40" + "$ref": "32" }, { - "$id": "66", + "$id": "58", "Name": "kind", "NameInRequest": "kind", "Type": { @@ -624,11 +563,11 @@ "Kind": "Method" }, { - "$id": "67", + "$id": "59", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "68", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -643,9 +582,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "69", + "$id": "61", "Type": { - "$ref": "68" + "$ref": "60" }, "Value": "application/json" } @@ -653,7 +592,7 @@ ], "Responses": [ { - "$id": "70", + "$id": "62", "StatusCodes": [ 200 ], @@ -677,19 +616,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "71", + "$id": "63", "Name": "GetFirstPet", "ResourceName": "Pets", "Parameters": [ { - "$ref": "40" + "$ref": "32" }, { - "$id": "72", + "$id": "64", "Name": "start", "NameInRequest": "start", "Type": { - "$id": "73", + "$id": "65", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -705,11 +644,11 @@ "Kind": "Method" }, { - "$id": "74", + "$id": "66", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "75", + "$id": "67", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -724,9 +663,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "76", + "$id": "68", "Type": { - "$ref": "75" + "$ref": "67" }, "Value": "application/json" } @@ -734,7 +673,7 @@ ], "Responses": [ { - "$id": "77", + "$id": "69", "StatusCodes": [ 200 ], @@ -758,19 +697,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "78", + "$id": "70", "Name": "getFish", "ResourceName": "Pets", "Parameters": [ { - "$ref": "40" + "$ref": "32" }, { - "$id": "79", + "$id": "71", "Name": "kind", "NameInRequest": "kind", "Type": { - "$id": "80", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -786,11 +725,11 @@ "Kind": "Method" }, { - "$id": "81", + "$id": "73", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "82", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -805,9 +744,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "83", + "$id": "75", "Type": { - "$ref": "82" + "$ref": "74" }, "Value": "application/json" } @@ -815,7 +754,7 @@ ], "Responses": [ { - "$id": "84", + "$id": "76", "StatusCodes": [ 200 ], @@ -839,20 +778,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "85", + "$id": "77", "Name": "refresh", "ResourceName": "Pets", "Description": "Test that an LRO polling operation defined in a namespace wtihout @service decorator will not be generated. This should be removed after cadl-ranch test case update.", "Parameters": [ { - "$ref": "40" + "$ref": "32" }, { - "$id": "86", + "$id": "78", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "87", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -867,9 +806,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "88", + "$id": "80", "Type": { - "$ref": "87" + "$ref": "79" }, "Value": "application/json" } @@ -886,7 +825,7 @@ } ], "Protocol": { - "$id": "89" + "$id": "81" }, "Creatable": false, "Parent": "PetStoreClient" diff --git a/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json index fd1b0703f72..7ccaec8f1d8 100644 --- a/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/RenameGetList-TypeSpec/src/Generated/tspCodeModel.json @@ -348,45 +348,36 @@ "IsReadOnly": false } ] - }, - { - "$id": "46", - "Kind": "Model", - "Name": "ListQueryParams", - "Namespace": "RenameGetList", - "IsNullable": false, - "Usage": "None", - "Properties": [] } ], "Clients": [ { - "$id": "47", + "$id": "46", "Name": "RenameGetListClient", "Description": "", "Operations": [], "Protocol": { - "$id": "48" + "$id": "47" }, "Creatable": true }, { - "$id": "49", + "$id": "48", "Name": "Projects", "Description": "", "Operations": [ { - "$id": "50", + "$id": "49", "Name": "get", "ResourceName": "Project", "Description": "Gets the details of a project.", "Parameters": [ { - "$id": "51", + "$id": "50", "Name": "Endpoint", "NameInRequest": "Endpoint", "Type": { - "$id": "52", + "$id": "51", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -402,21 +393,21 @@ "Kind": "Client" }, { - "$id": "53", + "$id": "52", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "54", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "55", + "$id": "54", "Type": { - "$id": "56", + "$id": "55", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -433,11 +424,11 @@ "Kind": "Client" }, { - "$id": "57", + "$id": "56", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "58", + "$id": "57", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -453,11 +444,11 @@ "Kind": "Method" }, { - "$id": "59", + "$id": "58", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "60", + "$id": "59", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -472,9 +463,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "61", + "$id": "60", "Type": { - "$ref": "60" + "$ref": "59" }, "Value": "application/json" } @@ -482,7 +473,7 @@ ], "Responses": [ { - "$id": "62", + "$id": "61", "StatusCodes": [ 200 ], @@ -506,28 +497,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "63", + "$id": "62", "Name": "list", "ResourceName": "Project", "Description": "Lists the existing projects.", "Parameters": [ { - "$ref": "51" + "$ref": "50" }, { - "$id": "64", + "$id": "63", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "65", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "55" + "$ref": "54" }, "IsRequired": true, "IsApiVersion": true, @@ -539,11 +530,11 @@ "Kind": "Client" }, { - "$id": "66", + "$id": "65", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "67", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -558,9 +549,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "68", + "$id": "67", "Type": { - "$ref": "67" + "$ref": "66" }, "Value": "application/json" } @@ -568,7 +559,7 @@ ], "Responses": [ { - "$id": "69", + "$id": "68", "StatusCodes": [ 200 ], @@ -589,7 +580,7 @@ "Path": "/authoring/analyze-text/projects", "BufferResponse": true, "Paging": { - "$id": "70", + "$id": "69", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -598,39 +589,39 @@ } ], "Protocol": { - "$id": "71" + "$id": "70" }, "Creatable": false, "Parent": "RenameGetListClient" }, { - "$id": "72", + "$id": "71", "Name": "Deployments", "Description": "", "Operations": [ { - "$id": "73", + "$id": "72", "Name": "get", "ResourceName": "Deployment", "Description": "Gets the details of a deployment.", "Parameters": [ { - "$ref": "51" + "$ref": "50" }, { - "$id": "74", + "$id": "73", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "75", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "55" + "$ref": "54" }, "IsRequired": true, "IsApiVersion": true, @@ -642,11 +633,11 @@ "Kind": "Client" }, { - "$id": "76", + "$id": "75", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "77", + "$id": "76", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -662,11 +653,11 @@ "Kind": "Method" }, { - "$id": "78", + "$id": "77", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "79", + "$id": "78", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -682,11 +673,11 @@ "Kind": "Method" }, { - "$id": "80", + "$id": "79", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "81", + "$id": "80", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -701,9 +692,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "82", + "$id": "81", "Type": { - "$ref": "81" + "$ref": "80" }, "Value": "application/json" } @@ -711,7 +702,7 @@ ], "Responses": [ { - "$id": "83", + "$id": "82", "StatusCodes": [ 200 ], @@ -735,28 +726,28 @@ "GenerateConvenienceMethod": false }, { - "$id": "84", + "$id": "83", "Name": "list", "ResourceName": "Deployment", "Description": "Lists the existing deployments.", "Parameters": [ { - "$ref": "51" + "$ref": "50" }, { - "$id": "85", + "$id": "84", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "86", + "$id": "85", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "55" + "$ref": "54" }, "IsRequired": true, "IsApiVersion": true, @@ -768,11 +759,11 @@ "Kind": "Client" }, { - "$id": "87", + "$id": "86", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "88", + "$id": "87", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -788,11 +779,11 @@ "Kind": "Method" }, { - "$id": "89", + "$id": "88", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "90", + "$id": "89", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -807,9 +798,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "91", + "$id": "90", "Type": { - "$ref": "90" + "$ref": "89" }, "Value": "application/json" } @@ -817,7 +808,7 @@ ], "Responses": [ { - "$id": "92", + "$id": "91", "StatusCodes": [ 200 ], @@ -838,7 +829,7 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments", "BufferResponse": true, "Paging": { - "$id": "93", + "$id": "92", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -847,7 +838,7 @@ } ], "Protocol": { - "$id": "94" + "$id": "93" }, "Creatable": false, "Parent": "RenameGetListClient" diff --git a/test/TestProjects/SpecificVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/SpecificVersion-TypeSpec/src/Generated/tspCodeModel.json index 2842d1b8297..4b38e8047f3 100644 --- a/test/TestProjects/SpecificVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/SpecificVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -385,75 +385,57 @@ }, { "$ref": "40" - }, - { - "$id": "49", - "Kind": "Model", - "Name": "ExportParams", - "Namespace": "TypeSpec.Versioning.Specific", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "50", - "Kind": "Model", - "Name": "ListQueryParams", - "Namespace": "TypeSpec.Versioning.Specific", - "IsNullable": false, - "Usage": "None", - "Properties": [] } ], "Clients": [ { - "$id": "51", + "$id": "49", "Name": "SpecificClient", "Description": "", "Operations": [], "Protocol": { - "$id": "52" + "$id": "50" }, "Creatable": true }, { - "$id": "53", + "$id": "51", "Name": "ResourceOperations", "Description": "", "Operations": [], "Protocol": { - "$id": "54" + "$id": "52" }, "Creatable": false, "Parent": "SpecificClient" }, { - "$id": "55", + "$id": "53", "Name": "VersioningOp", "Description": "", "Operations": [ { - "$id": "56", + "$id": "54", "Name": "export", "ResourceName": "VersioningOp", "Description": "Long-running resource action operation template.", "Parameters": [ { - "$id": "57", + "$id": "55", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "58", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "59", + "$id": "57", "Type": { - "$id": "60", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -470,11 +452,11 @@ "Kind": "Client" }, { - "$id": "61", + "$id": "59", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "62", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -490,11 +472,11 @@ "Kind": "Method" }, { - "$id": "63", + "$id": "61", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "64", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -510,11 +492,11 @@ "Kind": "Method" }, { - "$id": "65", + "$id": "63", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "66", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -529,9 +511,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "67", + "$id": "65", "Type": { - "$ref": "66" + "$ref": "64" }, "Value": "application/json" } @@ -539,7 +521,7 @@ ], "Responses": [ { - "$id": "68", + "$id": "66", "StatusCodes": [ 202 ], @@ -549,12 +531,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "69", + "$id": "67", "Name": "Operation-Location", "NameInResponse": "operationLocation", "Description": "The location for monitoring the operation state.", "Type": { - "$id": "70", + "$id": "68", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -573,10 +555,10 @@ "Path": "/versioning/resources/{name}:export", "BufferResponse": true, "LongRunning": { - "$id": "71", + "$id": "69", "FinalStateVia": 3, "FinalResponse": { - "$id": "72", + "$id": "70", "StatusCodes": [ 200 ], @@ -591,25 +573,25 @@ "GenerateConvenienceMethod": true }, { - "$id": "73", + "$id": "71", "Name": "list", "ResourceName": "Resource", "Description": "Resource list operation template.", "Parameters": [ { - "$id": "74", + "$id": "72", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "75", + "$id": "73", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "59" + "$ref": "57" }, "IsRequired": true, "IsApiVersion": true, @@ -621,16 +603,16 @@ "Kind": "Client" }, { - "$id": "76", + "$id": "74", "Name": "select", "NameInRequest": "select", "Description": "Select the specified fields to be included in the response.", "Type": { - "$id": "77", + "$id": "75", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "78", + "$id": "76", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -648,11 +630,11 @@ "Kind": "Method" }, { - "$id": "79", + "$id": "77", "Name": "expand", "NameInRequest": "expand", "Type": { - "$id": "80", + "$id": "78", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -668,11 +650,11 @@ "Kind": "Method" }, { - "$id": "81", + "$id": "79", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "82", + "$id": "80", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -687,9 +669,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "83", + "$id": "81", "Type": { - "$ref": "82" + "$ref": "80" }, "Value": "application/json" } @@ -697,7 +679,7 @@ ], "Responses": [ { - "$id": "84", + "$id": "82", "StatusCodes": [ 200 ], @@ -718,7 +700,7 @@ "Path": "/versioning/resources", "BufferResponse": true, "Paging": { - "$id": "85", + "$id": "83", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -726,25 +708,25 @@ "GenerateConvenienceMethod": true }, { - "$id": "86", + "$id": "84", "Name": "create", "ResourceName": "Resource", "Description": "Create or replace operation template.", "Parameters": [ { - "$id": "87", + "$id": "85", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "88", + "$id": "86", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "59" + "$ref": "57" }, "IsRequired": true, "IsApiVersion": true, @@ -756,11 +738,11 @@ "Kind": "Client" }, { - "$id": "89", + "$id": "87", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "90", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -776,7 +758,7 @@ "Kind": "Method" }, { - "$id": "91", + "$id": "89", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -794,11 +776,11 @@ "Kind": "Method" }, { - "$id": "92", + "$id": "90", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "93", + "$id": "91", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -813,19 +795,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "94", + "$id": "92", "Type": { - "$ref": "93" + "$ref": "91" }, "Value": "application/json" } }, { - "$id": "95", + "$id": "93", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "96", + "$id": "94", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -840,9 +822,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "97", + "$id": "95", "Type": { - "$ref": "96" + "$ref": "94" }, "Value": "application/json" } @@ -850,7 +832,7 @@ ], "Responses": [ { - "$id": "98", + "$id": "96", "StatusCodes": [ 201 ], @@ -865,7 +847,7 @@ ] }, { - "$id": "99", + "$id": "97", "StatusCodes": [ 200 ], @@ -893,7 +875,7 @@ } ], "Protocol": { - "$id": "100" + "$id": "98" }, "Creatable": false, "Parent": "SpecificClient" diff --git a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json index 9f4c0944c1d..7397611abb2 100644 --- a/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/sdk/newprojecttypespec/Azure.NewProject.TypeSpec/src/Generated/tspCodeModel.json @@ -332,86 +332,11 @@ "IsExtensible": true, "IsNullable": false, "Usage": "None" - }, - { - "$id": "46", - "Kind": "Enum", - "Name": "OAuth2FlowType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "47", - "Name": "authorizationCode", - "Value": "authorizationCode", - "Description": "authorization code flow" - }, - { - "$id": "48", - "Name": "implicit", - "Value": "implicit", - "Description": "implicit flow" - }, - { - "$id": "49", - "Name": "password", - "Value": "password", - "Description": "password flow" - }, - { - "$id": "50", - "Name": "clientCredentials", - "Value": "clientCredentials", - "Description": "client credential flow" - } - ], - "Namespace": "TypeSpec.Http", - "Description": "Describes the OAuth2 flow type", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "51", - "Kind": "Enum", - "Name": "AuthFlow_tokenUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "52", - "Name": "https://api.example.com/oauth2/token", - "Value": "https://api.example.com/oauth2/token", - "Description": "https://api.example.com/oauth2/token" - } - ], - "Namespace": "NewProjectTypeSpec", - "Description": "The AuthFlow_tokenUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "53", - "Kind": "Enum", - "Name": "AuthFlow_refreshUrl", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "54", - "Name": "https://api.example.com/oauth2/refresh", - "Value": "https://api.example.com/oauth2/refresh", - "Description": "https://api.example.com/oauth2/refresh" - } - ], - "Namespace": "NewProjectTypeSpec", - "Description": "The AuthFlow_refreshUrl", - "IsExtensible": true, - "IsNullable": false, - "Usage": "None" } ], "Models": [ { - "$id": "55", + "$id": "46", "Kind": "Model", "Name": "Thing", "Namespace": "NewProjectTypeSpec", @@ -420,12 +345,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "56", + "$id": "47", "Name": "name", "SerializedName": "name", "Description": "name of the Thing", "Type": { - "$id": "57", + "$id": "48", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -434,27 +359,27 @@ "IsReadOnly": false }, { - "$id": "58", + "$id": "49", "Name": "requiredUnion", "SerializedName": "requiredUnion", "Description": "required Union", "Type": { - "$id": "59", + "$id": "50", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "60", + "$id": "51", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "61", + "$id": "52", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "62", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -462,7 +387,7 @@ "IsNullable": false }, { - "$id": "63", + "$id": "54", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -474,12 +399,12 @@ "IsReadOnly": false }, { - "$id": "64", + "$id": "55", "Name": "requiredLiteralString", "SerializedName": "requiredLiteralString", "Description": "required literal string", "Type": { - "$id": "65", + "$id": "56", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -492,12 +417,12 @@ "IsReadOnly": false }, { - "$id": "66", + "$id": "57", "Name": "requiredLiteralInt", "SerializedName": "requiredLiteralInt", "Description": "required literal int", "Type": { - "$id": "67", + "$id": "58", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -510,12 +435,12 @@ "IsReadOnly": false }, { - "$id": "68", + "$id": "59", "Name": "requiredLiteralFloat", "SerializedName": "requiredLiteralFloat", "Description": "required literal float", "Type": { - "$id": "69", + "$id": "60", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -528,16 +453,16 @@ "IsReadOnly": false }, { - "$id": "70", + "$id": "61", "Name": "requiredLiteralBool", "SerializedName": "requiredLiteralBool", "Description": "required literal bool", "Type": { - "$id": "71", + "$id": "62", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "72", + "$id": "63", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -549,12 +474,12 @@ "IsReadOnly": false }, { - "$id": "73", + "$id": "64", "Name": "optionalLiteralString", "SerializedName": "optionalLiteralString", "Description": "optional literal string", "Type": { - "$id": "74", + "$id": "65", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -567,12 +492,12 @@ "IsReadOnly": false }, { - "$id": "75", + "$id": "66", "Name": "optionalLiteralInt", "SerializedName": "optionalLiteralInt", "Description": "optional literal int", "Type": { - "$id": "76", + "$id": "67", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -585,12 +510,12 @@ "IsReadOnly": false }, { - "$id": "77", + "$id": "68", "Name": "optionalLiteralFloat", "SerializedName": "optionalLiteralFloat", "Description": "optional literal float", "Type": { - "$id": "78", + "$id": "69", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -603,16 +528,16 @@ "IsReadOnly": false }, { - "$id": "79", + "$id": "70", "Name": "optionalLiteralBool", "SerializedName": "optionalLiteralBool", "Description": "optional literal bool", "Type": { - "$id": "80", + "$id": "71", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "81", + "$id": "72", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -624,12 +549,12 @@ "IsReadOnly": false }, { - "$id": "82", + "$id": "73", "Name": "requiredBadDescription", "SerializedName": "requiredBadDescription", "Description": "description with xml <|endoftext|>", "Type": { - "$id": "83", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -640,7 +565,7 @@ ] }, { - "$id": "84", + "$id": "75", "Kind": "Model", "Name": "Friend", "Namespace": "NewProjectTypeSpec", @@ -649,12 +574,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "85", + "$id": "76", "Name": "name", "SerializedName": "name", "Description": "name of the NotFriend", "Type": { - "$id": "86", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -665,7 +590,7 @@ ] }, { - "$id": "87", + "$id": "78", "Kind": "Model", "Name": "ModelWithFormat", "Namespace": "NewProjectTypeSpec", @@ -673,12 +598,12 @@ "Usage": "Input", "Properties": [ { - "$id": "88", + "$id": "79", "Name": "sourceUrl", "SerializedName": "sourceUrl", "Description": "url format", "Type": { - "$id": "89", + "$id": "80", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -687,12 +612,12 @@ "IsReadOnly": false }, { - "$id": "90", + "$id": "81", "Name": "guid", "SerializedName": "guid", "Description": "uuid format", "Type": { - "$id": "91", + "$id": "82", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -703,7 +628,7 @@ ] }, { - "$id": "92", + "$id": "83", "Kind": "Model", "Name": "RoundTripModel", "Namespace": "NewProjectTypeSpec", @@ -712,12 +637,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "93", + "$id": "84", "Name": "requiredString", "SerializedName": "requiredString", "Description": "Required string, illustrating a reference type property.", "Type": { - "$id": "94", + "$id": "85", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -726,12 +651,12 @@ "IsReadOnly": false }, { - "$id": "95", + "$id": "86", "Name": "requiredInt", "SerializedName": "requiredInt", "Description": "Required int, illustrating a value type property.", "Type": { - "$id": "96", + "$id": "87", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -740,12 +665,12 @@ "IsReadOnly": false }, { - "$id": "97", + "$id": "88", "Name": "requiredCollection", "SerializedName": "requiredCollection", "Description": "Required collection of enums", "Type": { - "$id": "98", + "$id": "89", "Kind": "Array", "Name": "Array", "ElementType": { @@ -757,16 +682,16 @@ "IsReadOnly": false }, { - "$id": "99", + "$id": "90", "Name": "requiredDictionary", "SerializedName": "requiredDictionary", "Description": "Required dictionary of enums", "Type": { - "$id": "100", + "$id": "91", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "101", + "$id": "92", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -780,18 +705,18 @@ "IsReadOnly": false }, { - "$id": "102", + "$id": "93", "Name": "requiredModel", "SerializedName": "requiredModel", "Description": "Required model", "Type": { - "$ref": "55" + "$ref": "46" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "103", + "$id": "94", "Name": "intExtensibleEnum", "SerializedName": "intExtensibleEnum", "Description": "this is an int based extensible enum", @@ -802,12 +727,12 @@ "IsReadOnly": false }, { - "$id": "104", + "$id": "95", "Name": "intExtensibleEnumCollection", "SerializedName": "intExtensibleEnumCollection", "Description": "this is a collection of int based extensible enum", "Type": { - "$id": "105", + "$id": "96", "Kind": "Array", "Name": "Array", "ElementType": { @@ -819,7 +744,7 @@ "IsReadOnly": false }, { - "$id": "106", + "$id": "97", "Name": "floatExtensibleEnum", "SerializedName": "floatExtensibleEnum", "Description": "this is a float based extensible enum", @@ -830,12 +755,12 @@ "IsReadOnly": false }, { - "$id": "107", + "$id": "98", "Name": "floatExtensibleEnumCollection", "SerializedName": "floatExtensibleEnumCollection", "Description": "this is a collection of float based extensible enum", "Type": { - "$id": "108", + "$id": "99", "Kind": "Array", "Name": "Array", "ElementType": { @@ -847,7 +772,7 @@ "IsReadOnly": false }, { - "$id": "109", + "$id": "100", "Name": "floatFixedEnum", "SerializedName": "floatFixedEnum", "Description": "this is a float based fixed enum", @@ -858,12 +783,12 @@ "IsReadOnly": false }, { - "$id": "110", + "$id": "101", "Name": "floatFixedEnumCollection", "SerializedName": "floatFixedEnumCollection", "Description": "this is a collection of float based fixed enum", "Type": { - "$id": "111", + "$id": "102", "Kind": "Array", "Name": "Array", "ElementType": { @@ -875,7 +800,7 @@ "IsReadOnly": false }, { - "$id": "112", + "$id": "103", "Name": "intFixedEnum", "SerializedName": "intFixedEnum", "Description": "this is a int based fixed enum", @@ -886,12 +811,12 @@ "IsReadOnly": false }, { - "$id": "113", + "$id": "104", "Name": "intFixedEnumCollection", "SerializedName": "intFixedEnumCollection", "Description": "this is a collection of int based fixed enum", "Type": { - "$id": "114", + "$id": "105", "Kind": "Array", "Name": "Array", "ElementType": { @@ -903,7 +828,7 @@ "IsReadOnly": false }, { - "$id": "115", + "$id": "106", "Name": "stringFixedEnum", "SerializedName": "stringFixedEnum", "Description": "this is a string based fixed enum", @@ -914,12 +839,12 @@ "IsReadOnly": false }, { - "$id": "116", + "$id": "107", "Name": "requiredUnknown", "SerializedName": "requiredUnknown", "Description": "required unknown", "Type": { - "$id": "117", + "$id": "108", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -928,12 +853,12 @@ "IsReadOnly": false }, { - "$id": "118", + "$id": "109", "Name": "optionalUnknown", "SerializedName": "optionalUnknown", "Description": "optional unknown", "Type": { - "$id": "119", + "$id": "110", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -942,22 +867,22 @@ "IsReadOnly": false }, { - "$id": "120", + "$id": "111", "Name": "requiredRecordUnknown", "SerializedName": "requiredRecordUnknown", "Description": "required record of unknown", "Type": { - "$id": "121", + "$id": "112", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "122", + "$id": "113", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "123", + "$id": "114", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -968,22 +893,22 @@ "IsReadOnly": false }, { - "$id": "124", + "$id": "115", "Name": "optionalRecordUnknown", "SerializedName": "optionalRecordUnknown", "Description": "optional record of unknown", "Type": { - "$id": "125", + "$id": "116", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "126", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "127", + "$id": "118", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -994,22 +919,22 @@ "IsReadOnly": false }, { - "$id": "128", + "$id": "119", "Name": "readOnlyRequiredRecordUnknown", "SerializedName": "readOnlyRequiredRecordUnknown", "Description": "required readonly record of unknown", "Type": { - "$id": "129", + "$id": "120", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "130", + "$id": "121", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "131", + "$id": "122", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1020,22 +945,22 @@ "IsReadOnly": true }, { - "$id": "132", + "$id": "123", "Name": "readOnlyOptionalRecordUnknown", "SerializedName": "readOnlyOptionalRecordUnknown", "Description": "optional readonly record of unknown", "Type": { - "$id": "133", + "$id": "124", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "134", + "$id": "125", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "135", + "$id": "126", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1046,105 +971,26 @@ "IsReadOnly": true } ] - }, - { - "$id": "136", - "Kind": "Model", - "Name": "AuthFlow", - "Namespace": "NewProjectTypeSpec", - "Description": "The auth flow model", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "137", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$id": "138", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "46" - }, - "Value": "clientCredentials", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "139", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "140", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "51" - }, - "Value": "https://api.example.com/oauth2/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "141", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "142", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "53" - }, - "Value": "https://api.example.com/oauth2/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "143", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "144", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "145", + "$id": "127", "Name": "NewProjectTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "146", + "$id": "128", "Name": "topAction", "ResourceName": "NewProjectTypeSpec", "Description": "top level method", "Parameters": [ { - "$id": "147", + "$id": "129", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "148", + "$id": "130", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1160,11 +1006,11 @@ "Kind": "Client" }, { - "$id": "149", + "$id": "131", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "150", + "$id": "132", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1180,11 +1026,11 @@ "Kind": "Method" }, { - "$id": "151", + "$id": "133", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "152", + "$id": "134", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1199,9 +1045,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "153", + "$id": "135", "Type": { - "$ref": "152" + "$ref": "134" }, "Value": "application/json" } @@ -1209,12 +1055,12 @@ ], "Responses": [ { - "$id": "154", + "$id": "136", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1233,20 +1079,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "155", + "$id": "137", "Name": "topAction2", "ResourceName": "NewProjectTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "156", + "$id": "138", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "157", + "$id": "139", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1261,9 +1107,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "158", + "$id": "140", "Type": { - "$ref": "157" + "$ref": "139" }, "Value": "application/json" } @@ -1271,12 +1117,12 @@ ], "Responses": [ { - "$id": "159", + "$id": "141", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1295,20 +1141,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "160", + "$id": "142", "Name": "patchAction", "ResourceName": "NewProjectTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "161", + "$id": "143", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -1321,11 +1167,11 @@ "Kind": "Method" }, { - "$id": "162", + "$id": "144", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "163", + "$id": "145", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1340,19 +1186,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "164", + "$id": "146", "Type": { - "$ref": "163" + "$ref": "145" }, "Value": "application/json" } }, { - "$id": "165", + "$id": "147", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "166", + "$id": "148", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1367,9 +1213,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "167", + "$id": "149", "Type": { - "$ref": "166" + "$ref": "148" }, "Value": "application/json" } @@ -1377,12 +1223,12 @@ ], "Responses": [ { - "$id": "168", + "$id": "150", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1404,21 +1250,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "169", + "$id": "151", "Name": "anonymousBody", "ResourceName": "NewProjectTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "170", + "$id": "152", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -1431,11 +1277,11 @@ "Kind": "Method" }, { - "$id": "171", + "$id": "153", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "172", + "$id": "154", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1450,19 +1296,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "173", + "$id": "155", "Type": { - "$ref": "172" + "$ref": "154" }, "Value": "application/json" } }, { - "$id": "174", + "$id": "156", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "175", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1477,9 +1323,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "176", + "$id": "158", "Type": { - "$ref": "175" + "$ref": "157" }, "Value": "application/json" } @@ -1487,12 +1333,12 @@ ], "Responses": [ { - "$id": "177", + "$id": "159", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1514,21 +1360,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "178", + "$id": "160", "Name": "friendlyModel", "ResourceName": "NewProjectTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "179", + "$id": "161", "Name": "Friend", "NameInRequest": "NotFriend", "Description": "this is not a friendly model but with a friendly name", "Type": { - "$ref": "84" + "$ref": "75" }, "Location": "Body", "IsRequired": true, @@ -1541,11 +1387,11 @@ "Kind": "Method" }, { - "$id": "180", + "$id": "162", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "181", + "$id": "163", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1560,19 +1406,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "182", + "$id": "164", "Type": { - "$ref": "181" + "$ref": "163" }, "Value": "application/json" } }, { - "$id": "183", + "$id": "165", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "184", + "$id": "166", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1587,9 +1433,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "185", + "$id": "167", "Type": { - "$ref": "184" + "$ref": "166" }, "Value": "application/json" } @@ -1597,12 +1443,12 @@ ], "Responses": [ { - "$id": "186", + "$id": "168", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "84" + "$ref": "75" }, "BodyMediaType": "Json", "Headers": [], @@ -1624,19 +1470,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "187", + "$id": "169", "Name": "addTimeHeader", "ResourceName": "NewProjectTypeSpec", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "188", + "$id": "170", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "189", + "$id": "171", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1652,11 +1498,11 @@ "Kind": "Method" }, { - "$id": "190", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "191", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1671,9 +1517,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "192", + "$id": "174", "Type": { - "$ref": "191" + "$ref": "173" }, "Value": "application/json" } @@ -1681,7 +1527,7 @@ ], "Responses": [ { - "$id": "193", + "$id": "175", "StatusCodes": [ 204 ], @@ -1699,20 +1545,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "194", + "$id": "176", "Name": "stringFormat", "ResourceName": "NewProjectTypeSpec", "Description": "paramete has string format.", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "195", + "$id": "177", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "196", + "$id": "178", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -1728,11 +1574,11 @@ "Kind": "Method" }, { - "$id": "197", + "$id": "179", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "87" + "$ref": "78" }, "Location": "Body", "IsRequired": true, @@ -1745,11 +1591,11 @@ "Kind": "Method" }, { - "$id": "198", + "$id": "180", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "199", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1764,19 +1610,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "200", + "$id": "182", "Type": { - "$ref": "199" + "$ref": "181" }, "Value": "application/json" } }, { - "$id": "201", + "$id": "183", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "184", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1791,9 +1637,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "185", "Type": { - "$ref": "202" + "$ref": "184" }, "Value": "application/json" } @@ -1801,7 +1647,7 @@ ], "Responses": [ { - "$id": "204", + "$id": "186", "StatusCodes": [ 204 ], @@ -1823,41 +1669,41 @@ } ], "Protocol": { - "$id": "205" + "$id": "187" }, "Creatable": true }, { - "$id": "206", + "$id": "188", "Name": "Hello", "Description": "", "Operations": [], "Protocol": { - "$id": "207" + "$id": "189" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" }, { - "$id": "208", + "$id": "190", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "209", + "$id": "191", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "210", + "$id": "192", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "211", + "$id": "193", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1873,11 +1719,11 @@ "Kind": "Method" }, { - "$id": "212", + "$id": "194", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "213", + "$id": "195", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1893,11 +1739,11 @@ "Kind": "Method" }, { - "$id": "214", + "$id": "196", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "215", + "$id": "197", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1913,11 +1759,11 @@ "Kind": "Method" }, { - "$id": "216", + "$id": "198", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "217", + "$id": "199", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1932,9 +1778,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "218", + "$id": "200", "Type": { - "$ref": "217" + "$ref": "199" }, "Value": "application/json" } @@ -1942,12 +1788,12 @@ ], "Responses": [ { - "$id": "219", + "$id": "201", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1967,31 +1813,31 @@ } ], "Protocol": { - "$id": "220" + "$id": "202" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "221", + "$id": "203", "Name": "HelloDemo2", "Description": "", "Operations": [ { - "$id": "222", + "$id": "204", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "223", + "$id": "205", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "224", + "$id": "206", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2007,15 +1853,15 @@ "Kind": "Method" }, { - "$id": "225", + "$id": "207", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "226", + "$id": "208", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "227", + "$id": "209", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2025,9 +1871,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "228", + "$id": "210", "Type": { - "$ref": "226" + "$ref": "208" }, "Value": "text/plain" }, @@ -2041,11 +1887,11 @@ "Kind": "Constant" }, { - "$id": "229", + "$id": "211", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "230", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2061,11 +1907,11 @@ "Kind": "Method" }, { - "$id": "231", + "$id": "213", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "92" + "$ref": "83" }, "Location": "Body", "IsRequired": true, @@ -2078,11 +1924,11 @@ "Kind": "Method" }, { - "$id": "232", + "$id": "214", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "233", + "$id": "215", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2097,9 +1943,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "234", + "$id": "216", "Type": { - "$ref": "233" + "$ref": "215" }, "Value": "application/json" } @@ -2107,12 +1953,12 @@ ], "Responses": [ { - "$id": "235", + "$id": "217", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "92" + "$ref": "83" }, "BodyMediaType": "Json", "Headers": [], @@ -2134,20 +1980,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "236", + "$id": "218", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "237", + "$id": "219", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "238", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2163,11 +2009,11 @@ "Kind": "Method" }, { - "$id": "239", + "$id": "221", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "240", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2183,11 +2029,11 @@ "Kind": "Method" }, { - "$id": "241", + "$id": "223", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "92" + "$ref": "83" }, "Location": "Body", "IsRequired": true, @@ -2200,11 +2046,11 @@ "Kind": "Method" }, { - "$id": "242", + "$id": "224", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "243", + "$id": "225", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2219,19 +2065,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "244", + "$id": "226", "Type": { - "$ref": "243" + "$ref": "225" }, "Value": "application/json" } }, { - "$id": "245", + "$id": "227", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "246", + "$id": "228", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2246,9 +2092,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "247", + "$id": "229", "Type": { - "$ref": "246" + "$ref": "228" }, "Value": "application/json" } @@ -2256,12 +2102,12 @@ ], "Responses": [ { - "$id": "248", + "$id": "230", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "92" + "$ref": "83" }, "BodyMediaType": "Json", "Headers": [], @@ -2283,20 +2129,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "249", + "$id": "231", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "250", + "$id": "232", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2309,11 +2155,11 @@ "Kind": "Method" }, { - "$id": "251", + "$id": "233", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "252", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2328,19 +2174,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "253", + "$id": "235", "Type": { - "$ref": "252" + "$ref": "234" }, "Value": "application/json" } }, { - "$id": "254", + "$id": "236", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "255", + "$id": "237", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2355,9 +2201,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "238", "Type": { - "$ref": "255" + "$ref": "237" }, "Value": "application/json" } @@ -2365,12 +2211,12 @@ ], "Responses": [ { - "$id": "257", + "$id": "239", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2392,24 +2238,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "258", + "$id": "240", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "259", + "$id": "241", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "260", + "$id": "242", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "261", + "$id": "243", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2419,9 +2265,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "262", + "$id": "244", "Type": { - "$ref": "260" + "$ref": "242" }, "Value": "test" }, @@ -2435,15 +2281,15 @@ "Kind": "Constant" }, { - "$id": "263", + "$id": "245", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "264", + "$id": "246", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "265", + "$id": "247", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -2453,9 +2299,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "266", + "$id": "248", "Type": { - "$ref": "264" + "$ref": "246" }, "Value": 123 }, @@ -2469,15 +2315,15 @@ "Kind": "Constant" }, { - "$id": "267", + "$id": "249", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "268", + "$id": "250", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "269", + "$id": "251", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2487,9 +2333,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "270", + "$id": "252", "Type": { - "$ref": "268" + "$ref": "250" }, "Value": true }, @@ -2503,11 +2349,11 @@ "Kind": "Constant" }, { - "$id": "271", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "272", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2522,9 +2368,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "255", "Type": { - "$ref": "272" + "$ref": "254" }, "Value": "application/json" } @@ -2532,12 +2378,12 @@ ], "Responses": [ { - "$id": "274", + "$id": "256", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2557,27 +2403,27 @@ } ], "Protocol": { - "$id": "275" + "$id": "257" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "276", + "$id": "258", "Name": "EnumTest", "Description": "", "Operations": [ { - "$id": "277", + "$id": "259", "Name": "getUnknownValue", "ResourceName": "EnumTest", "Description": "create extensible enum", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "278", + "$id": "260", "Name": "input", "NameInRequest": "input", "Type": { @@ -2594,11 +2440,11 @@ "Kind": "Method" }, { - "$id": "279", + "$id": "261", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "280", + "$id": "262", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2613,19 +2459,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "281", + "$id": "263", "Type": { - "$ref": "280" + "$ref": "262" }, "Value": "application/json" } }, { - "$id": "282", + "$id": "264", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "283", + "$id": "265", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2640,9 +2486,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "284", + "$id": "266", "Type": { - "$ref": "283" + "$ref": "265" }, "Value": "application/json" } @@ -2650,7 +2496,7 @@ ], "Responses": [ { - "$id": "285", + "$id": "267", "StatusCodes": [ 204 ], @@ -2672,31 +2518,31 @@ } ], "Protocol": { - "$id": "286" + "$id": "268" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" }, { - "$id": "287", + "$id": "269", "Name": "ProtocolAndConvenient", "Description": "", "Operations": [ { - "$id": "288", + "$id": "270", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "289", + "$id": "271", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2709,11 +2555,11 @@ "Kind": "Method" }, { - "$id": "290", + "$id": "272", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "291", + "$id": "273", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2728,19 +2574,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "274", "Type": { - "$ref": "291" + "$ref": "273" }, "Value": "application/json" } }, { - "$id": "293", + "$id": "275", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "294", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2755,9 +2601,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "295", + "$id": "277", "Type": { - "$ref": "294" + "$ref": "276" }, "Value": "application/json" } @@ -2765,12 +2611,12 @@ ], "Responses": [ { - "$id": "296", + "$id": "278", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2792,20 +2638,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "297", + "$id": "279", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Parameters": [ { - "$ref": "147" + "$ref": "129" }, { - "$id": "298", + "$id": "280", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "299", + "$id": "281", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2820,9 +2666,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "300", + "$id": "282", "Type": { - "$ref": "299" + "$ref": "281" }, "Value": "application/json" } @@ -2830,7 +2676,7 @@ ], "Responses": [ { - "$id": "301", + "$id": "283", "StatusCodes": [ 204 ], @@ -2849,20 +2695,20 @@ } ], "Protocol": { - "$id": "302" + "$id": "284" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" } ], "Auth": { - "$id": "303", + "$id": "285", "ApiKey": { - "$id": "304", + "$id": "286", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "305", + "$id": "287", "Scopes": [ "https://api.example.com/.default" ] diff --git a/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json index cd897dd8a5e..b76fd0f2959 100644 --- a/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json @@ -123,67 +123,11 @@ { "$id": "14", "Kind": "Enum", - "Name": "StringExtensibleEnum", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "15", - "Name": "One", - "Value": "1" - }, - { - "$id": "16", - "Name": "Two", - "Value": "2" - }, - { - "$id": "17", - "Name": "Four", - "Value": "4" - } - ], - "Namespace": "", - "Description": "Extensible enum", - "IsExtensible": true, - "IsNullable": true, - "Usage": "None" - }, - { - "$id": "18", - "Kind": "Enum", - "Name": "StringFixedEnum", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "19", - "Name": "One", - "Value": "1" - }, - { - "$id": "20", - "Name": "Two", - "Value": "2" - }, - { - "$id": "21", - "Name": "Four", - "Value": "4" - } - ], - "Namespace": "", - "Description": "Simple enum", - "IsExtensible": false, - "IsNullable": true, - "Usage": "None" - }, - { - "$id": "22", - "Kind": "Enum", "Name": "Versions", "EnumValueType": "String", "AllowedValues": [ { - "$id": "23", + "$id": "15", "Name": "2022-05-15-preview", "Value": "2022-05-15-preview" } @@ -192,67 +136,11 @@ "IsExtensible": false, "IsNullable": false, "Usage": "None" - }, - { - "$id": "24", - "Kind": "Enum", - "Name": "FloatFixedEnum", - "EnumValueType": "Float32", - "AllowedValues": [ - { - "$id": "25", - "Name": "One", - "Value": 1.1 - }, - { - "$id": "26", - "Name": "Two", - "Value": 2.2 - }, - { - "$id": "27", - "Name": "Four", - "Value": 4.4 - } - ], - "Namespace": "CustomizedTypeSpec", - "Description": "float fixed enum", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "28", - "Kind": "Enum", - "Name": "IntFixedEnum", - "EnumValueType": "Int32", - "AllowedValues": [ - { - "$id": "29", - "Name": "One", - "Value": 1 - }, - { - "$id": "30", - "Name": "Two", - "Value": 2 - }, - { - "$id": "31", - "Name": "Four", - "Value": 4 - } - ], - "Namespace": "CustomizedTypeSpec", - "Description": "int fixed enum", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" } ], "Models": [ { - "$id": "32", + "$id": "16", "Kind": "Model", "Name": "Thing", "Namespace": "CustomizedTypeSpec", @@ -261,12 +149,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "33", + "$id": "17", "Name": "name", "SerializedName": "name", "Description": "name of the Thing", "Type": { - "$id": "34", + "$id": "18", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -275,27 +163,27 @@ "IsReadOnly": false }, { - "$id": "35", + "$id": "19", "Name": "requiredUnion", "SerializedName": "requiredUnion", "Description": "required Union", "Type": { - "$id": "36", + "$id": "20", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "37", + "$id": "21", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "38", + "$id": "22", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "39", + "$id": "23", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -303,7 +191,7 @@ "IsNullable": false }, { - "$id": "40", + "$id": "24", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -315,12 +203,12 @@ "IsReadOnly": false }, { - "$id": "41", + "$id": "25", "Name": "requiredLiteralString", "SerializedName": "requiredLiteralString", "Description": "required literal string", "Type": { - "$id": "42", + "$id": "26", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -333,12 +221,12 @@ "IsReadOnly": false }, { - "$id": "43", + "$id": "27", "Name": "requiredLiteralInt", "SerializedName": "requiredLiteralInt", "Description": "required literal int", "Type": { - "$id": "44", + "$id": "28", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -351,12 +239,12 @@ "IsReadOnly": false }, { - "$id": "45", + "$id": "29", "Name": "requiredLiteralFloat", "SerializedName": "requiredLiteralFloat", "Description": "required literal float", "Type": { - "$id": "46", + "$id": "30", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -369,16 +257,16 @@ "IsReadOnly": false }, { - "$id": "47", + "$id": "31", "Name": "requiredLiteralBool", "SerializedName": "requiredLiteralBool", "Description": "required literal bool", "Type": { - "$id": "48", + "$id": "32", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "49", + "$id": "33", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -390,12 +278,12 @@ "IsReadOnly": false }, { - "$id": "50", + "$id": "34", "Name": "optionalLiteralString", "SerializedName": "optionalLiteralString", "Description": "optional literal string", "Type": { - "$id": "51", + "$id": "35", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -408,12 +296,12 @@ "IsReadOnly": false }, { - "$id": "52", + "$id": "36", "Name": "optionalLiteralInt", "SerializedName": "optionalLiteralInt", "Description": "optional literal int", "Type": { - "$id": "53", + "$id": "37", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -426,12 +314,12 @@ "IsReadOnly": false }, { - "$id": "54", + "$id": "38", "Name": "optionalLiteralFloat", "SerializedName": "optionalLiteralFloat", "Description": "optional literal float", "Type": { - "$id": "55", + "$id": "39", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -444,16 +332,16 @@ "IsReadOnly": false }, { - "$id": "56", + "$id": "40", "Name": "optionalLiteralBool", "SerializedName": "optionalLiteralBool", "Description": "optional literal bool", "Type": { - "$id": "57", + "$id": "41", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "58", + "$id": "42", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -465,12 +353,12 @@ "IsReadOnly": false }, { - "$id": "59", + "$id": "43", "Name": "requiredBadDescription", "SerializedName": "requiredBadDescription", "Description": "description with xml <|endoftext|>", "Type": { - "$id": "60", + "$id": "44", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -479,16 +367,16 @@ "IsReadOnly": false }, { - "$id": "61", + "$id": "45", "Name": "optionalNullableList", "SerializedName": "optionalNullableList", "Description": "optional nullable collection", "Type": { - "$id": "62", + "$id": "46", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "63", + "$id": "47", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -499,16 +387,16 @@ "IsReadOnly": false }, { - "$id": "64", + "$id": "48", "Name": "requiredNullableList", "SerializedName": "requiredNullableList", "Description": "required nullable collection", "Type": { - "$id": "65", + "$id": "49", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "66", + "$id": "50", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -521,7 +409,7 @@ ] }, { - "$id": "67", + "$id": "51", "Kind": "Model", "Name": "RoundTripModel", "Namespace": "CustomizedTypeSpec", @@ -530,12 +418,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "68", + "$id": "52", "Name": "requiredString", "SerializedName": "requiredString", "Description": "Required string, illustrating a reference type property.", "Type": { - "$id": "69", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -544,12 +432,12 @@ "IsReadOnly": false }, { - "$id": "70", + "$id": "54", "Name": "requiredInt", "SerializedName": "requiredInt", "Description": "Required int, illustrating a value type property.", "Type": { - "$id": "71", + "$id": "55", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -560,7 +448,7 @@ ] }, { - "$id": "72", + "$id": "56", "Kind": "Model", "Name": "Friend", "Namespace": "CustomizedTypeSpec", @@ -569,12 +457,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "73", + "$id": "57", "Name": "name", "SerializedName": "name", "Description": "name of the NotFriend", "Type": { - "$id": "74", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -585,7 +473,7 @@ ] }, { - "$id": "75", + "$id": "59", "Kind": "Model", "Name": "ModelWithFormat", "Namespace": "CustomizedTypeSpec", @@ -593,12 +481,12 @@ "Usage": "Input", "Properties": [ { - "$id": "76", + "$id": "60", "Name": "sourceUrl", "SerializedName": "sourceUrl", "Description": "url format", "Type": { - "$id": "77", + "$id": "61", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -607,12 +495,12 @@ "IsReadOnly": false }, { - "$id": "78", + "$id": "62", "Name": "guid", "SerializedName": "guid", "Description": "uuid format", "Type": { - "$id": "79", + "$id": "63", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -623,7 +511,7 @@ ] }, { - "$id": "80", + "$id": "64", "Kind": "Model", "Name": "ProjectedModel", "Namespace": "CustomizedTypeSpec", @@ -632,12 +520,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "81", + "$id": "65", "Name": "name", "SerializedName": "name", "Description": "name of the ModelWithProjectedName", "Type": { - "$id": "82", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -648,80 +536,33 @@ ] }, { - "$id": "83", + "$id": "67", "Kind": "Model", "Name": "ReturnsAnonymousModelResponse", "Namespace": "CustomizedTypeSpec", "IsNullable": false, "Usage": "Output", "Properties": [] - }, - { - "$id": "84", - "Kind": "Model", - "Name": "ModelWithRequiredNullableProperties", - "Namespace": "CustomizedTypeSpec", - "Description": "A model with a few required nullable properties", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "85", - "Name": "requiredNullablePrimitive", - "SerializedName": "requiredNullablePrimitive", - "Description": "required nullable primitive type", - "Type": { - "$id": "86", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": true - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "87", - "Name": "requiredExtensibleEnum", - "SerializedName": "requiredExtensibleEnum", - "Description": "required nullable extensible enum type", - "Type": { - "$ref": "14" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "88", - "Name": "requiredFixedEnum", - "SerializedName": "requiredFixedEnum", - "Description": "required nullable fixed enum type", - "Type": { - "$ref": "18" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "89", + "$id": "68", "Name": "CustomizedTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "90", + "$id": "69", "Name": "sayHi", "ResourceName": "CustomizedTypeSpec", "Description": "Return hi", "Parameters": [ { - "$id": "91", + "$id": "70", "Name": "unbrandedTypeSpecUrl", "NameInRequest": "unbrandedTypeSpecUrl", "Type": { - "$id": "92", + "$id": "71", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -737,11 +578,11 @@ "Kind": "Client" }, { - "$id": "93", + "$id": "72", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "94", + "$id": "73", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -757,11 +598,11 @@ "Kind": "Method" }, { - "$id": "95", + "$id": "74", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "96", + "$id": "75", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -777,11 +618,11 @@ "Kind": "Method" }, { - "$id": "97", + "$id": "76", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "98", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -797,11 +638,11 @@ "Kind": "Method" }, { - "$id": "99", + "$id": "78", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "100", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -816,9 +657,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "101", + "$id": "80", "Type": { - "$ref": "100" + "$ref": "79" }, "Value": "application/json" } @@ -826,12 +667,12 @@ ], "Responses": [ { - "$id": "102", + "$id": "81", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -850,20 +691,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "103", + "$id": "82", "Name": "helloAgain", "ResourceName": "CustomizedTypeSpec", "Description": "Return hi again", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "104", + "$id": "83", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "105", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -879,15 +720,15 @@ "Kind": "Method" }, { - "$id": "106", + "$id": "85", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "107", + "$id": "86", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "108", + "$id": "87", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -897,9 +738,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "109", + "$id": "88", "Type": { - "$ref": "107" + "$ref": "86" }, "Value": "text/plain" }, @@ -913,11 +754,11 @@ "Kind": "Constant" }, { - "$id": "110", + "$id": "89", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "111", + "$id": "90", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -933,11 +774,11 @@ "Kind": "Method" }, { - "$id": "112", + "$id": "91", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "67" + "$ref": "51" }, "Location": "Body", "IsRequired": true, @@ -950,11 +791,11 @@ "Kind": "Method" }, { - "$id": "113", + "$id": "92", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "114", + "$id": "93", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -969,9 +810,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "115", + "$id": "94", "Type": { - "$ref": "114" + "$ref": "93" }, "Value": "application/json" } @@ -979,12 +820,12 @@ ], "Responses": [ { - "$id": "116", + "$id": "95", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "67" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -1006,20 +847,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "117", + "$id": "96", "Name": "noContentType", "ResourceName": "CustomizedTypeSpec", "Description": "Return hi again", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "118", + "$id": "97", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "119", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1035,11 +876,11 @@ "Kind": "Method" }, { - "$id": "120", + "$id": "99", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "121", + "$id": "100", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1055,11 +896,11 @@ "Kind": "Method" }, { - "$id": "122", + "$id": "101", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "67" + "$ref": "51" }, "Location": "Body", "IsRequired": true, @@ -1072,11 +913,11 @@ "Kind": "Method" }, { - "$id": "123", + "$id": "102", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "124", + "$id": "103", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1091,19 +932,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "125", + "$id": "104", "Type": { - "$ref": "124" + "$ref": "103" }, "Value": "application/json" } }, { - "$id": "126", + "$id": "105", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "127", + "$id": "106", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1118,9 +959,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "128", + "$id": "107", "Type": { - "$ref": "127" + "$ref": "106" }, "Value": "application/json" } @@ -1128,12 +969,12 @@ ], "Responses": [ { - "$id": "129", + "$id": "108", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "67" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -1155,20 +996,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "130", + "$id": "109", "Name": "helloDemo2", "ResourceName": "CustomizedTypeSpec", "Description": "Return hi in demo2", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "131", + "$id": "110", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "132", + "$id": "111", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1183,9 +1024,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "133", + "$id": "112", "Type": { - "$ref": "132" + "$ref": "111" }, "Value": "application/json" } @@ -1193,12 +1034,12 @@ ], "Responses": [ { - "$id": "134", + "$id": "113", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1217,20 +1058,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "135", + "$id": "114", "Name": "createLiteral", "ResourceName": "CustomizedTypeSpec", "Description": "Create with literal value", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "136", + "$id": "115", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "32" + "$ref": "16" }, "Location": "Body", "IsRequired": true, @@ -1243,11 +1084,11 @@ "Kind": "Method" }, { - "$id": "137", + "$id": "116", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "138", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1262,19 +1103,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "139", + "$id": "118", "Type": { - "$ref": "138" + "$ref": "117" }, "Value": "application/json" } }, { - "$id": "140", + "$id": "119", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "141", + "$id": "120", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1289,9 +1130,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "142", + "$id": "121", "Type": { - "$ref": "141" + "$ref": "120" }, "Value": "application/json" } @@ -1299,12 +1140,12 @@ ], "Responses": [ { - "$id": "143", + "$id": "122", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1326,24 +1167,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "144", + "$id": "123", "Name": "helloLiteral", "ResourceName": "CustomizedTypeSpec", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "145", + "$id": "124", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "146", + "$id": "125", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "147", + "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1353,9 +1194,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "148", + "$id": "127", "Type": { - "$ref": "146" + "$ref": "125" }, "Value": "test" }, @@ -1369,15 +1210,15 @@ "Kind": "Constant" }, { - "$id": "149", + "$id": "128", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "150", + "$id": "129", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "151", + "$id": "130", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1387,9 +1228,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "152", + "$id": "131", "Type": { - "$ref": "150" + "$ref": "129" }, "Value": 123 }, @@ -1403,15 +1244,15 @@ "Kind": "Constant" }, { - "$id": "153", + "$id": "132", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "154", + "$id": "133", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "155", + "$id": "134", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1421,9 +1262,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "156", + "$id": "135", "Type": { - "$ref": "154" + "$ref": "133" }, "Value": true }, @@ -1437,11 +1278,11 @@ "Kind": "Constant" }, { - "$id": "157", + "$id": "136", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "158", + "$id": "137", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1456,9 +1297,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "159", + "$id": "138", "Type": { - "$ref": "158" + "$ref": "137" }, "Value": "application/json" } @@ -1466,12 +1307,12 @@ ], "Responses": [ { - "$id": "160", + "$id": "139", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1490,20 +1331,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "161", + "$id": "140", "Name": "topAction", "ResourceName": "CustomizedTypeSpec", "Description": "top level method", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "162", + "$id": "141", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "163", + "$id": "142", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1519,11 +1360,11 @@ "Kind": "Method" }, { - "$id": "164", + "$id": "143", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "165", + "$id": "144", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1538,9 +1379,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "166", + "$id": "145", "Type": { - "$ref": "165" + "$ref": "144" }, "Value": "application/json" } @@ -1548,12 +1389,12 @@ ], "Responses": [ { - "$id": "167", + "$id": "146", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1572,20 +1413,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "168", + "$id": "147", "Name": "topAction2", "ResourceName": "CustomizedTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "169", + "$id": "148", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "170", + "$id": "149", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1600,9 +1441,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "171", + "$id": "150", "Type": { - "$ref": "170" + "$ref": "149" }, "Value": "application/json" } @@ -1610,12 +1451,12 @@ ], "Responses": [ { - "$id": "172", + "$id": "151", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1634,20 +1475,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "173", + "$id": "152", "Name": "patchAction", "ResourceName": "CustomizedTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "174", + "$id": "153", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "32" + "$ref": "16" }, "Location": "Body", "IsRequired": true, @@ -1660,11 +1501,11 @@ "Kind": "Method" }, { - "$id": "175", + "$id": "154", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "176", + "$id": "155", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1679,19 +1520,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "177", + "$id": "156", "Type": { - "$ref": "176" + "$ref": "155" }, "Value": "application/json" } }, { - "$id": "178", + "$id": "157", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "179", + "$id": "158", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1706,9 +1547,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "180", + "$id": "159", "Type": { - "$ref": "179" + "$ref": "158" }, "Value": "application/json" } @@ -1716,12 +1557,12 @@ ], "Responses": [ { - "$id": "181", + "$id": "160", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1743,21 +1584,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "182", + "$id": "161", "Name": "anonymousBody", "ResourceName": "CustomizedTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "183", + "$id": "162", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", "Type": { - "$ref": "32" + "$ref": "16" }, "Location": "Body", "IsRequired": true, @@ -1770,11 +1611,11 @@ "Kind": "Method" }, { - "$id": "184", + "$id": "163", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "185", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1789,19 +1630,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "186", + "$id": "165", "Type": { - "$ref": "185" + "$ref": "164" }, "Value": "application/json" } }, { - "$id": "187", + "$id": "166", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "188", + "$id": "167", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1816,9 +1657,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "189", + "$id": "168", "Type": { - "$ref": "188" + "$ref": "167" }, "Value": "application/json" } @@ -1826,12 +1667,12 @@ ], "Responses": [ { - "$id": "190", + "$id": "169", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1853,21 +1694,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "191", + "$id": "170", "Name": "friendlyModel", "ResourceName": "CustomizedTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "192", + "$id": "171", "Name": "Friend", "NameInRequest": "NotFriend", "Description": "this is not a friendly model but with a friendly name", "Type": { - "$ref": "72" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -1880,11 +1721,11 @@ "Kind": "Method" }, { - "$id": "193", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "194", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1899,19 +1740,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "195", + "$id": "174", "Type": { - "$ref": "194" + "$ref": "173" }, "Value": "application/json" } }, { - "$id": "196", + "$id": "175", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "197", + "$id": "176", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1926,9 +1767,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "198", + "$id": "177", "Type": { - "$ref": "197" + "$ref": "176" }, "Value": "application/json" } @@ -1936,12 +1777,12 @@ ], "Responses": [ { - "$id": "199", + "$id": "178", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "72" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1963,19 +1804,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "200", + "$id": "179", "Name": "addTimeHeader", "ResourceName": "CustomizedTypeSpec", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "201", + "$id": "180", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "202", + "$id": "181", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1991,11 +1832,11 @@ "Kind": "Method" }, { - "$id": "203", + "$id": "182", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "204", + "$id": "183", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2010,9 +1851,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "205", + "$id": "184", "Type": { - "$ref": "204" + "$ref": "183" }, "Value": "application/json" } @@ -2020,7 +1861,7 @@ ], "Responses": [ { - "$id": "206", + "$id": "185", "StatusCodes": [ 204 ], @@ -2038,20 +1879,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "207", + "$id": "186", "Name": "stringFormat", "ResourceName": "CustomizedTypeSpec", "Description": "parameter has string format.", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "208", + "$id": "187", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "209", + "$id": "188", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -2067,11 +1908,11 @@ "Kind": "Method" }, { - "$id": "210", + "$id": "189", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "75" + "$ref": "59" }, "Location": "Body", "IsRequired": true, @@ -2084,11 +1925,11 @@ "Kind": "Method" }, { - "$id": "211", + "$id": "190", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "212", + "$id": "191", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2103,19 +1944,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "213", + "$id": "192", "Type": { - "$ref": "212" + "$ref": "191" }, "Value": "application/json" } }, { - "$id": "214", + "$id": "193", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "215", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2130,9 +1971,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "216", + "$id": "195", "Type": { - "$ref": "215" + "$ref": "194" }, "Value": "application/json" } @@ -2140,7 +1981,7 @@ ], "Responses": [ { - "$id": "217", + "$id": "196", "StatusCodes": [ 204 ], @@ -2161,21 +2002,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "218", + "$id": "197", "Name": "projectedNameModel", "ResourceName": "CustomizedTypeSpec", "Description": "Model can have its projected name", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "219", + "$id": "198", "Name": "ProjectedModel", "NameInRequest": "ModelWithProjectedName", "Description": "this is a model with a projected name", "Type": { - "$ref": "80" + "$ref": "64" }, "Location": "Body", "IsRequired": true, @@ -2188,11 +2029,11 @@ "Kind": "Method" }, { - "$id": "220", + "$id": "199", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "221", + "$id": "200", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2207,19 +2048,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "222", + "$id": "201", "Type": { - "$ref": "221" + "$ref": "200" }, "Value": "application/json" } }, { - "$id": "223", + "$id": "202", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "224", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2234,9 +2075,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "225", + "$id": "204", "Type": { - "$ref": "224" + "$ref": "203" }, "Value": "application/json" } @@ -2244,12 +2085,12 @@ ], "Responses": [ { - "$id": "226", + "$id": "205", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "80" + "$ref": "64" }, "BodyMediaType": "Json", "Headers": [], @@ -2271,20 +2112,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "227", + "$id": "206", "Name": "returnsAnonymousModel", "ResourceName": "CustomizedTypeSpec", "Description": "return anonymous model", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "228", + "$id": "207", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "229", + "$id": "208", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2299,9 +2140,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "230", + "$id": "209", "Type": { - "$ref": "229" + "$ref": "208" }, "Value": "application/json" } @@ -2309,12 +2150,12 @@ ], "Responses": [ { - "$id": "231", + "$id": "210", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "83" + "$ref": "67" }, "BodyMediaType": "Json", "Headers": [], @@ -2333,20 +2174,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "232", + "$id": "211", "Name": "getUnknownValue", "ResourceName": "CustomizedTypeSpec", "Description": "get extensible enum", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "233", + "$id": "212", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "234", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2361,9 +2202,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "235", + "$id": "214", "Type": { - "$ref": "234" + "$ref": "213" }, "Value": "application/json" } @@ -2371,12 +2212,12 @@ ], "Responses": [ { - "$id": "236", + "$id": "215", "StatusCodes": [ 200 ], "BodyType": { - "$id": "237", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2398,20 +2239,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "238", + "$id": "217", "Name": "internalProtocol", "ResourceName": "CustomizedTypeSpec", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "239", + "$id": "218", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "32" + "$ref": "16" }, "Location": "Body", "IsRequired": true, @@ -2424,11 +2265,11 @@ "Kind": "Method" }, { - "$id": "240", + "$id": "219", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "241", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2443,19 +2284,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "242", + "$id": "221", "Type": { - "$ref": "241" + "$ref": "220" }, "Value": "application/json" } }, { - "$id": "243", + "$id": "222", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "244", + "$id": "223", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2470,9 +2311,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "245", + "$id": "224", "Type": { - "$ref": "244" + "$ref": "223" }, "Value": "application/json" } @@ -2480,12 +2321,12 @@ ], "Responses": [ { - "$id": "246", + "$id": "225", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "32" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -2507,20 +2348,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "247", + "$id": "226", "Name": "stillConvenient", "ResourceName": "CustomizedTypeSpec", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "248", + "$id": "227", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "249", + "$id": "228", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2535,9 +2376,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "250", + "$id": "229", "Type": { - "$ref": "249" + "$ref": "228" }, "Value": "application/json" } @@ -2545,7 +2386,7 @@ ], "Responses": [ { - "$id": "251", + "$id": "230", "StatusCodes": [ 204 ], @@ -2563,20 +2404,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "252", + "$id": "231", "Name": "headAsBoolean", "ResourceName": "CustomizedTypeSpec", "Description": "head as boolean.", "Parameters": [ { - "$ref": "91" + "$ref": "70" }, { - "$id": "253", + "$id": "232", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "254", + "$id": "233", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2592,11 +2433,11 @@ "Kind": "Method" }, { - "$id": "255", + "$id": "234", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "256", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2611,9 +2452,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "257", + "$id": "236", "Type": { - "$ref": "256" + "$ref": "235" }, "Value": "application/json" } @@ -2621,7 +2462,7 @@ ], "Responses": [ { - "$id": "258", + "$id": "237", "StatusCodes": [ 204 ], @@ -2640,15 +2481,15 @@ } ], "Protocol": { - "$id": "259" + "$id": "238" }, "Creatable": true } ], "Auth": { - "$id": "260", + "$id": "239", "ApiKey": { - "$id": "261", + "$id": "240", "Name": "my-api-key" } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json index 8a2c4be9121..7d2890bddb5 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json @@ -830,33 +830,11 @@ "IsExtensible": true, "IsNullable": false, "Usage": "Input" - }, - { - "$id": "124", - "Kind": "Enum", - "Name": "FineTuningEventType", - "EnumValueType": "String", - "AllowedValues": [ - { - "$id": "125", - "Name": "message", - "Value": "message" - }, - { - "$id": "126", - "Name": "metrics", - "Value": "metrics" - } - ], - "Namespace": "", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" } ], "Models": [ { - "$id": "127", + "$id": "124", "Kind": "Model", "Name": "CreateTranscriptionRequest", "Namespace": "OpenAI", @@ -864,12 +842,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "128", + "$id": "125", "Name": "file", "SerializedName": "file", "Description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4,\nmpeg, mpga, m4a, ogg, wav, or webm.", "Type": { - "$id": "129", + "$id": "126", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -878,7 +856,7 @@ "IsReadOnly": false }, { - "$id": "130", + "$id": "127", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. Only `whisper-1` is currently available.", @@ -889,12 +867,12 @@ "IsReadOnly": false }, { - "$id": "131", + "$id": "128", "Name": "prompt", "SerializedName": "prompt", "Description": "An optional text to guide the model's style or continue a previous audio segment. The\n[prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", "Type": { - "$id": "132", + "$id": "129", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -903,7 +881,7 @@ "IsReadOnly": false }, { - "$id": "133", + "$id": "130", "Name": "response_format", "SerializedName": "response_format", "Description": "The format of the transcript output, in one of these options: json, text, srt, verbose_json, or\nvtt.", @@ -914,12 +892,12 @@ "IsReadOnly": false }, { - "$id": "134", + "$id": "131", "Name": "temperature", "SerializedName": "temperature", "Description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more\nrandom, while lower values like 0.2 will make it more focused and deterministic. If set to 0,\nthe model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to\nautomatically increase the temperature until certain thresholds are hit.", "Type": { - "$id": "135", + "$id": "132", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -928,12 +906,12 @@ "IsReadOnly": false }, { - "$id": "136", + "$id": "133", "Name": "language", "SerializedName": "language", "Description": "The language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy\nand latency.", "Type": { - "$id": "137", + "$id": "134", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -944,7 +922,7 @@ ] }, { - "$id": "138", + "$id": "135", "Kind": "Model", "Name": "CreateTranscriptionResponse", "Namespace": "OpenAI", @@ -952,12 +930,12 @@ "Usage": "Output", "Properties": [ { - "$id": "139", + "$id": "136", "Name": "text", "SerializedName": "text", "Description": "", "Type": { - "$id": "140", + "$id": "137", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -968,7 +946,7 @@ ] }, { - "$id": "141", + "$id": "138", "Kind": "Model", "Name": "CreateTranslationRequest", "Namespace": "OpenAI", @@ -976,12 +954,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "142", + "$id": "139", "Name": "file", "SerializedName": "file", "Description": "The audio file object (not file name) to translate, in one of these formats: flac, mp3, mp4,\nmpeg, mpga, m4a, ogg, wav, or webm.", "Type": { - "$id": "143", + "$id": "140", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -990,7 +968,7 @@ "IsReadOnly": false }, { - "$id": "144", + "$id": "141", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. Only `whisper-1` is currently available.", @@ -1001,12 +979,12 @@ "IsReadOnly": false }, { - "$id": "145", + "$id": "142", "Name": "prompt", "SerializedName": "prompt", "Description": "An optional text to guide the model's style or continue a previous audio segment. The\n[prompt](/docs/guides/speech-to-text/prompting) should match the audio language.", "Type": { - "$id": "146", + "$id": "143", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1015,7 +993,7 @@ "IsReadOnly": false }, { - "$id": "147", + "$id": "144", "Name": "response_format", "SerializedName": "response_format", "Description": "The format of the transcript output, in one of these options: json, text, srt, verbose_json, or\nvtt.", @@ -1026,12 +1004,12 @@ "IsReadOnly": false }, { - "$id": "148", + "$id": "145", "Name": "temperature", "SerializedName": "temperature", "Description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more\nrandom, while lower values like 0.2 will make it more focused and deterministic. If set to 0,\nthe model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to\nautomatically increase the temperature until certain thresholds are hit.", "Type": { - "$id": "149", + "$id": "146", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -1042,7 +1020,7 @@ ] }, { - "$id": "150", + "$id": "147", "Kind": "Model", "Name": "CreateTranslationResponse", "Namespace": "OpenAI", @@ -1050,12 +1028,12 @@ "Usage": "Output", "Properties": [ { - "$id": "151", + "$id": "148", "Name": "text", "SerializedName": "text", "Description": "", "Type": { - "$id": "152", + "$id": "149", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1066,7 +1044,7 @@ ] }, { - "$id": "153", + "$id": "150", "Kind": "Model", "Name": "CreateChatCompletionRequest", "Namespace": "OpenAI", @@ -1074,7 +1052,7 @@ "Usage": "Input", "Properties": [ { - "$id": "154", + "$id": "151", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility)\ntable for details on which models work with the Chat API.", @@ -1085,16 +1063,16 @@ "IsReadOnly": false }, { - "$id": "155", + "$id": "152", "Name": "messages", "SerializedName": "messages", "Description": "A list of messages comprising the conversation so far.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb).", "Type": { - "$id": "156", + "$id": "153", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "157", + "$id": "154", "Kind": "Model", "Name": "ChatCompletionRequestMessage", "Namespace": "OpenAI", @@ -1102,7 +1080,7 @@ "Usage": "Input", "Properties": [ { - "$id": "158", + "$id": "155", "Name": "role", "SerializedName": "role", "Description": "The role of the messages author. One of `system`, `user`, `assistant`, or `function`.", @@ -1113,12 +1091,12 @@ "IsReadOnly": false }, { - "$id": "159", + "$id": "156", "Name": "content", "SerializedName": "content", "Description": "The contents of the message. `content` is required for all messages, and may be null for\nassistant messages with function calls.", "Type": { - "$id": "160", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1127,12 +1105,12 @@ "IsReadOnly": false }, { - "$id": "161", + "$id": "158", "Name": "name", "SerializedName": "name", "Description": "The name of the author of this message. `name` is required if role is `function`, and it\nshould be the name of the function whose response is in the `content`. May contain a-z,\nA-Z, 0-9, and underscores, with a maximum length of 64 characters.", "Type": { - "$id": "162", + "$id": "159", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1141,12 +1119,12 @@ "IsReadOnly": false }, { - "$id": "163", + "$id": "160", "Name": "function_call", "SerializedName": "function_call", "Description": "The name and arguments of a function that should be called, as generated by the model.", "Type": { - "$id": "164", + "$id": "161", "Kind": "Model", "Name": "ChatCompletionRequestMessageFunctionCall", "Namespace": "OpenAI", @@ -1154,12 +1132,12 @@ "Usage": "Input", "Properties": [ { - "$id": "165", + "$id": "162", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "166", + "$id": "163", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1168,12 +1146,12 @@ "IsReadOnly": false }, { - "$id": "167", + "$id": "164", "Name": "arguments", "SerializedName": "arguments", "Description": "The arguments to call the function with, as generated by the model in JSON format. Note that\nthe model does not always generate valid JSON, and may hallucinate parameters not defined by\nyour function schema. Validate the arguments in your code before calling your function.", "Type": { - "$id": "168", + "$id": "165", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1194,16 +1172,16 @@ "IsReadOnly": false }, { - "$id": "169", + "$id": "166", "Name": "functions", "SerializedName": "functions", "Description": "A list of functions the model may generate JSON inputs for.", "Type": { - "$id": "170", + "$id": "167", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "171", + "$id": "168", "Kind": "Model", "Name": "ChatCompletionFunctions", "Namespace": "OpenAI", @@ -1211,12 +1189,12 @@ "Usage": "Input", "Properties": [ { - "$id": "172", + "$id": "169", "Name": "name", "SerializedName": "name", "Description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and\ndashes, with a maximum length of 64.", "Type": { - "$id": "173", + "$id": "170", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1225,12 +1203,12 @@ "IsReadOnly": false }, { - "$id": "174", + "$id": "171", "Name": "description", "SerializedName": "description", "Description": "A description of what the function does, used by the model to choose when and how to call the\nfunction.", "Type": { - "$id": "175", + "$id": "172", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1239,29 +1217,29 @@ "IsReadOnly": false }, { - "$id": "176", + "$id": "173", "Name": "parameters", "SerializedName": "parameters", "Description": "The parameters the functions accepts, described as a JSON Schema object. See the\n[guide](/docs/guides/gpt/function-calling) for examples, and the\n[JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation\nabout the format.\\n\\nTo describe a function that accepts no parameters, provide the value\n`{\\\"type\\\": \\\"object\\\", \\\"properties\\\": {}}`.", "Type": { - "$id": "177", + "$id": "174", "Kind": "Model", "Name": "ChatCompletionFunctionParameters", "Namespace": "OpenAI", "IsNullable": false, "Usage": "Input", "InheritedDictionaryType": { - "$id": "178", + "$id": "175", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "179", + "$id": "176", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "180", + "$id": "177", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1281,21 +1259,21 @@ "IsReadOnly": false }, { - "$id": "181", + "$id": "178", "Name": "function_call", "SerializedName": "function_call", "Description": "Controls how the model responds to function calls. `none` means the model does not call a\nfunction, and responds to the end-user. `auto` means the model can pick between an end-user or\ncalling a function. Specifying a particular function via `{\\\"name\":\\ \\\"my_function\\\"}` forces the\nmodel to call that function. `none` is the default when no functions are present. `auto` is the\ndefault if functions are present.", "Type": { - "$id": "182", + "$id": "179", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "183", + "$id": "180", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "184", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1304,11 +1282,11 @@ "IsNullable": false }, { - "$id": "185", + "$id": "182", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "186", + "$id": "183", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1317,7 +1295,7 @@ "IsNullable": false }, { - "$id": "187", + "$id": "184", "Kind": "Model", "Name": "ChatCompletionFunctionCallOption", "Namespace": "OpenAI", @@ -1325,12 +1303,12 @@ "Usage": "Input", "Properties": [ { - "$id": "188", + "$id": "185", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "189", + "$id": "186", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1347,12 +1325,12 @@ "IsReadOnly": false }, { - "$id": "190", + "$id": "187", "Name": "temperature", "SerializedName": "temperature", "Description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "Type": { - "$id": "191", + "$id": "188", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1361,12 +1339,12 @@ "IsReadOnly": false }, { - "$id": "192", + "$id": "189", "Name": "top_p", "SerializedName": "top_p", "Description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers\nthe results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising\nthe top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "Type": { - "$id": "193", + "$id": "190", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1375,12 +1353,12 @@ "IsReadOnly": false }, { - "$id": "194", + "$id": "191", "Name": "n", "SerializedName": "n", "Description": "How many completions to generate for each prompt.\n**Note:** Because this parameter generates many completions, it can quickly consume your token\nquota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "Type": { - "$id": "195", + "$id": "192", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -1389,12 +1367,12 @@ "IsReadOnly": false }, { - "$id": "196", + "$id": "193", "Name": "max_tokens", "SerializedName": "max_tokens", "Description": "The maximum number of [tokens](/tokenizer) to generate in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)\nfor counting tokens.", "Type": { - "$id": "197", + "$id": "194", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -1403,27 +1381,27 @@ "IsReadOnly": false }, { - "$id": "198", + "$id": "195", "Name": "stop", "SerializedName": "stop", "Description": "Up to 4 sequences where the API will stop generating further tokens.", "Type": { - "$id": "199", + "$id": "196", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "200", + "$id": "197", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "201", + "$id": "198", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "202", + "$id": "199", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1437,12 +1415,12 @@ "IsReadOnly": false }, { - "$id": "203", + "$id": "200", "Name": "presence_penalty", "SerializedName": "presence_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear\nin the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "204", + "$id": "201", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1451,12 +1429,12 @@ "IsReadOnly": false }, { - "$id": "205", + "$id": "202", "Name": "frequency_penalty", "SerializedName": "frequency_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing\nfrequency in the text so far, decreasing the model's likelihood to repeat the same line\nverbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "206", + "$id": "203", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1465,22 +1443,22 @@ "IsReadOnly": false }, { - "$id": "207", + "$id": "204", "Name": "logit_bias", "SerializedName": "logit_bias", "Description": "Modify the likelihood of specified tokens appearing in the completion.\nAccepts a json object that maps tokens (specified by their token ID in the tokenizer) to an\nassociated bias value from -100 to 100. Mathematically, the bias is added to the logits\ngenerated by the model prior to sampling. The exact effect will vary per model, but values\nbetween -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.", "Type": { - "$id": "208", + "$id": "205", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "209", + "$id": "206", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "210", + "$id": "207", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1491,12 +1469,12 @@ "IsReadOnly": false }, { - "$id": "211", + "$id": "208", "Name": "user", "SerializedName": "user", "Description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect\nabuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "Type": { - "$id": "212", + "$id": "209", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1505,12 +1483,12 @@ "IsReadOnly": false }, { - "$id": "213", + "$id": "210", "Name": "stream", "SerializedName": "stream", "Description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available, with the stream terminated by a `data: [DONE]` message.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).", "Type": { - "$id": "214", + "$id": "211", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -1521,22 +1499,22 @@ ] }, { - "$ref": "157" + "$ref": "154" }, { - "$ref": "164" + "$ref": "161" }, { - "$ref": "171" + "$ref": "168" }, { - "$ref": "177" + "$ref": "174" }, { - "$ref": "187" + "$ref": "184" }, { - "$id": "215", + "$id": "212", "Kind": "Model", "Name": "CreateChatCompletionResponse", "Namespace": "OpenAI", @@ -1545,12 +1523,12 @@ "Usage": "Output", "Properties": [ { - "$id": "216", + "$id": "213", "Name": "id", "SerializedName": "id", "Description": "A unique identifier for the chat completion.", "Type": { - "$id": "217", + "$id": "214", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1559,12 +1537,12 @@ "IsReadOnly": false }, { - "$id": "218", + "$id": "215", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `chat.completion`.", "Type": { - "$id": "219", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1573,12 +1551,12 @@ "IsReadOnly": false }, { - "$id": "220", + "$id": "217", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the chat completion was created.", "Type": { - "$id": "221", + "$id": "218", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1587,12 +1565,12 @@ "IsReadOnly": false }, { - "$id": "222", + "$id": "219", "Name": "model", "SerializedName": "model", "Description": "The model used for the chat completion.", "Type": { - "$id": "223", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1601,16 +1579,16 @@ "IsReadOnly": false }, { - "$id": "224", + "$id": "221", "Name": "choices", "SerializedName": "choices", "Description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", "Type": { - "$id": "225", + "$id": "222", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "226", + "$id": "223", "Kind": "Model", "Name": "CreateChatCompletionResponseChoice", "Namespace": "OpenAI", @@ -1618,12 +1596,12 @@ "Usage": "Output", "Properties": [ { - "$id": "227", + "$id": "224", "Name": "index", "SerializedName": "index", "Description": "The index of the choice in the list of choices.", "Type": { - "$id": "228", + "$id": "225", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1632,12 +1610,12 @@ "IsReadOnly": false }, { - "$id": "229", + "$id": "226", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "230", + "$id": "227", "Kind": "Model", "Name": "ChatCompletionResponseMessage", "Namespace": "OpenAI", @@ -1645,7 +1623,7 @@ "Usage": "Output", "Properties": [ { - "$id": "231", + "$id": "228", "Name": "role", "SerializedName": "role", "Description": "The role of the author of this message.", @@ -1656,12 +1634,12 @@ "IsReadOnly": false }, { - "$id": "232", + "$id": "229", "Name": "content", "SerializedName": "content", "Description": "The contents of the message.", "Type": { - "$id": "233", + "$id": "230", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1670,12 +1648,12 @@ "IsReadOnly": false }, { - "$id": "234", + "$id": "231", "Name": "function_call", "SerializedName": "function_call", "Description": "The name and arguments of a function that should be called, as generated by the model.", "Type": { - "$id": "235", + "$id": "232", "Kind": "Model", "Name": "ChatCompletionResponseMessageFunctionCall", "Namespace": "OpenAI", @@ -1683,12 +1661,12 @@ "Usage": "Output", "Properties": [ { - "$id": "236", + "$id": "233", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "237", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1697,12 +1675,12 @@ "IsReadOnly": false }, { - "$id": "238", + "$id": "235", "Name": "arguments", "SerializedName": "arguments", "Description": "The arguments to call the function with, as generated by the model in JSON format. Note that\nthe model does not always generate valid JSON, and may hallucinate parameters not defined by\nyour function schema. Validate the arguments in your code before calling your function.", "Type": { - "$id": "239", + "$id": "236", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1721,7 +1699,7 @@ "IsReadOnly": false }, { - "$id": "240", + "$id": "237", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, `length` if the maximum number of tokens\nspecified in the request was reached, `content_filter` if the content was omitted due to\na flag from our content filters, or `function_call` if the model called a function.", @@ -1739,12 +1717,12 @@ "IsReadOnly": false }, { - "$id": "241", + "$id": "238", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$id": "242", + "$id": "239", "Kind": "Model", "Name": "CompletionUsage", "Namespace": "OpenAI", @@ -1753,12 +1731,12 @@ "Usage": "Output", "Properties": [ { - "$id": "243", + "$id": "240", "Name": "prompt_tokens", "SerializedName": "prompt_tokens", "Description": "Number of tokens in the prompt.", "Type": { - "$id": "244", + "$id": "241", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1767,12 +1745,12 @@ "IsReadOnly": false }, { - "$id": "245", + "$id": "242", "Name": "completion_tokens", "SerializedName": "completion_tokens", "Description": "Number of tokens in the generated completion", "Type": { - "$id": "246", + "$id": "243", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1781,12 +1759,12 @@ "IsReadOnly": false }, { - "$id": "247", + "$id": "244", "Name": "total_tokens", "SerializedName": "total_tokens", "Description": "Total number of tokens used in the request (prompt + completion).", "Type": { - "$id": "248", + "$id": "245", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1802,19 +1780,19 @@ ] }, { - "$ref": "226" + "$ref": "223" }, { - "$ref": "230" + "$ref": "227" }, { - "$ref": "235" + "$ref": "232" }, { - "$ref": "242" + "$ref": "239" }, { - "$id": "249", + "$id": "246", "Kind": "Model", "Name": "CreateFineTuningJobRequest", "Namespace": "OpenAI", @@ -1822,12 +1800,12 @@ "Usage": "Input", "Properties": [ { - "$id": "250", + "$id": "247", "Name": "training_file", "SerializedName": "training_file", "Description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/upload) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with\nthe purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "251", + "$id": "248", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1836,12 +1814,12 @@ "IsReadOnly": false }, { - "$id": "252", + "$id": "249", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation metrics periodically during\nfine-tuning. These metrics can be viewed in the fine-tuning results file. The same data should\nnot be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose\n`fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "253", + "$id": "250", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1850,7 +1828,7 @@ "IsReadOnly": false }, { - "$id": "254", + "$id": "251", "Name": "model", "SerializedName": "model", "Description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/what-models-can-be-fine-tuned).", @@ -1861,12 +1839,12 @@ "IsReadOnly": false }, { - "$id": "255", + "$id": "252", "Name": "hyperparameters", "SerializedName": "hyperparameters", "Description": "The hyperparameters used for the fine-tuning job.", "Type": { - "$id": "256", + "$id": "253", "Kind": "Model", "Name": "CreateFineTuningJobRequestHyperparameters", "Namespace": "OpenAI", @@ -1874,21 +1852,21 @@ "Usage": "Input", "Properties": [ { - "$id": "257", + "$id": "254", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "258", + "$id": "255", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "259", + "$id": "256", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "260", + "$id": "257", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1897,7 +1875,7 @@ "IsNullable": false }, { - "$id": "261", + "$id": "258", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1914,12 +1892,12 @@ "IsReadOnly": false }, { - "$id": "262", + "$id": "259", "Name": "suffix", "SerializedName": "suffix", "Description": "A string of up to 18 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like\n`ft:gpt-3.5-turbo:openai:custom-model-name:7p4lURel`.", "Type": { - "$id": "263", + "$id": "260", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1930,10 +1908,10 @@ ] }, { - "$ref": "256" + "$ref": "253" }, { - "$id": "264", + "$id": "261", "Kind": "Model", "Name": "FineTuningJob", "Namespace": "OpenAI", @@ -1941,12 +1919,12 @@ "Usage": "Output", "Properties": [ { - "$id": "265", + "$id": "262", "Name": "id", "SerializedName": "id", "Description": "The object identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "266", + "$id": "263", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1955,12 +1933,12 @@ "IsReadOnly": false }, { - "$id": "267", + "$id": "264", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"fine_tuning.job\".", "Type": { - "$id": "268", + "$id": "265", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -1973,12 +1951,12 @@ "IsReadOnly": false }, { - "$id": "269", + "$id": "266", "Name": "created_at", "SerializedName": "created_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "Type": { - "$id": "270", + "$id": "267", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1987,12 +1965,12 @@ "IsReadOnly": false }, { - "$id": "271", + "$id": "268", "Name": "finished_at", "SerializedName": "finished_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be\nnull if the fine-tuning job is still running.", "Type": { - "$id": "272", + "$id": "269", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": true @@ -2001,12 +1979,12 @@ "IsReadOnly": false }, { - "$id": "273", + "$id": "270", "Name": "model", "SerializedName": "model", "Description": "The base model that is being fine-tuned.", "Type": { - "$id": "274", + "$id": "271", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2015,12 +1993,12 @@ "IsReadOnly": false }, { - "$id": "275", + "$id": "272", "Name": "fine_tuned_model", "SerializedName": "fine_tuned_model", "Description": "The name of the fine-tuned model that is being created. The value will be null if the\nfine-tuning job is still running.", "Type": { - "$id": "276", + "$id": "273", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2029,12 +2007,12 @@ "IsReadOnly": false }, { - "$id": "277", + "$id": "274", "Name": "organization_id", "SerializedName": "organization_id", "Description": "The organization that owns the fine-tuning job.", "Type": { - "$id": "278", + "$id": "275", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2043,7 +2021,7 @@ "IsReadOnly": false }, { - "$id": "279", + "$id": "276", "Name": "status", "SerializedName": "status", "Description": "The current status of the fine-tuning job, which can be either `created`, `pending`, `running`,\n`succeeded`, `failed`, or `cancelled`.", @@ -2054,12 +2032,12 @@ "IsReadOnly": false }, { - "$id": "280", + "$id": "277", "Name": "hyperparameters", "SerializedName": "hyperparameters", "Description": "The hyperparameters used for the fine-tuning job. See the\n[fine-tuning guide](/docs/guides/fine-tuning) for more details.", "Type": { - "$id": "281", + "$id": "278", "Kind": "Model", "Name": "FineTuningJobHyperparameters", "Namespace": "OpenAI", @@ -2067,21 +2045,21 @@ "Usage": "Output", "Properties": [ { - "$id": "282", + "$id": "279", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.\n\n\"Auto\" decides the optimal number of epochs based on the size of the dataset. If setting the\nnumber manually, we support any number between 1 and 50 epochs.", "Type": { - "$id": "283", + "$id": "280", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "284", + "$id": "281", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "285", + "$id": "282", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2090,7 +2068,7 @@ "IsNullable": false }, { - "$id": "286", + "$id": "283", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2107,12 +2085,12 @@ "IsReadOnly": false }, { - "$id": "287", + "$id": "284", "Name": "training_file", "SerializedName": "training_file", "Description": "The file ID used for training. You can retrieve the training data with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "288", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2121,12 +2099,12 @@ "IsReadOnly": false }, { - "$id": "289", + "$id": "286", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The file ID used for validation. You can retrieve the validation results with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "290", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2135,16 +2113,16 @@ "IsReadOnly": false }, { - "$id": "291", + "$id": "288", "Name": "result_files", "SerializedName": "result_files", "Description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the\n[Files API](/docs/api-reference/files/retrieve-contents).", "Type": { - "$id": "292", + "$id": "289", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "293", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2155,12 +2133,12 @@ "IsReadOnly": false }, { - "$id": "294", + "$id": "291", "Name": "trained_tokens", "SerializedName": "trained_tokens", "Description": "The total number of billable tokens processed by this fine tuning job. The value will be null\nif the fine-tuning job is still running.", "Type": { - "$id": "295", + "$id": "292", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2169,12 +2147,12 @@ "IsReadOnly": false }, { - "$id": "296", + "$id": "293", "Name": "error", "SerializedName": "error", "Description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the\nfailure.", "Type": { - "$id": "297", + "$id": "294", "Kind": "Model", "Name": "FineTuningJobError", "Namespace": "", @@ -2182,12 +2160,12 @@ "Usage": "Output", "Properties": [ { - "$id": "298", + "$id": "295", "Name": "message", "SerializedName": "message", "Description": "A human-readable error message.", "Type": { - "$id": "299", + "$id": "296", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2196,12 +2174,12 @@ "IsReadOnly": false }, { - "$id": "300", + "$id": "297", "Name": "code", "SerializedName": "code", "Description": "A machine-readable error code.", "Type": { - "$id": "301", + "$id": "298", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2210,12 +2188,12 @@ "IsReadOnly": false }, { - "$id": "302", + "$id": "299", "Name": "param", "SerializedName": "param", "Description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field\nwill be null if the failure was not parameter-specific.", "Type": { - "$id": "303", + "$id": "300", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2231,13 +2209,13 @@ ] }, { - "$ref": "281" + "$ref": "278" }, { - "$ref": "297" + "$ref": "294" }, { - "$id": "304", + "$id": "301", "Kind": "Model", "Name": "ListPaginatedFineTuningJobsResponse", "Namespace": "OpenAI", @@ -2245,12 +2223,12 @@ "Usage": "Output", "Properties": [ { - "$id": "305", + "$id": "302", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "306", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2259,16 +2237,16 @@ "IsReadOnly": false }, { - "$id": "307", + "$id": "304", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "308", + "$id": "305", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "264" + "$ref": "261" }, "IsNullable": false }, @@ -2276,12 +2254,12 @@ "IsReadOnly": false }, { - "$id": "309", + "$id": "306", "Name": "has_more", "SerializedName": "has_more", "Description": "", "Type": { - "$id": "310", + "$id": "307", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2292,7 +2270,7 @@ ] }, { - "$id": "311", + "$id": "308", "Kind": "Model", "Name": "ListFineTuningJobEventsResponse", "Namespace": "OpenAI", @@ -2300,12 +2278,12 @@ "Usage": "Output", "Properties": [ { - "$id": "312", + "$id": "309", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "313", + "$id": "310", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2314,16 +2292,16 @@ "IsReadOnly": false }, { - "$id": "314", + "$id": "311", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "315", + "$id": "312", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "316", + "$id": "313", "Kind": "Model", "Name": "FineTuningJobEvent", "Namespace": "OpenAI", @@ -2331,12 +2309,12 @@ "Usage": "Output", "Properties": [ { - "$id": "317", + "$id": "314", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "318", + "$id": "315", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2345,12 +2323,12 @@ "IsReadOnly": false }, { - "$id": "319", + "$id": "316", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "320", + "$id": "317", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2359,12 +2337,12 @@ "IsReadOnly": false }, { - "$id": "321", + "$id": "318", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "322", + "$id": "319", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2373,7 +2351,7 @@ "IsReadOnly": false }, { - "$id": "323", + "$id": "320", "Name": "level", "SerializedName": "level", "Description": "", @@ -2384,12 +2362,12 @@ "IsReadOnly": false }, { - "$id": "324", + "$id": "321", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "325", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2407,10 +2385,10 @@ ] }, { - "$ref": "316" + "$ref": "313" }, { - "$id": "326", + "$id": "323", "Kind": "Model", "Name": "CreateCompletionRequest", "Namespace": "OpenAI", @@ -2418,7 +2396,7 @@ "Usage": "Input", "Properties": [ { - "$id": "327", + "$id": "324", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to\nsee all of your available models, or see our [Model overview](/docs/models/overview) for\ndescriptions of them.", @@ -2429,27 +2407,27 @@ "IsReadOnly": false }, { - "$id": "328", + "$id": "325", "Name": "prompt", "SerializedName": "prompt", "Description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of\ntokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a\nprompt is not specified the model will generate as if from the beginning of a new document.", "Type": { - "$id": "329", + "$id": "326", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "330", + "$id": "327", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "331", + "$id": "328", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "332", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2457,11 +2435,11 @@ "IsNullable": false }, { - "$id": "333", + "$id": "330", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "334", + "$id": "331", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2469,15 +2447,15 @@ "IsNullable": false }, { - "$id": "335", + "$id": "332", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "336", + "$id": "333", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "337", + "$id": "334", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2493,12 +2471,12 @@ "IsReadOnly": false }, { - "$id": "338", + "$id": "335", "Name": "suffix", "SerializedName": "suffix", "Description": "The suffix that comes after a completion of inserted text.", "Type": { - "$id": "339", + "$id": "336", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2507,12 +2485,12 @@ "IsReadOnly": false }, { - "$id": "340", + "$id": "337", "Name": "temperature", "SerializedName": "temperature", "Description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "Type": { - "$id": "341", + "$id": "338", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2521,12 +2499,12 @@ "IsReadOnly": false }, { - "$id": "342", + "$id": "339", "Name": "top_p", "SerializedName": "top_p", "Description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers\nthe results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising\nthe top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "Type": { - "$id": "343", + "$id": "340", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2535,12 +2513,12 @@ "IsReadOnly": false }, { - "$id": "344", + "$id": "341", "Name": "n", "SerializedName": "n", "Description": "How many completions to generate for each prompt.\n**Note:** Because this parameter generates many completions, it can quickly consume your token\nquota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "Type": { - "$id": "345", + "$id": "342", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2549,12 +2527,12 @@ "IsReadOnly": false }, { - "$id": "346", + "$id": "343", "Name": "max_tokens", "SerializedName": "max_tokens", "Description": "The maximum number of [tokens](/tokenizer) to generate in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)\nfor counting tokens.", "Type": { - "$id": "347", + "$id": "344", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2563,27 +2541,27 @@ "IsReadOnly": false }, { - "$id": "348", + "$id": "345", "Name": "stop", "SerializedName": "stop", "Description": "Up to 4 sequences where the API will stop generating further tokens.", "Type": { - "$id": "349", + "$id": "346", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "350", + "$id": "347", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "351", + "$id": "348", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "352", + "$id": "349", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2597,12 +2575,12 @@ "IsReadOnly": false }, { - "$id": "353", + "$id": "350", "Name": "presence_penalty", "SerializedName": "presence_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear\nin the text so far, increasing the model's likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "354", + "$id": "351", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2611,12 +2589,12 @@ "IsReadOnly": false }, { - "$id": "355", + "$id": "352", "Name": "frequency_penalty", "SerializedName": "frequency_penalty", "Description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing\nfrequency in the text so far, decreasing the model's likelihood to repeat the same line\nverbatim.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)", "Type": { - "$id": "356", + "$id": "353", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2625,22 +2603,22 @@ "IsReadOnly": false }, { - "$id": "357", + "$id": "354", "Name": "logit_bias", "SerializedName": "logit_bias", "Description": "Modify the likelihood of specified tokens appearing in the completion.\nAccepts a json object that maps tokens (specified by their token ID in the tokenizer) to an\nassociated bias value from -100 to 100. Mathematically, the bias is added to the logits\ngenerated by the model prior to sampling. The exact effect will vary per model, but values\nbetween -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.", "Type": { - "$id": "358", + "$id": "355", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "359", + "$id": "356", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "360", + "$id": "357", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2651,12 +2629,12 @@ "IsReadOnly": false }, { - "$id": "361", + "$id": "358", "Name": "user", "SerializedName": "user", "Description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect\nabuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).", "Type": { - "$id": "362", + "$id": "359", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2665,12 +2643,12 @@ "IsReadOnly": false }, { - "$id": "363", + "$id": "360", "Name": "stream", "SerializedName": "stream", "Description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available, with the stream terminated by a `data: [DONE]` message.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb).", "Type": { - "$id": "364", + "$id": "361", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -2679,12 +2657,12 @@ "IsReadOnly": false }, { - "$id": "365", + "$id": "362", "Name": "logprobs", "SerializedName": "logprobs", "Description": "Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens.\nFor example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The\nAPI will always return the `logprob` of the sampled token, so there may be up to `logprobs+1`\nelements in the response.\n\nThe maximum value for `logprobs` is 5.", "Type": { - "$id": "366", + "$id": "363", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2693,12 +2671,12 @@ "IsReadOnly": false }, { - "$id": "367", + "$id": "364", "Name": "echo", "SerializedName": "echo", "Description": "Echo back the prompt in addition to the completion", "Type": { - "$id": "368", + "$id": "365", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -2707,12 +2685,12 @@ "IsReadOnly": false }, { - "$id": "369", + "$id": "366", "Name": "best_of", "SerializedName": "best_of", "Description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest\nlog probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies\nhow many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token\nquota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.", "Type": { - "$id": "370", + "$id": "367", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2723,7 +2701,7 @@ ] }, { - "$id": "371", + "$id": "368", "Kind": "Model", "Name": "CreateCompletionResponse", "Namespace": "OpenAI", @@ -2732,12 +2710,12 @@ "Usage": "Output", "Properties": [ { - "$id": "372", + "$id": "369", "Name": "id", "SerializedName": "id", "Description": "A unique identifier for the completion.", "Type": { - "$id": "373", + "$id": "370", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2746,12 +2724,12 @@ "IsReadOnly": false }, { - "$id": "374", + "$id": "371", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `text_completion`.", "Type": { - "$id": "375", + "$id": "372", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2760,12 +2738,12 @@ "IsReadOnly": false }, { - "$id": "376", + "$id": "373", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the completion was created.", "Type": { - "$id": "377", + "$id": "374", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2774,12 +2752,12 @@ "IsReadOnly": false }, { - "$id": "378", + "$id": "375", "Name": "model", "SerializedName": "model", "Description": "The model used for the completion.", "Type": { - "$id": "379", + "$id": "376", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2788,16 +2766,16 @@ "IsReadOnly": false }, { - "$id": "380", + "$id": "377", "Name": "choices", "SerializedName": "choices", "Description": "The list of completion choices the model generated for the input.", "Type": { - "$id": "381", + "$id": "378", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "382", + "$id": "379", "Kind": "Model", "Name": "CreateCompletionResponseChoice", "Namespace": "OpenAI", @@ -2805,12 +2783,12 @@ "Usage": "Output", "Properties": [ { - "$id": "383", + "$id": "380", "Name": "index", "SerializedName": "index", "Description": "", "Type": { - "$id": "384", + "$id": "381", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2819,12 +2797,12 @@ "IsReadOnly": false }, { - "$id": "385", + "$id": "382", "Name": "text", "SerializedName": "text", "Description": "", "Type": { - "$id": "386", + "$id": "383", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2833,12 +2811,12 @@ "IsReadOnly": false }, { - "$id": "387", + "$id": "384", "Name": "logprobs", "SerializedName": "logprobs", "Description": "", "Type": { - "$id": "388", + "$id": "385", "Kind": "Model", "Name": "CreateCompletionResponseChoiceLogprobs", "Namespace": "", @@ -2846,16 +2824,16 @@ "Usage": "Output", "Properties": [ { - "$id": "389", + "$id": "386", "Name": "tokens", "SerializedName": "tokens", "Description": "", "Type": { - "$id": "390", + "$id": "387", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "391", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2866,16 +2844,16 @@ "IsReadOnly": false }, { - "$id": "392", + "$id": "389", "Name": "token_logprobs", "SerializedName": "token_logprobs", "Description": "", "Type": { - "$id": "393", + "$id": "390", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "394", + "$id": "391", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -2886,26 +2864,26 @@ "IsReadOnly": false }, { - "$id": "395", + "$id": "392", "Name": "top_logprobs", "SerializedName": "top_logprobs", "Description": "", "Type": { - "$id": "396", + "$id": "393", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "397", + "$id": "394", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "398", + "$id": "395", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "399", + "$id": "396", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2918,16 +2896,16 @@ "IsReadOnly": false }, { - "$id": "400", + "$id": "397", "Name": "text_offset", "SerializedName": "text_offset", "Description": "", "Type": { - "$id": "401", + "$id": "398", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "402", + "$id": "399", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2943,7 +2921,7 @@ "IsReadOnly": false }, { - "$id": "403", + "$id": "400", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, or `content_filter` if content was omitted\ndue to a flag from our content filters, `length` if the maximum number of tokens specified\nin the request was reached, or `content_filter` if content was omitted due to a flag from our\ncontent filters.", @@ -2961,12 +2939,12 @@ "IsReadOnly": false }, { - "$id": "404", + "$id": "401", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$ref": "242" + "$ref": "239" }, "IsRequired": false, "IsReadOnly": false @@ -2974,13 +2952,13 @@ ] }, { - "$ref": "382" + "$ref": "379" }, { - "$ref": "388" + "$ref": "385" }, { - "$id": "405", + "$id": "402", "Kind": "Model", "Name": "CreateEditRequest", "Namespace": "OpenAI", @@ -2988,7 +2966,7 @@ "Usage": "Input", "Properties": [ { - "$id": "406", + "$id": "403", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the `text-davinci-edit-001` or `code-davinci-edit-001`\nmodel with this endpoint.", @@ -2999,12 +2977,12 @@ "IsReadOnly": false }, { - "$id": "407", + "$id": "404", "Name": "input", "SerializedName": "input", "Description": "The input text to use as a starting point for the edit.", "Type": { - "$id": "408", + "$id": "405", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3013,12 +2991,12 @@ "IsReadOnly": false }, { - "$id": "409", + "$id": "406", "Name": "instruction", "SerializedName": "instruction", "Description": "The instruction that tells the model how to edit the prompt.", "Type": { - "$id": "410", + "$id": "407", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3027,12 +3005,12 @@ "IsReadOnly": false }, { - "$id": "411", + "$id": "408", "Name": "n", "SerializedName": "n", "Description": "How many edits to generate for the input and instruction.", "Type": { - "$id": "412", + "$id": "409", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3041,12 +3019,12 @@ "IsReadOnly": false }, { - "$id": "413", + "$id": "410", "Name": "temperature", "SerializedName": "temperature", "Description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\nmore random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.", "Type": { - "$id": "414", + "$id": "411", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3055,12 +3033,12 @@ "IsReadOnly": false }, { - "$id": "415", + "$id": "412", "Name": "top_p", "SerializedName": "top_p", "Description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers\nthe results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising\nthe top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.", "Type": { - "$id": "416", + "$id": "413", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3071,7 +3049,7 @@ ] }, { - "$id": "417", + "$id": "414", "Kind": "Model", "Name": "CreateEditResponse", "Namespace": "OpenAI", @@ -3080,12 +3058,12 @@ "Usage": "Output", "Properties": [ { - "$id": "418", + "$id": "415", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `edit`.", "Type": { - "$id": "419", + "$id": "416", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3098,12 +3076,12 @@ "IsReadOnly": false }, { - "$id": "420", + "$id": "417", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the edit was created.", "Type": { - "$id": "421", + "$id": "418", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3112,16 +3090,16 @@ "IsReadOnly": false }, { - "$id": "422", + "$id": "419", "Name": "choices", "SerializedName": "choices", "Description": "description: A list of edit choices. Can be more than one if `n` is greater than 1.", "Type": { - "$id": "423", + "$id": "420", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "424", + "$id": "421", "Kind": "Model", "Name": "CreateEditResponseChoice", "Namespace": "OpenAI", @@ -3129,12 +3107,12 @@ "Usage": "Output", "Properties": [ { - "$id": "425", + "$id": "422", "Name": "text", "SerializedName": "text", "Description": "The edited result.", "Type": { - "$id": "426", + "$id": "423", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3143,12 +3121,12 @@ "IsReadOnly": false }, { - "$id": "427", + "$id": "424", "Name": "index", "SerializedName": "index", "Description": "The index of the choice in the list of choices.", "Type": { - "$id": "428", + "$id": "425", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3157,7 +3135,7 @@ "IsReadOnly": false }, { - "$id": "429", + "$id": "426", "Name": "finish_reason", "SerializedName": "finish_reason", "Description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a\nnatural stop point or a provided stop sequence, or `length` if the maximum number of tokens\nspecified in the request was reached.", @@ -3175,12 +3153,12 @@ "IsReadOnly": false }, { - "$id": "430", + "$id": "427", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$ref": "242" + "$ref": "239" }, "IsRequired": true, "IsReadOnly": false @@ -3188,10 +3166,10 @@ ] }, { - "$ref": "424" + "$ref": "421" }, { - "$id": "431", + "$id": "428", "Kind": "Model", "Name": "CreateEmbeddingRequest", "Namespace": "OpenAI", @@ -3199,7 +3177,7 @@ "Usage": "Input", "Properties": [ { - "$id": "432", + "$id": "429", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.", @@ -3210,27 +3188,27 @@ "IsReadOnly": false }, { - "$id": "433", + "$id": "430", "Name": "input", "SerializedName": "input", "Description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a\nsingle request, pass an array of strings or array of token arrays. Each input must not exceed\nthe max input tokens for the model (8191 tokens for `text-embedding-ada-002`) and cannot be an empty string.\n[Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb)\nfor counting tokens.", "Type": { - "$id": "434", + "$id": "431", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "435", + "$id": "432", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "436", + "$id": "433", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "437", + "$id": "434", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3238,11 +3216,11 @@ "IsNullable": false }, { - "$id": "438", + "$id": "435", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "439", + "$id": "436", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3250,15 +3228,15 @@ "IsNullable": false }, { - "$id": "440", + "$id": "437", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "441", + "$id": "438", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "442", + "$id": "439", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3274,12 +3252,12 @@ "IsReadOnly": false }, { - "$id": "443", + "$id": "440", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "444", + "$id": "441", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3290,7 +3268,7 @@ ] }, { - "$id": "445", + "$id": "442", "Kind": "Model", "Name": "CreateEmbeddingResponse", "Namespace": "OpenAI", @@ -3298,12 +3276,12 @@ "Usage": "Output", "Properties": [ { - "$id": "446", + "$id": "443", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"embedding\".", "Type": { - "$id": "447", + "$id": "444", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3316,12 +3294,12 @@ "IsReadOnly": false }, { - "$id": "448", + "$id": "445", "Name": "model", "SerializedName": "model", "Description": "The name of the model used to generate the embedding.", "Type": { - "$id": "449", + "$id": "446", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3330,16 +3308,16 @@ "IsReadOnly": false }, { - "$id": "450", + "$id": "447", "Name": "data", "SerializedName": "data", "Description": "The list of embeddings generated by the model.", "Type": { - "$id": "451", + "$id": "448", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "452", + "$id": "449", "Kind": "Model", "Name": "Embedding", "Namespace": "OpenAI", @@ -3348,12 +3326,12 @@ "Usage": "Output", "Properties": [ { - "$id": "453", + "$id": "450", "Name": "index", "SerializedName": "index", "Description": "The index of the embedding in the list of embeddings.", "Type": { - "$id": "454", + "$id": "451", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3362,12 +3340,12 @@ "IsReadOnly": false }, { - "$id": "455", + "$id": "452", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"embedding\".", "Type": { - "$id": "456", + "$id": "453", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3380,16 +3358,16 @@ "IsReadOnly": false }, { - "$id": "457", + "$id": "454", "Name": "embedding", "SerializedName": "embedding", "Description": "The embedding vector, which is a list of floats. The length of vector depends on the model as\\\nlisted in the [embedding guide](/docs/guides/embeddings).", "Type": { - "$id": "458", + "$id": "455", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "459", + "$id": "456", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -3407,12 +3385,12 @@ "IsReadOnly": false }, { - "$id": "460", + "$id": "457", "Name": "usage", "SerializedName": "usage", "Description": "The usage information for the request.", "Type": { - "$id": "461", + "$id": "458", "Kind": "Model", "Name": "CreateEmbeddingResponseUsage", "Namespace": "OpenAI", @@ -3420,12 +3398,12 @@ "Usage": "Output", "Properties": [ { - "$id": "462", + "$id": "459", "Name": "prompt_tokens", "SerializedName": "prompt_tokens", "Description": "The number of tokens used by the prompt.", "Type": { - "$id": "463", + "$id": "460", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3434,12 +3412,12 @@ "IsReadOnly": false }, { - "$id": "464", + "$id": "461", "Name": "total_tokens", "SerializedName": "total_tokens", "Description": "The total number of tokens used by the request.", "Type": { - "$id": "465", + "$id": "462", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3455,13 +3433,13 @@ ] }, { - "$ref": "452" + "$ref": "449" }, { - "$ref": "461" + "$ref": "458" }, { - "$id": "466", + "$id": "463", "Kind": "Model", "Name": "ListFilesResponse", "Namespace": "OpenAI", @@ -3469,12 +3447,12 @@ "Usage": "Output", "Properties": [ { - "$id": "467", + "$id": "464", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "468", + "$id": "465", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3483,16 +3461,16 @@ "IsReadOnly": false }, { - "$id": "469", + "$id": "466", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "470", + "$id": "467", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "471", + "$id": "468", "Kind": "Model", "Name": "OpenAIFile", "Namespace": "OpenAI", @@ -3501,12 +3479,12 @@ "Usage": "Output", "Properties": [ { - "$id": "472", + "$id": "469", "Name": "id", "SerializedName": "id", "Description": "The file identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "473", + "$id": "470", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3515,12 +3493,12 @@ "IsReadOnly": false }, { - "$id": "474", + "$id": "471", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"file\".", "Type": { - "$id": "475", + "$id": "472", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3533,12 +3511,12 @@ "IsReadOnly": false }, { - "$id": "476", + "$id": "473", "Name": "bytes", "SerializedName": "bytes", "Description": "The size of the file in bytes.", "Type": { - "$id": "477", + "$id": "474", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3547,12 +3525,12 @@ "IsReadOnly": false }, { - "$id": "478", + "$id": "475", "Name": "createdAt", "SerializedName": "createdAt", "Description": "The Unix timestamp (in seconds) for when the file was created.", "Type": { - "$id": "479", + "$id": "476", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3561,12 +3539,12 @@ "IsReadOnly": false }, { - "$id": "480", + "$id": "477", "Name": "filename", "SerializedName": "filename", "Description": "The name of the file.", "Type": { - "$id": "481", + "$id": "478", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3575,12 +3553,12 @@ "IsReadOnly": false }, { - "$id": "482", + "$id": "479", "Name": "purpose", "SerializedName": "purpose", "Description": "The intended purpose of the file. Currently, only \"fine-tune\" is supported.", "Type": { - "$id": "483", + "$id": "480", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3589,7 +3567,7 @@ "IsReadOnly": false }, { - "$id": "484", + "$id": "481", "Name": "status", "SerializedName": "status", "Description": "The current status of the file, which can be either `uploaded`, `processed`, `pending`,\n`error`, `deleting` or `deleted`.", @@ -3600,12 +3578,12 @@ "IsReadOnly": false }, { - "$id": "485", + "$id": "482", "Name": "status_details", "SerializedName": "status_details", "Description": "Additional details about the status of the file. If the file is in the `error` state, this will\ninclude a message describing the error.", "Type": { - "$id": "486", + "$id": "483", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3623,10 +3601,10 @@ ] }, { - "$ref": "471" + "$ref": "468" }, { - "$id": "487", + "$id": "484", "Kind": "Model", "Name": "CreateFileRequest", "Namespace": "OpenAI", @@ -3634,12 +3612,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "488", + "$id": "485", "Name": "file", "SerializedName": "file", "Description": "Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.\n\nIf the `purpose` is set to \"fine-tune\", the file will be used for fine-tuning.", "Type": { - "$id": "489", + "$id": "486", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -3648,12 +3626,12 @@ "IsReadOnly": false }, { - "$id": "490", + "$id": "487", "Name": "purpose", "SerializedName": "purpose", "Description": "The intended purpose of the uploaded documents. Use \"fine-tune\" for\n[fine-tuning](/docs/api-reference/fine-tuning). This allows us to validate the format of the\nuploaded file.", "Type": { - "$id": "491", + "$id": "488", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3664,7 +3642,7 @@ ] }, { - "$id": "492", + "$id": "489", "Kind": "Model", "Name": "DeleteFileResponse", "Namespace": "OpenAI", @@ -3672,12 +3650,12 @@ "Usage": "Output", "Properties": [ { - "$id": "493", + "$id": "490", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "494", + "$id": "491", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3686,12 +3664,12 @@ "IsReadOnly": false }, { - "$id": "495", + "$id": "492", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "496", + "$id": "493", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3700,12 +3678,12 @@ "IsReadOnly": false }, { - "$id": "497", + "$id": "494", "Name": "deleted", "SerializedName": "deleted", "Description": "", "Type": { - "$id": "498", + "$id": "495", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -3716,7 +3694,7 @@ ] }, { - "$id": "499", + "$id": "496", "Kind": "Model", "Name": "CreateFineTuneRequest", "Namespace": "OpenAI", @@ -3724,12 +3702,12 @@ "Usage": "Input", "Properties": [ { - "$id": "500", + "$id": "497", "Name": "training_file", "SerializedName": "training_file", "Description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/upload) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file, where each training example is a JSON object\nwith the keys \"prompt\" and \"completion\". Additionally, you must upload your file with the\npurpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more\ndetails.", "Type": { - "$id": "501", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3738,12 +3716,12 @@ "IsReadOnly": false }, { - "$id": "502", + "$id": "499", "Name": "validation_file", "SerializedName": "validation_file", "Description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation metrics periodically during\nfine-tuning. These metrics can be viewed in the\n[fine-tuning results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).\nYour train and validation data should be mutually exclusive.\n\nYour dataset must be formatted as a JSONL file, where each validation example is a JSON object\nwith the keys \"prompt\" and \"completion\". Additionally, you must upload your file with the\npurpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more\ndetails.", "Type": { - "$id": "503", + "$id": "500", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3752,7 +3730,7 @@ "IsReadOnly": false }, { - "$id": "504", + "$id": "501", "Name": "model", "SerializedName": "model", "Description": "The name of the base model to fine-tune. You can select one of \"ada\", \"babbage\", \"curie\",\n\"davinci\", or a fine-tuned model created after 2022-04-21 and before 2023-08-22. To learn more\nabout these models, see the [Models](/docs/models) documentation.", @@ -3763,12 +3741,12 @@ "IsReadOnly": false }, { - "$id": "505", + "$id": "502", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "506", + "$id": "503", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3777,12 +3755,12 @@ "IsReadOnly": false }, { - "$id": "507", + "$id": "504", "Name": "batch_size", "SerializedName": "batch_size", "Description": "The batch size to use for training. The batch size is the number of training examples used to\ntrain a single forward and backward pass.\n\nBy default, the batch size will be dynamically configured to be ~0.2% of the number of examples\nin the training set, capped at 256 - in general, we've found that larger batch sizes tend to\nwork better for larger datasets.", "Type": { - "$id": "508", + "$id": "505", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3791,12 +3769,12 @@ "IsReadOnly": false }, { - "$id": "509", + "$id": "506", "Name": "learning_rate_multiplier", "SerializedName": "learning_rate_multiplier", "Description": "The learning rate multiplier to use for training. The fine-tuning learning rate is the original\nlearning rate used for pretraining multiplied by this value.\n\nBy default, the learning rate multiplier is the 0.05, 0.1, or 0.2 depending on final\n`batch_size` (larger learning rates tend to perform better with larger batch sizes). We\nrecommend experimenting with values in the range 0.02 to 0.2 to see what produces the best\nresults.", "Type": { - "$id": "510", + "$id": "507", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3805,12 +3783,12 @@ "IsReadOnly": false }, { - "$id": "511", + "$id": "508", "Name": "prompt_loss_rate", "SerializedName": "prompt_loss_rate", "Description": "The weight to use for loss on the prompt tokens. This controls how much the model tries to\nlearn to generate the prompt (as compared to the completion which always has a weight of 1.0),\nand can add a stabilizing effect to training when completions are short.\n\nIf prompts are extremely long (relative to completions), it may make sense to reduce this\nweight so as to avoid over-prioritizing learning the prompt.", "Type": { - "$id": "512", + "$id": "509", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3819,12 +3797,12 @@ "IsReadOnly": false }, { - "$id": "513", + "$id": "510", "Name": "compute_classification_metrics", "SerializedName": "compute_classification_metrics", "Description": "If set, we calculate classification-specific metrics such as accuracy and F-1 score using the\nvalidation set at the end of every epoch. These metrics can be viewed in the\n[results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).\n\nIn order to compute classification metrics, you must provide a `validation_file`. Additionally,\nyou must specify `classification_n_classes` for multiclass classification or\n`classification_positive_class` for binary classification.", "Type": { - "$id": "514", + "$id": "511", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -3833,12 +3811,12 @@ "IsReadOnly": false }, { - "$id": "515", + "$id": "512", "Name": "classification_n_classes", "SerializedName": "classification_n_classes", "Description": "The number of classes in a classification task.\n\nThis parameter is required for multiclass classification.", "Type": { - "$id": "516", + "$id": "513", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3847,12 +3825,12 @@ "IsReadOnly": false }, { - "$id": "517", + "$id": "514", "Name": "classification_positive_class", "SerializedName": "classification_positive_class", "Description": "The positive class in binary classification.\n\nThis parameter is needed to generate precision, recall, and F1 metrics when doing binary\nclassification.", "Type": { - "$id": "518", + "$id": "515", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3861,16 +3839,16 @@ "IsReadOnly": false }, { - "$id": "519", + "$id": "516", "Name": "classification_betas", "SerializedName": "classification_betas", "Description": "If this is provided, we calculate F-beta scores at the specified beta values. The F-beta score\nis a generalization of F-1 score. This is only used for binary classification.\n\nWith a beta of 1 (i.e. the F-1 score), precision and recall are given the same weight. A larger\nbeta score puts more weight on recall and less on precision. A smaller beta score puts more\nweight on precision and less on recall.", "Type": { - "$id": "520", + "$id": "517", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "521", + "$id": "518", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -3881,12 +3859,12 @@ "IsReadOnly": false }, { - "$id": "522", + "$id": "519", "Name": "suffix", "SerializedName": "suffix", "Description": "A string of up to 18 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like\n`ada:ft-your-org:custom-model-name-2022-02-15-04-21-04`.", "Type": { - "$id": "523", + "$id": "520", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3897,7 +3875,7 @@ ] }, { - "$id": "524", + "$id": "521", "Kind": "Model", "Name": "FineTune", "Namespace": "OpenAI", @@ -3907,12 +3885,12 @@ "Usage": "Output", "Properties": [ { - "$id": "525", + "$id": "522", "Name": "id", "SerializedName": "id", "Description": "The object identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "526", + "$id": "523", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3921,12 +3899,12 @@ "IsReadOnly": false }, { - "$id": "527", + "$id": "524", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"fine-tune\".", "Type": { - "$id": "528", + "$id": "525", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -3939,12 +3917,12 @@ "IsReadOnly": false }, { - "$id": "529", + "$id": "526", "Name": "created_at", "SerializedName": "created_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "Type": { - "$id": "530", + "$id": "527", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3953,12 +3931,12 @@ "IsReadOnly": false }, { - "$id": "531", + "$id": "528", "Name": "updated_at", "SerializedName": "updated_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was last updated.", "Type": { - "$id": "532", + "$id": "529", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3967,12 +3945,12 @@ "IsReadOnly": false }, { - "$id": "533", + "$id": "530", "Name": "model", "SerializedName": "model", "Description": "The base model that is being fine-tuned.", "Type": { - "$id": "534", + "$id": "531", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3981,12 +3959,12 @@ "IsReadOnly": false }, { - "$id": "535", + "$id": "532", "Name": "fine_tuned_model", "SerializedName": "fine_tuned_model", "Description": "The name of the fine-tuned model that is being created.", "Type": { - "$id": "536", + "$id": "533", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3995,12 +3973,12 @@ "IsReadOnly": false }, { - "$id": "537", + "$id": "534", "Name": "organization_id", "SerializedName": "organization_id", "Description": "The organization that owns the fine-tuning job.", "Type": { - "$id": "538", + "$id": "535", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4009,7 +3987,7 @@ "IsReadOnly": false }, { - "$id": "539", + "$id": "536", "Name": "status", "SerializedName": "status", "Description": "The current status of the fine-tuning job, which can be either `created`, `running`,\n`succeeded`, `failed`, or `cancelled`.", @@ -4020,12 +3998,12 @@ "IsReadOnly": false }, { - "$id": "540", + "$id": "537", "Name": "hyperparams", "SerializedName": "hyperparams", "Description": "The hyperparameters used for the fine-tuning job. See the\n[fine-tuning guide](/docs/guides/legacy-fine-tuning/hyperparameters) for more details.", "Type": { - "$id": "541", + "$id": "538", "Kind": "Model", "Name": "FineTuneHyperparams", "Namespace": "OpenAI", @@ -4033,12 +4011,12 @@ "Usage": "Output", "Properties": [ { - "$id": "542", + "$id": "539", "Name": "n_epochs", "SerializedName": "n_epochs", "Description": "The number of epochs to train the model for. An epoch refers to one full cycle through the\ntraining dataset.", "Type": { - "$id": "543", + "$id": "540", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4047,12 +4025,12 @@ "IsReadOnly": false }, { - "$id": "544", + "$id": "541", "Name": "batch_size", "SerializedName": "batch_size", "Description": "The batch size to use for training. The batch size is the number of training examples used to\ntrain a single forward and backward pass.", "Type": { - "$id": "545", + "$id": "542", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4061,12 +4039,12 @@ "IsReadOnly": false }, { - "$id": "546", + "$id": "543", "Name": "prompt_loss_weight", "SerializedName": "prompt_loss_weight", "Description": "The weight to use for loss on the prompt tokens.", "Type": { - "$id": "547", + "$id": "544", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4075,12 +4053,12 @@ "IsReadOnly": false }, { - "$id": "548", + "$id": "545", "Name": "learning_rate_multiplier", "SerializedName": "learning_rate_multiplier", "Description": "The learning rate multiplier to use for training.", "Type": { - "$id": "549", + "$id": "546", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4089,12 +4067,12 @@ "IsReadOnly": false }, { - "$id": "550", + "$id": "547", "Name": "compute_classification_metrics", "SerializedName": "compute_classification_metrics", "Description": "The classification metrics to compute using the validation dataset at the end of every epoch.", "Type": { - "$id": "551", + "$id": "548", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4103,12 +4081,12 @@ "IsReadOnly": false }, { - "$id": "552", + "$id": "549", "Name": "classification_positive_class", "SerializedName": "classification_positive_class", "Description": "The positive class to use for computing classification metrics.", "Type": { - "$id": "553", + "$id": "550", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4117,12 +4095,12 @@ "IsReadOnly": false }, { - "$id": "554", + "$id": "551", "Name": "classification_n_classes", "SerializedName": "classification_n_classes", "Description": "The number of classes to use for computing classification metrics.", "Type": { - "$id": "555", + "$id": "552", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4136,16 +4114,16 @@ "IsReadOnly": false }, { - "$id": "556", + "$id": "553", "Name": "training_files", "SerializedName": "training_files", "Description": "The list of files used for training.", "Type": { - "$id": "557", + "$id": "554", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "471" + "$ref": "468" }, "IsNullable": false }, @@ -4153,16 +4131,16 @@ "IsReadOnly": false }, { - "$id": "558", + "$id": "555", "Name": "validation_files", "SerializedName": "validation_files", "Description": "The list of files used for validation.", "Type": { - "$id": "559", + "$id": "556", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "471" + "$ref": "468" }, "IsNullable": false }, @@ -4170,16 +4148,16 @@ "IsReadOnly": false }, { - "$id": "560", + "$id": "557", "Name": "result_files", "SerializedName": "result_files", "Description": "The compiled results files for the fine-tuning job.", "Type": { - "$id": "561", + "$id": "558", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "471" + "$ref": "468" }, "IsNullable": false }, @@ -4187,16 +4165,16 @@ "IsReadOnly": false }, { - "$id": "562", + "$id": "559", "Name": "events", "SerializedName": "events", "Description": "The list of events that have been observed in the lifecycle of the FineTune job.", "Type": { - "$id": "563", + "$id": "560", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "564", + "$id": "561", "Kind": "Model", "Name": "FineTuneEvent", "Namespace": "OpenAI", @@ -4204,12 +4182,12 @@ "Usage": "Output", "Properties": [ { - "$id": "565", + "$id": "562", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "566", + "$id": "563", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4218,12 +4196,12 @@ "IsReadOnly": false }, { - "$id": "567", + "$id": "564", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "568", + "$id": "565", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4232,12 +4210,12 @@ "IsReadOnly": false }, { - "$id": "569", + "$id": "566", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "570", + "$id": "567", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4246,12 +4224,12 @@ "IsReadOnly": false }, { - "$id": "571", + "$id": "568", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "572", + "$id": "569", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4269,13 +4247,13 @@ ] }, { - "$ref": "541" + "$ref": "538" }, { - "$ref": "564" + "$ref": "561" }, { - "$id": "573", + "$id": "570", "Kind": "Model", "Name": "ListFineTunesResponse", "Namespace": "OpenAI", @@ -4283,12 +4261,12 @@ "Usage": "Output", "Properties": [ { - "$id": "574", + "$id": "571", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "575", + "$id": "572", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4297,16 +4275,16 @@ "IsReadOnly": false }, { - "$id": "576", + "$id": "573", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "577", + "$id": "574", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "524" + "$ref": "521" }, "IsNullable": false }, @@ -4316,7 +4294,7 @@ ] }, { - "$id": "578", + "$id": "575", "Kind": "Model", "Name": "ListFineTuneEventsResponse", "Namespace": "OpenAI", @@ -4324,12 +4302,12 @@ "Usage": "Output", "Properties": [ { - "$id": "579", + "$id": "576", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "580", + "$id": "577", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4338,16 +4316,16 @@ "IsReadOnly": false }, { - "$id": "581", + "$id": "578", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "582", + "$id": "579", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "564" + "$ref": "561" }, "IsNullable": false }, @@ -4357,7 +4335,7 @@ ] }, { - "$id": "583", + "$id": "580", "Kind": "Model", "Name": "ListModelsResponse", "Namespace": "OpenAI", @@ -4365,12 +4343,12 @@ "Usage": "Output", "Properties": [ { - "$id": "584", + "$id": "581", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "585", + "$id": "582", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4379,16 +4357,16 @@ "IsReadOnly": false }, { - "$id": "586", + "$id": "583", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "587", + "$id": "584", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "588", + "$id": "585", "Kind": "Model", "Name": "Model", "Namespace": "OpenAI", @@ -4397,12 +4375,12 @@ "Usage": "Output", "Properties": [ { - "$id": "589", + "$id": "586", "Name": "id", "SerializedName": "id", "Description": "The model identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "590", + "$id": "587", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4411,12 +4389,12 @@ "IsReadOnly": false }, { - "$id": "591", + "$id": "588", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"model\".", "Type": { - "$id": "592", + "$id": "589", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -4429,12 +4407,12 @@ "IsReadOnly": false }, { - "$id": "593", + "$id": "590", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) when the model was created.", "Type": { - "$id": "594", + "$id": "591", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4443,12 +4421,12 @@ "IsReadOnly": false }, { - "$id": "595", + "$id": "592", "Name": "owned_by", "SerializedName": "owned_by", "Description": "The organization that owns the model.", "Type": { - "$id": "596", + "$id": "593", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4466,10 +4444,10 @@ ] }, { - "$ref": "588" + "$ref": "585" }, { - "$id": "597", + "$id": "594", "Kind": "Model", "Name": "DeleteModelResponse", "Namespace": "OpenAI", @@ -4477,12 +4455,12 @@ "Usage": "Output", "Properties": [ { - "$id": "598", + "$id": "595", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "599", + "$id": "596", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4491,12 +4469,12 @@ "IsReadOnly": false }, { - "$id": "600", + "$id": "597", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "601", + "$id": "598", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4505,12 +4483,12 @@ "IsReadOnly": false }, { - "$id": "602", + "$id": "599", "Name": "deleted", "SerializedName": "deleted", "Description": "", "Type": { - "$id": "603", + "$id": "600", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4521,7 +4499,7 @@ ] }, { - "$id": "604", + "$id": "601", "Kind": "Model", "Name": "CreateImageRequest", "Namespace": "OpenAI", @@ -4529,12 +4507,12 @@ "Usage": "Input", "Properties": [ { - "$id": "605", + "$id": "602", "Name": "prompt", "SerializedName": "prompt", "Description": "A text description of the desired image(s). The maximum length is 1000 characters.", "Type": { - "$id": "606", + "$id": "603", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4543,12 +4521,12 @@ "IsReadOnly": false }, { - "$id": "607", + "$id": "604", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "608", + "$id": "605", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4557,7 +4535,7 @@ "IsReadOnly": false }, { - "$id": "609", + "$id": "606", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -4568,7 +4546,7 @@ "IsReadOnly": false }, { - "$id": "610", + "$id": "607", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -4579,12 +4557,12 @@ "IsReadOnly": false }, { - "$id": "611", + "$id": "608", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "612", + "$id": "609", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4595,7 +4573,7 @@ ] }, { - "$id": "613", + "$id": "610", "Kind": "Model", "Name": "ImagesResponse", "Namespace": "OpenAI", @@ -4603,12 +4581,12 @@ "Usage": "Output", "Properties": [ { - "$id": "614", + "$id": "611", "Name": "created", "SerializedName": "created", "Description": "", "Type": { - "$id": "615", + "$id": "612", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4617,16 +4595,16 @@ "IsReadOnly": false }, { - "$id": "616", + "$id": "613", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "617", + "$id": "614", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "618", + "$id": "615", "Kind": "Model", "Name": "Image", "Namespace": "OpenAI", @@ -4635,12 +4613,12 @@ "Usage": "Output", "Properties": [ { - "$id": "619", + "$id": "616", "Name": "url", "SerializedName": "url", "Description": "The URL of the generated image, if `response_format` is `url` (default).", "Type": { - "$id": "620", + "$id": "617", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -4649,12 +4627,12 @@ "IsReadOnly": false }, { - "$id": "621", + "$id": "618", "Name": "b64_json", "SerializedName": "b64_json", "Description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", "Type": { - "$id": "622", + "$id": "619", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4672,10 +4650,10 @@ ] }, { - "$ref": "618" + "$ref": "615" }, { - "$id": "623", + "$id": "620", "Kind": "Model", "Name": "CreateImageEditRequest", "Namespace": "OpenAI", @@ -4683,12 +4661,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "624", + "$id": "621", "Name": "prompt", "SerializedName": "prompt", "Description": "A text description of the desired image(s). The maximum length is 1000 characters.", "Type": { - "$id": "625", + "$id": "622", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4697,12 +4675,12 @@ "IsReadOnly": false }, { - "$id": "626", + "$id": "623", "Name": "image", "SerializedName": "image", "Description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not\nprovided, image must have transparency, which will be used as the mask.", "Type": { - "$id": "627", + "$id": "624", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4711,12 +4689,12 @@ "IsReadOnly": false }, { - "$id": "628", + "$id": "625", "Name": "mask", "SerializedName": "mask", "Description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where\n`image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions\nas `image`.", "Type": { - "$id": "629", + "$id": "626", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4725,12 +4703,12 @@ "IsReadOnly": false }, { - "$id": "630", + "$id": "627", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "631", + "$id": "628", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4739,7 +4717,7 @@ "IsReadOnly": false }, { - "$id": "632", + "$id": "629", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -4750,7 +4728,7 @@ "IsReadOnly": false }, { - "$id": "633", + "$id": "630", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -4761,12 +4739,12 @@ "IsReadOnly": false }, { - "$id": "634", + "$id": "631", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "635", + "$id": "632", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4777,7 +4755,7 @@ ] }, { - "$id": "636", + "$id": "633", "Kind": "Model", "Name": "CreateImageVariationRequest", "Namespace": "OpenAI", @@ -4785,12 +4763,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "637", + "$id": "634", "Name": "image", "SerializedName": "image", "Description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB,\nand square.", "Type": { - "$id": "638", + "$id": "635", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4799,12 +4777,12 @@ "IsReadOnly": false }, { - "$id": "639", + "$id": "636", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "640", + "$id": "637", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4813,7 +4791,7 @@ "IsReadOnly": false }, { - "$id": "641", + "$id": "638", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", @@ -4824,7 +4802,7 @@ "IsReadOnly": false }, { - "$id": "642", + "$id": "639", "Name": "response_format", "SerializedName": "response_format", "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", @@ -4835,12 +4813,12 @@ "IsReadOnly": false }, { - "$id": "643", + "$id": "640", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "644", + "$id": "641", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4851,7 +4829,7 @@ ] }, { - "$id": "645", + "$id": "642", "Kind": "Model", "Name": "CreateModerationRequest", "Namespace": "OpenAI", @@ -4859,27 +4837,27 @@ "Usage": "Input", "Properties": [ { - "$id": "646", + "$id": "643", "Name": "input", "SerializedName": "input", "Description": "The input text to classify", "Type": { - "$id": "647", + "$id": "644", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "648", + "$id": "645", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "649", + "$id": "646", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "650", + "$id": "647", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4893,7 +4871,7 @@ "IsReadOnly": false }, { - "$id": "651", + "$id": "648", "Name": "model", "SerializedName": "model", "Description": "Two content moderations models are available: `text-moderation-stable` and\n`text-moderation-latest`. The default is `text-moderation-latest` which will be automatically\nupgraded over time. This ensures you are always using our most accurate model. If you use\n`text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy\nof `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.", @@ -4906,7 +4884,7 @@ ] }, { - "$id": "652", + "$id": "649", "Kind": "Model", "Name": "CreateModerationResponse", "Namespace": "OpenAI", @@ -4914,12 +4892,12 @@ "Usage": "Output", "Properties": [ { - "$id": "653", + "$id": "650", "Name": "id", "SerializedName": "id", "Description": "The unique identifier for the moderation request.", "Type": { - "$id": "654", + "$id": "651", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4928,12 +4906,12 @@ "IsReadOnly": false }, { - "$id": "655", + "$id": "652", "Name": "model", "SerializedName": "model", "Description": "The model used to generate the moderation results.", "Type": { - "$id": "656", + "$id": "653", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4942,16 +4920,16 @@ "IsReadOnly": false }, { - "$id": "657", + "$id": "654", "Name": "results", "SerializedName": "results", "Description": "A list of moderation objects.", "Type": { - "$id": "658", + "$id": "655", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "659", + "$id": "656", "Kind": "Model", "Name": "CreateModerationResponseResult", "Namespace": "OpenAI", @@ -4959,12 +4937,12 @@ "Usage": "Output", "Properties": [ { - "$id": "660", + "$id": "657", "Name": "flagged", "SerializedName": "flagged", "Description": "Whether the content violates [OpenAI's usage policies](/policies/usage-policies).", "Type": { - "$id": "661", + "$id": "658", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4973,12 +4951,12 @@ "IsReadOnly": false }, { - "$id": "662", + "$id": "659", "Name": "categories", "SerializedName": "categories", "Description": "A list of the categories, and whether they are flagged or not.", "Type": { - "$id": "663", + "$id": "660", "Kind": "Model", "Name": "CreateModerationResponseResultCategories", "Namespace": "OpenAI", @@ -4986,12 +4964,12 @@ "Usage": "Output", "Properties": [ { - "$id": "664", + "$id": "661", "Name": "hate", "SerializedName": "hate", "Description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity,\nreligion, nationality, sexual orientation, disability status, or caste. Hateful content\naimed at non-protected groups (e.g., chess players) is harrassment.", "Type": { - "$id": "665", + "$id": "662", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5000,12 +4978,12 @@ "IsReadOnly": false }, { - "$id": "666", + "$id": "663", "Name": "hate/threatening", "SerializedName": "hate/threatening", "Description": "Hateful content that also includes violence or serious harm towards the targeted group\nbased on race, gender, ethnicity, religion, nationality, sexual orientation, disability\nstatus, or caste.", "Type": { - "$id": "667", + "$id": "664", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5014,12 +4992,12 @@ "IsReadOnly": false }, { - "$id": "668", + "$id": "665", "Name": "harassment", "SerializedName": "harassment", "Description": "Content that expresses, incites, or promotes harassing language towards any target.", "Type": { - "$id": "669", + "$id": "666", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5028,12 +5006,12 @@ "IsReadOnly": false }, { - "$id": "670", + "$id": "667", "Name": "harassment/threatening", "SerializedName": "harassment/threatening", "Description": "Harassment content that also includes violence or serious harm towards any target.", "Type": { - "$id": "671", + "$id": "668", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5042,12 +5020,12 @@ "IsReadOnly": false }, { - "$id": "672", + "$id": "669", "Name": "self-harm", "SerializedName": "self-harm", "Description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting,\nand eating disorders.", "Type": { - "$id": "673", + "$id": "670", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5056,12 +5034,12 @@ "IsReadOnly": false }, { - "$id": "674", + "$id": "671", "Name": "self-harm/intent", "SerializedName": "self-harm/intent", "Description": "Content where the speaker expresses that they are engaging or intend to engage in acts of\nself-harm, such as suicide, cutting, and eating disorders.", "Type": { - "$id": "675", + "$id": "672", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5070,12 +5048,12 @@ "IsReadOnly": false }, { - "$id": "676", + "$id": "673", "Name": "self-harm/instructive", "SerializedName": "self-harm/instructive", "Description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating\ndisorders, or that gives instructions or advice on how to commit such acts.", "Type": { - "$id": "677", + "$id": "674", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5084,12 +5062,12 @@ "IsReadOnly": false }, { - "$id": "678", + "$id": "675", "Name": "sexual", "SerializedName": "sexual", "Description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or\nthat promotes sexual services (excluding sex education and wellness).", "Type": { - "$id": "679", + "$id": "676", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5098,12 +5076,12 @@ "IsReadOnly": false }, { - "$id": "680", + "$id": "677", "Name": "sexual/minors", "SerializedName": "sexual/minors", "Description": "Sexual content that includes an individual who is under 18 years old.", "Type": { - "$id": "681", + "$id": "678", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5112,12 +5090,12 @@ "IsReadOnly": false }, { - "$id": "682", + "$id": "679", "Name": "violence", "SerializedName": "violence", "Description": "Content that depicts death, violence, or physical injury.", "Type": { - "$id": "683", + "$id": "680", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5126,12 +5104,12 @@ "IsReadOnly": false }, { - "$id": "684", + "$id": "681", "Name": "violence/graphic", "SerializedName": "violence/graphic", "Description": "Content that depicts death, violence, or physical injury in graphic detail.", "Type": { - "$id": "685", + "$id": "682", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5145,12 +5123,12 @@ "IsReadOnly": false }, { - "$id": "686", + "$id": "683", "Name": "category_scores", "SerializedName": "category_scores", "Description": "A list of the categories along with their scores as predicted by model.", "Type": { - "$id": "687", + "$id": "684", "Kind": "Model", "Name": "CreateModerationResponseResultCategoryScores", "Namespace": "OpenAI", @@ -5158,12 +5136,12 @@ "Usage": "Output", "Properties": [ { - "$id": "688", + "$id": "685", "Name": "hate", "SerializedName": "hate", "Description": "The score for the category 'hate'.", "Type": { - "$id": "689", + "$id": "686", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5172,12 +5150,12 @@ "IsReadOnly": false }, { - "$id": "690", + "$id": "687", "Name": "hate/threatening", "SerializedName": "hate/threatening", "Description": "The score for the category 'hate/threatening'.", "Type": { - "$id": "691", + "$id": "688", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5186,12 +5164,12 @@ "IsReadOnly": false }, { - "$id": "692", + "$id": "689", "Name": "harassment", "SerializedName": "harassment", "Description": "The score for the category 'harassment'.", "Type": { - "$id": "693", + "$id": "690", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5200,12 +5178,12 @@ "IsReadOnly": false }, { - "$id": "694", + "$id": "691", "Name": "harassment/threatening", "SerializedName": "harassment/threatening", "Description": "The score for the category 'harassment/threatening'.", "Type": { - "$id": "695", + "$id": "692", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5214,12 +5192,12 @@ "IsReadOnly": false }, { - "$id": "696", + "$id": "693", "Name": "self-harm", "SerializedName": "self-harm", "Description": "The score for the category 'self-harm'.", "Type": { - "$id": "697", + "$id": "694", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5228,12 +5206,12 @@ "IsReadOnly": false }, { - "$id": "698", + "$id": "695", "Name": "self-harm/intent", "SerializedName": "self-harm/intent", "Description": "The score for the category 'self-harm/intent'.", "Type": { - "$id": "699", + "$id": "696", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5242,12 +5220,12 @@ "IsReadOnly": false }, { - "$id": "700", + "$id": "697", "Name": "self-harm/instructive", "SerializedName": "self-harm/instructive", "Description": "The score for the category 'self-harm/instructive'.", "Type": { - "$id": "701", + "$id": "698", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5256,12 +5234,12 @@ "IsReadOnly": false }, { - "$id": "702", + "$id": "699", "Name": "sexual", "SerializedName": "sexual", "Description": "The score for the category 'sexual'.", "Type": { - "$id": "703", + "$id": "700", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5270,12 +5248,12 @@ "IsReadOnly": false }, { - "$id": "704", + "$id": "701", "Name": "sexual/minors", "SerializedName": "sexual/minors", "Description": "The score for the category 'sexual/minors'.", "Type": { - "$id": "705", + "$id": "702", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5284,12 +5262,12 @@ "IsReadOnly": false }, { - "$id": "706", + "$id": "703", "Name": "violence", "SerializedName": "violence", "Description": "The score for the category 'violence'.", "Type": { - "$id": "707", + "$id": "704", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5298,12 +5276,12 @@ "IsReadOnly": false }, { - "$id": "708", + "$id": "705", "Name": "violence/graphic", "SerializedName": "violence/graphic", "Description": "The score for the category 'violence/graphic'.", "Type": { - "$id": "709", + "$id": "706", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5326,16 +5304,16 @@ ] }, { - "$ref": "659" + "$ref": "656" }, { - "$ref": "663" + "$ref": "660" }, { - "$ref": "687" + "$ref": "684" }, { - "$id": "710", + "$id": "707", "Kind": "Model", "Name": "ErrorResponse", "Namespace": "OpenAI", @@ -5343,12 +5321,12 @@ "Usage": "Output", "Properties": [ { - "$id": "711", + "$id": "708", "Name": "error", "SerializedName": "error", "Description": "", "Type": { - "$id": "712", + "$id": "709", "Kind": "Model", "Name": "Error", "Namespace": "OpenAI", @@ -5356,12 +5334,12 @@ "Usage": "Output", "Properties": [ { - "$id": "713", + "$id": "710", "Name": "type", "SerializedName": "type", "Description": "", "Type": { - "$id": "714", + "$id": "711", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5370,12 +5348,12 @@ "IsReadOnly": false }, { - "$id": "715", + "$id": "712", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "716", + "$id": "713", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5384,12 +5362,12 @@ "IsReadOnly": false }, { - "$id": "717", + "$id": "714", "Name": "param", "SerializedName": "param", "Description": "", "Type": { - "$id": "718", + "$id": "715", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -5398,12 +5376,12 @@ "IsReadOnly": false }, { - "$id": "719", + "$id": "716", "Name": "code", "SerializedName": "code", "Description": "", "Type": { - "$id": "720", + "$id": "717", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -5419,152 +5397,49 @@ ] }, { - "$ref": "712" - }, - { - "$id": "721", - "Kind": "Model", - "Name": "FineTuningEvent", - "Namespace": "OpenAI", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "722", - "Name": "object", - "SerializedName": "object", - "Description": "", - "Type": { - "$id": "723", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "724", - "Name": "created_at", - "SerializedName": "created_at", - "Description": "", - "Type": { - "$id": "725", - "Kind": "Primitive", - "Name": "DateTimeUnix", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "726", - "Name": "level", - "SerializedName": "level", - "Description": "", - "Type": { - "$id": "727", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "728", - "Name": "message", - "SerializedName": "message", - "Description": "", - "Type": { - "$id": "729", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "730", - "Name": "data", - "SerializedName": "data", - "Description": "", - "Type": { - "$id": "731", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "732", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "733", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsNullable": true - }, - "IsRequired": false, - "IsReadOnly": false - }, - { - "$id": "734", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$ref": "124" - }, - "IsRequired": false, - "IsReadOnly": false - } - ] + "$ref": "709" } ], "Clients": [ { - "$id": "735", + "$id": "718", "Name": "OpenAIClient", "Description": "", "Operations": [], "Protocol": { - "$id": "736" + "$id": "719" }, "Creatable": true }, { - "$id": "737", + "$id": "720", "Name": "Audio", "Description": "", "Operations": [], "Protocol": { - "$id": "738" + "$id": "721" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "739", + "$id": "722", "Name": "AudioTranscriptions", "Description": "", "Operations": [ { - "$id": "740", + "$id": "723", "Name": "create", "ResourceName": "Transcriptions", "Summary": "Transcribes audio into the input language.", "Parameters": [ { - "$id": "741", + "$id": "724", "Name": "host", "NameInRequest": "host", "Description": "OpenAI Endpoint", "Type": { - "$id": "742", + "$id": "725", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5579,9 +5454,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "743", + "$id": "726", "Type": { - "$id": "744", + "$id": "727", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5590,15 +5465,15 @@ } }, { - "$id": "745", + "$id": "728", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "746", + "$id": "729", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "747", + "$id": "730", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5608,9 +5483,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "748", + "$id": "731", "Type": { - "$ref": "746" + "$ref": "729" }, "Value": "multipart/form-data" }, @@ -5624,11 +5499,11 @@ "Kind": "Constant" }, { - "$id": "749", + "$id": "732", "Name": "audio", "NameInRequest": "audio", "Type": { - "$ref": "127" + "$ref": "124" }, "Location": "Body", "IsRequired": true, @@ -5641,11 +5516,11 @@ "Kind": "Method" }, { - "$id": "750", + "$id": "733", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "751", + "$id": "734", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5660,9 +5535,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "752", + "$id": "735", "Type": { - "$ref": "751" + "$ref": "734" }, "Value": "application/json" } @@ -5670,12 +5545,12 @@ ], "Responses": [ { - "$id": "753", + "$id": "736", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "138" + "$ref": "135" }, "BodyMediaType": "Json", "Headers": [], @@ -5698,35 +5573,35 @@ } ], "Protocol": { - "$id": "754" + "$id": "737" }, "Creatable": false, "Parent": "Audio" }, { - "$id": "755", + "$id": "738", "Name": "AudioTranslations", "Description": "", "Operations": [ { - "$id": "756", + "$id": "739", "Name": "create", "ResourceName": "Translations", "Summary": "Transcribes audio into the input language.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "757", + "$id": "740", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "758", + "$id": "741", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "759", + "$id": "742", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5736,9 +5611,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "760", + "$id": "743", "Type": { - "$ref": "758" + "$ref": "741" }, "Value": "multipart/form-data" }, @@ -5752,11 +5627,11 @@ "Kind": "Constant" }, { - "$id": "761", + "$id": "744", "Name": "audio", "NameInRequest": "audio", "Type": { - "$ref": "141" + "$ref": "138" }, "Location": "Body", "IsRequired": true, @@ -5769,11 +5644,11 @@ "Kind": "Method" }, { - "$id": "762", + "$id": "745", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "763", + "$id": "746", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5788,9 +5663,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "764", + "$id": "747", "Type": { - "$ref": "763" + "$ref": "746" }, "Value": "application/json" } @@ -5798,12 +5673,12 @@ ], "Responses": [ { - "$id": "765", + "$id": "748", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "150" + "$ref": "147" }, "BodyMediaType": "Json", "Headers": [], @@ -5826,41 +5701,41 @@ } ], "Protocol": { - "$id": "766" + "$id": "749" }, "Creatable": false, "Parent": "Audio" }, { - "$id": "767", + "$id": "750", "Name": "Chat", "Description": "", "Operations": [], "Protocol": { - "$id": "768" + "$id": "751" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "769", + "$id": "752", "Name": "ChatCompletions", "Description": "", "Operations": [ { - "$id": "770", + "$id": "753", "Name": "create", "ResourceName": "Completions", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "771", + "$id": "754", "Name": "CreateChatCompletionRequest", "NameInRequest": "CreateChatCompletionRequest", "Type": { - "$ref": "153" + "$ref": "150" }, "Location": "Body", "IsRequired": true, @@ -5873,11 +5748,11 @@ "Kind": "Method" }, { - "$id": "772", + "$id": "755", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "773", + "$id": "756", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5892,19 +5767,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "774", + "$id": "757", "Type": { - "$ref": "773" + "$ref": "756" }, "Value": "application/json" } }, { - "$id": "775", + "$id": "758", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "776", + "$id": "759", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5919,9 +5794,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "777", + "$id": "760", "Type": { - "$ref": "776" + "$ref": "759" }, "Value": "application/json" } @@ -5929,12 +5804,12 @@ ], "Responses": [ { - "$id": "778", + "$id": "761", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "215" + "$ref": "212" }, "BodyMediaType": "Json", "Headers": [], @@ -5957,42 +5832,42 @@ } ], "Protocol": { - "$id": "779" + "$id": "762" }, "Creatable": false, "Parent": "Chat" }, { - "$id": "780", + "$id": "763", "Name": "FineTuning", "Description": "", "Operations": [], "Protocol": { - "$id": "781" + "$id": "764" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "782", + "$id": "765", "Name": "FineTuningJobs", "Description": "", "Operations": [ { - "$id": "783", + "$id": "766", "Name": "create", "ResourceName": "Jobs", "Description": "Creates a job that fine-tunes a specified model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the\nfine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "784", + "$id": "767", "Name": "job", "NameInRequest": "job", "Type": { - "$ref": "249" + "$ref": "246" }, "Location": "Body", "IsRequired": true, @@ -6005,11 +5880,11 @@ "Kind": "Method" }, { - "$id": "785", + "$id": "768", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "786", + "$id": "769", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6024,19 +5899,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "787", + "$id": "770", "Type": { - "$ref": "786" + "$ref": "769" }, "Value": "application/json" } }, { - "$id": "788", + "$id": "771", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "789", + "$id": "772", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6051,9 +5926,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "790", + "$id": "773", "Type": { - "$ref": "789" + "$ref": "772" }, "Value": "application/json" } @@ -6061,12 +5936,12 @@ ], "Responses": [ { - "$id": "791", + "$id": "774", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "264" + "$ref": "261" }, "BodyMediaType": "Json", "Headers": [], @@ -6088,20 +5963,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "792", + "$id": "775", "Name": "listPaginated", "ResourceName": "Jobs", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "793", + "$id": "776", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last job from the previous pagination request.", "Type": { - "$id": "794", + "$id": "777", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6117,12 +5992,12 @@ "Kind": "Method" }, { - "$id": "795", + "$id": "778", "Name": "limit", "NameInRequest": "limit", "Description": "Number of fine-tuning jobs to retrieve.", "Type": { - "$id": "796", + "$id": "779", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -6138,11 +6013,11 @@ "Kind": "Method" }, { - "$id": "797", + "$id": "780", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "798", + "$id": "781", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6157,9 +6032,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "799", + "$id": "782", "Type": { - "$ref": "798" + "$ref": "781" }, "Value": "application/json" } @@ -6167,12 +6042,12 @@ ], "Responses": [ { - "$id": "800", + "$id": "783", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "304" + "$ref": "301" }, "BodyMediaType": "Json", "Headers": [], @@ -6191,20 +6066,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "801", + "$id": "784", "Name": "retrieve", "ResourceName": "Jobs", "Summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "802", + "$id": "785", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Type": { - "$id": "803", + "$id": "786", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6220,11 +6095,11 @@ "Kind": "Method" }, { - "$id": "804", + "$id": "787", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "805", + "$id": "788", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6239,9 +6114,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "806", + "$id": "789", "Type": { - "$ref": "805" + "$ref": "788" }, "Value": "application/json" } @@ -6249,12 +6124,12 @@ ], "Responses": [ { - "$id": "807", + "$id": "790", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "264" + "$ref": "261" }, "BodyMediaType": "Json", "Headers": [], @@ -6273,21 +6148,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "808", + "$id": "791", "Name": "listEvents", "ResourceName": "Jobs", "Summary": "Get status updates for a fine-tuning job.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "809", + "$id": "792", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to get events for.", "Type": { - "$id": "810", + "$id": "793", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6303,12 +6178,12 @@ "Kind": "Method" }, { - "$id": "811", + "$id": "794", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last event from the previous pagination request.", "Type": { - "$id": "812", + "$id": "795", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6324,12 +6199,12 @@ "Kind": "Method" }, { - "$id": "813", + "$id": "796", "Name": "limit", "NameInRequest": "limit", "Description": "Number of events to retrieve.", "Type": { - "$id": "814", + "$id": "797", "Kind": "Primitive", "Name": "Int64", "IsNullable": false @@ -6345,11 +6220,11 @@ "Kind": "Method" }, { - "$id": "815", + "$id": "798", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "816", + "$id": "799", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6364,9 +6239,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "817", + "$id": "800", "Type": { - "$ref": "816" + "$ref": "799" }, "Value": "application/json" } @@ -6374,12 +6249,12 @@ ], "Responses": [ { - "$id": "818", + "$id": "801", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "311" + "$ref": "308" }, "BodyMediaType": "Json", "Headers": [], @@ -6398,21 +6273,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "819", + "$id": "802", "Name": "cancel", "ResourceName": "Jobs", "Summary": "Immediately cancel a fine-tune job.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "820", + "$id": "803", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to cancel.", "Type": { - "$id": "821", + "$id": "804", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6428,11 +6303,11 @@ "Kind": "Method" }, { - "$id": "822", + "$id": "805", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "823", + "$id": "806", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6447,9 +6322,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "824", + "$id": "807", "Type": { - "$ref": "823" + "$ref": "806" }, "Value": "application/json" } @@ -6457,12 +6332,12 @@ ], "Responses": [ { - "$id": "825", + "$id": "808", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "264" + "$ref": "261" }, "BodyMediaType": "Json", "Headers": [], @@ -6482,30 +6357,30 @@ } ], "Protocol": { - "$id": "826" + "$id": "809" }, "Creatable": false, "Parent": "FineTuning" }, { - "$id": "827", + "$id": "810", "Name": "Completions", "Description": "", "Operations": [ { - "$id": "828", + "$id": "811", "Name": "create", "ResourceName": "Completions", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "829", + "$id": "812", "Name": "CreateCompletionRequest", "NameInRequest": "CreateCompletionRequest", "Type": { - "$ref": "326" + "$ref": "323" }, "Location": "Body", "IsRequired": true, @@ -6518,11 +6393,11 @@ "Kind": "Method" }, { - "$id": "830", + "$id": "813", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "831", + "$id": "814", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6537,19 +6412,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "832", + "$id": "815", "Type": { - "$ref": "831" + "$ref": "814" }, "Value": "application/json" } }, { - "$id": "833", + "$id": "816", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "834", + "$id": "817", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6564,9 +6439,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "835", + "$id": "818", "Type": { - "$ref": "834" + "$ref": "817" }, "Value": "application/json" } @@ -6574,12 +6449,12 @@ ], "Responses": [ { - "$id": "836", + "$id": "819", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "371" + "$ref": "368" }, "BodyMediaType": "Json", "Headers": [], @@ -6602,31 +6477,31 @@ } ], "Protocol": { - "$id": "837" + "$id": "820" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "838", + "$id": "821", "Name": "Edits", "Description": "", "Operations": [ { - "$id": "839", + "$id": "822", "Name": "create", "ResourceName": "Edits", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "840", + "$id": "823", "Name": "edit", "NameInRequest": "edit", "Type": { - "$ref": "405" + "$ref": "402" }, "Location": "Body", "IsRequired": true, @@ -6639,11 +6514,11 @@ "Kind": "Method" }, { - "$id": "841", + "$id": "824", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "842", + "$id": "825", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6658,19 +6533,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "843", + "$id": "826", "Type": { - "$ref": "842" + "$ref": "825" }, "Value": "application/json" } }, { - "$id": "844", + "$id": "827", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "845", + "$id": "828", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6685,9 +6560,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "846", + "$id": "829", "Type": { - "$ref": "845" + "$ref": "828" }, "Value": "application/json" } @@ -6695,12 +6570,12 @@ ], "Responses": [ { - "$id": "847", + "$id": "830", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "417" + "$ref": "414" }, "BodyMediaType": "Json", "Headers": [], @@ -6723,31 +6598,31 @@ } ], "Protocol": { - "$id": "848" + "$id": "831" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "849", + "$id": "832", "Name": "Embeddings", "Description": "", "Operations": [ { - "$id": "850", + "$id": "833", "Name": "create", "ResourceName": "Embeddings", "Summary": "Creates an embedding vector representing the input text.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "851", + "$id": "834", "Name": "embedding", "NameInRequest": "embedding", "Type": { - "$ref": "431" + "$ref": "428" }, "Location": "Body", "IsRequired": true, @@ -6760,11 +6635,11 @@ "Kind": "Method" }, { - "$id": "852", + "$id": "835", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "853", + "$id": "836", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6779,19 +6654,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "854", + "$id": "837", "Type": { - "$ref": "853" + "$ref": "836" }, "Value": "application/json" } }, { - "$id": "855", + "$id": "838", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "856", + "$id": "839", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6806,9 +6681,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "857", + "$id": "840", "Type": { - "$ref": "856" + "$ref": "839" }, "Value": "application/json" } @@ -6816,12 +6691,12 @@ ], "Responses": [ { - "$id": "858", + "$id": "841", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "445" + "$ref": "442" }, "BodyMediaType": "Json", "Headers": [], @@ -6844,31 +6719,31 @@ } ], "Protocol": { - "$id": "859" + "$id": "842" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "860", + "$id": "843", "Name": "Files", "Description": "", "Operations": [ { - "$id": "861", + "$id": "844", "Name": "list", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "862", + "$id": "845", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "863", + "$id": "846", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6883,9 +6758,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "864", + "$id": "847", "Type": { - "$ref": "863" + "$ref": "846" }, "Value": "application/json" } @@ -6893,12 +6768,12 @@ ], "Responses": [ { - "$id": "865", + "$id": "848", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "466" + "$ref": "463" }, "BodyMediaType": "Json", "Headers": [], @@ -6917,24 +6792,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "866", + "$id": "849", "Name": "create", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "867", + "$id": "850", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "868", + "$id": "851", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "869", + "$id": "852", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6944,9 +6819,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "870", + "$id": "853", "Type": { - "$ref": "868" + "$ref": "851" }, "Value": "multipart/form-data" }, @@ -6960,11 +6835,11 @@ "Kind": "Constant" }, { - "$id": "871", + "$id": "854", "Name": "file", "NameInRequest": "file", "Type": { - "$ref": "487" + "$ref": "484" }, "Location": "Body", "IsRequired": true, @@ -6977,11 +6852,11 @@ "Kind": "Method" }, { - "$id": "872", + "$id": "855", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "873", + "$id": "856", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6996,9 +6871,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "874", + "$id": "857", "Type": { - "$ref": "873" + "$ref": "856" }, "Value": "application/json" } @@ -7006,12 +6881,12 @@ ], "Responses": [ { - "$id": "875", + "$id": "858", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "471" + "$ref": "468" }, "BodyMediaType": "Json", "Headers": [], @@ -7033,21 +6908,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "876", + "$id": "859", "Name": "retrieve", "ResourceName": "Files", "Summary": "Returns information about a specific file.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "877", + "$id": "860", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "878", + "$id": "861", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7063,11 +6938,11 @@ "Kind": "Method" }, { - "$id": "879", + "$id": "862", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "880", + "$id": "863", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7082,9 +6957,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "881", + "$id": "864", "Type": { - "$ref": "880" + "$ref": "863" }, "Value": "application/json" } @@ -7092,12 +6967,12 @@ ], "Responses": [ { - "$id": "882", + "$id": "865", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "471" + "$ref": "468" }, "BodyMediaType": "Json", "Headers": [], @@ -7116,21 +6991,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "883", + "$id": "866", "Name": "delete", "ResourceName": "Files", "Summary": "Delete a file", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "884", + "$id": "867", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "885", + "$id": "868", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7146,11 +7021,11 @@ "Kind": "Method" }, { - "$id": "886", + "$id": "869", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "887", + "$id": "870", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7165,9 +7040,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "888", + "$id": "871", "Type": { - "$ref": "887" + "$ref": "870" }, "Value": "application/json" } @@ -7175,12 +7050,12 @@ ], "Responses": [ { - "$id": "889", + "$id": "872", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "492" + "$ref": "489" }, "BodyMediaType": "Json", "Headers": [], @@ -7199,21 +7074,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "890", + "$id": "873", "Name": "download", "ResourceName": "Files", "Summary": "Returns the contents of the specified file.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "891", + "$id": "874", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "892", + "$id": "875", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7229,11 +7104,11 @@ "Kind": "Method" }, { - "$id": "893", + "$id": "876", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "894", + "$id": "877", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7248,9 +7123,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "895", + "$id": "878", "Type": { - "$ref": "894" + "$ref": "877" }, "Value": "application/json" } @@ -7258,12 +7133,12 @@ ], "Responses": [ { - "$id": "896", + "$id": "879", "StatusCodes": [ 200 ], "BodyType": { - "$id": "897", + "$id": "880", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7286,32 +7161,32 @@ } ], "Protocol": { - "$id": "898" + "$id": "881" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "899", + "$id": "882", "Name": "FineTunes", "Description": "", "Operations": [ { - "$id": "900", + "$id": "883", "Name": "create", "ResourceName": "FineTunes", "Summary": "Creates a job that fine-tunes a specified model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "901", + "$id": "884", "Name": "fine_tune", "NameInRequest": "fine_tune", "Type": { - "$ref": "499" + "$ref": "496" }, "Location": "Body", "IsRequired": true, @@ -7324,11 +7199,11 @@ "Kind": "Method" }, { - "$id": "902", + "$id": "885", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "903", + "$id": "886", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7343,19 +7218,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "904", + "$id": "887", "Type": { - "$ref": "903" + "$ref": "886" }, "Value": "application/json" } }, { - "$id": "905", + "$id": "888", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "906", + "$id": "889", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7370,9 +7245,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "907", + "$id": "890", "Type": { - "$ref": "906" + "$ref": "889" }, "Value": "application/json" } @@ -7380,12 +7255,12 @@ ], "Responses": [ { - "$id": "908", + "$id": "891", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "524" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -7407,21 +7282,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "909", + "$id": "892", "Name": "list", "ResourceName": "FineTunes", "Summary": "List your organization's fine-tuning jobs", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "910", + "$id": "893", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "911", + "$id": "894", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7436,9 +7311,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "912", + "$id": "895", "Type": { - "$ref": "911" + "$ref": "894" }, "Value": "application/json" } @@ -7446,12 +7321,12 @@ ], "Responses": [ { - "$id": "913", + "$id": "896", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "573" + "$ref": "570" }, "BodyMediaType": "Json", "Headers": [], @@ -7470,22 +7345,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "914", + "$id": "897", "Name": "retrieve", "ResourceName": "FineTunes", "Summary": "Gets info about the fine-tune job.\n\n[Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "915", + "$id": "898", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job", "Type": { - "$id": "916", + "$id": "899", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7501,11 +7376,11 @@ "Kind": "Method" }, { - "$id": "917", + "$id": "900", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "918", + "$id": "901", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7520,9 +7395,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "919", + "$id": "902", "Type": { - "$ref": "918" + "$ref": "901" }, "Value": "application/json" } @@ -7530,12 +7405,12 @@ ], "Responses": [ { - "$id": "920", + "$id": "903", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "524" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -7554,22 +7429,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "921", + "$id": "904", "Name": "listEvents", "ResourceName": "FineTunes", "Summary": "Get fine-grained status updates for a fine-tune job.", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "922", + "$id": "905", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job to get events for.", "Type": { - "$id": "923", + "$id": "906", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7585,12 +7460,12 @@ "Kind": "Method" }, { - "$id": "924", + "$id": "907", "Name": "stream", "NameInRequest": "stream", "Description": "Whether to stream events for the fine-tune job. If set to true, events will be sent as\ndata-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available. The stream will terminate with a `data: [DONE]` message when the\njob is finished (succeeded, cancelled, or failed).\n\nIf set to false, only events generated so far will be returned.", "Type": { - "$id": "925", + "$id": "908", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -7606,11 +7481,11 @@ "Kind": "Method" }, { - "$id": "926", + "$id": "909", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "927", + "$id": "910", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7625,9 +7500,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "928", + "$id": "911", "Type": { - "$ref": "927" + "$ref": "910" }, "Value": "application/json" } @@ -7635,12 +7510,12 @@ ], "Responses": [ { - "$id": "929", + "$id": "912", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "578" + "$ref": "575" }, "BodyMediaType": "Json", "Headers": [], @@ -7659,22 +7534,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "930", + "$id": "913", "Name": "cancel", "ResourceName": "FineTunes", "Summary": "Immediately cancel a fine-tune job.", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "931", + "$id": "914", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job to cancel", "Type": { - "$id": "932", + "$id": "915", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7690,11 +7565,11 @@ "Kind": "Method" }, { - "$id": "933", + "$id": "916", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "934", + "$id": "917", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7709,9 +7584,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "935", + "$id": "918", "Type": { - "$ref": "934" + "$ref": "917" }, "Value": "application/json" } @@ -7719,12 +7594,12 @@ ], "Responses": [ { - "$id": "936", + "$id": "919", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "524" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -7744,31 +7619,31 @@ } ], "Protocol": { - "$id": "937" + "$id": "920" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "938", + "$id": "921", "Name": "ModelsOps", "Description": "", "Operations": [ { - "$id": "939", + "$id": "922", "Name": "list", "ResourceName": "Models", "Summary": "Lists the currently available models, and provides basic information about each one such as the\nowner and availability.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "940", + "$id": "923", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "941", + "$id": "924", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7783,9 +7658,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "942", + "$id": "925", "Type": { - "$ref": "941" + "$ref": "924" }, "Value": "application/json" } @@ -7793,12 +7668,12 @@ ], "Responses": [ { - "$id": "943", + "$id": "926", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "583" + "$ref": "580" }, "BodyMediaType": "Json", "Headers": [], @@ -7817,21 +7692,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "944", + "$id": "927", "Name": "retrieve", "ResourceName": "Models", "Summary": "Retrieves a model instance, providing basic information about the model such as the owner and\npermissioning.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "945", + "$id": "928", "Name": "model", "NameInRequest": "model", "Description": "The ID of the model to use for this request.", "Type": { - "$id": "946", + "$id": "929", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7847,11 +7722,11 @@ "Kind": "Method" }, { - "$id": "947", + "$id": "930", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "948", + "$id": "931", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7866,9 +7741,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "949", + "$id": "932", "Type": { - "$ref": "948" + "$ref": "931" }, "Value": "application/json" } @@ -7876,12 +7751,12 @@ ], "Responses": [ { - "$id": "950", + "$id": "933", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "588" + "$ref": "585" }, "BodyMediaType": "Json", "Headers": [], @@ -7900,21 +7775,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "951", + "$id": "934", "Name": "delete", "ResourceName": "Models", "Summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "952", + "$id": "935", "Name": "model", "NameInRequest": "model", "Description": "The model to delete", "Type": { - "$id": "953", + "$id": "936", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7930,11 +7805,11 @@ "Kind": "Method" }, { - "$id": "954", + "$id": "937", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "955", + "$id": "938", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7949,9 +7824,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "956", + "$id": "939", "Type": { - "$ref": "955" + "$ref": "938" }, "Value": "application/json" } @@ -7959,12 +7834,12 @@ ], "Responses": [ { - "$id": "957", + "$id": "940", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "597" + "$ref": "594" }, "BodyMediaType": "Json", "Headers": [], @@ -7984,31 +7859,31 @@ } ], "Protocol": { - "$id": "958" + "$id": "941" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "959", + "$id": "942", "Name": "Images", "Description": "", "Operations": [ { - "$id": "960", + "$id": "943", "Name": "create", "ResourceName": "Images", "Summary": "Creates an image given a prompt", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "961", + "$id": "944", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "604" + "$ref": "601" }, "Location": "Body", "IsRequired": true, @@ -8021,11 +7896,11 @@ "Kind": "Method" }, { - "$id": "962", + "$id": "945", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "963", + "$id": "946", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8040,19 +7915,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "964", + "$id": "947", "Type": { - "$ref": "963" + "$ref": "946" }, "Value": "application/json" } }, { - "$id": "965", + "$id": "948", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "966", + "$id": "949", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8067,9 +7942,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "967", + "$id": "950", "Type": { - "$ref": "966" + "$ref": "949" }, "Value": "application/json" } @@ -8077,12 +7952,12 @@ ], "Responses": [ { - "$id": "968", + "$id": "951", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "613" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8104,24 +7979,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "969", + "$id": "952", "Name": "createEdit", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "970", + "$id": "953", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "971", + "$id": "954", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "972", + "$id": "955", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8131,9 +8006,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "973", + "$id": "956", "Type": { - "$ref": "971" + "$ref": "954" }, "Value": "multipart/form-data" }, @@ -8147,11 +8022,11 @@ "Kind": "Constant" }, { - "$id": "974", + "$id": "957", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "623" + "$ref": "620" }, "Location": "Body", "IsRequired": true, @@ -8164,11 +8039,11 @@ "Kind": "Method" }, { - "$id": "975", + "$id": "958", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "976", + "$id": "959", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8183,9 +8058,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "977", + "$id": "960", "Type": { - "$ref": "976" + "$ref": "959" }, "Value": "application/json" } @@ -8193,12 +8068,12 @@ ], "Responses": [ { - "$id": "978", + "$id": "961", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "613" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8220,24 +8095,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "979", + "$id": "962", "Name": "createVariation", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "980", + "$id": "963", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "981", + "$id": "964", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "982", + "$id": "965", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8247,9 +8122,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "983", + "$id": "966", "Type": { - "$ref": "981" + "$ref": "964" }, "Value": "multipart/form-data" }, @@ -8263,11 +8138,11 @@ "Kind": "Constant" }, { - "$id": "984", + "$id": "967", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "636" + "$ref": "633" }, "Location": "Body", "IsRequired": true, @@ -8280,11 +8155,11 @@ "Kind": "Method" }, { - "$id": "985", + "$id": "968", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "986", + "$id": "969", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8299,9 +8174,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "987", + "$id": "970", "Type": { - "$ref": "986" + "$ref": "969" }, "Value": "application/json" } @@ -8309,12 +8184,12 @@ ], "Responses": [ { - "$id": "988", + "$id": "971", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "613" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8337,31 +8212,31 @@ } ], "Protocol": { - "$id": "989" + "$id": "972" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "990", + "$id": "973", "Name": "Moderations", "Description": "", "Operations": [ { - "$id": "991", + "$id": "974", "Name": "create", "ResourceName": "Moderations", "Summary": "Classifies if text violates OpenAI's Content Policy", "Parameters": [ { - "$ref": "741" + "$ref": "724" }, { - "$id": "992", + "$id": "975", "Name": "content", "NameInRequest": "content", "Type": { - "$ref": "645" + "$ref": "642" }, "Location": "Body", "IsRequired": true, @@ -8374,11 +8249,11 @@ "Kind": "Method" }, { - "$id": "993", + "$id": "976", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "994", + "$id": "977", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8393,19 +8268,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "995", + "$id": "978", "Type": { - "$ref": "994" + "$ref": "977" }, "Value": "application/json" } }, { - "$id": "996", + "$id": "979", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "997", + "$id": "980", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8420,9 +8295,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "998", + "$id": "981", "Type": { - "$ref": "997" + "$ref": "980" }, "Value": "application/json" } @@ -8430,12 +8305,12 @@ ], "Responses": [ { - "$id": "999", + "$id": "982", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "652" + "$ref": "649" }, "BodyMediaType": "Json", "Headers": [], @@ -8458,16 +8333,16 @@ } ], "Protocol": { - "$id": "1000" + "$id": "983" }, "Creatable": false, "Parent": "OpenAIClient" } ], "Auth": { - "$id": "1001", + "$id": "984", "ApiKey": { - "$id": "1002", + "$id": "985", "Name": "Authorization", "Prefix": "Bearer" } From 0cf28056a4cb319ac34b425fa261a3f83ebdf8d7 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sat, 27 Apr 2024 23:01:23 +0800 Subject: [PATCH 55/60] fix regen error --- .../src/Generated/tspCodeModel.json | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/samples/AnomalyDetector/src/Generated/tspCodeModel.json b/samples/AnomalyDetector/src/Generated/tspCodeModel.json index 78834ec21f9..791e648eb5e 100644 --- a/samples/AnomalyDetector/src/Generated/tspCodeModel.json +++ b/samples/AnomalyDetector/src/Generated/tspCodeModel.json @@ -2101,9 +2101,9 @@ { "$id": "279", "Kind": "Model", - "Name": "AnomalyDetectorError", - "Namespace": "AnomalyDetector.Univariate", - "Description": "Error information returned by the API.", + "Name": "ResponseError", + "Namespace": "AnomalyDetector.Multivariate", + "Description": "Error response", "IsNullable": false, "Usage": "Output", "Properties": [ @@ -2113,62 +2113,62 @@ "SerializedName": "code", "Description": "The error code.", "Type": { - "$ref": "43" + "$id": "281", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false }, - "IsRequired": false, + "IsRequired": true, "IsReadOnly": false }, { - "$id": "281", + "$id": "282", "Name": "message", "SerializedName": "message", - "Description": "A message explaining the error reported by the service.", + "Description": "The message explaining the error reported by the service.", "Type": { - "$id": "282", + "$id": "283", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsRequired": false, + "IsRequired": true, "IsReadOnly": false } ] }, { - "$id": "283", + "$id": "284", "Kind": "Model", - "Name": "ResponseError", - "Namespace": "AnomalyDetector.Multivariate", - "Description": "Error response", + "Name": "AnomalyDetectorError", + "Namespace": "AnomalyDetector.Univariate", + "Description": "Error information returned by the API.", "IsNullable": false, "Usage": "Output", "Properties": [ { - "$id": "284", + "$id": "285", "Name": "code", "SerializedName": "code", "Description": "The error code.", "Type": { - "$id": "285", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false + "$ref": "43" }, - "IsRequired": true, + "IsRequired": false, "IsReadOnly": false }, { "$id": "286", "Name": "message", "SerializedName": "message", - "Description": "The message explaining the error reported by the service.", + "Description": "A message explaining the error reported by the service.", "Type": { "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsRequired": true, + "IsRequired": false, "IsReadOnly": false } ] From 0377bd7949e499b23cb214b350f71dfdf43c5a8d Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Sun, 28 Apr 2024 15:19:21 +0800 Subject: [PATCH 56/60] bump tcgc to dev version to fix model usage propagation problem --- package-lock.json | 22 +-- package.json | 2 +- .../Emitter.Csharp/package.json | 4 +- .../src/Generated/tspCodeModel.json | 128 ++++++------------ .../src/Generated/tspCodeModel.json | 2 +- 5 files changed, 55 insertions(+), 103 deletions(-) diff --git a/package-lock.json b/package-lock.json index fa17ca32fcb..70d17adc69f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "name": "@autorest/csharp", "devDependencies": { "@azure-tools/cadl-ranch-mockapis": "file:test/CadlRanchMockApis", - "@azure-tools/typespec-client-generator-core": "0.41.5", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.48", @@ -335,10 +335,10 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.41.5", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.41.5.tgz", - "integrity": "sha512-qY2dnyKIJm68+yv45lXu46QxHK5wepNbVXVBfdpF2thx1505ltjsq6fOwJhSwiHdC4wjiUtDUxYsB9bmG2+g2g==", + "version": "0.42.0-pr-753.20240427.2", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", "dev": true, + "license": "MIT", "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -347,11 +347,11 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.41.0", - "@typespec/compiler": "~0.55.0", - "@typespec/http": "~0.55.0", - "@typespec/rest": "~0.55.0", - "@typespec/versioning": "~0.55.0" + "@azure-tools/typespec-azure-core": "~0.41.0 || >=0.42.0-0 <0.42.0", + "@typespec/compiler": "~0.55.0 || >=0.56.0-0 <0.56.0", + "@typespec/http": "~0.55.0 || >=0.56.0-0 <0.56.0", + "@typespec/rest": "~0.55.0 || >=0.56.0-0 <0.56.0", + "@typespec/versioning": "~0.55.0 || >=0.56.0-0 <0.56.0" } }, "node_modules/@azure-tools/typespec-csharp": { @@ -8415,7 +8415,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.41.0", - "@azure-tools/typespec-client-generator-core": "0.41.5", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", "@types/lodash.isequal": "^4.5.6", "@types/mocha": "~9.1.0", "@types/node": "~18.13.0", @@ -8439,7 +8439,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", "@typespec/compiler": ">=0.50.0 <1.0.0", "@typespec/http": ">=0.50.0 <1.0.0", "@typespec/openapi": ">=0.50.0 <1.0.0", diff --git a/package.json b/package.json index 9438dfc6f36..b3501fbb6a6 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "package.json intended for in-repo use only, package.json used for publishing is located in src/AutoRest.CSharp/package.json", "devDependencies": { "@azure-tools/cadl-ranch-mockapis": "file:test/CadlRanchMockApis", - "@azure-tools/typespec-client-generator-core": "0.41.5", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.48", diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 2be102b56df..71ba3f38804 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -40,7 +40,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", "@typespec/compiler": ">=0.50.0 <1.0.0", "@typespec/http": ">=0.50.0 <1.0.0", "@typespec/rest": ">=0.50.0 <1.0.0", @@ -49,7 +49,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.41.0", - "@azure-tools/typespec-client-generator-core": "0.41.5", + "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", "@typespec/compiler": "0.55.0", "@typespec/eslint-config-typespec": "0.55.0", "@typespec/eslint-plugin": "0.55.0", diff --git a/test/CadlRanchProjectsNonAzure/payload/content-negotiation/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/payload/content-negotiation/src/Generated/tspCodeModel.json index ad47a5405c7..6fffa7e0a86 100644 --- a/test/CadlRanchProjectsNonAzure/payload/content-negotiation/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/payload/content-negotiation/src/Generated/tspCodeModel.json @@ -28,84 +28,36 @@ "IsReadOnly": false } ] - }, - { - "$id": "5", - "Kind": "Model", - "Name": "PngImage", - "Namespace": "Payload.ContentNegotiation.SameBody", - "IsNullable": false, - "Usage": "Output", - "Properties": [ - { - "$id": "6", - "Name": "image", - "SerializedName": "image", - "Description": "", - "Type": { - "$id": "7", - "Kind": "Primitive", - "Name": "Bytes", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "8", - "Kind": "Model", - "Name": "JpegImage", - "Namespace": "Payload.ContentNegotiation.SameBody", - "IsNullable": false, - "Usage": "Output", - "Properties": [ - { - "$id": "9", - "Name": "image", - "SerializedName": "image", - "Description": "", - "Type": { - "$id": "10", - "Kind": "Primitive", - "Name": "Bytes", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "11", + "$id": "5", "Name": "ContentNegotiationClient", "Description": "", "Operations": [], "Protocol": { - "$id": "12" + "$id": "6" }, "Creatable": true }, { - "$id": "13", + "$id": "7", "Name": "SameBody", "Description": "", "Operations": [ { - "$id": "14", + "$id": "8", "Name": "getAvatarAsPng", "ResourceName": "SameBody", "Parameters": [ { - "$id": "15", + "$id": "9", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "16", + "$id": "10", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -120,9 +72,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "17", + "$id": "11", "Type": { - "$id": "18", + "$id": "12", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -131,11 +83,11 @@ } }, { - "$id": "19", + "$id": "13", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "20", + "$id": "14", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -150,9 +102,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "21", + "$id": "15", "Type": { - "$ref": "20" + "$ref": "14" }, "Value": "image/png" } @@ -160,12 +112,12 @@ ], "Responses": [ { - "$id": "22", + "$id": "16", "StatusCodes": [ 200 ], "BodyType": { - "$id": "23", + "$id": "17", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -187,19 +139,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "24", + "$id": "18", "Name": "getAvatarAsJpeg", "ResourceName": "SameBody", "Parameters": [ { - "$ref": "15" + "$ref": "9" }, { - "$id": "25", + "$id": "19", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "26", + "$id": "20", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -214,9 +166,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "27", + "$id": "21", "Type": { - "$ref": "26" + "$ref": "20" }, "Value": "image/jpeg" } @@ -224,12 +176,12 @@ ], "Responses": [ { - "$id": "28", + "$id": "22", "StatusCodes": [ 200 ], "BodyType": { - "$id": "29", + "$id": "23", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -252,30 +204,30 @@ } ], "Protocol": { - "$id": "30" + "$id": "24" }, "Creatable": false, "Parent": "ContentNegotiationClient" }, { - "$id": "31", + "$id": "25", "Name": "DifferentBody", "Description": "", "Operations": [ { - "$id": "32", + "$id": "26", "Name": "getAvatarAsPng", "ResourceName": "DifferentBody", "Parameters": [ { - "$ref": "15" + "$ref": "9" }, { - "$id": "33", + "$id": "27", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "34", + "$id": "28", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -290,9 +242,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "35", + "$id": "29", "Type": { - "$ref": "34" + "$ref": "28" }, "Value": "image/png" } @@ -300,12 +252,12 @@ ], "Responses": [ { - "$id": "36", + "$id": "30", "StatusCodes": [ 200 ], "BodyType": { - "$id": "37", + "$id": "31", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -327,19 +279,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "38", + "$id": "32", "Name": "getAvatarAsJson", "ResourceName": "DifferentBody", "Parameters": [ { - "$ref": "15" + "$ref": "9" }, { - "$id": "39", + "$id": "33", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "40", + "$id": "34", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -354,9 +306,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "41", + "$id": "35", "Type": { - "$ref": "40" + "$ref": "34" }, "Value": "application/json" } @@ -364,7 +316,7 @@ ], "Responses": [ { - "$id": "42", + "$id": "36", "StatusCodes": [ 200 ], @@ -389,7 +341,7 @@ } ], "Protocol": { - "$id": "43" + "$id": "37" }, "Creatable": false, "Parent": "ContentNegotiationClient" diff --git a/test/CadlRanchProjectsNonAzure/type/enum/extensible/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/type/enum/extensible/src/Generated/tspCodeModel.json index e9f6b904e3d..43c152a41ef 100644 --- a/test/CadlRanchProjectsNonAzure/type/enum/extensible/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/type/enum/extensible/src/Generated/tspCodeModel.json @@ -7,7 +7,7 @@ "$id": "2", "Kind": "Enum", "Name": "DaysOfWeekExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", From 2ee06e30072fe217b4fa12566e09027cc52c02bc Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Tue, 30 Apr 2024 10:00:22 +0800 Subject: [PATCH 57/60] bump tcgc to 0.41.8 --- package-lock.json | 22 +- package.json | 2 +- .../Emitter.Csharp/package.json | 4 +- .../naming/src/Generated/tspCodeModel.json | 4 +- .../src/Generated/tspCodeModel.json | 1940 +++++++------ .../src/Generated/Models/Bird.cs | 4 +- .../src/Generated/Models/Eagle.cs | 2 +- .../src/Generated/Models/Goose.cs | 2 +- .../src/Generated/Models/SeaGull.cs | 2 +- .../src/Generated/Models/Sparrow.cs | 2 +- .../src/Generated/Models/UnknownBird.cs | 2 +- .../src/Generated/tspCodeModel.json | 6 +- ...fferentSpreadFloatDerived.Serialization.cs | 14 +- .../Models/DifferentSpreadFloatDerived.cs | 18 +- ...ifferentSpreadFloatRecord.Serialization.cs | 115 + .../Models/DifferentSpreadFloatRecord.cs | 43 + ...ntSpreadModelArrayDerived.Serialization.cs | 14 +- .../DifferentSpreadModelArrayDerived.cs | 17 +- ...entSpreadModelArrayRecord.Serialization.cs | 125 + .../Models/DifferentSpreadModelArrayRecord.cs | 43 + ...fferentSpreadModelDerived.Serialization.cs | 14 +- .../Models/DifferentSpreadModelDerived.cs | 17 +- ...ifferentSpreadModelRecord.Serialization.cs | 115 + .../Models/DifferentSpreadModelRecord.cs | 43 + ...ferentSpreadStringDerived.Serialization.cs | 14 +- .../Models/DifferentSpreadStringDerived.cs | 14 +- ...fferentSpreadStringRecord.Serialization.cs | 115 + .../Models/DifferentSpreadStringRecord.cs | 39 + .../src/Generated/tspCodeModel.json | 2479 ++++++++++------- 29 files changed, 3241 insertions(+), 1990 deletions(-) create mode 100644 test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs create mode 100644 test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs create mode 100644 test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs create mode 100644 test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs create mode 100644 test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs create mode 100644 test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs create mode 100644 test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs create mode 100644 test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs diff --git a/package-lock.json b/package-lock.json index 3e469ab26c8..e657d3fc086 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "name": "@autorest/csharp", "devDependencies": { "@azure-tools/cadl-ranch-mockapis": "file:test/CadlRanchMockApis", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", + "@azure-tools/typespec-client-generator-core": "0.41.8", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.48", @@ -335,10 +335,10 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.42.0-pr-753.20240427.2", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", + "version": "0.41.8", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.41.8.tgz", + "integrity": "sha512-d72LPwkEio/swqyAAgcuOaw+K4ghSbZcRjpjsvddxHWHh25ZukjD2hU/BfCtidnKptgKjs79fV++w2MYE6sTyw==", "dev": true, - "license": "MIT", "dependencies": { "change-case": "~5.4.4", "pluralize": "^8.0.0" @@ -347,11 +347,11 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.41.0 || >=0.42.0-0 <0.42.0", - "@typespec/compiler": "~0.55.0 || >=0.56.0-0 <0.56.0", - "@typespec/http": "~0.55.0 || >=0.56.0-0 <0.56.0", - "@typespec/rest": "~0.55.0 || >=0.56.0-0 <0.56.0", - "@typespec/versioning": "~0.55.0 || >=0.56.0-0 <0.56.0" + "@azure-tools/typespec-azure-core": "~0.41.0", + "@typespec/compiler": "~0.55.0", + "@typespec/http": "~0.55.0", + "@typespec/rest": "~0.55.0", + "@typespec/versioning": "~0.55.0" } }, "node_modules/@azure-tools/typespec-csharp": { @@ -8415,7 +8415,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.41.0", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", + "@azure-tools/typespec-client-generator-core": "0.41.8", "@types/lodash.isequal": "^4.5.6", "@types/mocha": "~9.1.0", "@types/node": "~18.13.0", @@ -8439,7 +8439,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", + "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", "@typespec/compiler": ">=0.50.0 <1.0.0", "@typespec/http": ">=0.50.0 <1.0.0", "@typespec/openapi": ">=0.50.0 <1.0.0", diff --git a/package.json b/package.json index b3501fbb6a6..76ae906fb83 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "package.json intended for in-repo use only, package.json used for publishing is located in src/AutoRest.CSharp/package.json", "devDependencies": { "@azure-tools/cadl-ranch-mockapis": "file:test/CadlRanchMockApis", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", + "@azure-tools/typespec-client-generator-core": "0.41.8", "@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp", "@azure-tools/unbranded-tests": "file:test/UnbrandedProjects", "@microsoft.azure/autorest.testserver": "3.3.48", diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 71ba3f38804..65f753703eb 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -40,7 +40,7 @@ }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", + "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", "@typespec/compiler": ">=0.50.0 <1.0.0", "@typespec/http": ">=0.50.0 <1.0.0", "@typespec/rest": ">=0.50.0 <1.0.0", @@ -49,7 +49,7 @@ }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.41.0", - "@azure-tools/typespec-client-generator-core": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvMzc0MDkzNS9hcnRpZmFjdE5hbWUvcGFja2FnZXM1/content?format=file&subPath=%2Fazure-tools-typespec-client-generator-core-0.42.0-pr-753.20240427.2.tgz", + "@azure-tools/typespec-client-generator-core": "0.41.8", "@typespec/compiler": "0.55.0", "@typespec/eslint-config-typespec": "0.55.0", "@typespec/eslint-plugin": "0.55.0", diff --git a/test/CadlRanchProjectsNonAzure/client/naming/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/client/naming/src/Generated/tspCodeModel.json index eb42054ceba..9cfd2ceec02 100644 --- a/test/CadlRanchProjectsNonAzure/client/naming/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/client/naming/src/Generated/tspCodeModel.json @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "ClientExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", @@ -25,7 +25,7 @@ "$id": "4", "Kind": "Enum", "Name": "ExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "5", diff --git a/test/CadlRanchProjectsNonAzure/special-words/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/special-words/src/Generated/tspCodeModel.json index 295c4906623..374720abb37 100644 --- a/test/CadlRanchProjectsNonAzure/special-words/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/special-words/src/Generated/tspCodeModel.json @@ -820,60 +820,36 @@ "IsReadOnly": false } ] - }, - { - "$id": "104", - "Kind": "Model", - "Name": "Base", - "Namespace": "SpecialWords.Models", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "105", - "Name": "name", - "SerializedName": "name", - "Description": "", - "Type": { - "$id": "106", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "107", + "$id": "104", "Name": "SpecialWordsClient", "Description": "", "Operations": [], "Protocol": { - "$id": "108" + "$id": "105" }, "Creatable": true }, { - "$id": "109", + "$id": "106", "Name": "ModelsOps", "Description": "Verify model names", "Operations": [ { - "$id": "110", + "$id": "107", "Name": "withAnd", "ResourceName": "Models", "Parameters": [ { - "$id": "111", + "$id": "108", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "112", + "$id": "109", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -888,9 +864,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "113", + "$id": "110", "Type": { - "$id": "114", + "$id": "111", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -899,7 +875,7 @@ } }, { - "$id": "115", + "$id": "112", "Name": "body", "NameInRequest": "body", "Type": { @@ -916,11 +892,11 @@ "Kind": "Method" }, { - "$id": "116", + "$id": "113", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "117", + "$id": "114", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -935,19 +911,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "118", + "$id": "115", "Type": { - "$ref": "117" + "$ref": "114" }, "Value": "application/json" } }, { - "$id": "119", + "$id": "116", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "120", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -962,9 +938,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "121", + "$id": "118", "Type": { - "$ref": "120" + "$ref": "117" }, "Value": "application/json" } @@ -972,7 +948,7 @@ ], "Responses": [ { - "$id": "122", + "$id": "119", "StatusCodes": [ 204 ], @@ -993,15 +969,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "123", + "$id": "120", "Name": "withAs", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "124", + "$id": "121", "Name": "body", "NameInRequest": "body", "Type": { @@ -1018,11 +994,11 @@ "Kind": "Method" }, { - "$id": "125", + "$id": "122", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "126", + "$id": "123", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1037,19 +1013,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "127", + "$id": "124", "Type": { - "$ref": "126" + "$ref": "123" }, "Value": "application/json" } }, { - "$id": "128", + "$id": "125", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "129", + "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1064,9 +1040,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "130", + "$id": "127", "Type": { - "$ref": "129" + "$ref": "126" }, "Value": "application/json" } @@ -1074,7 +1050,7 @@ ], "Responses": [ { - "$id": "131", + "$id": "128", "StatusCodes": [ 204 ], @@ -1095,15 +1071,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "132", + "$id": "129", "Name": "withAssert", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "133", + "$id": "130", "Name": "body", "NameInRequest": "body", "Type": { @@ -1120,11 +1096,11 @@ "Kind": "Method" }, { - "$id": "134", + "$id": "131", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "135", + "$id": "132", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1139,19 +1115,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "136", + "$id": "133", "Type": { - "$ref": "135" + "$ref": "132" }, "Value": "application/json" } }, { - "$id": "137", + "$id": "134", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "138", + "$id": "135", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1166,9 +1142,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "139", + "$id": "136", "Type": { - "$ref": "138" + "$ref": "135" }, "Value": "application/json" } @@ -1176,7 +1152,7 @@ ], "Responses": [ { - "$id": "140", + "$id": "137", "StatusCodes": [ 204 ], @@ -1197,15 +1173,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "141", + "$id": "138", "Name": "withAsync", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "142", + "$id": "139", "Name": "body", "NameInRequest": "body", "Type": { @@ -1222,11 +1198,11 @@ "Kind": "Method" }, { - "$id": "143", + "$id": "140", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "144", + "$id": "141", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1241,19 +1217,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "145", + "$id": "142", "Type": { - "$ref": "144" + "$ref": "141" }, "Value": "application/json" } }, { - "$id": "146", + "$id": "143", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "147", + "$id": "144", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1268,9 +1244,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "148", + "$id": "145", "Type": { - "$ref": "147" + "$ref": "144" }, "Value": "application/json" } @@ -1278,7 +1254,7 @@ ], "Responses": [ { - "$id": "149", + "$id": "146", "StatusCodes": [ 204 ], @@ -1299,15 +1275,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "150", + "$id": "147", "Name": "withAwait", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "151", + "$id": "148", "Name": "body", "NameInRequest": "body", "Type": { @@ -1324,11 +1300,11 @@ "Kind": "Method" }, { - "$id": "152", + "$id": "149", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "153", + "$id": "150", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1343,19 +1319,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "154", + "$id": "151", "Type": { - "$ref": "153" + "$ref": "150" }, "Value": "application/json" } }, { - "$id": "155", + "$id": "152", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "156", + "$id": "153", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1370,9 +1346,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "157", + "$id": "154", "Type": { - "$ref": "156" + "$ref": "153" }, "Value": "application/json" } @@ -1380,7 +1356,7 @@ ], "Responses": [ { - "$id": "158", + "$id": "155", "StatusCodes": [ 204 ], @@ -1401,15 +1377,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "159", + "$id": "156", "Name": "withBreak", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "160", + "$id": "157", "Name": "body", "NameInRequest": "body", "Type": { @@ -1426,11 +1402,11 @@ "Kind": "Method" }, { - "$id": "161", + "$id": "158", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "162", + "$id": "159", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1445,19 +1421,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "163", + "$id": "160", "Type": { - "$ref": "162" + "$ref": "159" }, "Value": "application/json" } }, { - "$id": "164", + "$id": "161", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "165", + "$id": "162", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1472,9 +1448,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "166", + "$id": "163", "Type": { - "$ref": "165" + "$ref": "162" }, "Value": "application/json" } @@ -1482,7 +1458,7 @@ ], "Responses": [ { - "$id": "167", + "$id": "164", "StatusCodes": [ 204 ], @@ -1503,15 +1479,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "168", + "$id": "165", "Name": "withClass", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "169", + "$id": "166", "Name": "body", "NameInRequest": "body", "Type": { @@ -1528,11 +1504,11 @@ "Kind": "Method" }, { - "$id": "170", + "$id": "167", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "171", + "$id": "168", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1547,19 +1523,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "172", + "$id": "169", "Type": { - "$ref": "171" + "$ref": "168" }, "Value": "application/json" } }, { - "$id": "173", + "$id": "170", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "174", + "$id": "171", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1574,9 +1550,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "172", "Type": { - "$ref": "174" + "$ref": "171" }, "Value": "application/json" } @@ -1584,7 +1560,7 @@ ], "Responses": [ { - "$id": "176", + "$id": "173", "StatusCodes": [ 204 ], @@ -1605,15 +1581,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "177", + "$id": "174", "Name": "withConstructor", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "178", + "$id": "175", "Name": "body", "NameInRequest": "body", "Type": { @@ -1630,11 +1606,11 @@ "Kind": "Method" }, { - "$id": "179", + "$id": "176", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "180", + "$id": "177", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1649,19 +1625,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "181", + "$id": "178", "Type": { - "$ref": "180" + "$ref": "177" }, "Value": "application/json" } }, { - "$id": "182", + "$id": "179", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "183", + "$id": "180", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1676,9 +1652,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "184", + "$id": "181", "Type": { - "$ref": "183" + "$ref": "180" }, "Value": "application/json" } @@ -1686,7 +1662,7 @@ ], "Responses": [ { - "$id": "185", + "$id": "182", "StatusCodes": [ 204 ], @@ -1707,15 +1683,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "186", + "$id": "183", "Name": "withContinue", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "187", + "$id": "184", "Name": "body", "NameInRequest": "body", "Type": { @@ -1732,11 +1708,11 @@ "Kind": "Method" }, { - "$id": "188", + "$id": "185", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "189", + "$id": "186", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1751,19 +1727,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "190", + "$id": "187", "Type": { - "$ref": "189" + "$ref": "186" }, "Value": "application/json" } }, { - "$id": "191", + "$id": "188", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "192", + "$id": "189", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1778,9 +1754,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "193", + "$id": "190", "Type": { - "$ref": "192" + "$ref": "189" }, "Value": "application/json" } @@ -1788,7 +1764,7 @@ ], "Responses": [ { - "$id": "194", + "$id": "191", "StatusCodes": [ 204 ], @@ -1809,15 +1785,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "195", + "$id": "192", "Name": "withDef", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "196", + "$id": "193", "Name": "body", "NameInRequest": "body", "Type": { @@ -1834,11 +1810,11 @@ "Kind": "Method" }, { - "$id": "197", + "$id": "194", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "198", + "$id": "195", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1853,19 +1829,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "199", + "$id": "196", "Type": { - "$ref": "198" + "$ref": "195" }, "Value": "application/json" } }, { - "$id": "200", + "$id": "197", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "201", + "$id": "198", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1880,9 +1856,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "202", + "$id": "199", "Type": { - "$ref": "201" + "$ref": "198" }, "Value": "application/json" } @@ -1890,7 +1866,7 @@ ], "Responses": [ { - "$id": "203", + "$id": "200", "StatusCodes": [ 204 ], @@ -1911,15 +1887,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "204", + "$id": "201", "Name": "withDel", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "205", + "$id": "202", "Name": "body", "NameInRequest": "body", "Type": { @@ -1936,11 +1912,11 @@ "Kind": "Method" }, { - "$id": "206", + "$id": "203", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "207", + "$id": "204", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1955,19 +1931,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "208", + "$id": "205", "Type": { - "$ref": "207" + "$ref": "204" }, "Value": "application/json" } }, { - "$id": "209", + "$id": "206", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "210", + "$id": "207", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1982,9 +1958,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "211", + "$id": "208", "Type": { - "$ref": "210" + "$ref": "207" }, "Value": "application/json" } @@ -1992,7 +1968,7 @@ ], "Responses": [ { - "$id": "212", + "$id": "209", "StatusCodes": [ 204 ], @@ -2013,15 +1989,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "213", + "$id": "210", "Name": "withElif", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "214", + "$id": "211", "Name": "body", "NameInRequest": "body", "Type": { @@ -2038,11 +2014,11 @@ "Kind": "Method" }, { - "$id": "215", + "$id": "212", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "216", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2057,19 +2033,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "217", + "$id": "214", "Type": { - "$ref": "216" + "$ref": "213" }, "Value": "application/json" } }, { - "$id": "218", + "$id": "215", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "219", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2084,9 +2060,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "220", + "$id": "217", "Type": { - "$ref": "219" + "$ref": "216" }, "Value": "application/json" } @@ -2094,7 +2070,7 @@ ], "Responses": [ { - "$id": "221", + "$id": "218", "StatusCodes": [ 204 ], @@ -2115,15 +2091,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "222", + "$id": "219", "Name": "withElse", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "223", + "$id": "220", "Name": "body", "NameInRequest": "body", "Type": { @@ -2140,11 +2116,11 @@ "Kind": "Method" }, { - "$id": "224", + "$id": "221", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "225", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2159,19 +2135,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "223", "Type": { - "$ref": "225" + "$ref": "222" }, "Value": "application/json" } }, { - "$id": "227", + "$id": "224", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "228", + "$id": "225", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2186,9 +2162,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "229", + "$id": "226", "Type": { - "$ref": "228" + "$ref": "225" }, "Value": "application/json" } @@ -2196,7 +2172,7 @@ ], "Responses": [ { - "$id": "230", + "$id": "227", "StatusCodes": [ 204 ], @@ -2217,15 +2193,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "231", + "$id": "228", "Name": "withExcept", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "232", + "$id": "229", "Name": "body", "NameInRequest": "body", "Type": { @@ -2242,11 +2218,11 @@ "Kind": "Method" }, { - "$id": "233", + "$id": "230", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "234", + "$id": "231", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2261,19 +2237,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "235", + "$id": "232", "Type": { - "$ref": "234" + "$ref": "231" }, "Value": "application/json" } }, { - "$id": "236", + "$id": "233", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "237", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2288,9 +2264,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "238", + "$id": "235", "Type": { - "$ref": "237" + "$ref": "234" }, "Value": "application/json" } @@ -2298,7 +2274,7 @@ ], "Responses": [ { - "$id": "239", + "$id": "236", "StatusCodes": [ 204 ], @@ -2319,15 +2295,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "240", + "$id": "237", "Name": "withExec", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "241", + "$id": "238", "Name": "body", "NameInRequest": "body", "Type": { @@ -2344,11 +2320,11 @@ "Kind": "Method" }, { - "$id": "242", + "$id": "239", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "243", + "$id": "240", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2363,19 +2339,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "244", + "$id": "241", "Type": { - "$ref": "243" + "$ref": "240" }, "Value": "application/json" } }, { - "$id": "245", + "$id": "242", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "246", + "$id": "243", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2390,9 +2366,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "247", + "$id": "244", "Type": { - "$ref": "246" + "$ref": "243" }, "Value": "application/json" } @@ -2400,7 +2376,7 @@ ], "Responses": [ { - "$id": "248", + "$id": "245", "StatusCodes": [ 204 ], @@ -2421,15 +2397,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "249", + "$id": "246", "Name": "withFinally", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "250", + "$id": "247", "Name": "body", "NameInRequest": "body", "Type": { @@ -2446,11 +2422,11 @@ "Kind": "Method" }, { - "$id": "251", + "$id": "248", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "252", + "$id": "249", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2465,19 +2441,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "253", + "$id": "250", "Type": { - "$ref": "252" + "$ref": "249" }, "Value": "application/json" } }, { - "$id": "254", + "$id": "251", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "255", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2492,9 +2468,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "253", "Type": { - "$ref": "255" + "$ref": "252" }, "Value": "application/json" } @@ -2502,7 +2478,7 @@ ], "Responses": [ { - "$id": "257", + "$id": "254", "StatusCodes": [ 204 ], @@ -2523,15 +2499,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "258", + "$id": "255", "Name": "withFor", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "259", + "$id": "256", "Name": "body", "NameInRequest": "body", "Type": { @@ -2548,11 +2524,11 @@ "Kind": "Method" }, { - "$id": "260", + "$id": "257", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "261", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2567,19 +2543,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "262", + "$id": "259", "Type": { - "$ref": "261" + "$ref": "258" }, "Value": "application/json" } }, { - "$id": "263", + "$id": "260", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "264", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2594,9 +2570,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "265", + "$id": "262", "Type": { - "$ref": "264" + "$ref": "261" }, "Value": "application/json" } @@ -2604,7 +2580,7 @@ ], "Responses": [ { - "$id": "266", + "$id": "263", "StatusCodes": [ 204 ], @@ -2625,15 +2601,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "267", + "$id": "264", "Name": "withFrom", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "268", + "$id": "265", "Name": "body", "NameInRequest": "body", "Type": { @@ -2650,11 +2626,11 @@ "Kind": "Method" }, { - "$id": "269", + "$id": "266", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "270", + "$id": "267", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2669,19 +2645,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "271", + "$id": "268", "Type": { - "$ref": "270" + "$ref": "267" }, "Value": "application/json" } }, { - "$id": "272", + "$id": "269", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "273", + "$id": "270", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2696,9 +2672,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "274", + "$id": "271", "Type": { - "$ref": "273" + "$ref": "270" }, "Value": "application/json" } @@ -2706,7 +2682,7 @@ ], "Responses": [ { - "$id": "275", + "$id": "272", "StatusCodes": [ 204 ], @@ -2727,15 +2703,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "276", + "$id": "273", "Name": "withGlobal", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "277", + "$id": "274", "Name": "body", "NameInRequest": "body", "Type": { @@ -2752,11 +2728,11 @@ "Kind": "Method" }, { - "$id": "278", + "$id": "275", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "279", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2771,19 +2747,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "280", + "$id": "277", "Type": { - "$ref": "279" + "$ref": "276" }, "Value": "application/json" } }, { - "$id": "281", + "$id": "278", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "282", + "$id": "279", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2798,9 +2774,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "283", + "$id": "280", "Type": { - "$ref": "282" + "$ref": "279" }, "Value": "application/json" } @@ -2808,7 +2784,7 @@ ], "Responses": [ { - "$id": "284", + "$id": "281", "StatusCodes": [ 204 ], @@ -2829,15 +2805,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "285", + "$id": "282", "Name": "withIf", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "286", + "$id": "283", "Name": "body", "NameInRequest": "body", "Type": { @@ -2854,11 +2830,11 @@ "Kind": "Method" }, { - "$id": "287", + "$id": "284", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "288", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2873,19 +2849,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "289", + "$id": "286", "Type": { - "$ref": "288" + "$ref": "285" }, "Value": "application/json" } }, { - "$id": "290", + "$id": "287", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "291", + "$id": "288", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2900,9 +2876,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "289", "Type": { - "$ref": "291" + "$ref": "288" }, "Value": "application/json" } @@ -2910,7 +2886,7 @@ ], "Responses": [ { - "$id": "293", + "$id": "290", "StatusCodes": [ 204 ], @@ -2931,15 +2907,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "294", + "$id": "291", "Name": "withImport", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "295", + "$id": "292", "Name": "body", "NameInRequest": "body", "Type": { @@ -2956,11 +2932,11 @@ "Kind": "Method" }, { - "$id": "296", + "$id": "293", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "297", + "$id": "294", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2975,19 +2951,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "298", + "$id": "295", "Type": { - "$ref": "297" + "$ref": "294" }, "Value": "application/json" } }, { - "$id": "299", + "$id": "296", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "300", + "$id": "297", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3002,9 +2978,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "301", + "$id": "298", "Type": { - "$ref": "300" + "$ref": "297" }, "Value": "application/json" } @@ -3012,7 +2988,7 @@ ], "Responses": [ { - "$id": "302", + "$id": "299", "StatusCodes": [ 204 ], @@ -3033,15 +3009,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "303", + "$id": "300", "Name": "withIn", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "304", + "$id": "301", "Name": "body", "NameInRequest": "body", "Type": { @@ -3058,11 +3034,11 @@ "Kind": "Method" }, { - "$id": "305", + "$id": "302", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "306", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3077,19 +3053,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "307", + "$id": "304", "Type": { - "$ref": "306" + "$ref": "303" }, "Value": "application/json" } }, { - "$id": "308", + "$id": "305", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "309", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3104,9 +3080,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "310", + "$id": "307", "Type": { - "$ref": "309" + "$ref": "306" }, "Value": "application/json" } @@ -3114,7 +3090,7 @@ ], "Responses": [ { - "$id": "311", + "$id": "308", "StatusCodes": [ 204 ], @@ -3135,15 +3111,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "312", + "$id": "309", "Name": "withIs", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "313", + "$id": "310", "Name": "body", "NameInRequest": "body", "Type": { @@ -3160,11 +3136,11 @@ "Kind": "Method" }, { - "$id": "314", + "$id": "311", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "315", + "$id": "312", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3179,19 +3155,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "316", + "$id": "313", "Type": { - "$ref": "315" + "$ref": "312" }, "Value": "application/json" } }, { - "$id": "317", + "$id": "314", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "318", + "$id": "315", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3206,9 +3182,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "319", + "$id": "316", "Type": { - "$ref": "318" + "$ref": "315" }, "Value": "application/json" } @@ -3216,7 +3192,7 @@ ], "Responses": [ { - "$id": "320", + "$id": "317", "StatusCodes": [ 204 ], @@ -3237,15 +3213,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "321", + "$id": "318", "Name": "withLambda", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "322", + "$id": "319", "Name": "body", "NameInRequest": "body", "Type": { @@ -3262,11 +3238,11 @@ "Kind": "Method" }, { - "$id": "323", + "$id": "320", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "324", + "$id": "321", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3281,19 +3257,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "325", + "$id": "322", "Type": { - "$ref": "324" + "$ref": "321" }, "Value": "application/json" } }, { - "$id": "326", + "$id": "323", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "327", + "$id": "324", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3308,9 +3284,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "328", + "$id": "325", "Type": { - "$ref": "327" + "$ref": "324" }, "Value": "application/json" } @@ -3318,7 +3294,7 @@ ], "Responses": [ { - "$id": "329", + "$id": "326", "StatusCodes": [ 204 ], @@ -3339,15 +3315,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "330", + "$id": "327", "Name": "withNot", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "331", + "$id": "328", "Name": "body", "NameInRequest": "body", "Type": { @@ -3364,11 +3340,11 @@ "Kind": "Method" }, { - "$id": "332", + "$id": "329", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "333", + "$id": "330", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3383,19 +3359,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "334", + "$id": "331", "Type": { - "$ref": "333" + "$ref": "330" }, "Value": "application/json" } }, { - "$id": "335", + "$id": "332", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "336", + "$id": "333", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3410,9 +3386,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "337", + "$id": "334", "Type": { - "$ref": "336" + "$ref": "333" }, "Value": "application/json" } @@ -3420,7 +3396,7 @@ ], "Responses": [ { - "$id": "338", + "$id": "335", "StatusCodes": [ 204 ], @@ -3441,15 +3417,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "339", + "$id": "336", "Name": "withOr", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "340", + "$id": "337", "Name": "body", "NameInRequest": "body", "Type": { @@ -3466,11 +3442,11 @@ "Kind": "Method" }, { - "$id": "341", + "$id": "338", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "342", + "$id": "339", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3485,19 +3461,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "343", + "$id": "340", "Type": { - "$ref": "342" + "$ref": "339" }, "Value": "application/json" } }, { - "$id": "344", + "$id": "341", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "345", + "$id": "342", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3512,9 +3488,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "346", + "$id": "343", "Type": { - "$ref": "345" + "$ref": "342" }, "Value": "application/json" } @@ -3522,7 +3498,7 @@ ], "Responses": [ { - "$id": "347", + "$id": "344", "StatusCodes": [ 204 ], @@ -3543,15 +3519,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "348", + "$id": "345", "Name": "withPass", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "349", + "$id": "346", "Name": "body", "NameInRequest": "body", "Type": { @@ -3568,11 +3544,11 @@ "Kind": "Method" }, { - "$id": "350", + "$id": "347", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "351", + "$id": "348", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3587,19 +3563,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "352", + "$id": "349", "Type": { - "$ref": "351" + "$ref": "348" }, "Value": "application/json" } }, { - "$id": "353", + "$id": "350", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "354", + "$id": "351", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3614,9 +3590,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "355", + "$id": "352", "Type": { - "$ref": "354" + "$ref": "351" }, "Value": "application/json" } @@ -3624,7 +3600,7 @@ ], "Responses": [ { - "$id": "356", + "$id": "353", "StatusCodes": [ 204 ], @@ -3645,15 +3621,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "357", + "$id": "354", "Name": "withRaise", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "358", + "$id": "355", "Name": "body", "NameInRequest": "body", "Type": { @@ -3670,11 +3646,11 @@ "Kind": "Method" }, { - "$id": "359", + "$id": "356", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "360", + "$id": "357", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3689,19 +3665,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "361", + "$id": "358", "Type": { - "$ref": "360" + "$ref": "357" }, "Value": "application/json" } }, { - "$id": "362", + "$id": "359", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "363", + "$id": "360", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3716,9 +3692,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "364", + "$id": "361", "Type": { - "$ref": "363" + "$ref": "360" }, "Value": "application/json" } @@ -3726,7 +3702,7 @@ ], "Responses": [ { - "$id": "365", + "$id": "362", "StatusCodes": [ 204 ], @@ -3747,15 +3723,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "366", + "$id": "363", "Name": "withReturn", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "367", + "$id": "364", "Name": "body", "NameInRequest": "body", "Type": { @@ -3772,11 +3748,11 @@ "Kind": "Method" }, { - "$id": "368", + "$id": "365", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "369", + "$id": "366", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3791,19 +3767,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "370", + "$id": "367", "Type": { - "$ref": "369" + "$ref": "366" }, "Value": "application/json" } }, { - "$id": "371", + "$id": "368", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "372", + "$id": "369", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3818,9 +3794,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "373", + "$id": "370", "Type": { - "$ref": "372" + "$ref": "369" }, "Value": "application/json" } @@ -3828,7 +3804,7 @@ ], "Responses": [ { - "$id": "374", + "$id": "371", "StatusCodes": [ 204 ], @@ -3849,15 +3825,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "375", + "$id": "372", "Name": "withTry", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "376", + "$id": "373", "Name": "body", "NameInRequest": "body", "Type": { @@ -3874,11 +3850,11 @@ "Kind": "Method" }, { - "$id": "377", + "$id": "374", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "378", + "$id": "375", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3893,19 +3869,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "379", + "$id": "376", "Type": { - "$ref": "378" + "$ref": "375" }, "Value": "application/json" } }, { - "$id": "380", + "$id": "377", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "381", + "$id": "378", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3920,9 +3896,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "382", + "$id": "379", "Type": { - "$ref": "381" + "$ref": "378" }, "Value": "application/json" } @@ -3930,7 +3906,7 @@ ], "Responses": [ { - "$id": "383", + "$id": "380", "StatusCodes": [ 204 ], @@ -3951,15 +3927,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "384", + "$id": "381", "Name": "withWhile", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "385", + "$id": "382", "Name": "body", "NameInRequest": "body", "Type": { @@ -3976,11 +3952,11 @@ "Kind": "Method" }, { - "$id": "386", + "$id": "383", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "387", + "$id": "384", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3995,19 +3971,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "388", + "$id": "385", "Type": { - "$ref": "387" + "$ref": "384" }, "Value": "application/json" } }, { - "$id": "389", + "$id": "386", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "390", + "$id": "387", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4022,9 +3998,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "391", + "$id": "388", "Type": { - "$ref": "390" + "$ref": "387" }, "Value": "application/json" } @@ -4032,7 +4008,7 @@ ], "Responses": [ { - "$id": "392", + "$id": "389", "StatusCodes": [ 204 ], @@ -4053,15 +4029,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "393", + "$id": "390", "Name": "withWith", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "394", + "$id": "391", "Name": "body", "NameInRequest": "body", "Type": { @@ -4078,11 +4054,11 @@ "Kind": "Method" }, { - "$id": "395", + "$id": "392", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "396", + "$id": "393", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4097,19 +4073,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "397", + "$id": "394", "Type": { - "$ref": "396" + "$ref": "393" }, "Value": "application/json" } }, { - "$id": "398", + "$id": "395", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "399", + "$id": "396", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4124,9 +4100,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "400", + "$id": "397", "Type": { - "$ref": "399" + "$ref": "396" }, "Value": "application/json" } @@ -4134,7 +4110,7 @@ ], "Responses": [ { - "$id": "401", + "$id": "398", "StatusCodes": [ 204 ], @@ -4155,15 +4131,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "402", + "$id": "399", "Name": "withYield", "ResourceName": "Models", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "403", + "$id": "400", "Name": "body", "NameInRequest": "body", "Type": { @@ -4180,11 +4156,11 @@ "Kind": "Method" }, { - "$id": "404", + "$id": "401", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "405", + "$id": "402", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4199,19 +4175,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "406", + "$id": "403", "Type": { - "$ref": "405" + "$ref": "402" }, "Value": "application/json" } }, { - "$id": "407", + "$id": "404", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "408", + "$id": "405", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4226,9 +4202,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "409", + "$id": "406", "Type": { - "$ref": "408" + "$ref": "405" }, "Value": "application/json" } @@ -4236,7 +4212,7 @@ ], "Responses": [ { - "$id": "410", + "$id": "407", "StatusCodes": [ 204 ], @@ -4258,26 +4234,26 @@ } ], "Protocol": { - "$id": "411" + "$id": "408" }, "Creatable": false, "Parent": "SpecialWordsClient" }, { - "$id": "412", + "$id": "409", "Name": "ModelProperties", "Description": "Verify model names", "Operations": [ { - "$id": "413", + "$id": "410", "Name": "sameAsModel", "ResourceName": "ModelProperties", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "414", + "$id": "411", "Name": "body", "NameInRequest": "body", "Type": { @@ -4294,11 +4270,11 @@ "Kind": "Method" }, { - "$id": "415", + "$id": "412", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "416", + "$id": "413", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4313,19 +4289,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "417", + "$id": "414", "Type": { - "$ref": "416" + "$ref": "413" }, "Value": "application/json" } }, { - "$id": "418", + "$id": "415", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "419", + "$id": "416", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4340,9 +4316,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "420", + "$id": "417", "Type": { - "$ref": "419" + "$ref": "416" }, "Value": "application/json" } @@ -4350,7 +4326,7 @@ ], "Responses": [ { - "$id": "421", + "$id": "418", "StatusCodes": [ 204 ], @@ -4372,30 +4348,30 @@ } ], "Protocol": { - "$id": "422" + "$id": "419" }, "Creatable": false, "Parent": "SpecialWordsClient" }, { - "$id": "423", + "$id": "420", "Name": "Operations", "Description": "Test reserved words as operation name.", "Operations": [ { - "$id": "424", + "$id": "421", "Name": "and", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "425", + "$id": "422", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "426", + "$id": "423", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4410,9 +4386,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "427", + "$id": "424", "Type": { - "$ref": "426" + "$ref": "423" }, "Value": "application/json" } @@ -4420,7 +4396,7 @@ ], "Responses": [ { - "$id": "428", + "$id": "425", "StatusCodes": [ 204 ], @@ -4438,19 +4414,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "429", + "$id": "426", "Name": "as", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "430", + "$id": "427", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "431", + "$id": "428", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4465,9 +4441,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "432", + "$id": "429", "Type": { - "$ref": "431" + "$ref": "428" }, "Value": "application/json" } @@ -4475,7 +4451,7 @@ ], "Responses": [ { - "$id": "433", + "$id": "430", "StatusCodes": [ 204 ], @@ -4493,19 +4469,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "434", + "$id": "431", "Name": "assert", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "435", + "$id": "432", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "436", + "$id": "433", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4520,9 +4496,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "437", + "$id": "434", "Type": { - "$ref": "436" + "$ref": "433" }, "Value": "application/json" } @@ -4530,7 +4506,7 @@ ], "Responses": [ { - "$id": "438", + "$id": "435", "StatusCodes": [ 204 ], @@ -4548,19 +4524,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "439", + "$id": "436", "Name": "async", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "440", + "$id": "437", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "441", + "$id": "438", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4575,9 +4551,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "442", + "$id": "439", "Type": { - "$ref": "441" + "$ref": "438" }, "Value": "application/json" } @@ -4585,7 +4561,7 @@ ], "Responses": [ { - "$id": "443", + "$id": "440", "StatusCodes": [ 204 ], @@ -4603,19 +4579,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "444", + "$id": "441", "Name": "await", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "445", + "$id": "442", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "446", + "$id": "443", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4630,9 +4606,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "447", + "$id": "444", "Type": { - "$ref": "446" + "$ref": "443" }, "Value": "application/json" } @@ -4640,7 +4616,7 @@ ], "Responses": [ { - "$id": "448", + "$id": "445", "StatusCodes": [ 204 ], @@ -4658,19 +4634,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "449", + "$id": "446", "Name": "break", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "450", + "$id": "447", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "451", + "$id": "448", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4685,9 +4661,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "452", + "$id": "449", "Type": { - "$ref": "451" + "$ref": "448" }, "Value": "application/json" } @@ -4695,7 +4671,7 @@ ], "Responses": [ { - "$id": "453", + "$id": "450", "StatusCodes": [ 204 ], @@ -4713,19 +4689,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "454", + "$id": "451", "Name": "class", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "455", + "$id": "452", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "456", + "$id": "453", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4740,9 +4716,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "457", + "$id": "454", "Type": { - "$ref": "456" + "$ref": "453" }, "Value": "application/json" } @@ -4750,7 +4726,7 @@ ], "Responses": [ { - "$id": "458", + "$id": "455", "StatusCodes": [ 204 ], @@ -4768,19 +4744,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "459", + "$id": "456", "Name": "constructor", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "460", + "$id": "457", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "461", + "$id": "458", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4795,9 +4771,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "462", + "$id": "459", "Type": { - "$ref": "461" + "$ref": "458" }, "Value": "application/json" } @@ -4805,7 +4781,7 @@ ], "Responses": [ { - "$id": "463", + "$id": "460", "StatusCodes": [ 204 ], @@ -4823,19 +4799,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "464", + "$id": "461", "Name": "continue", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "465", + "$id": "462", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "466", + "$id": "463", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4850,9 +4826,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "467", + "$id": "464", "Type": { - "$ref": "466" + "$ref": "463" }, "Value": "application/json" } @@ -4860,7 +4836,7 @@ ], "Responses": [ { - "$id": "468", + "$id": "465", "StatusCodes": [ 204 ], @@ -4878,19 +4854,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "469", + "$id": "466", "Name": "def", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "470", + "$id": "467", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "471", + "$id": "468", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4905,9 +4881,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "472", + "$id": "469", "Type": { - "$ref": "471" + "$ref": "468" }, "Value": "application/json" } @@ -4915,7 +4891,7 @@ ], "Responses": [ { - "$id": "473", + "$id": "470", "StatusCodes": [ 204 ], @@ -4933,19 +4909,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "474", + "$id": "471", "Name": "del", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "475", + "$id": "472", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "476", + "$id": "473", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4960,9 +4936,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "477", + "$id": "474", "Type": { - "$ref": "476" + "$ref": "473" }, "Value": "application/json" } @@ -4970,7 +4946,7 @@ ], "Responses": [ { - "$id": "478", + "$id": "475", "StatusCodes": [ 204 ], @@ -4988,19 +4964,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "479", + "$id": "476", "Name": "elif", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "480", + "$id": "477", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "481", + "$id": "478", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5015,9 +4991,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "482", + "$id": "479", "Type": { - "$ref": "481" + "$ref": "478" }, "Value": "application/json" } @@ -5025,7 +5001,7 @@ ], "Responses": [ { - "$id": "483", + "$id": "480", "StatusCodes": [ 204 ], @@ -5043,19 +5019,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "484", + "$id": "481", "Name": "else", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "485", + "$id": "482", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "486", + "$id": "483", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5070,9 +5046,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "487", + "$id": "484", "Type": { - "$ref": "486" + "$ref": "483" }, "Value": "application/json" } @@ -5080,7 +5056,7 @@ ], "Responses": [ { - "$id": "488", + "$id": "485", "StatusCodes": [ 204 ], @@ -5098,19 +5074,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "489", + "$id": "486", "Name": "except", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "490", + "$id": "487", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "491", + "$id": "488", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5125,9 +5101,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "492", + "$id": "489", "Type": { - "$ref": "491" + "$ref": "488" }, "Value": "application/json" } @@ -5135,7 +5111,7 @@ ], "Responses": [ { - "$id": "493", + "$id": "490", "StatusCodes": [ 204 ], @@ -5153,19 +5129,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "494", + "$id": "491", "Name": "exec", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "495", + "$id": "492", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "496", + "$id": "493", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5180,9 +5156,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "497", + "$id": "494", "Type": { - "$ref": "496" + "$ref": "493" }, "Value": "application/json" } @@ -5190,7 +5166,7 @@ ], "Responses": [ { - "$id": "498", + "$id": "495", "StatusCodes": [ 204 ], @@ -5208,19 +5184,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "499", + "$id": "496", "Name": "finally", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "500", + "$id": "497", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "501", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5235,9 +5211,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "502", + "$id": "499", "Type": { - "$ref": "501" + "$ref": "498" }, "Value": "application/json" } @@ -5245,7 +5221,7 @@ ], "Responses": [ { - "$id": "503", + "$id": "500", "StatusCodes": [ 204 ], @@ -5263,19 +5239,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "504", + "$id": "501", "Name": "for", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "505", + "$id": "502", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "506", + "$id": "503", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5290,9 +5266,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "507", + "$id": "504", "Type": { - "$ref": "506" + "$ref": "503" }, "Value": "application/json" } @@ -5300,7 +5276,7 @@ ], "Responses": [ { - "$id": "508", + "$id": "505", "StatusCodes": [ 204 ], @@ -5318,19 +5294,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "509", + "$id": "506", "Name": "from", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "510", + "$id": "507", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "511", + "$id": "508", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5345,9 +5321,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "512", + "$id": "509", "Type": { - "$ref": "511" + "$ref": "508" }, "Value": "application/json" } @@ -5355,7 +5331,7 @@ ], "Responses": [ { - "$id": "513", + "$id": "510", "StatusCodes": [ 204 ], @@ -5373,19 +5349,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "514", + "$id": "511", "Name": "global", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "515", + "$id": "512", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "516", + "$id": "513", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5400,9 +5376,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "517", + "$id": "514", "Type": { - "$ref": "516" + "$ref": "513" }, "Value": "application/json" } @@ -5410,7 +5386,7 @@ ], "Responses": [ { - "$id": "518", + "$id": "515", "StatusCodes": [ 204 ], @@ -5428,19 +5404,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "519", + "$id": "516", "Name": "if", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "520", + "$id": "517", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "521", + "$id": "518", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5455,9 +5431,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "522", + "$id": "519", "Type": { - "$ref": "521" + "$ref": "518" }, "Value": "application/json" } @@ -5465,7 +5441,7 @@ ], "Responses": [ { - "$id": "523", + "$id": "520", "StatusCodes": [ 204 ], @@ -5483,19 +5459,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "524", + "$id": "521", "Name": "import", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "525", + "$id": "522", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "526", + "$id": "523", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5510,9 +5486,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "527", + "$id": "524", "Type": { - "$ref": "526" + "$ref": "523" }, "Value": "application/json" } @@ -5520,7 +5496,7 @@ ], "Responses": [ { - "$id": "528", + "$id": "525", "StatusCodes": [ 204 ], @@ -5538,19 +5514,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "529", + "$id": "526", "Name": "in", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "530", + "$id": "527", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "531", + "$id": "528", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5565,9 +5541,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "532", + "$id": "529", "Type": { - "$ref": "531" + "$ref": "528" }, "Value": "application/json" } @@ -5575,7 +5551,7 @@ ], "Responses": [ { - "$id": "533", + "$id": "530", "StatusCodes": [ 204 ], @@ -5593,19 +5569,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "534", + "$id": "531", "Name": "is", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "535", + "$id": "532", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "536", + "$id": "533", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5620,9 +5596,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "537", + "$id": "534", "Type": { - "$ref": "536" + "$ref": "533" }, "Value": "application/json" } @@ -5630,7 +5606,7 @@ ], "Responses": [ { - "$id": "538", + "$id": "535", "StatusCodes": [ 204 ], @@ -5648,19 +5624,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "539", + "$id": "536", "Name": "lambda", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "540", + "$id": "537", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "541", + "$id": "538", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5675,9 +5651,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "542", + "$id": "539", "Type": { - "$ref": "541" + "$ref": "538" }, "Value": "application/json" } @@ -5685,7 +5661,7 @@ ], "Responses": [ { - "$id": "543", + "$id": "540", "StatusCodes": [ 204 ], @@ -5703,19 +5679,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "544", + "$id": "541", "Name": "not", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "545", + "$id": "542", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "546", + "$id": "543", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5730,9 +5706,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "547", + "$id": "544", "Type": { - "$ref": "546" + "$ref": "543" }, "Value": "application/json" } @@ -5740,7 +5716,7 @@ ], "Responses": [ { - "$id": "548", + "$id": "545", "StatusCodes": [ 204 ], @@ -5758,19 +5734,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "549", + "$id": "546", "Name": "or", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "550", + "$id": "547", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "551", + "$id": "548", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5785,9 +5761,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "552", + "$id": "549", "Type": { - "$ref": "551" + "$ref": "548" }, "Value": "application/json" } @@ -5795,7 +5771,7 @@ ], "Responses": [ { - "$id": "553", + "$id": "550", "StatusCodes": [ 204 ], @@ -5813,19 +5789,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "554", + "$id": "551", "Name": "pass", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "555", + "$id": "552", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "556", + "$id": "553", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5840,9 +5816,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "557", + "$id": "554", "Type": { - "$ref": "556" + "$ref": "553" }, "Value": "application/json" } @@ -5850,7 +5826,7 @@ ], "Responses": [ { - "$id": "558", + "$id": "555", "StatusCodes": [ 204 ], @@ -5868,19 +5844,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "559", + "$id": "556", "Name": "raise", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "560", + "$id": "557", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "561", + "$id": "558", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5895,9 +5871,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "562", + "$id": "559", "Type": { - "$ref": "561" + "$ref": "558" }, "Value": "application/json" } @@ -5905,7 +5881,7 @@ ], "Responses": [ { - "$id": "563", + "$id": "560", "StatusCodes": [ 204 ], @@ -5923,19 +5899,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "564", + "$id": "561", "Name": "return", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "565", + "$id": "562", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "566", + "$id": "563", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5950,9 +5926,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "567", + "$id": "564", "Type": { - "$ref": "566" + "$ref": "563" }, "Value": "application/json" } @@ -5960,7 +5936,7 @@ ], "Responses": [ { - "$id": "568", + "$id": "565", "StatusCodes": [ 204 ], @@ -5978,19 +5954,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "569", + "$id": "566", "Name": "try", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "570", + "$id": "567", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "571", + "$id": "568", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6005,9 +5981,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "572", + "$id": "569", "Type": { - "$ref": "571" + "$ref": "568" }, "Value": "application/json" } @@ -6015,7 +5991,7 @@ ], "Responses": [ { - "$id": "573", + "$id": "570", "StatusCodes": [ 204 ], @@ -6033,19 +6009,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "574", + "$id": "571", "Name": "while", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "575", + "$id": "572", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "576", + "$id": "573", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6060,9 +6036,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "577", + "$id": "574", "Type": { - "$ref": "576" + "$ref": "573" }, "Value": "application/json" } @@ -6070,7 +6046,7 @@ ], "Responses": [ { - "$id": "578", + "$id": "575", "StatusCodes": [ 204 ], @@ -6088,19 +6064,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "579", + "$id": "576", "Name": "with", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "580", + "$id": "577", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "581", + "$id": "578", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6115,9 +6091,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "582", + "$id": "579", "Type": { - "$ref": "581" + "$ref": "578" }, "Value": "application/json" } @@ -6125,7 +6101,7 @@ ], "Responses": [ { - "$id": "583", + "$id": "580", "StatusCodes": [ 204 ], @@ -6143,19 +6119,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "584", + "$id": "581", "Name": "yield", "ResourceName": "Operations", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "585", + "$id": "582", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "586", + "$id": "583", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6170,9 +6146,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "587", + "$id": "584", "Type": { - "$ref": "586" + "$ref": "583" }, "Value": "application/json" } @@ -6180,7 +6156,7 @@ ], "Responses": [ { - "$id": "588", + "$id": "585", "StatusCodes": [ 204 ], @@ -6199,30 +6175,30 @@ } ], "Protocol": { - "$id": "589" + "$id": "586" }, "Creatable": false, "Parent": "SpecialWordsClient" }, { - "$id": "590", + "$id": "587", "Name": "Parameters", "Description": "Verify reserved words as parameter name.", "Operations": [ { - "$id": "591", + "$id": "588", "Name": "withAnd", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "592", + "$id": "589", "Name": "and", "NameInRequest": "and", "Type": { - "$id": "593", + "$id": "590", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6238,11 +6214,11 @@ "Kind": "Method" }, { - "$id": "594", + "$id": "591", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "595", + "$id": "592", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6257,9 +6233,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "596", + "$id": "593", "Type": { - "$ref": "595" + "$ref": "592" }, "Value": "application/json" } @@ -6267,7 +6243,7 @@ ], "Responses": [ { - "$id": "597", + "$id": "594", "StatusCodes": [ 204 ], @@ -6285,19 +6261,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "598", + "$id": "595", "Name": "withAs", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "599", + "$id": "596", "Name": "as", "NameInRequest": "as", "Type": { - "$id": "600", + "$id": "597", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6313,11 +6289,11 @@ "Kind": "Method" }, { - "$id": "601", + "$id": "598", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "602", + "$id": "599", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6332,9 +6308,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "603", + "$id": "600", "Type": { - "$ref": "602" + "$ref": "599" }, "Value": "application/json" } @@ -6342,7 +6318,7 @@ ], "Responses": [ { - "$id": "604", + "$id": "601", "StatusCodes": [ 204 ], @@ -6360,19 +6336,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "605", + "$id": "602", "Name": "withAssert", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "606", + "$id": "603", "Name": "assert", "NameInRequest": "assert", "Type": { - "$id": "607", + "$id": "604", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6388,11 +6364,11 @@ "Kind": "Method" }, { - "$id": "608", + "$id": "605", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "609", + "$id": "606", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6407,9 +6383,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "610", + "$id": "607", "Type": { - "$ref": "609" + "$ref": "606" }, "Value": "application/json" } @@ -6417,7 +6393,7 @@ ], "Responses": [ { - "$id": "611", + "$id": "608", "StatusCodes": [ 204 ], @@ -6435,19 +6411,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "612", + "$id": "609", "Name": "withAsync", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "613", + "$id": "610", "Name": "async", "NameInRequest": "async", "Type": { - "$id": "614", + "$id": "611", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6463,11 +6439,11 @@ "Kind": "Method" }, { - "$id": "615", + "$id": "612", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "616", + "$id": "613", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6482,9 +6458,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "617", + "$id": "614", "Type": { - "$ref": "616" + "$ref": "613" }, "Value": "application/json" } @@ -6492,7 +6468,7 @@ ], "Responses": [ { - "$id": "618", + "$id": "615", "StatusCodes": [ 204 ], @@ -6510,19 +6486,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "619", + "$id": "616", "Name": "withAwait", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "620", + "$id": "617", "Name": "await", "NameInRequest": "await", "Type": { - "$id": "621", + "$id": "618", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6538,11 +6514,11 @@ "Kind": "Method" }, { - "$id": "622", + "$id": "619", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "623", + "$id": "620", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6557,9 +6533,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "624", + "$id": "621", "Type": { - "$ref": "623" + "$ref": "620" }, "Value": "application/json" } @@ -6567,7 +6543,7 @@ ], "Responses": [ { - "$id": "625", + "$id": "622", "StatusCodes": [ 204 ], @@ -6585,19 +6561,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "626", + "$id": "623", "Name": "withBreak", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "627", + "$id": "624", "Name": "break", "NameInRequest": "break", "Type": { - "$id": "628", + "$id": "625", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6613,11 +6589,11 @@ "Kind": "Method" }, { - "$id": "629", + "$id": "626", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "630", + "$id": "627", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6632,9 +6608,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "631", + "$id": "628", "Type": { - "$ref": "630" + "$ref": "627" }, "Value": "application/json" } @@ -6642,7 +6618,7 @@ ], "Responses": [ { - "$id": "632", + "$id": "629", "StatusCodes": [ 204 ], @@ -6660,19 +6636,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "633", + "$id": "630", "Name": "withClass", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "634", + "$id": "631", "Name": "class", "NameInRequest": "class", "Type": { - "$id": "635", + "$id": "632", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6688,11 +6664,11 @@ "Kind": "Method" }, { - "$id": "636", + "$id": "633", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "637", + "$id": "634", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6707,9 +6683,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "638", + "$id": "635", "Type": { - "$ref": "637" + "$ref": "634" }, "Value": "application/json" } @@ -6717,7 +6693,7 @@ ], "Responses": [ { - "$id": "639", + "$id": "636", "StatusCodes": [ 204 ], @@ -6735,19 +6711,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "640", + "$id": "637", "Name": "withConstructor", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "641", + "$id": "638", "Name": "constructor", "NameInRequest": "constructor", "Type": { - "$id": "642", + "$id": "639", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6763,11 +6739,11 @@ "Kind": "Method" }, { - "$id": "643", + "$id": "640", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "644", + "$id": "641", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6782,9 +6758,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "645", + "$id": "642", "Type": { - "$ref": "644" + "$ref": "641" }, "Value": "application/json" } @@ -6792,7 +6768,7 @@ ], "Responses": [ { - "$id": "646", + "$id": "643", "StatusCodes": [ 204 ], @@ -6810,19 +6786,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "647", + "$id": "644", "Name": "withContinue", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "648", + "$id": "645", "Name": "continue", "NameInRequest": "continue", "Type": { - "$id": "649", + "$id": "646", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6838,11 +6814,11 @@ "Kind": "Method" }, { - "$id": "650", + "$id": "647", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "651", + "$id": "648", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6857,9 +6833,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "652", + "$id": "649", "Type": { - "$ref": "651" + "$ref": "648" }, "Value": "application/json" } @@ -6867,7 +6843,7 @@ ], "Responses": [ { - "$id": "653", + "$id": "650", "StatusCodes": [ 204 ], @@ -6885,19 +6861,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "654", + "$id": "651", "Name": "withDef", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "655", + "$id": "652", "Name": "def", "NameInRequest": "def", "Type": { - "$id": "656", + "$id": "653", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6913,11 +6889,11 @@ "Kind": "Method" }, { - "$id": "657", + "$id": "654", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "658", + "$id": "655", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6932,9 +6908,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "659", + "$id": "656", "Type": { - "$ref": "658" + "$ref": "655" }, "Value": "application/json" } @@ -6942,7 +6918,7 @@ ], "Responses": [ { - "$id": "660", + "$id": "657", "StatusCodes": [ 204 ], @@ -6960,19 +6936,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "661", + "$id": "658", "Name": "withDel", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "662", + "$id": "659", "Name": "del", "NameInRequest": "del", "Type": { - "$id": "663", + "$id": "660", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6988,11 +6964,11 @@ "Kind": "Method" }, { - "$id": "664", + "$id": "661", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "665", + "$id": "662", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7007,9 +6983,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "666", + "$id": "663", "Type": { - "$ref": "665" + "$ref": "662" }, "Value": "application/json" } @@ -7017,7 +6993,7 @@ ], "Responses": [ { - "$id": "667", + "$id": "664", "StatusCodes": [ 204 ], @@ -7035,19 +7011,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "668", + "$id": "665", "Name": "withElif", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "669", + "$id": "666", "Name": "elif", "NameInRequest": "elif", "Type": { - "$id": "670", + "$id": "667", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7063,11 +7039,11 @@ "Kind": "Method" }, { - "$id": "671", + "$id": "668", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "672", + "$id": "669", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7082,9 +7058,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "673", + "$id": "670", "Type": { - "$ref": "672" + "$ref": "669" }, "Value": "application/json" } @@ -7092,7 +7068,7 @@ ], "Responses": [ { - "$id": "674", + "$id": "671", "StatusCodes": [ 204 ], @@ -7110,19 +7086,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "675", + "$id": "672", "Name": "withElse", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "676", + "$id": "673", "Name": "else", "NameInRequest": "else", "Type": { - "$id": "677", + "$id": "674", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7138,11 +7114,11 @@ "Kind": "Method" }, { - "$id": "678", + "$id": "675", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "679", + "$id": "676", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7157,9 +7133,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "680", + "$id": "677", "Type": { - "$ref": "679" + "$ref": "676" }, "Value": "application/json" } @@ -7167,7 +7143,7 @@ ], "Responses": [ { - "$id": "681", + "$id": "678", "StatusCodes": [ 204 ], @@ -7185,19 +7161,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "682", + "$id": "679", "Name": "withExcept", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "683", + "$id": "680", "Name": "except", "NameInRequest": "except", "Type": { - "$id": "684", + "$id": "681", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7213,11 +7189,11 @@ "Kind": "Method" }, { - "$id": "685", + "$id": "682", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "686", + "$id": "683", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7232,9 +7208,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "687", + "$id": "684", "Type": { - "$ref": "686" + "$ref": "683" }, "Value": "application/json" } @@ -7242,7 +7218,7 @@ ], "Responses": [ { - "$id": "688", + "$id": "685", "StatusCodes": [ 204 ], @@ -7260,19 +7236,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "689", + "$id": "686", "Name": "withExec", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "690", + "$id": "687", "Name": "exec", "NameInRequest": "exec", "Type": { - "$id": "691", + "$id": "688", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7288,11 +7264,11 @@ "Kind": "Method" }, { - "$id": "692", + "$id": "689", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "693", + "$id": "690", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7307,9 +7283,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "694", + "$id": "691", "Type": { - "$ref": "693" + "$ref": "690" }, "Value": "application/json" } @@ -7317,7 +7293,7 @@ ], "Responses": [ { - "$id": "695", + "$id": "692", "StatusCodes": [ 204 ], @@ -7335,19 +7311,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "696", + "$id": "693", "Name": "withFinally", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "697", + "$id": "694", "Name": "finally", "NameInRequest": "finally", "Type": { - "$id": "698", + "$id": "695", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7363,11 +7339,11 @@ "Kind": "Method" }, { - "$id": "699", + "$id": "696", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "700", + "$id": "697", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7382,9 +7358,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "701", + "$id": "698", "Type": { - "$ref": "700" + "$ref": "697" }, "Value": "application/json" } @@ -7392,7 +7368,7 @@ ], "Responses": [ { - "$id": "702", + "$id": "699", "StatusCodes": [ 204 ], @@ -7410,19 +7386,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "703", + "$id": "700", "Name": "withFor", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "704", + "$id": "701", "Name": "for", "NameInRequest": "for", "Type": { - "$id": "705", + "$id": "702", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7438,11 +7414,11 @@ "Kind": "Method" }, { - "$id": "706", + "$id": "703", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "707", + "$id": "704", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7457,9 +7433,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "708", + "$id": "705", "Type": { - "$ref": "707" + "$ref": "704" }, "Value": "application/json" } @@ -7467,7 +7443,7 @@ ], "Responses": [ { - "$id": "709", + "$id": "706", "StatusCodes": [ 204 ], @@ -7485,19 +7461,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "710", + "$id": "707", "Name": "withFrom", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "711", + "$id": "708", "Name": "from", "NameInRequest": "from", "Type": { - "$id": "712", + "$id": "709", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7513,11 +7489,11 @@ "Kind": "Method" }, { - "$id": "713", + "$id": "710", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "714", + "$id": "711", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7532,9 +7508,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "715", + "$id": "712", "Type": { - "$ref": "714" + "$ref": "711" }, "Value": "application/json" } @@ -7542,7 +7518,7 @@ ], "Responses": [ { - "$id": "716", + "$id": "713", "StatusCodes": [ 204 ], @@ -7560,19 +7536,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "717", + "$id": "714", "Name": "withGlobal", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "718", + "$id": "715", "Name": "global", "NameInRequest": "global", "Type": { - "$id": "719", + "$id": "716", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7588,11 +7564,11 @@ "Kind": "Method" }, { - "$id": "720", + "$id": "717", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "721", + "$id": "718", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7607,9 +7583,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "722", + "$id": "719", "Type": { - "$ref": "721" + "$ref": "718" }, "Value": "application/json" } @@ -7617,7 +7593,7 @@ ], "Responses": [ { - "$id": "723", + "$id": "720", "StatusCodes": [ 204 ], @@ -7635,19 +7611,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "724", + "$id": "721", "Name": "withIf", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "725", + "$id": "722", "Name": "if", "NameInRequest": "if", "Type": { - "$id": "726", + "$id": "723", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7663,11 +7639,11 @@ "Kind": "Method" }, { - "$id": "727", + "$id": "724", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "728", + "$id": "725", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7682,9 +7658,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "729", + "$id": "726", "Type": { - "$ref": "728" + "$ref": "725" }, "Value": "application/json" } @@ -7692,7 +7668,7 @@ ], "Responses": [ { - "$id": "730", + "$id": "727", "StatusCodes": [ 204 ], @@ -7710,19 +7686,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "731", + "$id": "728", "Name": "withImport", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "732", + "$id": "729", "Name": "import", "NameInRequest": "import", "Type": { - "$id": "733", + "$id": "730", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7738,11 +7714,11 @@ "Kind": "Method" }, { - "$id": "734", + "$id": "731", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "735", + "$id": "732", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7757,9 +7733,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "736", + "$id": "733", "Type": { - "$ref": "735" + "$ref": "732" }, "Value": "application/json" } @@ -7767,7 +7743,7 @@ ], "Responses": [ { - "$id": "737", + "$id": "734", "StatusCodes": [ 204 ], @@ -7785,19 +7761,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "738", + "$id": "735", "Name": "withIn", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "739", + "$id": "736", "Name": "in", "NameInRequest": "in", "Type": { - "$id": "740", + "$id": "737", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7813,11 +7789,11 @@ "Kind": "Method" }, { - "$id": "741", + "$id": "738", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "742", + "$id": "739", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7832,9 +7808,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "743", + "$id": "740", "Type": { - "$ref": "742" + "$ref": "739" }, "Value": "application/json" } @@ -7842,7 +7818,7 @@ ], "Responses": [ { - "$id": "744", + "$id": "741", "StatusCodes": [ 204 ], @@ -7860,19 +7836,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "745", + "$id": "742", "Name": "withIs", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "746", + "$id": "743", "Name": "is", "NameInRequest": "is", "Type": { - "$id": "747", + "$id": "744", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7888,11 +7864,11 @@ "Kind": "Method" }, { - "$id": "748", + "$id": "745", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "749", + "$id": "746", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7907,9 +7883,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "750", + "$id": "747", "Type": { - "$ref": "749" + "$ref": "746" }, "Value": "application/json" } @@ -7917,7 +7893,7 @@ ], "Responses": [ { - "$id": "751", + "$id": "748", "StatusCodes": [ 204 ], @@ -7935,19 +7911,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "752", + "$id": "749", "Name": "withLambda", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "753", + "$id": "750", "Name": "lambda", "NameInRequest": "lambda", "Type": { - "$id": "754", + "$id": "751", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7963,11 +7939,11 @@ "Kind": "Method" }, { - "$id": "755", + "$id": "752", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "756", + "$id": "753", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7982,9 +7958,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "757", + "$id": "754", "Type": { - "$ref": "756" + "$ref": "753" }, "Value": "application/json" } @@ -7992,7 +7968,7 @@ ], "Responses": [ { - "$id": "758", + "$id": "755", "StatusCodes": [ 204 ], @@ -8010,19 +7986,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "759", + "$id": "756", "Name": "withNot", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "760", + "$id": "757", "Name": "not", "NameInRequest": "not", "Type": { - "$id": "761", + "$id": "758", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8038,11 +8014,11 @@ "Kind": "Method" }, { - "$id": "762", + "$id": "759", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "763", + "$id": "760", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8057,9 +8033,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "764", + "$id": "761", "Type": { - "$ref": "763" + "$ref": "760" }, "Value": "application/json" } @@ -8067,7 +8043,7 @@ ], "Responses": [ { - "$id": "765", + "$id": "762", "StatusCodes": [ 204 ], @@ -8085,19 +8061,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "766", + "$id": "763", "Name": "withOr", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "767", + "$id": "764", "Name": "or", "NameInRequest": "or", "Type": { - "$id": "768", + "$id": "765", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8113,11 +8089,11 @@ "Kind": "Method" }, { - "$id": "769", + "$id": "766", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "770", + "$id": "767", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8132,9 +8108,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "771", + "$id": "768", "Type": { - "$ref": "770" + "$ref": "767" }, "Value": "application/json" } @@ -8142,7 +8118,7 @@ ], "Responses": [ { - "$id": "772", + "$id": "769", "StatusCodes": [ 204 ], @@ -8160,19 +8136,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "773", + "$id": "770", "Name": "withPass", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "774", + "$id": "771", "Name": "pass", "NameInRequest": "pass", "Type": { - "$id": "775", + "$id": "772", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8188,11 +8164,11 @@ "Kind": "Method" }, { - "$id": "776", + "$id": "773", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "777", + "$id": "774", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8207,9 +8183,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "778", + "$id": "775", "Type": { - "$ref": "777" + "$ref": "774" }, "Value": "application/json" } @@ -8217,7 +8193,7 @@ ], "Responses": [ { - "$id": "779", + "$id": "776", "StatusCodes": [ 204 ], @@ -8235,19 +8211,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "780", + "$id": "777", "Name": "withRaise", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "781", + "$id": "778", "Name": "raise", "NameInRequest": "raise", "Type": { - "$id": "782", + "$id": "779", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8263,11 +8239,11 @@ "Kind": "Method" }, { - "$id": "783", + "$id": "780", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "784", + "$id": "781", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8282,9 +8258,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "785", + "$id": "782", "Type": { - "$ref": "784" + "$ref": "781" }, "Value": "application/json" } @@ -8292,7 +8268,7 @@ ], "Responses": [ { - "$id": "786", + "$id": "783", "StatusCodes": [ 204 ], @@ -8310,19 +8286,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "787", + "$id": "784", "Name": "withReturn", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "788", + "$id": "785", "Name": "return", "NameInRequest": "return", "Type": { - "$id": "789", + "$id": "786", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8338,11 +8314,11 @@ "Kind": "Method" }, { - "$id": "790", + "$id": "787", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "791", + "$id": "788", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8357,9 +8333,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "792", + "$id": "789", "Type": { - "$ref": "791" + "$ref": "788" }, "Value": "application/json" } @@ -8367,7 +8343,7 @@ ], "Responses": [ { - "$id": "793", + "$id": "790", "StatusCodes": [ 204 ], @@ -8385,19 +8361,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "794", + "$id": "791", "Name": "withTry", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "795", + "$id": "792", "Name": "try", "NameInRequest": "try", "Type": { - "$id": "796", + "$id": "793", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8413,11 +8389,11 @@ "Kind": "Method" }, { - "$id": "797", + "$id": "794", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "798", + "$id": "795", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8432,9 +8408,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "799", + "$id": "796", "Type": { - "$ref": "798" + "$ref": "795" }, "Value": "application/json" } @@ -8442,7 +8418,7 @@ ], "Responses": [ { - "$id": "800", + "$id": "797", "StatusCodes": [ 204 ], @@ -8460,19 +8436,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "801", + "$id": "798", "Name": "withWhile", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "802", + "$id": "799", "Name": "while", "NameInRequest": "while", "Type": { - "$id": "803", + "$id": "800", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8488,11 +8464,11 @@ "Kind": "Method" }, { - "$id": "804", + "$id": "801", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "805", + "$id": "802", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8507,9 +8483,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "806", + "$id": "803", "Type": { - "$ref": "805" + "$ref": "802" }, "Value": "application/json" } @@ -8517,7 +8493,7 @@ ], "Responses": [ { - "$id": "807", + "$id": "804", "StatusCodes": [ 204 ], @@ -8535,19 +8511,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "808", + "$id": "805", "Name": "withWith", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "809", + "$id": "806", "Name": "with", "NameInRequest": "with", "Type": { - "$id": "810", + "$id": "807", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8563,11 +8539,11 @@ "Kind": "Method" }, { - "$id": "811", + "$id": "808", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "812", + "$id": "809", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8582,9 +8558,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "813", + "$id": "810", "Type": { - "$ref": "812" + "$ref": "809" }, "Value": "application/json" } @@ -8592,7 +8568,7 @@ ], "Responses": [ { - "$id": "814", + "$id": "811", "StatusCodes": [ 204 ], @@ -8610,19 +8586,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "815", + "$id": "812", "Name": "withYield", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "816", + "$id": "813", "Name": "yield", "NameInRequest": "yield", "Type": { - "$id": "817", + "$id": "814", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8638,11 +8614,11 @@ "Kind": "Method" }, { - "$id": "818", + "$id": "815", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "819", + "$id": "816", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8657,9 +8633,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "820", + "$id": "817", "Type": { - "$ref": "819" + "$ref": "816" }, "Value": "application/json" } @@ -8667,7 +8643,7 @@ ], "Responses": [ { - "$id": "821", + "$id": "818", "StatusCodes": [ 204 ], @@ -8685,19 +8661,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "822", + "$id": "819", "Name": "withCancellationToken", "ResourceName": "Parameters", "Parameters": [ { - "$ref": "111" + "$ref": "108" }, { - "$id": "823", + "$id": "820", "Name": "cancellationToken", "NameInRequest": "cancellationToken", "Type": { - "$id": "824", + "$id": "821", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8713,11 +8689,11 @@ "Kind": "Method" }, { - "$id": "825", + "$id": "822", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "826", + "$id": "823", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8732,9 +8708,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "827", + "$id": "824", "Type": { - "$ref": "826" + "$ref": "823" }, "Value": "application/json" } @@ -8742,7 +8718,7 @@ ], "Responses": [ { - "$id": "828", + "$id": "825", "StatusCodes": [ 204 ], @@ -8761,7 +8737,7 @@ } ], "Protocol": { - "$id": "829" + "$id": "826" }, "Creatable": false, "Parent": "SpecialWordsClient" diff --git a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Bird.cs b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Bird.cs index aed12eba84d..83838229972 100644 --- a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Bird.cs +++ b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Bird.cs @@ -54,7 +54,7 @@ protected Bird(int wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal Bird(string kind, int wingspan, IDictionary serializedAdditionalRawData) @@ -69,7 +69,7 @@ internal Bird() { } - /// Gets or sets the kind. + /// Discriminator. internal string Kind { get; set; } /// Gets or sets the wingspan. public int Wingspan { get; set; } diff --git a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs index cbd8263d280..c7ea59bc16d 100644 --- a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs +++ b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Eagle.cs @@ -20,7 +20,7 @@ public Eagle(int wingspan) : base(wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. /// diff --git a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs index 7744484721f..f27a84282a4 100644 --- a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs +++ b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Goose.cs @@ -18,7 +18,7 @@ public Goose(int wingspan) : base(wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal Goose(string kind, int wingspan, IDictionary serializedAdditionalRawData) : base(kind, wingspan, serializedAdditionalRawData) diff --git a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs index e525790081c..6df4fd65a9b 100644 --- a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs +++ b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/SeaGull.cs @@ -18,7 +18,7 @@ public SeaGull(int wingspan) : base(wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal SeaGull(string kind, int wingspan, IDictionary serializedAdditionalRawData) : base(kind, wingspan, serializedAdditionalRawData) diff --git a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs index f8326ebaece..910fae922cf 100644 --- a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs +++ b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/Sparrow.cs @@ -18,7 +18,7 @@ public Sparrow(int wingspan) : base(wingspan) } /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal Sparrow(string kind, int wingspan, IDictionary serializedAdditionalRawData) : base(kind, wingspan, serializedAdditionalRawData) diff --git a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownBird.cs b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownBird.cs index 886b082ce64..03ffe0b6ddf 100644 --- a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownBird.cs +++ b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/Models/UnknownBird.cs @@ -11,7 +11,7 @@ namespace Scm._Type.Model.Inheritance.SingleDiscriminator.Models internal partial class UnknownBird : Bird { /// Initializes a new instance of . - /// + /// Discriminator. /// /// Keeps track of any properties unknown to the library. internal UnknownBird(string kind, int wingspan, IDictionary serializedAdditionalRawData) : base(kind, wingspan, serializedAdditionalRawData) diff --git a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json index 83c6297775e..8dd0291df11 100644 --- a/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/type/model/inheritance/single-discriminator/src/Generated/tspCodeModel.json @@ -19,7 +19,7 @@ "$id": "3", "Name": "kind", "SerializedName": "kind", - "Description": "", + "Description": "Discriminator", "Type": { "$id": "4", "Kind": "Primitive", @@ -61,14 +61,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "9", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs index 2602bf70e4a..7be9638a44b 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs @@ -23,6 +23,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStartObject(); writer.WritePropertyName("derivedProp"u8); writer.WriteNumberValue(DerivedProp); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -52,6 +54,7 @@ internal static DifferentSpreadFloatDerived DeserializeDifferentSpreadFloatDeriv return null; } float derivedProp = default; + string name = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -61,10 +64,15 @@ internal static DifferentSpreadFloatDerived DeserializeDifferentSpreadFloatDeriv derivedProp = property.Value.GetSingle(); continue; } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } additionalPropertiesDictionary.Add(property.Name, property.Value.GetSingle()); } additionalProperties = additionalPropertiesDictionary; - return new DifferentSpreadFloatDerived(derivedProp, additionalProperties); + return new DifferentSpreadFloatDerived(name, additionalProperties, derivedProp); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -100,14 +108,14 @@ DifferentSpreadFloatDerived IPersistableModel.Creat /// Deserializes the model from a raw response. /// The result to deserialize the model from. - internal static DifferentSpreadFloatDerived FromResponse(PipelineResponse response) + internal static new DifferentSpreadFloatDerived FromResponse(PipelineResponse response) { using var document = JsonDocument.Parse(response.Content); return DeserializeDifferentSpreadFloatDerived(document.RootElement); } /// Convert into a . - internal virtual BinaryContent ToBinaryContent() + internal override BinaryContent ToBinaryContent() { return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); } diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs index 1e6b0189a26..3064c98227a 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs @@ -2,28 +2,32 @@ #nullable disable +using System; using System.Collections.Generic; namespace Scm._Type.Property.AdditionalProperties.Models { /// The model extends from a model that spread Record<float32> with the different known property type. - public partial class DifferentSpreadFloatDerived + public partial class DifferentSpreadFloatDerived : DifferentSpreadFloatRecord { /// Initializes a new instance of . + /// The id property. /// The index property. - public DifferentSpreadFloatDerived(float derivedProp) + /// is null. + public DifferentSpreadFloatDerived(string name, float derivedProp) : base(name) { + Argument.AssertNotNull(name, nameof(name)); + DerivedProp = derivedProp; - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// The index property. + /// The id property. /// Additional Properties. - internal DifferentSpreadFloatDerived(float derivedProp, IDictionary additionalProperties) + /// The index property. + internal DifferentSpreadFloatDerived(string name, IDictionary additionalProperties, float derivedProp) : base(name, additionalProperties) { DerivedProp = derivedProp; - AdditionalProperties = additionalProperties; } /// Initializes a new instance of for deserialization. @@ -33,7 +37,5 @@ internal DifferentSpreadFloatDerived() /// The index property. public float DerivedProp { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs new file mode 100644 index 00000000000..5c8a2ad73c6 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs @@ -0,0 +1,115 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Scm._Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadFloatRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DifferentSpreadFloatRecord)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + } + + DifferentSpreadFloatRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DifferentSpreadFloatRecord)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDifferentSpreadFloatRecord(document.RootElement, options); + } + + internal static DifferentSpreadFloatRecord DeserializeDifferentSpreadFloatRecord(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary.Add(property.Name, property.Value.GetSingle()); + } + additionalProperties = additionalPropertiesDictionary; + return new DifferentSpreadFloatRecord(name, additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DifferentSpreadFloatRecord)} does not support writing '{options.Format}' format."); + } + } + + DifferentSpreadFloatRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDifferentSpreadFloatRecord(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DifferentSpreadFloatRecord)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The result to deserialize the model from. + internal static DifferentSpreadFloatRecord FromResponse(PipelineResponse response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDifferentSpreadFloatRecord(document.RootElement); + } + + /// Convert into a . + internal virtual BinaryContent ToBinaryContent() + { + return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs new file mode 100644 index 00000000000..5264624d7c0 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Scm._Type.Property.AdditionalProperties.Models +{ + /// The model spread Record<float32> with the different known property type. + public partial class DifferentSpreadFloatRecord + { + /// Initializes a new instance of . + /// The id property. + /// is null. + public DifferentSpreadFloatRecord(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id property. + /// Additional Properties. + internal DifferentSpreadFloatRecord(string name, IDictionary additionalProperties) + { + Name = name; + AdditionalProperties = additionalProperties; + } + + /// Initializes a new instance of for deserialization. + internal DifferentSpreadFloatRecord() + { + } + + /// The id property. + public string Name { get; set; } + /// Additional Properties. + public IDictionary AdditionalProperties { get; } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs index e2568dc2568..4286e7e835b 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs @@ -28,6 +28,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("knownProp"u8); + writer.WriteStringValue(KnownProp); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -62,6 +64,7 @@ internal static DifferentSpreadModelArrayDerived DeserializeDifferentSpreadModel return null; } IList derivedProp = default; + string knownProp = default; IDictionary> additionalProperties = default; Dictionary> additionalPropertiesDictionary = new Dictionary>(); foreach (var property in element.EnumerateObject()) @@ -76,6 +79,11 @@ internal static DifferentSpreadModelArrayDerived DeserializeDifferentSpreadModel derivedProp = array; continue; } + if (property.NameEquals("knownProp"u8)) + { + knownProp = property.Value.GetString(); + continue; + } List array0 = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -84,7 +92,7 @@ internal static DifferentSpreadModelArrayDerived DeserializeDifferentSpreadModel additionalPropertiesDictionary.Add(property.Name, array0); } additionalProperties = additionalPropertiesDictionary; - return new DifferentSpreadModelArrayDerived(derivedProp, additionalProperties); + return new DifferentSpreadModelArrayDerived(knownProp, additionalProperties, derivedProp); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -120,14 +128,14 @@ DifferentSpreadModelArrayDerived IPersistableModel Deserializes the model from a raw response. /// The result to deserialize the model from. - internal static DifferentSpreadModelArrayDerived FromResponse(PipelineResponse response) + internal static new DifferentSpreadModelArrayDerived FromResponse(PipelineResponse response) { using var document = JsonDocument.Parse(response.Content); return DeserializeDifferentSpreadModelArrayDerived(document.RootElement); } /// Convert into a . - internal virtual BinaryContent ToBinaryContent() + internal override BinaryContent ToBinaryContent() { return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); } diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs index 9780ed29242..f415f42d68a 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs @@ -9,26 +9,27 @@ namespace Scm._Type.Property.AdditionalProperties.Models { /// The model extends from a model that spread Record<ModelForRecord[]> with the different known property type. - public partial class DifferentSpreadModelArrayDerived + public partial class DifferentSpreadModelArrayDerived : DifferentSpreadModelArrayRecord { /// Initializes a new instance of . + /// /// The index property. - /// is null. - public DifferentSpreadModelArrayDerived(IEnumerable derivedProp) + /// or is null. + public DifferentSpreadModelArrayDerived(string knownProp, IEnumerable derivedProp) : base(knownProp) { + Argument.AssertNotNull(knownProp, nameof(knownProp)); Argument.AssertNotNull(derivedProp, nameof(derivedProp)); DerivedProp = derivedProp.ToList(); - AdditionalProperties = new ChangeTrackingDictionary>(); } /// Initializes a new instance of . - /// The index property. + /// /// Additional Properties. - internal DifferentSpreadModelArrayDerived(IList derivedProp, IDictionary> additionalProperties) + /// The index property. + internal DifferentSpreadModelArrayDerived(string knownProp, IDictionary> additionalProperties, IList derivedProp) : base(knownProp, additionalProperties) { DerivedProp = derivedProp; - AdditionalProperties = additionalProperties; } /// Initializes a new instance of for deserialization. @@ -38,7 +39,5 @@ internal DifferentSpreadModelArrayDerived() /// The index property. public IList DerivedProp { get; } - /// Additional Properties. - public IDictionary> AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs new file mode 100644 index 00000000000..c4c5fbaeb0f --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs @@ -0,0 +1,125 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Scm._Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelArrayRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DifferentSpreadModelArrayRecord)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("knownProp"u8); + writer.WriteStringValue(KnownProp); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStartArray(); + foreach (var item0 in item.Value) + { + writer.WriteObjectValue(item0, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + DifferentSpreadModelArrayRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DifferentSpreadModelArrayRecord)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDifferentSpreadModelArrayRecord(document.RootElement, options); + } + + internal static DifferentSpreadModelArrayRecord DeserializeDifferentSpreadModelArrayRecord(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string knownProp = default; + IDictionary> additionalProperties = default; + Dictionary> additionalPropertiesDictionary = new Dictionary>(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("knownProp"u8)) + { + knownProp = property.Value.GetString(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ModelForRecord.DeserializeModelForRecord(item, options)); + } + additionalPropertiesDictionary.Add(property.Name, array); + } + additionalProperties = additionalPropertiesDictionary; + return new DifferentSpreadModelArrayRecord(knownProp, additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DifferentSpreadModelArrayRecord)} does not support writing '{options.Format}' format."); + } + } + + DifferentSpreadModelArrayRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDifferentSpreadModelArrayRecord(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DifferentSpreadModelArrayRecord)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The result to deserialize the model from. + internal static DifferentSpreadModelArrayRecord FromResponse(PipelineResponse response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDifferentSpreadModelArrayRecord(document.RootElement); + } + + /// Convert into a . + internal virtual BinaryContent ToBinaryContent() + { + return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs new file mode 100644 index 00000000000..ad5f7839db1 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Scm._Type.Property.AdditionalProperties.Models +{ + /// The model spread Record<ModelForRecord[]> with the different known property type. + public partial class DifferentSpreadModelArrayRecord + { + /// Initializes a new instance of . + /// + /// is null. + public DifferentSpreadModelArrayRecord(string knownProp) + { + Argument.AssertNotNull(knownProp, nameof(knownProp)); + + KnownProp = knownProp; + AdditionalProperties = new ChangeTrackingDictionary>(); + } + + /// Initializes a new instance of . + /// + /// Additional Properties. + internal DifferentSpreadModelArrayRecord(string knownProp, IDictionary> additionalProperties) + { + KnownProp = knownProp; + AdditionalProperties = additionalProperties; + } + + /// Initializes a new instance of for deserialization. + internal DifferentSpreadModelArrayRecord() + { + } + + /// Gets or sets the known prop. + public string KnownProp { get; set; } + /// Additional Properties. + public IDictionary> AdditionalProperties { get; } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs index 014547f4c75..5f4553f31f0 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs @@ -23,6 +23,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteStartObject(); writer.WritePropertyName("derivedProp"u8); writer.WriteObjectValue(DerivedProp, options); + writer.WritePropertyName("knownProp"u8); + writer.WriteStringValue(KnownProp); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -52,6 +54,7 @@ internal static DifferentSpreadModelDerived DeserializeDifferentSpreadModelDeriv return null; } ModelForRecord derivedProp = default; + string knownProp = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -61,10 +64,15 @@ internal static DifferentSpreadModelDerived DeserializeDifferentSpreadModelDeriv derivedProp = ModelForRecord.DeserializeModelForRecord(property.Value, options); continue; } + if (property.NameEquals("knownProp"u8)) + { + knownProp = property.Value.GetString(); + continue; + } additionalPropertiesDictionary.Add(property.Name, ModelForRecord.DeserializeModelForRecord(property.Value, options)); } additionalProperties = additionalPropertiesDictionary; - return new DifferentSpreadModelDerived(derivedProp, additionalProperties); + return new DifferentSpreadModelDerived(knownProp, additionalProperties, derivedProp); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -100,14 +108,14 @@ DifferentSpreadModelDerived IPersistableModel.Creat /// Deserializes the model from a raw response. /// The result to deserialize the model from. - internal static DifferentSpreadModelDerived FromResponse(PipelineResponse response) + internal static new DifferentSpreadModelDerived FromResponse(PipelineResponse response) { using var document = JsonDocument.Parse(response.Content); return DeserializeDifferentSpreadModelDerived(document.RootElement); } /// Convert into a . - internal virtual BinaryContent ToBinaryContent() + internal override BinaryContent ToBinaryContent() { return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); } diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs index 0c9a736a952..882f4dfa084 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs @@ -8,26 +8,27 @@ namespace Scm._Type.Property.AdditionalProperties.Models { /// The model extends from a model that spread Record<ModelForRecord> with the different known property type. - public partial class DifferentSpreadModelDerived + public partial class DifferentSpreadModelDerived : DifferentSpreadModelRecord { /// Initializes a new instance of . + /// /// The index property. - /// is null. - public DifferentSpreadModelDerived(ModelForRecord derivedProp) + /// or is null. + public DifferentSpreadModelDerived(string knownProp, ModelForRecord derivedProp) : base(knownProp) { + Argument.AssertNotNull(knownProp, nameof(knownProp)); Argument.AssertNotNull(derivedProp, nameof(derivedProp)); DerivedProp = derivedProp; - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// The index property. + /// /// Additional Properties. - internal DifferentSpreadModelDerived(ModelForRecord derivedProp, IDictionary additionalProperties) + /// The index property. + internal DifferentSpreadModelDerived(string knownProp, IDictionary additionalProperties, ModelForRecord derivedProp) : base(knownProp, additionalProperties) { DerivedProp = derivedProp; - AdditionalProperties = additionalProperties; } /// Initializes a new instance of for deserialization. @@ -37,7 +38,5 @@ internal DifferentSpreadModelDerived() /// The index property. public ModelForRecord DerivedProp { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs new file mode 100644 index 00000000000..797ff7d4d22 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs @@ -0,0 +1,115 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Scm._Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DifferentSpreadModelRecord)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("knownProp"u8); + writer.WriteStringValue(KnownProp); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + + DifferentSpreadModelRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DifferentSpreadModelRecord)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDifferentSpreadModelRecord(document.RootElement, options); + } + + internal static DifferentSpreadModelRecord DeserializeDifferentSpreadModelRecord(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string knownProp = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("knownProp"u8)) + { + knownProp = property.Value.GetString(); + continue; + } + additionalPropertiesDictionary.Add(property.Name, ModelForRecord.DeserializeModelForRecord(property.Value, options)); + } + additionalProperties = additionalPropertiesDictionary; + return new DifferentSpreadModelRecord(knownProp, additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DifferentSpreadModelRecord)} does not support writing '{options.Format}' format."); + } + } + + DifferentSpreadModelRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDifferentSpreadModelRecord(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DifferentSpreadModelRecord)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The result to deserialize the model from. + internal static DifferentSpreadModelRecord FromResponse(PipelineResponse response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDifferentSpreadModelRecord(document.RootElement); + } + + /// Convert into a . + internal virtual BinaryContent ToBinaryContent() + { + return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs new file mode 100644 index 00000000000..8878bf3ac74 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Scm._Type.Property.AdditionalProperties.Models +{ + /// The model spread Record<ModelForRecord> with the different known property type. + public partial class DifferentSpreadModelRecord + { + /// Initializes a new instance of . + /// + /// is null. + public DifferentSpreadModelRecord(string knownProp) + { + Argument.AssertNotNull(knownProp, nameof(knownProp)); + + KnownProp = knownProp; + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// + /// Additional Properties. + internal DifferentSpreadModelRecord(string knownProp, IDictionary additionalProperties) + { + KnownProp = knownProp; + AdditionalProperties = additionalProperties; + } + + /// Initializes a new instance of for deserialization. + internal DifferentSpreadModelRecord() + { + } + + /// Gets or sets the known prop. + public string KnownProp { get; set; } + /// Additional Properties. + public IDictionary AdditionalProperties { get; } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs index a12911bfe36..2ec3f7dda07 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs @@ -23,6 +23,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStartObject(); writer.WritePropertyName("derivedProp"u8); writer.WriteStringValue(DerivedProp); + writer.WritePropertyName("id"u8); + writer.WriteNumberValue(Id); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -52,6 +54,7 @@ internal static DifferentSpreadStringDerived DeserializeDifferentSpreadStringDer return null; } string derivedProp = default; + float id = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -61,10 +64,15 @@ internal static DifferentSpreadStringDerived DeserializeDifferentSpreadStringDer derivedProp = property.Value.GetString(); continue; } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetSingle(); + continue; + } additionalPropertiesDictionary.Add(property.Name, property.Value.GetString()); } additionalProperties = additionalPropertiesDictionary; - return new DifferentSpreadStringDerived(derivedProp, additionalProperties); + return new DifferentSpreadStringDerived(id, additionalProperties, derivedProp); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -100,14 +108,14 @@ DifferentSpreadStringDerived IPersistableModel.Cre /// Deserializes the model from a raw response. /// The result to deserialize the model from. - internal static DifferentSpreadStringDerived FromResponse(PipelineResponse response) + internal static new DifferentSpreadStringDerived FromResponse(PipelineResponse response) { using var document = JsonDocument.Parse(response.Content); return DeserializeDifferentSpreadStringDerived(document.RootElement); } /// Convert into a . - internal virtual BinaryContent ToBinaryContent() + internal override BinaryContent ToBinaryContent() { return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); } diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs index ca548f81614..034d6b45c93 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs @@ -8,26 +8,26 @@ namespace Scm._Type.Property.AdditionalProperties.Models { /// The model extends from a model that spread Record<string> with the different known property type. - public partial class DifferentSpreadStringDerived + public partial class DifferentSpreadStringDerived : DifferentSpreadStringRecord { /// Initializes a new instance of . + /// The name property. /// The index property. /// is null. - public DifferentSpreadStringDerived(string derivedProp) + public DifferentSpreadStringDerived(float id, string derivedProp) : base(id) { Argument.AssertNotNull(derivedProp, nameof(derivedProp)); DerivedProp = derivedProp; - AdditionalProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// The index property. + /// The name property. /// Additional Properties. - internal DifferentSpreadStringDerived(string derivedProp, IDictionary additionalProperties) + /// The index property. + internal DifferentSpreadStringDerived(float id, IDictionary additionalProperties, string derivedProp) : base(id, additionalProperties) { DerivedProp = derivedProp; - AdditionalProperties = additionalProperties; } /// Initializes a new instance of for deserialization. @@ -37,7 +37,5 @@ internal DifferentSpreadStringDerived() /// The index property. public string DerivedProp { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs new file mode 100644 index 00000000000..9d6229826c0 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs @@ -0,0 +1,115 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Scm._Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadStringRecord : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DifferentSpreadStringRecord)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteNumberValue(Id); + foreach (var item in AdditionalProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + + DifferentSpreadStringRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DifferentSpreadStringRecord)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDifferentSpreadStringRecord(document.RootElement, options); + } + + internal static DifferentSpreadStringRecord DeserializeDifferentSpreadStringRecord(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float id = default; + IDictionary additionalProperties = default; + Dictionary additionalPropertiesDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetSingle(); + continue; + } + additionalPropertiesDictionary.Add(property.Name, property.Value.GetString()); + } + additionalProperties = additionalPropertiesDictionary; + return new DifferentSpreadStringRecord(id, additionalProperties); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DifferentSpreadStringRecord)} does not support writing '{options.Format}' format."); + } + } + + DifferentSpreadStringRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDifferentSpreadStringRecord(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DifferentSpreadStringRecord)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The result to deserialize the model from. + internal static DifferentSpreadStringRecord FromResponse(PipelineResponse response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDifferentSpreadStringRecord(document.RootElement); + } + + /// Convert into a . + internal virtual BinaryContent ToBinaryContent() + { + return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs new file mode 100644 index 00000000000..06bb13c68b1 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs @@ -0,0 +1,39 @@ +// + +#nullable disable + +using System.Collections.Generic; + +namespace Scm._Type.Property.AdditionalProperties.Models +{ + /// The model spread Record<string> with the different known property type. + public partial class DifferentSpreadStringRecord + { + /// Initializes a new instance of . + /// The name property. + public DifferentSpreadStringRecord(float id) + { + Id = id; + AdditionalProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The name property. + /// Additional Properties. + internal DifferentSpreadStringRecord(float id, IDictionary additionalProperties) + { + Id = id; + AdditionalProperties = additionalProperties; + } + + /// Initializes a new instance of for deserialization. + internal DifferentSpreadStringRecord() + { + } + + /// The name property. + public float Id { get; set; } + /// Additional Properties. + public IDictionary AdditionalProperties { get; } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/tspCodeModel.json index 66ab31006e4..e58d6eab452 100644 --- a/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/type/property/additional-properties/src/Generated/tspCodeModel.json @@ -526,48 +526,45 @@ { "$id": "70", "Kind": "Model", - "Name": "ModelForRecord", - "Namespace": "Type.Property.AdditionalProperties", - "Description": "model for record", - "IsNullable": false, - "Usage": "RoundTrip", - "Properties": [ - { - "$id": "71", - "Name": "state", - "SerializedName": "state", - "Description": "The state property", - "Type": { - "$id": "72", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "73", - "Kind": "Model", "Name": "ExtendsModelAdditionalProperties", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from Record type.", "IsNullable": false, "Usage": "RoundTrip", "InheritedDictionaryType": { - "$id": "74", + "$id": "71", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "75", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$ref": "70" + "$id": "73", + "Kind": "Model", + "Name": "ModelForRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "model for record", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "74", + "Name": "state", + "SerializedName": "state", + "Description": "The state property", + "Type": { + "$id": "75", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] }, "IsNullable": false }, @@ -578,13 +575,16 @@ "SerializedName": "knownProp", "Description": "", "Type": { - "$ref": "70" + "$ref": "73" }, "IsRequired": true, "IsReadOnly": false } ] }, + { + "$ref": "73" + }, { "$id": "77", "Kind": "Model", @@ -604,7 +604,7 @@ "IsNullable": false }, "ValueType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -615,7 +615,7 @@ "SerializedName": "knownProp", "Description": "", "Type": { - "$ref": "70" + "$ref": "73" }, "IsRequired": true, "IsReadOnly": false @@ -645,7 +645,7 @@ "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -662,7 +662,7 @@ "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -694,7 +694,7 @@ "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -711,7 +711,7 @@ "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -728,32 +728,57 @@ "Description": "The model extends from a model that spread Record with the different known property type", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { + "BaseModel": { "$id": "94", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { + "Kind": "Model", + "Name": "DifferentSpreadStringRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the different known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { "$id": "95", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "96", - "Kind": "Primitive", - "Name": "String", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "96", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "97", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, "IsNullable": false }, - "IsNullable": false + "Properties": [ + { + "$id": "98", + "Name": "id", + "SerializedName": "id", + "Description": "The name property", + "Type": { + "$id": "99", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] }, "Properties": [ { - "$id": "97", + "$id": "100", "Name": "derivedProp", "SerializedName": "derivedProp", "Description": "The index property", "Type": { - "$id": "98", + "$id": "101", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -764,39 +789,67 @@ ] }, { - "$id": "99", + "$ref": "94" + }, + { + "$id": "102", "Kind": "Model", "Name": "DifferentSpreadFloatDerived", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from a model that spread Record with the different known property type", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "100", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "101", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "102", - "Kind": "Primitive", - "Name": "Float32", + "BaseModel": { + "$id": "103", + "Kind": "Model", + "Name": "DifferentSpreadFloatRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the different known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "104", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "105", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "106", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + }, "IsNullable": false }, - "IsNullable": false + "Properties": [ + { + "$id": "107", + "Name": "name", + "SerializedName": "name", + "Description": "The id property", + "Type": { + "$id": "108", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] }, "Properties": [ { - "$id": "103", + "$id": "109", "Name": "derivedProp", "SerializedName": "derivedProp", "Description": "The index property", "Type": { - "$id": "104", + "$id": "110", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -807,36 +860,64 @@ ] }, { - "$id": "105", + "$ref": "103" + }, + { + "$id": "111", "Kind": "Model", "Name": "DifferentSpreadModelDerived", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from a model that spread Record with the different known property type", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "106", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "107", - "Kind": "Primitive", - "Name": "String", + "BaseModel": { + "$id": "112", + "Kind": "Model", + "Name": "DifferentSpreadModelRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the different known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "113", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "114", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$ref": "73" + }, "IsNullable": false }, - "ValueType": { - "$ref": "70" - }, - "IsNullable": false + "Properties": [ + { + "$id": "115", + "Name": "knownProp", + "SerializedName": "knownProp", + "Description": "", + "Type": { + "$id": "116", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] }, "Properties": [ { - "$id": "108", + "$id": "117", "Name": "derivedProp", "SerializedName": "derivedProp", "Description": "The index property", "Type": { - "$ref": "70" + "$ref": "73" }, "IsRequired": true, "IsReadOnly": false @@ -844,46 +925,74 @@ ] }, { - "$id": "109", + "$ref": "112" + }, + { + "$id": "118", "Kind": "Model", "Name": "DifferentSpreadModelArrayDerived", "Namespace": "Type.Property.AdditionalProperties", "Description": "The model extends from a model that spread Record with the different known property type", "IsNullable": false, "Usage": "RoundTrip", - "InheritedDictionaryType": { - "$id": "110", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "111", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "112", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$ref": "70" + "BaseModel": { + "$id": "119", + "Kind": "Model", + "Name": "DifferentSpreadModelArrayRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the different known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "120", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "121", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "122", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "73" + }, + "IsNullable": false }, "IsNullable": false }, - "IsNullable": false + "Properties": [ + { + "$id": "123", + "Name": "knownProp", + "SerializedName": "knownProp", + "Description": "", + "Type": { + "$id": "124", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] }, "Properties": [ { - "$id": "113", + "$id": "125", "Name": "derivedProp", "SerializedName": "derivedProp", "Description": "The index property", "Type": { - "$id": "114", + "$id": "126", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -893,7 +1002,10 @@ ] }, { - "$id": "115", + "$ref": "119" + }, + { + "$id": "127", "Kind": "Model", "Name": "WidgetData0", "Namespace": "Type.Property.AdditionalProperties", @@ -901,12 +1013,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "116", + "$id": "128", "Name": "kind", "SerializedName": "kind", "Description": "", "Type": { - "$id": "117", + "$id": "129", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -919,12 +1031,12 @@ "IsReadOnly": false }, { - "$id": "118", + "$id": "130", "Name": "fooProp", "SerializedName": "fooProp", "Description": "", "Type": { - "$id": "119", + "$id": "131", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -935,7 +1047,7 @@ ] }, { - "$id": "120", + "$id": "132", "Kind": "Model", "Name": "WidgetData1", "Namespace": "Type.Property.AdditionalProperties", @@ -943,12 +1055,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "121", + "$id": "133", "Name": "kind", "SerializedName": "kind", "Description": "", "Type": { - "$id": "122", + "$id": "134", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -961,28 +1073,28 @@ "IsReadOnly": false }, { - "$id": "123", + "$id": "135", "Name": "start", "SerializedName": "start", "Description": "", "Type": { - "$id": "124", + "$id": "136", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "125", + "$id": "137", "Name": "end", "SerializedName": "end", "Description": "", "Type": { - "$id": "126", + "$id": "138", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, @@ -991,7 +1103,7 @@ ] }, { - "$id": "127", + "$id": "139", "Kind": "Model", "Name": "WidgetData2", "Namespace": "Type.Property.AdditionalProperties", @@ -999,12 +1111,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "128", + "$id": "140", "Name": "kind", "SerializedName": "kind", "Description": "", "Type": { - "$id": "129", + "$id": "141", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -1017,12 +1129,507 @@ "IsReadOnly": false }, { - "$id": "130", + "$id": "142", "Name": "start", "SerializedName": "start", "Description": "", "Type": { - "$id": "131", + "$id": "143", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "144", + "Kind": "Model", + "Name": "SpreadRecordForNonDiscriminatedUnion3", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "145", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "146", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "147", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$id": "148", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "139" + }, + "IsNullable": false + }, + { + "$ref": "132" + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "149", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "150", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "151", + "Kind": "Model", + "Name": "SpreadRecordForNonDiscriminatedUnion2", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "152", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "153", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "154", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$ref": "139" + }, + { + "$ref": "132" + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "155", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "156", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "157", + "Kind": "Model", + "Name": "SpreadRecordForNonDiscriminatedUnion", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "158", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "159", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "160", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$ref": "127" + }, + { + "$ref": "132" + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "161", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "162", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "163", + "Kind": "Model", + "Name": "SpreadRecordForDiscriminatedUnion", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "164", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "165", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "166", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$ref": "127" + }, + { + "$ref": "132" + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "167", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "168", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "169", + "Kind": "Model", + "Name": "SpreadRecordForUnion", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "170", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "171", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "172", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$id": "173", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + { + "$id": "174", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "175", + "Name": "flag", + "SerializedName": "flag", + "Description": "The name property", + "Type": { + "$id": "176", + "Kind": "Primitive", + "Name": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "177", + "Kind": "Model", + "Name": "MultipleSpreadRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record and Record", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "178", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "179", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "180", + "Kind": "Union", + "Name": "Union", + "UnionItemTypes": [ + { + "$id": "181", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + { + "$id": "182", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + } + ], + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "183", + "Name": "flag", + "SerializedName": "flag", + "Description": "The name property", + "Type": { + "$id": "184", + "Kind": "Primitive", + "Name": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "185", + "Kind": "Model", + "Name": "SpreadModelArrayRecord", + "Namespace": "Type.Property.AdditionalProperties", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "186", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "187", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "188", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "73" + }, + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "189", + "Name": "knownProp", + "SerializedName": "knownProp", + "Description": "", + "Type": { + "$id": "190", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "73" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "191", + "Kind": "Model", + "Name": "SpreadModelRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the same known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "192", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "193", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$ref": "73" + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "194", + "Name": "knownProp", + "SerializedName": "knownProp", + "Description": "", + "Type": { + "$ref": "73" + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "195", + "Kind": "Model", + "Name": "SpreadFloatRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the same known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "196", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "197", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "198", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "199", + "Name": "id", + "SerializedName": "id", + "Description": "The id property", + "Type": { + "$id": "200", + "Kind": "Primitive", + "Name": "Float32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "201", + "Kind": "Model", + "Name": "SpreadStringRecord", + "Namespace": "Type.Property.AdditionalProperties", + "Description": "The model spread Record with the same known property type", + "IsNullable": false, + "Usage": "RoundTrip", + "InheritedDictionaryType": { + "$id": "202", + "Kind": "Dictionary", + "Name": "Dictionary", + "KeyType": { + "$id": "203", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "204", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "Properties": [ + { + "$id": "205", + "Name": "name", + "SerializedName": "name", + "Description": "The name property", + "Type": { + "$id": "206", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1033,25 +1640,25 @@ ] }, { - "$id": "132", + "$id": "207", "Kind": "Model", - "Name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", + "Name": "IsUnknownAdditionalPropertiesDiscriminatedDerived", "Namespace": "Type.Property.AdditionalProperties", "Description": "The derived discriminated type", "IsNullable": false, "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { - "$ref": "19" + "$ref": "38" }, "Properties": [ { - "$id": "133", + "$id": "208", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "134", + "$id": "209", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1060,12 +1667,12 @@ "IsReadOnly": false }, { - "$id": "135", + "$id": "210", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "136", + "$id": "211", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -1076,25 +1683,25 @@ ] }, { - "$id": "137", + "$id": "212", "Kind": "Model", - "Name": "IsUnknownAdditionalPropertiesDiscriminatedDerived", + "Name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", "Namespace": "Type.Property.AdditionalProperties", "Description": "The derived discriminated type", "IsNullable": false, "DiscriminatorValue": "derived", "Usage": "RoundTrip", "BaseModel": { - "$ref": "38" + "$ref": "19" }, "Properties": [ { - "$id": "138", + "$id": "213", "Name": "index", "SerializedName": "index", "Description": "The index property", "Type": { - "$id": "139", + "$id": "214", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1103,12 +1710,12 @@ "IsReadOnly": false }, { - "$id": "140", + "$id": "215", "Name": "age", "SerializedName": "age", "Description": "The age property", "Type": { - "$id": "141", + "$id": "216", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -1121,33 +1728,33 @@ ], "Clients": [ { - "$id": "142", + "$id": "217", "Name": "AdditionalPropertiesClient", "Description": "", "Operations": [], "Protocol": { - "$id": "143" + "$id": "218" }, "Creatable": true }, { - "$id": "144", + "$id": "219", "Name": "ExtendsUnknown", "Description": "", "Operations": [ { - "$id": "145", + "$id": "220", "Name": "get", "ResourceName": "ExtendsUnknown", "Description": "Get call", "Parameters": [ { - "$id": "146", + "$id": "221", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "147", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1162,9 +1769,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "148", + "$id": "223", "Type": { - "$id": "149", + "$id": "224", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1173,11 +1780,11 @@ } }, { - "$id": "150", + "$id": "225", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "151", + "$id": "226", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1192,9 +1799,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "152", + "$id": "227", "Type": { - "$ref": "151" + "$ref": "226" }, "Value": "application/json" } @@ -1202,7 +1809,7 @@ ], "Responses": [ { - "$id": "153", + "$id": "228", "StatusCodes": [ 200 ], @@ -1226,16 +1833,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "154", + "$id": "229", "Name": "put", "ResourceName": "ExtendsUnknown", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "155", + "$id": "230", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1253,11 +1860,11 @@ "Kind": "Method" }, { - "$id": "156", + "$id": "231", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "157", + "$id": "232", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1272,19 +1879,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "158", + "$id": "233", "Type": { - "$ref": "157" + "$ref": "232" }, "Value": "application/json" } }, { - "$id": "159", + "$id": "234", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "160", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1299,9 +1906,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "161", + "$id": "236", "Type": { - "$ref": "160" + "$ref": "235" }, "Value": "application/json" } @@ -1309,7 +1916,7 @@ ], "Responses": [ { - "$id": "162", + "$id": "237", "StatusCodes": [ 204 ], @@ -1331,31 +1938,31 @@ } ], "Protocol": { - "$id": "163" + "$id": "238" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "164", + "$id": "239", "Name": "ExtendsUnknownDerived", "Description": "", "Operations": [ { - "$id": "165", + "$id": "240", "Name": "get", "ResourceName": "ExtendsUnknownDerived", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "166", + "$id": "241", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "167", + "$id": "242", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1370,9 +1977,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "168", + "$id": "243", "Type": { - "$ref": "167" + "$ref": "242" }, "Value": "application/json" } @@ -1380,7 +1987,7 @@ ], "Responses": [ { - "$id": "169", + "$id": "244", "StatusCodes": [ 200 ], @@ -1404,16 +2011,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "170", + "$id": "245", "Name": "put", "ResourceName": "ExtendsUnknownDerived", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "171", + "$id": "246", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1431,11 +2038,11 @@ "Kind": "Method" }, { - "$id": "172", + "$id": "247", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "173", + "$id": "248", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1450,19 +2057,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "174", + "$id": "249", "Type": { - "$ref": "173" + "$ref": "248" }, "Value": "application/json" } }, { - "$id": "175", + "$id": "250", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "176", + "$id": "251", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1477,9 +2084,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "177", + "$id": "252", "Type": { - "$ref": "176" + "$ref": "251" }, "Value": "application/json" } @@ -1487,7 +2094,7 @@ ], "Responses": [ { - "$id": "178", + "$id": "253", "StatusCodes": [ 204 ], @@ -1509,31 +2116,31 @@ } ], "Protocol": { - "$id": "179" + "$id": "254" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "180", + "$id": "255", "Name": "ExtendsUnknownDiscriminated", "Description": "", "Operations": [ { - "$id": "181", + "$id": "256", "Name": "get", "ResourceName": "ExtendsUnknownDiscriminated", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "182", + "$id": "257", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "183", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1548,9 +2155,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "184", + "$id": "259", "Type": { - "$ref": "183" + "$ref": "258" }, "Value": "application/json" } @@ -1558,7 +2165,7 @@ ], "Responses": [ { - "$id": "185", + "$id": "260", "StatusCodes": [ 200 ], @@ -1582,16 +2189,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "186", + "$id": "261", "Name": "put", "ResourceName": "ExtendsUnknownDiscriminated", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "187", + "$id": "262", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1609,11 +2216,11 @@ "Kind": "Method" }, { - "$id": "188", + "$id": "263", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "189", + "$id": "264", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1628,19 +2235,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "190", + "$id": "265", "Type": { - "$ref": "189" + "$ref": "264" }, "Value": "application/json" } }, { - "$id": "191", + "$id": "266", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "192", + "$id": "267", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1655,9 +2262,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "193", + "$id": "268", "Type": { - "$ref": "192" + "$ref": "267" }, "Value": "application/json" } @@ -1665,7 +2272,7 @@ ], "Responses": [ { - "$id": "194", + "$id": "269", "StatusCodes": [ 204 ], @@ -1687,31 +2294,31 @@ } ], "Protocol": { - "$id": "195" + "$id": "270" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "196", + "$id": "271", "Name": "IsUnknown", "Description": "", "Operations": [ { - "$id": "197", + "$id": "272", "Name": "get", "ResourceName": "IsUnknown", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "198", + "$id": "273", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "199", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1726,9 +2333,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "200", + "$id": "275", "Type": { - "$ref": "199" + "$ref": "274" }, "Value": "application/json" } @@ -1736,7 +2343,7 @@ ], "Responses": [ { - "$id": "201", + "$id": "276", "StatusCodes": [ 200 ], @@ -1760,16 +2367,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "202", + "$id": "277", "Name": "put", "ResourceName": "IsUnknown", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "203", + "$id": "278", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1787,11 +2394,11 @@ "Kind": "Method" }, { - "$id": "204", + "$id": "279", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "205", + "$id": "280", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1806,19 +2413,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "206", + "$id": "281", "Type": { - "$ref": "205" + "$ref": "280" }, "Value": "application/json" } }, { - "$id": "207", + "$id": "282", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "208", + "$id": "283", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1833,9 +2440,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "209", + "$id": "284", "Type": { - "$ref": "208" + "$ref": "283" }, "Value": "application/json" } @@ -1843,7 +2450,7 @@ ], "Responses": [ { - "$id": "210", + "$id": "285", "StatusCodes": [ 204 ], @@ -1865,31 +2472,31 @@ } ], "Protocol": { - "$id": "211" + "$id": "286" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "212", + "$id": "287", "Name": "IsUnknownDerived", "Description": "", "Operations": [ { - "$id": "213", + "$id": "288", "Name": "get", "ResourceName": "IsUnknownDerived", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "214", + "$id": "289", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "215", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1904,9 +2511,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "216", + "$id": "291", "Type": { - "$ref": "215" + "$ref": "290" }, "Value": "application/json" } @@ -1914,7 +2521,7 @@ ], "Responses": [ { - "$id": "217", + "$id": "292", "StatusCodes": [ 200 ], @@ -1938,16 +2545,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "218", + "$id": "293", "Name": "put", "ResourceName": "IsUnknownDerived", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "219", + "$id": "294", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -1965,11 +2572,11 @@ "Kind": "Method" }, { - "$id": "220", + "$id": "295", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "221", + "$id": "296", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1984,19 +2591,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "222", + "$id": "297", "Type": { - "$ref": "221" + "$ref": "296" }, "Value": "application/json" } }, { - "$id": "223", + "$id": "298", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "224", + "$id": "299", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2011,9 +2618,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "225", + "$id": "300", "Type": { - "$ref": "224" + "$ref": "299" }, "Value": "application/json" } @@ -2021,7 +2628,7 @@ ], "Responses": [ { - "$id": "226", + "$id": "301", "StatusCodes": [ 204 ], @@ -2043,31 +2650,31 @@ } ], "Protocol": { - "$id": "227" + "$id": "302" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "228", + "$id": "303", "Name": "IsUnknownDiscriminated", "Description": "", "Operations": [ { - "$id": "229", + "$id": "304", "Name": "get", "ResourceName": "IsUnknownDiscriminated", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "230", + "$id": "305", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "231", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2082,9 +2689,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "232", + "$id": "307", "Type": { - "$ref": "231" + "$ref": "306" }, "Value": "application/json" } @@ -2092,7 +2699,7 @@ ], "Responses": [ { - "$id": "233", + "$id": "308", "StatusCodes": [ 200 ], @@ -2116,16 +2723,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "234", + "$id": "309", "Name": "put", "ResourceName": "IsUnknownDiscriminated", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "235", + "$id": "310", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2143,11 +2750,11 @@ "Kind": "Method" }, { - "$id": "236", + "$id": "311", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "237", + "$id": "312", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2162,19 +2769,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "238", + "$id": "313", "Type": { - "$ref": "237" + "$ref": "312" }, "Value": "application/json" } }, { - "$id": "239", + "$id": "314", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "240", + "$id": "315", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2189,9 +2796,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "241", + "$id": "316", "Type": { - "$ref": "240" + "$ref": "315" }, "Value": "application/json" } @@ -2199,7 +2806,7 @@ ], "Responses": [ { - "$id": "242", + "$id": "317", "StatusCodes": [ 204 ], @@ -2221,31 +2828,31 @@ } ], "Protocol": { - "$id": "243" + "$id": "318" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "244", + "$id": "319", "Name": "ExtendsString", "Description": "", "Operations": [ { - "$id": "245", + "$id": "320", "Name": "get", "ResourceName": "ExtendsString", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "246", + "$id": "321", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "247", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2260,9 +2867,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "248", + "$id": "323", "Type": { - "$ref": "247" + "$ref": "322" }, "Value": "application/json" } @@ -2270,7 +2877,7 @@ ], "Responses": [ { - "$id": "249", + "$id": "324", "StatusCodes": [ 200 ], @@ -2294,16 +2901,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "250", + "$id": "325", "Name": "put", "ResourceName": "ExtendsString", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "251", + "$id": "326", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2321,11 +2928,11 @@ "Kind": "Method" }, { - "$id": "252", + "$id": "327", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "253", + "$id": "328", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2340,19 +2947,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "254", + "$id": "329", "Type": { - "$ref": "253" + "$ref": "328" }, "Value": "application/json" } }, { - "$id": "255", + "$id": "330", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "256", + "$id": "331", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2367,9 +2974,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "257", + "$id": "332", "Type": { - "$ref": "256" + "$ref": "331" }, "Value": "application/json" } @@ -2377,7 +2984,7 @@ ], "Responses": [ { - "$id": "258", + "$id": "333", "StatusCodes": [ 204 ], @@ -2399,31 +3006,31 @@ } ], "Protocol": { - "$id": "259" + "$id": "334" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "260", + "$id": "335", "Name": "IsString", "Description": "", "Operations": [ { - "$id": "261", + "$id": "336", "Name": "get", "ResourceName": "IsString", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "262", + "$id": "337", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "263", + "$id": "338", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2438,9 +3045,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "264", + "$id": "339", "Type": { - "$ref": "263" + "$ref": "338" }, "Value": "application/json" } @@ -2448,7 +3055,7 @@ ], "Responses": [ { - "$id": "265", + "$id": "340", "StatusCodes": [ 200 ], @@ -2472,16 +3079,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "266", + "$id": "341", "Name": "put", "ResourceName": "IsString", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "267", + "$id": "342", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2499,11 +3106,11 @@ "Kind": "Method" }, { - "$id": "268", + "$id": "343", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "269", + "$id": "344", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2518,19 +3125,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "270", + "$id": "345", "Type": { - "$ref": "269" + "$ref": "344" }, "Value": "application/json" } }, { - "$id": "271", + "$id": "346", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "272", + "$id": "347", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2545,9 +3152,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "348", "Type": { - "$ref": "272" + "$ref": "347" }, "Value": "application/json" } @@ -2555,7 +3162,7 @@ ], "Responses": [ { - "$id": "274", + "$id": "349", "StatusCodes": [ 204 ], @@ -2577,31 +3184,31 @@ } ], "Protocol": { - "$id": "275" + "$id": "350" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "276", + "$id": "351", "Name": "SpreadString", "Description": "", "Operations": [ { - "$id": "277", + "$id": "352", "Name": "get", "ResourceName": "SpreadString", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "278", + "$id": "353", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "279", + "$id": "354", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2616,9 +3223,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "280", + "$id": "355", "Type": { - "$ref": "279" + "$ref": "354" }, "Value": "application/json" } @@ -2626,22 +3233,22 @@ ], "Responses": [ { - "$id": "281", + "$id": "356", "StatusCodes": [ 200 ], "BodyType": { - "$id": "282", + "$id": "357", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "283", + "$id": "358", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "284", + "$id": "359", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2665,31 +3272,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "285", + "$id": "360", "Name": "put", "ResourceName": "SpreadString", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "286", + "$id": "361", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "287", + "$id": "362", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "288", + "$id": "363", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "289", + "$id": "364", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2707,11 +3314,11 @@ "Kind": "Method" }, { - "$id": "290", + "$id": "365", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "291", + "$id": "366", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2726,19 +3333,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "367", "Type": { - "$ref": "291" + "$ref": "366" }, "Value": "application/json" } }, { - "$id": "293", + "$id": "368", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "294", + "$id": "369", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2753,9 +3360,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "295", + "$id": "370", "Type": { - "$ref": "294" + "$ref": "369" }, "Value": "application/json" } @@ -2763,7 +3370,7 @@ ], "Responses": [ { - "$id": "296", + "$id": "371", "StatusCodes": [ 204 ], @@ -2785,31 +3392,31 @@ } ], "Protocol": { - "$id": "297" + "$id": "372" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "298", + "$id": "373", "Name": "ExtendsFloat", "Description": "", "Operations": [ { - "$id": "299", + "$id": "374", "Name": "get", "ResourceName": "ExtendsFloat", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "300", + "$id": "375", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "301", + "$id": "376", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2824,9 +3431,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "302", + "$id": "377", "Type": { - "$ref": "301" + "$ref": "376" }, "Value": "application/json" } @@ -2834,7 +3441,7 @@ ], "Responses": [ { - "$id": "303", + "$id": "378", "StatusCodes": [ 200 ], @@ -2858,16 +3465,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "304", + "$id": "379", "Name": "put", "ResourceName": "ExtendsFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "305", + "$id": "380", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -2885,11 +3492,11 @@ "Kind": "Method" }, { - "$id": "306", + "$id": "381", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "307", + "$id": "382", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2904,19 +3511,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "308", + "$id": "383", "Type": { - "$ref": "307" + "$ref": "382" }, "Value": "application/json" } }, { - "$id": "309", + "$id": "384", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "310", + "$id": "385", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2931,9 +3538,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "311", + "$id": "386", "Type": { - "$ref": "310" + "$ref": "385" }, "Value": "application/json" } @@ -2941,7 +3548,7 @@ ], "Responses": [ { - "$id": "312", + "$id": "387", "StatusCodes": [ 204 ], @@ -2963,31 +3570,31 @@ } ], "Protocol": { - "$id": "313" + "$id": "388" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "314", + "$id": "389", "Name": "IsFloat", "Description": "", "Operations": [ { - "$id": "315", + "$id": "390", "Name": "get", "ResourceName": "IsFloat", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "316", + "$id": "391", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "317", + "$id": "392", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3002,9 +3609,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "318", + "$id": "393", "Type": { - "$ref": "317" + "$ref": "392" }, "Value": "application/json" } @@ -3012,7 +3619,7 @@ ], "Responses": [ { - "$id": "319", + "$id": "394", "StatusCodes": [ 200 ], @@ -3036,16 +3643,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "320", + "$id": "395", "Name": "put", "ResourceName": "IsFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "321", + "$id": "396", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3063,11 +3670,11 @@ "Kind": "Method" }, { - "$id": "322", + "$id": "397", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "323", + "$id": "398", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3082,19 +3689,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "324", + "$id": "399", "Type": { - "$ref": "323" + "$ref": "398" }, "Value": "application/json" } }, { - "$id": "325", + "$id": "400", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "326", + "$id": "401", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3109,9 +3716,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "327", + "$id": "402", "Type": { - "$ref": "326" + "$ref": "401" }, "Value": "application/json" } @@ -3119,7 +3726,7 @@ ], "Responses": [ { - "$id": "328", + "$id": "403", "StatusCodes": [ 204 ], @@ -3141,31 +3748,31 @@ } ], "Protocol": { - "$id": "329" + "$id": "404" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "330", + "$id": "405", "Name": "SpreadFloat", "Description": "", "Operations": [ { - "$id": "331", + "$id": "406", "Name": "get", "ResourceName": "SpreadFloat", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "332", + "$id": "407", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "333", + "$id": "408", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3180,9 +3787,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "334", + "$id": "409", "Type": { - "$ref": "333" + "$ref": "408" }, "Value": "application/json" } @@ -3190,22 +3797,22 @@ ], "Responses": [ { - "$id": "335", + "$id": "410", "StatusCodes": [ 200 ], "BodyType": { - "$id": "336", + "$id": "411", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "337", + "$id": "412", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "338", + "$id": "413", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -3229,31 +3836,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "339", + "$id": "414", "Name": "put", "ResourceName": "SpreadFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "340", + "$id": "415", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "341", + "$id": "416", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "342", + "$id": "417", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "343", + "$id": "418", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -3271,11 +3878,11 @@ "Kind": "Method" }, { - "$id": "344", + "$id": "419", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "345", + "$id": "420", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3290,19 +3897,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "346", + "$id": "421", "Type": { - "$ref": "345" + "$ref": "420" }, "Value": "application/json" } }, { - "$id": "347", + "$id": "422", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "348", + "$id": "423", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3317,9 +3924,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "349", + "$id": "424", "Type": { - "$ref": "348" + "$ref": "423" }, "Value": "application/json" } @@ -3327,7 +3934,7 @@ ], "Responses": [ { - "$id": "350", + "$id": "425", "StatusCodes": [ 204 ], @@ -3349,31 +3956,31 @@ } ], "Protocol": { - "$id": "351" + "$id": "426" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "352", + "$id": "427", "Name": "ExtendsModel", "Description": "", "Operations": [ { - "$id": "353", + "$id": "428", "Name": "get", "ResourceName": "ExtendsModel", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "354", + "$id": "429", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "355", + "$id": "430", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3388,9 +3995,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "356", + "$id": "431", "Type": { - "$ref": "355" + "$ref": "430" }, "Value": "application/json" } @@ -3398,12 +4005,12 @@ ], "Responses": [ { - "$id": "357", + "$id": "432", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "73" + "$ref": "70" }, "BodyMediaType": "Json", "Headers": [], @@ -3422,21 +4029,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "358", + "$id": "433", "Name": "put", "ResourceName": "ExtendsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "359", + "$id": "434", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "73" + "$ref": "70" }, "Location": "Body", "IsRequired": true, @@ -3449,11 +4056,11 @@ "Kind": "Method" }, { - "$id": "360", + "$id": "435", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "361", + "$id": "436", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3468,19 +4075,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "362", + "$id": "437", "Type": { - "$ref": "361" + "$ref": "436" }, "Value": "application/json" } }, { - "$id": "363", + "$id": "438", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "364", + "$id": "439", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3495,9 +4102,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "365", + "$id": "440", "Type": { - "$ref": "364" + "$ref": "439" }, "Value": "application/json" } @@ -3505,7 +4112,7 @@ ], "Responses": [ { - "$id": "366", + "$id": "441", "StatusCodes": [ 204 ], @@ -3527,31 +4134,31 @@ } ], "Protocol": { - "$id": "367" + "$id": "442" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "368", + "$id": "443", "Name": "IsModel", "Description": "", "Operations": [ { - "$id": "369", + "$id": "444", "Name": "get", "ResourceName": "IsModel", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "370", + "$id": "445", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "371", + "$id": "446", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3566,9 +4173,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "372", + "$id": "447", "Type": { - "$ref": "371" + "$ref": "446" }, "Value": "application/json" } @@ -3576,7 +4183,7 @@ ], "Responses": [ { - "$id": "373", + "$id": "448", "StatusCodes": [ 200 ], @@ -3600,16 +4207,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "374", + "$id": "449", "Name": "put", "ResourceName": "IsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "375", + "$id": "450", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -3627,11 +4234,11 @@ "Kind": "Method" }, { - "$id": "376", + "$id": "451", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "377", + "$id": "452", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3646,19 +4253,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "378", + "$id": "453", "Type": { - "$ref": "377" + "$ref": "452" }, "Value": "application/json" } }, { - "$id": "379", + "$id": "454", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "380", + "$id": "455", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3673,9 +4280,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "381", + "$id": "456", "Type": { - "$ref": "380" + "$ref": "455" }, "Value": "application/json" } @@ -3683,7 +4290,7 @@ ], "Responses": [ { - "$id": "382", + "$id": "457", "StatusCodes": [ 204 ], @@ -3705,31 +4312,31 @@ } ], "Protocol": { - "$id": "383" + "$id": "458" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "384", + "$id": "459", "Name": "SpreadModel", "Description": "", "Operations": [ { - "$id": "385", + "$id": "460", "Name": "get", "ResourceName": "SpreadModel", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "386", + "$id": "461", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "387", + "$id": "462", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3744,9 +4351,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "388", + "$id": "463", "Type": { - "$ref": "387" + "$ref": "462" }, "Value": "application/json" } @@ -3754,22 +4361,22 @@ ], "Responses": [ { - "$id": "389", + "$id": "464", "StatusCodes": [ 200 ], "BodyType": { - "$id": "390", + "$id": "465", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "391", + "$id": "466", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -3790,31 +4397,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "392", + "$id": "467", "Name": "put", "ResourceName": "SpreadModel", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "393", + "$id": "468", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "394", + "$id": "469", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "395", + "$id": "470", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -3829,11 +4436,11 @@ "Kind": "Method" }, { - "$id": "396", + "$id": "471", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "397", + "$id": "472", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3848,19 +4455,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "398", + "$id": "473", "Type": { - "$ref": "397" + "$ref": "472" }, "Value": "application/json" } }, { - "$id": "399", + "$id": "474", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "400", + "$id": "475", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3875,9 +4482,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "401", + "$id": "476", "Type": { - "$ref": "400" + "$ref": "475" }, "Value": "application/json" } @@ -3885,7 +4492,7 @@ ], "Responses": [ { - "$id": "402", + "$id": "477", "StatusCodes": [ 204 ], @@ -3907,31 +4514,31 @@ } ], "Protocol": { - "$id": "403" + "$id": "478" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "404", + "$id": "479", "Name": "ExtendsModelArray", "Description": "", "Operations": [ { - "$id": "405", + "$id": "480", "Name": "get", "ResourceName": "ExtendsModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "406", + "$id": "481", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "407", + "$id": "482", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3946,9 +4553,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "408", + "$id": "483", "Type": { - "$ref": "407" + "$ref": "482" }, "Value": "application/json" } @@ -3956,7 +4563,7 @@ ], "Responses": [ { - "$id": "409", + "$id": "484", "StatusCodes": [ 200 ], @@ -3980,16 +4587,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "410", + "$id": "485", "Name": "put", "ResourceName": "ExtendsModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "411", + "$id": "486", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4007,11 +4614,11 @@ "Kind": "Method" }, { - "$id": "412", + "$id": "487", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "413", + "$id": "488", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4026,19 +4633,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "414", + "$id": "489", "Type": { - "$ref": "413" + "$ref": "488" }, "Value": "application/json" } }, { - "$id": "415", + "$id": "490", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "416", + "$id": "491", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4053,9 +4660,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "417", + "$id": "492", "Type": { - "$ref": "416" + "$ref": "491" }, "Value": "application/json" } @@ -4063,7 +4670,7 @@ ], "Responses": [ { - "$id": "418", + "$id": "493", "StatusCodes": [ 204 ], @@ -4085,31 +4692,31 @@ } ], "Protocol": { - "$id": "419" + "$id": "494" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "420", + "$id": "495", "Name": "IsModelArray", "Description": "", "Operations": [ { - "$id": "421", + "$id": "496", "Name": "get", "ResourceName": "IsModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "422", + "$id": "497", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "423", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4124,9 +4731,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "424", + "$id": "499", "Type": { - "$ref": "423" + "$ref": "498" }, "Value": "application/json" } @@ -4134,7 +4741,7 @@ ], "Responses": [ { - "$id": "425", + "$id": "500", "StatusCodes": [ 200 ], @@ -4158,16 +4765,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "426", + "$id": "501", "Name": "put", "ResourceName": "IsModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "427", + "$id": "502", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -4185,11 +4792,11 @@ "Kind": "Method" }, { - "$id": "428", + "$id": "503", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "429", + "$id": "504", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4204,19 +4811,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "430", + "$id": "505", "Type": { - "$ref": "429" + "$ref": "504" }, "Value": "application/json" } }, { - "$id": "431", + "$id": "506", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "432", + "$id": "507", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4231,9 +4838,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "433", + "$id": "508", "Type": { - "$ref": "432" + "$ref": "507" }, "Value": "application/json" } @@ -4241,7 +4848,7 @@ ], "Responses": [ { - "$id": "434", + "$id": "509", "StatusCodes": [ 204 ], @@ -4263,31 +4870,31 @@ } ], "Protocol": { - "$id": "435" + "$id": "510" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "436", + "$id": "511", "Name": "SpreadModelArray", "Description": "", "Operations": [ { - "$id": "437", + "$id": "512", "Name": "get", "ResourceName": "SpreadModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "438", + "$id": "513", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "439", + "$id": "514", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4302,9 +4909,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "440", + "$id": "515", "Type": { - "$ref": "439" + "$ref": "514" }, "Value": "application/json" } @@ -4312,26 +4919,26 @@ ], "Responses": [ { - "$id": "441", + "$id": "516", "StatusCodes": [ 200 ], "BodyType": { - "$id": "442", + "$id": "517", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "443", + "$id": "518", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "444", + "$id": "519", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -4354,35 +4961,35 @@ "GenerateConvenienceMethod": true }, { - "$id": "445", + "$id": "520", "Name": "put", "ResourceName": "SpreadModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "446", + "$id": "521", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "447", + "$id": "522", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "448", + "$id": "523", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "449", + "$id": "524", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -4399,11 +5006,11 @@ "Kind": "Method" }, { - "$id": "450", + "$id": "525", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "451", + "$id": "526", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4418,19 +5025,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "452", + "$id": "527", "Type": { - "$ref": "451" + "$ref": "526" }, "Value": "application/json" } }, { - "$id": "453", + "$id": "528", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "454", + "$id": "529", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4445,9 +5052,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "455", + "$id": "530", "Type": { - "$ref": "454" + "$ref": "529" }, "Value": "application/json" } @@ -4455,7 +5062,7 @@ ], "Responses": [ { - "$id": "456", + "$id": "531", "StatusCodes": [ 204 ], @@ -4477,31 +5084,31 @@ } ], "Protocol": { - "$id": "457" + "$id": "532" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "458", + "$id": "533", "Name": "SpreadDifferentString", "Description": "", "Operations": [ { - "$id": "459", + "$id": "534", "Name": "get", "ResourceName": "SpreadDifferentString", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "460", + "$id": "535", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "461", + "$id": "536", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4516,9 +5123,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "462", + "$id": "537", "Type": { - "$ref": "461" + "$ref": "536" }, "Value": "application/json" } @@ -4526,22 +5133,22 @@ ], "Responses": [ { - "$id": "463", + "$id": "538", "StatusCodes": [ 200 ], "BodyType": { - "$id": "464", + "$id": "539", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "465", + "$id": "540", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "466", + "$id": "541", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4565,31 +5172,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "467", + "$id": "542", "Name": "put", "ResourceName": "SpreadDifferentString", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "468", + "$id": "543", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "469", + "$id": "544", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "470", + "$id": "545", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "471", + "$id": "546", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4607,11 +5214,11 @@ "Kind": "Method" }, { - "$id": "472", + "$id": "547", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "473", + "$id": "548", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4626,19 +5233,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "474", + "$id": "549", "Type": { - "$ref": "473" + "$ref": "548" }, "Value": "application/json" } }, { - "$id": "475", + "$id": "550", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "476", + "$id": "551", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4653,9 +5260,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "477", + "$id": "552", "Type": { - "$ref": "476" + "$ref": "551" }, "Value": "application/json" } @@ -4663,7 +5270,7 @@ ], "Responses": [ { - "$id": "478", + "$id": "553", "StatusCodes": [ 204 ], @@ -4685,31 +5292,31 @@ } ], "Protocol": { - "$id": "479" + "$id": "554" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "480", + "$id": "555", "Name": "SpreadDifferentFloat", "Description": "", "Operations": [ { - "$id": "481", + "$id": "556", "Name": "get", "ResourceName": "SpreadDifferentFloat", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "482", + "$id": "557", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "483", + "$id": "558", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4724,9 +5331,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "484", + "$id": "559", "Type": { - "$ref": "483" + "$ref": "558" }, "Value": "application/json" } @@ -4734,22 +5341,22 @@ ], "Responses": [ { - "$id": "485", + "$id": "560", "StatusCodes": [ 200 ], "BodyType": { - "$id": "486", + "$id": "561", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "487", + "$id": "562", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "488", + "$id": "563", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -4773,31 +5380,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "489", + "$id": "564", "Name": "put", "ResourceName": "SpreadDifferentFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "490", + "$id": "565", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "491", + "$id": "566", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "492", + "$id": "567", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "493", + "$id": "568", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -4815,11 +5422,11 @@ "Kind": "Method" }, { - "$id": "494", + "$id": "569", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "495", + "$id": "570", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4834,19 +5441,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "496", + "$id": "571", "Type": { - "$ref": "495" + "$ref": "570" }, "Value": "application/json" } }, { - "$id": "497", + "$id": "572", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "498", + "$id": "573", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4861,9 +5468,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "499", + "$id": "574", "Type": { - "$ref": "498" + "$ref": "573" }, "Value": "application/json" } @@ -4871,7 +5478,7 @@ ], "Responses": [ { - "$id": "500", + "$id": "575", "StatusCodes": [ 204 ], @@ -4893,31 +5500,31 @@ } ], "Protocol": { - "$id": "501" + "$id": "576" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "502", + "$id": "577", "Name": "SpreadDifferentModel", "Description": "", "Operations": [ { - "$id": "503", + "$id": "578", "Name": "get", "ResourceName": "SpreadDifferentModel", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "504", + "$id": "579", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "505", + "$id": "580", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4932,9 +5539,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "506", + "$id": "581", "Type": { - "$ref": "505" + "$ref": "580" }, "Value": "application/json" } @@ -4942,22 +5549,22 @@ ], "Responses": [ { - "$id": "507", + "$id": "582", "StatusCodes": [ 200 ], "BodyType": { - "$id": "508", + "$id": "583", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "509", + "$id": "584", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -4978,31 +5585,31 @@ "GenerateConvenienceMethod": true }, { - "$id": "510", + "$id": "585", "Name": "put", "ResourceName": "SpreadDifferentModel", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "511", + "$id": "586", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "512", + "$id": "587", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "513", + "$id": "588", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -5017,11 +5624,11 @@ "Kind": "Method" }, { - "$id": "514", + "$id": "589", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "515", + "$id": "590", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5036,19 +5643,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "516", + "$id": "591", "Type": { - "$ref": "515" + "$ref": "590" }, "Value": "application/json" } }, { - "$id": "517", + "$id": "592", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "518", + "$id": "593", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5063,9 +5670,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "519", + "$id": "594", "Type": { - "$ref": "518" + "$ref": "593" }, "Value": "application/json" } @@ -5073,7 +5680,7 @@ ], "Responses": [ { - "$id": "520", + "$id": "595", "StatusCodes": [ 204 ], @@ -5095,31 +5702,31 @@ } ], "Protocol": { - "$id": "521" + "$id": "596" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "522", + "$id": "597", "Name": "SpreadDifferentModelArray", "Description": "", "Operations": [ { - "$id": "523", + "$id": "598", "Name": "get", "ResourceName": "SpreadDifferentModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "524", + "$id": "599", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "525", + "$id": "600", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5134,9 +5741,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "526", + "$id": "601", "Type": { - "$ref": "525" + "$ref": "600" }, "Value": "application/json" } @@ -5144,26 +5751,26 @@ ], "Responses": [ { - "$id": "527", + "$id": "602", "StatusCodes": [ 200 ], "BodyType": { - "$id": "528", + "$id": "603", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "529", + "$id": "604", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "530", + "$id": "605", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -5186,35 +5793,35 @@ "GenerateConvenienceMethod": true }, { - "$id": "531", + "$id": "606", "Name": "put", "ResourceName": "SpreadDifferentModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "532", + "$id": "607", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "533", + "$id": "608", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "534", + "$id": "609", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "535", + "$id": "610", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "70" + "$ref": "73" }, "IsNullable": false }, @@ -5231,11 +5838,11 @@ "Kind": "Method" }, { - "$id": "536", + "$id": "611", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "537", + "$id": "612", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5250,19 +5857,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "538", + "$id": "613", "Type": { - "$ref": "537" + "$ref": "612" }, "Value": "application/json" } }, { - "$id": "539", + "$id": "614", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "540", + "$id": "615", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5277,9 +5884,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "541", + "$id": "616", "Type": { - "$ref": "540" + "$ref": "615" }, "Value": "application/json" } @@ -5287,7 +5894,7 @@ ], "Responses": [ { - "$id": "542", + "$id": "617", "StatusCodes": [ 204 ], @@ -5309,31 +5916,31 @@ } ], "Protocol": { - "$id": "543" + "$id": "618" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "544", + "$id": "619", "Name": "ExtendsDifferentSpreadString", "Description": "", "Operations": [ { - "$id": "545", + "$id": "620", "Name": "get", "ResourceName": "ExtendsDifferentSpreadString", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "546", + "$id": "621", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "547", + "$id": "622", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5348,9 +5955,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "548", + "$id": "623", "Type": { - "$ref": "547" + "$ref": "622" }, "Value": "application/json" } @@ -5358,7 +5965,7 @@ ], "Responses": [ { - "$id": "549", + "$id": "624", "StatusCodes": [ 200 ], @@ -5382,16 +5989,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "550", + "$id": "625", "Name": "put", "ResourceName": "ExtendsDifferentSpreadString", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "551", + "$id": "626", "Name": "body", "NameInRequest": "body", "Description": "body", @@ -5409,11 +6016,11 @@ "Kind": "Method" }, { - "$id": "552", + "$id": "627", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "553", + "$id": "628", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5428,19 +6035,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "554", + "$id": "629", "Type": { - "$ref": "553" + "$ref": "628" }, "Value": "application/json" } }, { - "$id": "555", + "$id": "630", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "556", + "$id": "631", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5455,9 +6062,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "557", + "$id": "632", "Type": { - "$ref": "556" + "$ref": "631" }, "Value": "application/json" } @@ -5465,7 +6072,7 @@ ], "Responses": [ { - "$id": "558", + "$id": "633", "StatusCodes": [ 204 ], @@ -5487,31 +6094,31 @@ } ], "Protocol": { - "$id": "559" + "$id": "634" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "560", + "$id": "635", "Name": "ExtendsDifferentSpreadFloat", "Description": "", "Operations": [ { - "$id": "561", + "$id": "636", "Name": "get", "ResourceName": "ExtendsDifferentSpreadFloat", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "562", + "$id": "637", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "563", + "$id": "638", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5526,9 +6133,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "564", + "$id": "639", "Type": { - "$ref": "563" + "$ref": "638" }, "Value": "application/json" } @@ -5536,12 +6143,12 @@ ], "Responses": [ { - "$id": "565", + "$id": "640", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "99" + "$ref": "102" }, "BodyMediaType": "Json", "Headers": [], @@ -5560,21 +6167,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "566", + "$id": "641", "Name": "put", "ResourceName": "ExtendsDifferentSpreadFloat", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "567", + "$id": "642", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "99" + "$ref": "102" }, "Location": "Body", "IsRequired": true, @@ -5587,11 +6194,11 @@ "Kind": "Method" }, { - "$id": "568", + "$id": "643", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "569", + "$id": "644", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5606,19 +6213,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "570", + "$id": "645", "Type": { - "$ref": "569" + "$ref": "644" }, "Value": "application/json" } }, { - "$id": "571", + "$id": "646", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "572", + "$id": "647", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5633,9 +6240,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "573", + "$id": "648", "Type": { - "$ref": "572" + "$ref": "647" }, "Value": "application/json" } @@ -5643,7 +6250,7 @@ ], "Responses": [ { - "$id": "574", + "$id": "649", "StatusCodes": [ 204 ], @@ -5665,31 +6272,31 @@ } ], "Protocol": { - "$id": "575" + "$id": "650" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "576", + "$id": "651", "Name": "ExtendsDifferentSpreadModel", "Description": "", "Operations": [ { - "$id": "577", + "$id": "652", "Name": "get", "ResourceName": "ExtendsDifferentSpreadModel", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "578", + "$id": "653", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "579", + "$id": "654", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5704,9 +6311,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "580", + "$id": "655", "Type": { - "$ref": "579" + "$ref": "654" }, "Value": "application/json" } @@ -5714,12 +6321,12 @@ ], "Responses": [ { - "$id": "581", + "$id": "656", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "105" + "$ref": "111" }, "BodyMediaType": "Json", "Headers": [], @@ -5738,21 +6345,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "582", + "$id": "657", "Name": "put", "ResourceName": "ExtendsDifferentSpreadModel", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "583", + "$id": "658", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "105" + "$ref": "111" }, "Location": "Body", "IsRequired": true, @@ -5765,11 +6372,11 @@ "Kind": "Method" }, { - "$id": "584", + "$id": "659", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "585", + "$id": "660", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5784,19 +6391,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "586", + "$id": "661", "Type": { - "$ref": "585" + "$ref": "660" }, "Value": "application/json" } }, { - "$id": "587", + "$id": "662", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "588", + "$id": "663", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5811,9 +6418,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "589", + "$id": "664", "Type": { - "$ref": "588" + "$ref": "663" }, "Value": "application/json" } @@ -5821,7 +6428,7 @@ ], "Responses": [ { - "$id": "590", + "$id": "665", "StatusCodes": [ 204 ], @@ -5843,31 +6450,31 @@ } ], "Protocol": { - "$id": "591" + "$id": "666" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "592", + "$id": "667", "Name": "ExtendsDifferentSpreadModelArray", "Description": "", "Operations": [ { - "$id": "593", + "$id": "668", "Name": "get", "ResourceName": "ExtendsDifferentSpreadModelArray", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "594", + "$id": "669", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "595", + "$id": "670", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5882,9 +6489,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "596", + "$id": "671", "Type": { - "$ref": "595" + "$ref": "670" }, "Value": "application/json" } @@ -5892,12 +6499,12 @@ ], "Responses": [ { - "$id": "597", + "$id": "672", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "109" + "$ref": "118" }, "BodyMediaType": "Json", "Headers": [], @@ -5916,21 +6523,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "598", + "$id": "673", "Name": "put", "ResourceName": "ExtendsDifferentSpreadModelArray", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "599", + "$id": "674", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "109" + "$ref": "118" }, "Location": "Body", "IsRequired": true, @@ -5943,11 +6550,11 @@ "Kind": "Method" }, { - "$id": "600", + "$id": "675", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "601", + "$id": "676", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5962,19 +6569,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "602", + "$id": "677", "Type": { - "$ref": "601" + "$ref": "676" }, "Value": "application/json" } }, { - "$id": "603", + "$id": "678", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "604", + "$id": "679", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5989,9 +6596,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "605", + "$id": "680", "Type": { - "$ref": "604" + "$ref": "679" }, "Value": "application/json" } @@ -5999,7 +6606,7 @@ ], "Responses": [ { - "$id": "606", + "$id": "681", "StatusCodes": [ 204 ], @@ -6021,31 +6628,31 @@ } ], "Protocol": { - "$id": "607" + "$id": "682" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "608", + "$id": "683", "Name": "MultipleSpread", "Description": "", "Operations": [ { - "$id": "609", + "$id": "684", "Name": "get", "ResourceName": "MultipleSpread", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "610", + "$id": "685", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "611", + "$id": "686", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6060,9 +6667,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "612", + "$id": "687", "Type": { - "$ref": "611" + "$ref": "686" }, "Value": "application/json" } @@ -6070,33 +6677,33 @@ ], "Responses": [ { - "$id": "613", + "$id": "688", "StatusCodes": [ 200 ], "BodyType": { - "$id": "614", + "$id": "689", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "615", + "$id": "690", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "616", + "$id": "691", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "617", + "$id": "692", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "618", + "$id": "693", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -6123,42 +6730,42 @@ "GenerateConvenienceMethod": true }, { - "$id": "619", + "$id": "694", "Name": "put", "ResourceName": "MultipleSpread", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "620", + "$id": "695", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "621", + "$id": "696", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "622", + "$id": "697", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "623", + "$id": "698", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "624", + "$id": "699", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "625", + "$id": "700", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -6179,11 +6786,11 @@ "Kind": "Method" }, { - "$id": "626", + "$id": "701", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "627", + "$id": "702", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6198,19 +6805,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "628", + "$id": "703", "Type": { - "$ref": "627" + "$ref": "702" }, "Value": "application/json" } }, { - "$id": "629", + "$id": "704", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "630", + "$id": "705", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6225,9 +6832,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "631", + "$id": "706", "Type": { - "$ref": "630" + "$ref": "705" }, "Value": "application/json" } @@ -6235,7 +6842,7 @@ ], "Responses": [ { - "$id": "632", + "$id": "707", "StatusCodes": [ 204 ], @@ -6257,31 +6864,31 @@ } ], "Protocol": { - "$id": "633" + "$id": "708" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "634", + "$id": "709", "Name": "SpreadRecordUnion", "Description": "", "Operations": [ { - "$id": "635", + "$id": "710", "Name": "get", "ResourceName": "SpreadRecordUnion", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "636", + "$id": "711", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "637", + "$id": "712", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6296,9 +6903,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "638", + "$id": "713", "Type": { - "$ref": "637" + "$ref": "712" }, "Value": "application/json" } @@ -6306,33 +6913,33 @@ ], "Responses": [ { - "$id": "639", + "$id": "714", "StatusCodes": [ 200 ], "BodyType": { - "$id": "640", + "$id": "715", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "641", + "$id": "716", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "642", + "$id": "717", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "643", + "$id": "718", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "644", + "$id": "719", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -6359,42 +6966,42 @@ "GenerateConvenienceMethod": true }, { - "$id": "645", + "$id": "720", "Name": "put", "ResourceName": "SpreadRecordUnion", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "646", + "$id": "721", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "647", + "$id": "722", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "648", + "$id": "723", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "649", + "$id": "724", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "650", + "$id": "725", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "651", + "$id": "726", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -6415,11 +7022,11 @@ "Kind": "Method" }, { - "$id": "652", + "$id": "727", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "653", + "$id": "728", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6434,19 +7041,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "654", + "$id": "729", "Type": { - "$ref": "653" + "$ref": "728" }, "Value": "application/json" } }, { - "$id": "655", + "$id": "730", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "656", + "$id": "731", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6461,9 +7068,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "657", + "$id": "732", "Type": { - "$ref": "656" + "$ref": "731" }, "Value": "application/json" } @@ -6471,7 +7078,7 @@ ], "Responses": [ { - "$id": "658", + "$id": "733", "StatusCodes": [ 204 ], @@ -6493,31 +7100,31 @@ } ], "Protocol": { - "$id": "659" + "$id": "734" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "660", + "$id": "735", "Name": "SpreadRecordDiscriminatedUnion", "Description": "", "Operations": [ { - "$id": "661", + "$id": "736", "Name": "get", "ResourceName": "SpreadRecordDiscriminatedUnion", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "662", + "$id": "737", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "663", + "$id": "738", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6532,9 +7139,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "664", + "$id": "739", "Type": { - "$ref": "663" + "$ref": "738" }, "Value": "application/json" } @@ -6542,30 +7149,30 @@ ], "Responses": [ { - "$id": "665", + "$id": "740", "StatusCodes": [ 200 ], "BodyType": { - "$id": "666", + "$id": "741", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "667", + "$id": "742", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "668", + "$id": "743", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "115" + "$ref": "127" }, { - "$ref": "120" + "$ref": "132" } ], "IsNullable": false @@ -6589,39 +7196,39 @@ "GenerateConvenienceMethod": true }, { - "$id": "669", + "$id": "744", "Name": "put", "ResourceName": "SpreadRecordDiscriminatedUnion", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "670", + "$id": "745", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "671", + "$id": "746", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "672", + "$id": "747", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "673", + "$id": "748", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "115" + "$ref": "127" }, { - "$ref": "120" + "$ref": "132" } ], "IsNullable": false @@ -6639,11 +7246,11 @@ "Kind": "Method" }, { - "$id": "674", + "$id": "749", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "675", + "$id": "750", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6658,19 +7265,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "676", + "$id": "751", "Type": { - "$ref": "675" + "$ref": "750" }, "Value": "application/json" } }, { - "$id": "677", + "$id": "752", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "678", + "$id": "753", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6685,9 +7292,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "679", + "$id": "754", "Type": { - "$ref": "678" + "$ref": "753" }, "Value": "application/json" } @@ -6695,7 +7302,7 @@ ], "Responses": [ { - "$id": "680", + "$id": "755", "StatusCodes": [ 204 ], @@ -6717,31 +7324,31 @@ } ], "Protocol": { - "$id": "681" + "$id": "756" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "682", + "$id": "757", "Name": "SpreadRecordNonDiscriminatedUnion", "Description": "", "Operations": [ { - "$id": "683", + "$id": "758", "Name": "get", "ResourceName": "SpreadRecordNonDiscriminatedUnion", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "684", + "$id": "759", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "685", + "$id": "760", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6756,9 +7363,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "686", + "$id": "761", "Type": { - "$ref": "685" + "$ref": "760" }, "Value": "application/json" } @@ -6766,30 +7373,30 @@ ], "Responses": [ { - "$id": "687", + "$id": "762", "StatusCodes": [ 200 ], "BodyType": { - "$id": "688", + "$id": "763", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "689", + "$id": "764", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "690", + "$id": "765", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "115" + "$ref": "127" }, { - "$ref": "120" + "$ref": "132" } ], "IsNullable": false @@ -6813,39 +7420,39 @@ "GenerateConvenienceMethod": true }, { - "$id": "691", + "$id": "766", "Name": "put", "ResourceName": "SpreadRecordNonDiscriminatedUnion", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "692", + "$id": "767", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "693", + "$id": "768", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "694", + "$id": "769", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "695", + "$id": "770", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "115" + "$ref": "127" }, { - "$ref": "120" + "$ref": "132" } ], "IsNullable": false @@ -6863,11 +7470,11 @@ "Kind": "Method" }, { - "$id": "696", + "$id": "771", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "697", + "$id": "772", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6882,19 +7489,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "698", + "$id": "773", "Type": { - "$ref": "697" + "$ref": "772" }, "Value": "application/json" } }, { - "$id": "699", + "$id": "774", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "700", + "$id": "775", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6909,9 +7516,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "701", + "$id": "776", "Type": { - "$ref": "700" + "$ref": "775" }, "Value": "application/json" } @@ -6919,7 +7526,7 @@ ], "Responses": [ { - "$id": "702", + "$id": "777", "StatusCodes": [ 204 ], @@ -6941,31 +7548,31 @@ } ], "Protocol": { - "$id": "703" + "$id": "778" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "704", + "$id": "779", "Name": "SpreadRecordNonDiscriminatedUnion2", "Description": "", "Operations": [ { - "$id": "705", + "$id": "780", "Name": "get", "ResourceName": "SpreadRecordNonDiscriminatedUnion2", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "706", + "$id": "781", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "707", + "$id": "782", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6980,9 +7587,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "708", + "$id": "783", "Type": { - "$ref": "707" + "$ref": "782" }, "Value": "application/json" } @@ -6990,30 +7597,30 @@ ], "Responses": [ { - "$id": "709", + "$id": "784", "StatusCodes": [ 200 ], "BodyType": { - "$id": "710", + "$id": "785", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "711", + "$id": "786", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "712", + "$id": "787", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "127" + "$ref": "139" }, { - "$ref": "120" + "$ref": "132" } ], "IsNullable": false @@ -7037,39 +7644,39 @@ "GenerateConvenienceMethod": true }, { - "$id": "713", + "$id": "788", "Name": "put", "ResourceName": "SpreadRecordNonDiscriminatedUnion2", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "714", + "$id": "789", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "715", + "$id": "790", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "716", + "$id": "791", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "717", + "$id": "792", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "127" + "$ref": "139" }, { - "$ref": "120" + "$ref": "132" } ], "IsNullable": false @@ -7087,11 +7694,11 @@ "Kind": "Method" }, { - "$id": "718", + "$id": "793", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "719", + "$id": "794", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7106,19 +7713,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "720", + "$id": "795", "Type": { - "$ref": "719" + "$ref": "794" }, "Value": "application/json" } }, { - "$id": "721", + "$id": "796", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "722", + "$id": "797", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7133,9 +7740,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "723", + "$id": "798", "Type": { - "$ref": "722" + "$ref": "797" }, "Value": "application/json" } @@ -7143,7 +7750,7 @@ ], "Responses": [ { - "$id": "724", + "$id": "799", "StatusCodes": [ 204 ], @@ -7165,31 +7772,31 @@ } ], "Protocol": { - "$id": "725" + "$id": "800" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" }, { - "$id": "726", + "$id": "801", "Name": "SpreadRecordNonDiscriminatedUnion3", "Description": "", "Operations": [ { - "$id": "727", + "$id": "802", "Name": "get", "ResourceName": "SpreadRecordNonDiscriminatedUnion3", "Description": "Get call", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "728", + "$id": "803", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "729", + "$id": "804", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7204,9 +7811,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "730", + "$id": "805", "Type": { - "$ref": "729" + "$ref": "804" }, "Value": "application/json" } @@ -7214,36 +7821,36 @@ ], "Responses": [ { - "$id": "731", + "$id": "806", "StatusCodes": [ 200 ], "BodyType": { - "$id": "732", + "$id": "807", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "733", + "$id": "808", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "734", + "$id": "809", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "735", + "$id": "810", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "127" + "$ref": "139" }, "IsNullable": false }, { - "$ref": "120" + "$ref": "132" } ], "IsNullable": false @@ -7267,45 +7874,45 @@ "GenerateConvenienceMethod": true }, { - "$id": "736", + "$id": "811", "Name": "put", "ResourceName": "SpreadRecordNonDiscriminatedUnion3", "Description": "Put operation", "Parameters": [ { - "$ref": "146" + "$ref": "221" }, { - "$id": "737", + "$id": "812", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$id": "738", + "$id": "813", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "739", + "$id": "814", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "740", + "$id": "815", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "741", + "$id": "816", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "127" + "$ref": "139" }, "IsNullable": false }, { - "$ref": "120" + "$ref": "132" } ], "IsNullable": false @@ -7323,11 +7930,11 @@ "Kind": "Method" }, { - "$id": "742", + "$id": "817", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "743", + "$id": "818", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7342,19 +7949,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "744", + "$id": "819", "Type": { - "$ref": "743" + "$ref": "818" }, "Value": "application/json" } }, { - "$id": "745", + "$id": "820", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "746", + "$id": "821", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7369,9 +7976,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "747", + "$id": "822", "Type": { - "$ref": "746" + "$ref": "821" }, "Value": "application/json" } @@ -7379,7 +7986,7 @@ ], "Responses": [ { - "$id": "748", + "$id": "823", "StatusCodes": [ 204 ], @@ -7401,7 +8008,7 @@ } ], "Protocol": { - "$id": "749" + "$id": "824" }, "Creatable": false, "Parent": "AdditionalPropertiesClient" From bb585bf1019497a6f8375385b9952fcf928aa307 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Mon, 6 May 2024 11:02:50 +0800 Subject: [PATCH 58/60] Some clean up --- .../Emitter.Csharp/src/emitter.ts | 12 ------------ .../Emitter.Csharp/src/lib/model.ts | 8 -------- .../Emitter.Csharp/src/type/converter.ts | 16 +++++----------- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts index 62c889d0074..daecfc73936 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts @@ -41,18 +41,6 @@ export const $lib = createTypeSpecLibrary({ default: paramMessage`No Route for service for service ${"service"}` } }, - "No-Model": { - severity: "error", - messages: { - default: paramMessage`Model '${"name"}' is not found` - } - }, - "No-Type": { - severity: "error", - messages: { - default: paramMessage`Type '${"kind"}' is not found` - } - }, "Invalid-Name": { severity: "warning", messages: { diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index dbf140de08d..e14c6958fd9 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -859,19 +859,11 @@ export function getFormattedType(program: Program, type: Type): FormattedType { }; } -// This is a temporary solution. After we uptake getAllModels we should delete this. export function navigateModels( context: SdkContext, models: Map, enums: Map ) { - const computeType = (x: Type) => - getInputType( - context, - getFormattedType(context.program, x), - models, - enums - ) as any; getAllModels(context).forEach((model) => model.kind === "model" ? fromSdkModelType(model, context, models, enums) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index d01fad91138..b762848ba75 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -129,14 +129,6 @@ export function fromSdkModelType( ? fromSdkModelType(modelType.baseModel, context, models, enums) : undefined; - // TODO: can we fix the resolving reference issue in csharp? - // https://github.com/Azure/autorest.csharp/issues/4136 - // if (modelType.discriminatedSubtypes) { - // inputModelType.DerivedModels = Object.values( - // modelType.discriminatedSubtypes - // ).map((m) => fromSdkModelType(m, program, models, enums)); - // } - inputModelType.InheritedDictionaryType = modelType.additionalProperties ? ({ Kind: InputTypeKind.Dictionary, @@ -251,6 +243,7 @@ function fromSdkDatetimeType( return InputPrimitiveTypeKind.DateTimeUnix; } } + return { Kind: InputTypeKind.Primitive, Name: fromDateTimeKnownEncoding(dateTimeType.encode), @@ -280,6 +273,7 @@ function fromSdkDurationType( return InputPrimitiveTypeKind.DurationISO8601; } } + return { Kind: InputTypeKind.Primitive, Name: fromDurationKnownEncoding( @@ -459,7 +453,7 @@ function fromIntrinsicType(scalarType: SdkType): InputIntrinsicType { }; } -export function fromUnionType( +function fromUnionType( union: SdkUnionType, context: SdkContext, models: Map, @@ -592,7 +586,7 @@ function fromSdkDictionaryType( }; } -export function fromSdkArrayType( +function fromSdkArrayType( arrayType: SdkArrayType, context: SdkContext, models: Map, @@ -606,7 +600,7 @@ export function fromSdkArrayType( }; } -export function fromUsageFlags(usage: UsageFlags): Usage { +function fromUsageFlags(usage: UsageFlags): Usage { if (usage === UsageFlags.Input) return Usage.Input; else if (usage === UsageFlags.Output) return Usage.Output; else if (usage === (UsageFlags.Input | UsageFlags.Output)) From 7c4729e8fe5a79ade271fcc50fdcb2a17d784810 Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Mon, 6 May 2024 11:39:08 +0800 Subject: [PATCH 59/60] more clean up --- src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts | 4 ---- src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts index e14c6958fd9..f74910d650b 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -75,10 +75,6 @@ export function mapTypeSpecTypeToCSharpInputTypeKind( format?: string, encode?: EncodeData ): InputPrimitiveTypeKind { - // TODO: https://github.com/Azure/typespec-azure/issues/201 - if (typespecType === undefined && format === "string") { - return InputPrimitiveTypeKind.String; - } const kind = typespecType.kind; switch (kind) { case "Model": diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index b762848ba75..d1d1827b2c0 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -487,7 +487,9 @@ function fromSdkConstantType( constantType.valueType.kind === "boolean" || literalTypeContext === undefined ? fromSdkBuiltInType(constantType.valueType) - : convertConstantToEnum( + : // TODO: this might change in the near future + // we might keep constant as-is, instead of creating an enum for it. + convertConstantToEnum( constantType, enums, literalTypeContext From 403b7a6d2c76b6ca06b8d5901031eddca1f97f0f Mon Sep 17 00:00:00 2001 From: "Mingzhe Huang (from Dev Box)" Date: Tue, 7 May 2024 11:05:50 +0800 Subject: [PATCH 60/60] update comments --- src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts | 1 + .../Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts index d1d1827b2c0..67043e79797 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -284,6 +284,7 @@ function fromSdkDurationType( } as InputPrimitiveType; } +// TODO: tuple is not officially supported function fromTupleType(tupleType: SdkTupleType): InputIntrinsicType { return { Kind: InputTypeKind.Intrinsic, diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts index 1a587105116..4a1fb16f505 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/inputPrimitiveTypeKind.ts @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. +// TODO: clean up primitive types, separate types info from encoding info +// https://github.com/Azure/autorest.csharp/issues/4681 export enum InputPrimitiveTypeKind { AzureLocation = "AzureLocation", Boolean = "Boolean",