diff --git a/package-lock.json b/package-lock.json index 9c6e73322da..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": "0.41.5", + "@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,9 +335,9 @@ } }, "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.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, "dependencies": { "change-case": "~5.4.4", @@ -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": "0.41.8", "@types/lodash.isequal": "^4.5.6", "@types/mocha": "~9.1.0", "@types/node": "~18.13.0", diff --git a/package.json b/package.json index 9438dfc6f36..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": "0.41.5", + "@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/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 d1bdc4c74df..791e648eb5e 100644 --- a/samples/AnomalyDetector/src/Generated/tspCodeModel.json +++ b/samples/AnomalyDetector/src/Generated/tspCodeModel.json @@ -84,7 +84,7 @@ "$id": "14", "Kind": "Enum", "Name": "ImputeMode", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "15", @@ -160,7 +160,7 @@ "$id": "26", "Kind": "Enum", "Name": "DataSchema", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "27", @@ -208,7 +208,7 @@ "$id": "32", "Kind": "Enum", "Name": "FillNAMethod", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "33", @@ -338,7 +338,6 @@ } ], "Namespace": "AnomalyDetector.Univariate", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "Output" @@ -356,7 +355,6 @@ } ], "Namespace": "AnomalyDetector", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -398,7 +396,7 @@ "Type": { "$id": "62", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, @@ -1153,7 +1151,7 @@ "Type": { "$id": "164", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, @@ -1167,7 +1165,7 @@ "Type": { "$id": "166", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, @@ -1230,7 +1228,7 @@ "Type": { "$id": "174", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -1244,7 +1242,7 @@ "Type": { "$id": "176", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -1286,7 +1284,7 @@ "Type": { "$id": "181", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -1537,7 +1535,7 @@ "Type": { "$id": "209", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -1551,7 +1549,7 @@ "Type": { "$id": "211", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -1845,7 +1843,7 @@ "Type": { "$id": "247", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -1859,7 +1857,7 @@ "Type": { "$id": "249", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -2103,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": [ @@ -2115,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 } ] diff --git a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs index e4c6a66c4e3..aa2d3a0edda 100644 --- a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs +++ b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs @@ -183,8 +183,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); @@ -205,8 +205,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); @@ -224,7 +224,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); } @@ -236,7 +236,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); } @@ -252,8 +252,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 @@ -291,8 +291,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", } }, }, @@ -338,8 +338,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 @@ -377,8 +377,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", } }, }, @@ -420,7 +420,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 = "", @@ -446,8 +446,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"), }}, }, }; @@ -462,7 +462,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 = "", @@ -488,8 +488,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"), }}, }, }; @@ -710,8 +710,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); @@ -737,8 +737,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); @@ -760,7 +760,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); } @@ -772,7 +772,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); } @@ -788,8 +788,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); @@ -830,8 +830,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); @@ -868,7 +868,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); } @@ -880,7 +880,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 36498e23a1b..5f56bc15cd6 100644 --- a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs +++ b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs @@ -122,7 +122,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, } }, @@ -161,7 +161,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, } }, @@ -198,7 +198,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"), } }) { @@ -225,7 +225,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"), } }) { @@ -346,7 +346,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, } }, @@ -386,7 +386,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, } }, @@ -424,7 +424,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"), } }) { @@ -451,7 +451,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"), } }) { @@ -560,7 +560,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, } }, @@ -592,7 +592,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, } }, @@ -622,7 +622,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) { @@ -646,7 +646,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/Generation/Writers/RequestWriterHelpers.cs b/src/AutoRest.CSharp/Common/Generation/Writers/RequestWriterHelpers.cs index 548489568d0..483e1e8d97e 100644 --- a/src/AutoRest.CSharp/Common/Generation/Writers/RequestWriterHelpers.cs +++ b/src/AutoRest.CSharp/Common/Generation/Writers/RequestWriterHelpers.cs @@ -403,7 +403,7 @@ private static void WritePathSegment(CodeWriter writer, CodeWriterDeclaration ur { methodName ??= segment.IsRaw ? "AppendRaw" : "AppendPath"; writer.Append($"{uri}.{methodName}("); - WriteConstantOrParameter(writer, value, enumAsString: !segment.IsRaw || value.Type is { IsFrameworkType: false, Implementation: EnumType { IsExtensible: true } }); + WriteConstantOrParameter(writer, value, enumAsString: !segment.IsRaw || value.Type is { IsFrameworkType: false, Implementation: EnumType }); if (!Configuration.IsBranded) { if (value.Type.IsFrameworkType && value.Type.FrameworkType != typeof(string)) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputModelTypeConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputModelTypeConverter.cs index 510456c461f..aadad8b5ea0 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, model.Usage.HasFlag(InputModelTypeUsage.Multipart)); 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/Common/Output/Models/ClientFields.cs b/src/AutoRest.CSharp/Common/Output/Models/ClientFields.cs index 9c55c9c1354..a82dfa47b76 100644 --- a/src/AutoRest.CSharp/Common/Output/Models/ClientFields.cs +++ b/src/AutoRest.CSharp/Common/Output/Models/ClientFields.cs @@ -132,6 +132,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 c9b099f5791..bb81ef07fc5 100644 --- a/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs +++ b/src/AutoRest.CSharp/Common/Output/Models/RestClientBuilder.cs @@ -368,7 +368,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; } @@ -489,7 +489,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 }; } @@ -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 98165b3010b..2ec466cb684 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -375,7 +375,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 @@ -669,10 +669,10 @@ 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"); + throw new InvalidOperationException($"Parameter '{parameter.Name}' should have matching field"); } return new Reference(field.Name, field.Type); diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 2be102b56df..65f753703eb 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -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": "0.41.8", "@typespec/compiler": "0.55.0", "@typespec/eslint-config-typespec": "0.55.0", "@typespec/eslint-plugin": "0.55.0", diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts index a1cf1082014..14a16843552 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/clientModelBuilder.ts @@ -3,6 +3,7 @@ import { SdkClient, + getAllModels, listClients, listOperationGroups, listOperationsInOperationGroup, @@ -12,28 +13,28 @@ import { } 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 { @@ -43,23 +44,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({ @@ -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 2840b719f78..f74910d650b 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/model.ts @@ -2,36 +2,38 @@ // Licensed under the MIT License. See License.txt in the project root for license information. import { getLroMetadata, isFixed } from "@azure-tools/typespec-azure-core"; +import { + SdkContext, + SdkEnumType, + SdkModelType, + getAllModels, + getClientType +} from "@azure-tools/typespec-client-generator-core"; import { EncodeData, Enum, - EnumMember, IntrinsicType, Model, ModelProperty, Namespace, - NeverType, Operation, Program, + ProjectedProgram, Scalar, Type, Union, UsageFlags, getDeprecated, - getDiscriminator, getDoc, getEffectiveModelType, getEncode, getFormat, getKnownValues, - getVisibility, isArrayModelType, - isRecordModelType, isGlobalNamespace, + isRecordModelType, navigateTypesInNamespace, - isVoidType, - resolveUsages, - ProjectedProgram + resolveUsages } from "@typespec/compiler"; import { HttpOperation, @@ -41,9 +43,12 @@ import { isStatusCode } from "@typespec/http"; import { getResourceOperation } from "@typespec/rest"; +import { NetEmitterOptions } from "../options.js"; +import { fromSdkEnumType, fromSdkModelType } from "../type/converter.js"; import { FormattedType } from "../type/formattedType.js"; import { InputEnumTypeValue } from "../type/inputEnumTypeValue.js"; -import { InputModelProperty } from "../type/inputModelProperty.js"; +import { InputIntrinsicTypeKind } from "../type/inputIntrinsicTypeKind.js"; +import { InputPrimitiveTypeKind } from "../type/inputPrimitiveTypeKind.js"; import { InputDictionaryType, InputEnumType, @@ -54,34 +59,18 @@ import { InputPrimitiveType, InputType, InputUnionType, - isInputDictionaryType, isInputEnumType, isInputIntrinsicType, - isInputListType, - isInputLiteralType, - isInputModelType + isInputLiteralType } from "../type/inputType.js"; -import { InputPrimitiveTypeKind } from "../type/inputPrimitiveTypeKind.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 { - SdkContext, - getAccess, - getClientType, - getUsageOverride, - getWireName -} from "@azure-tools/typespec-client-generator-core"; import { capitalize, getFullNamespaceString, getTypeName } from "./utils.js"; -import { InputTypeKind } from "../type/inputTypeKind.js"; -import { InputIntrinsicTypeKind } from "../type/inputIntrinsicTypeKind.js"; -import { fromSdkEnumType } from "../type/converter.js"; -import { NetEmitterOptions } from "../options.js"; /** * Map calType to csharp InputTypeKind */ export function mapTypeSpecTypeToCSharpInputTypeKind( - context: SdkContext, typespecType: Type, format?: string, encode?: EncodeData @@ -89,7 +78,7 @@ export function mapTypeSpecTypeToCSharpInputTypeKind( const kind = typespecType.kind; switch (kind) { case "Model": - return getCSharpInputTypeKindByIntrinsicModelName( + return getCSharpInputTypeKindByPrimitiveModelName( typespecType.name, format, encode @@ -111,11 +100,11 @@ export function mapTypeSpecTypeToCSharpInputTypeKind( if (format === "uri") return InputPrimitiveTypeKind.Uri; return InputPrimitiveTypeKind.String; default: - return InputPrimitiveTypeKind.UnKnownKind; + throw new Error(`Unsupported primitive kind ${kind}`); } } -function getCSharpInputTypeKindByIntrinsicModelName( +export function getCSharpInputTypeKindByPrimitiveModelName( name: string, format?: string, encode?: EncodeData @@ -284,10 +273,6 @@ 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, @@ -295,10 +280,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; @@ -340,7 +327,7 @@ export function getInputType( const sdkType = getClientType(context, type); return { Kind: InputTypeKind.Primitive, - Name: getCSharpInputTypeKindByIntrinsicModelName( + Name: getCSharpInputTypeKindByPrimitiveModelName( sdkType.kind, formattedType.format, formattedType.encode @@ -422,7 +409,6 @@ export function getInputType( const type = formattedType.type; const builtInKind: InputPrimitiveTypeKind = mapTypeSpecTypeToCSharpInputTypeKind( - context, type, formattedType.format, formattedType.encode @@ -492,59 +478,25 @@ export function getInputType( ): InputEnumType { const name = getTypeName(context, e); let enumType = enums.get(name); - if (!enumType) { - 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] - ); - 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); - } + if (enumType) return enumType; - 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; - function enumMemberType(member: EnumMember): string { - if (typeof member.value === "number") { - return "Float32"; - } - return "String"; - } + const createdSdkEnumType = getClientType(context, e) as SdkEnumType; + context.modelsMap!.set(e, createdSdkEnumType); + enumType = fromSdkEnumType(createdSdkEnumType, context, enums); + if (addToCollection) enums.set(name, enumType); + + return enumType; } function getInputTypeForArray(elementType: Type): InputListType { @@ -582,210 +534,17 @@ 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: 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); - } - - return model; - } - - 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 = getInputType( - 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.` + if (context.modelsMap!.has(m)) { + return fromSdkModelType( + context.modelsMap!.get(m) as SdkModelType, + context, + models, + enums ); - 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 (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 {}; + var createdSdkModelType = getClientType(context, m) as SdkModelType; + context.modelsMap!.set(m, createdSdkModelType); + return fromSdkModelType(createdSdkModelType, context, models, enums); } function getInputModelForIntrinsicType( @@ -854,21 +613,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[], @@ -1111,50 +855,27 @@ 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 ) { - const computeType = (x: Type) => - getInputType( - context, - getFormattedType(context.program, x), - models, - enums - ) as any; - const skipSubNamespaces = isGlobalNamespace(context.program, namespace); - navigateTypesInNamespace( - namespace, - { - model: (m) => { - const realModel = getRealType(m); - return ( - realModel.kind === "Model" && - realModel.name != "" && - computeType(realModel) - ); - }, - enum: (e) => { - const realEnum = getRealType(e); - return realEnum.kind === "Enum" && computeType(realEnum); - } - }, - { skipSubNamespaces } + getAllModels(context).forEach((model) => + model.kind === "model" + ? fromSdkModelType(model, context, models, enums) + : fromSdkEnumType(model, context, enums) ); +} - // 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 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 { + if ("projector" in context.program) + return ( + (context.program as ProjectedProgram).projector.projectedTypes.get( + type + ) ?? type + ); + return type; } diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts index 59296235f8d..59b16a87a27 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/lib/operation.ts @@ -17,8 +17,7 @@ import { Model, ModelProperty, Namespace, - Operation, - Program + Operation } from "@typespec/compiler"; import { getResourceOperation } from "@typespec/rest"; import { diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts index cb24b7ad05a..fd87abaf423 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts @@ -130,6 +130,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 index 561f33e4f83..67043e79797 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/type/converter.ts @@ -1,17 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + import { + SdkArrayType, + SdkBodyModelPropertyType, + SdkBuiltInType, + SdkConstantType, SdkContext, + SdkDatetimeType, + SdkDictionaryType, + SdkDurationType, SdkEnumType, SdkEnumValueType, - UsageFlags + SdkModelPropertyType, + SdkModelType, + SdkTupleType, + SdkType, + SdkUnionType, + UsageFlags, + isReadOnly, + isSdkBuiltInKind } from "@azure-tools/typespec-client-generator-core"; -import { InputEnumType } from "./inputType.js"; -import { Enum } from "@typespec/compiler"; -import { InputTypeKind } from "./inputTypeKind.js"; +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 { setUsage } from "../lib/model.js"; +import { InputIntrinsicTypeKind } from "./inputIntrinsicTypeKind.js"; +import { InputModelProperty } from "./inputModelProperty.js"; +import { InputPrimitiveTypeKind } from "./inputPrimitiveTypeKind.js"; +import { + InputDictionaryType, + InputEnumType, + InputIntrinsicType, + InputListType, + InputLiteralType, + InputModelType, + InputPrimitiveType, + InputType, + InputUnionType +} from "./inputType.js"; +import { InputTypeKind } from "./inputTypeKind.js"; +import { LiteralTypeContext } from "./literalTypeContext.js"; import { Usage } from "./usage.js"; +function fromSdkType( + sdkType: SdkType, + context: SdkContext, + models: Map, + enums: Map, + literalTypeContext?: LiteralTypeContext +): InputType { + if (sdkType.kind === "model") + return fromSdkModelType(sdkType, context, models, enums); + if (sdkType.kind === "enum") + return fromSdkEnumType(sdkType, context, enums); + if (sdkType.kind === "enumvalue") + return fromSdkEnumValueTypeToConstantType( + sdkType, + context, + enums, + literalTypeContext + ); + if (sdkType.kind === "dict") + return fromSdkDictionaryType(sdkType, context, models, enums); + if (sdkType.kind === "array") + return fromSdkArrayType(sdkType, context, models, enums); + if (sdkType.kind === "constant") + return fromSdkConstantType(sdkType, enums, literalTypeContext); + 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 === "string") + return fromStringType(context.program, sdkType); + // 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 + if (sdkType.__raw?.kind === "Intrinsic") return fromIntrinsicType(sdkType); + if (isSdkBuiltInKind(sdkType.kind)) + return fromSdkBuiltInType(sdkType as SdkBuiltInType); + return {} as InputType; +} + +export function fromSdkModelType( + modelType: SdkModelType, + context: SdkContext, + models: Map, + enums: Map +): InputModelType { + const modelTypeName = modelType.name; + let inputModelType = models.get(modelTypeName); + if (!inputModelType) { + const baseModelHasDiscriminator = hasDiscriminator(modelType.baseModel); + inputModelType = { + Kind: InputTypeKind.Model, + Name: modelTypeName, + Namespace: getFullNamespaceString( + (modelType.__raw as Model).namespace + ), + Accessibility: modelType.access, + Deprecated: modelType.deprecation, + Description: modelType.description, + IsNullable: modelType.nullable, + DiscriminatorPropertyName: baseModelHasDiscriminator + ? undefined + : getDiscriminatorPropertyNameFromCurrentModel(modelType), + DiscriminatorValue: modelType.discriminatorValue, + Usage: fromUsageFlags(modelType.usage) + } as InputModelType; + + models.set(modelTypeName, inputModelType); + + inputModelType.BaseModel = modelType.baseModel + ? fromSdkModelType(modelType.baseModel, context, models, enums) + : 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) => + !(p as SdkBodyModelPropertyType).discriminator || + !baseModelHasDiscriminator + ) + .filter( + (p) => + p.kind !== "header" && + p.kind !== "query" && + p.kind !== "path" + ) + .map((p) => + fromSdkModelPropertyType(p, context, models, enums, { + ModelName: inputModelType?.Name, + Namespace: inputModelType?.Namespace + } as LiteralTypeContext) + ); + } + + return inputModelType; +} + +function getDiscriminatorPropertyNameFromCurrentModel( + 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 undefined; +} + +function hasDiscriminator(model?: SdkModelType): boolean { + if (model == null) return false; + + if ( + model.properties.some( + (p) => (p as SdkBodyModelPropertyType).discriminator + ) + ) + return true; + + return hasDiscriminator(model.baseModel); +} + export function fromSdkEnumType( enumType: SdkEnumType, context: SdkContext, @@ -24,10 +208,11 @@ 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 + // Enum and Union have optional namespace property + (enumType.__raw! as any).namespace ), Accessibility: enumType.access, Deprecated: enumType.deprecation, @@ -36,7 +221,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; } @@ -44,20 +228,447 @@ export function fromSdkEnumType( return inputEnumType; } -export function fromSdkEnumValueType( +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: dateTimeType.nullable + } 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: durationType.nullable + } as InputPrimitiveType; +} + +// TODO: tuple is not officially supported +function fromTupleType(tupleType: SdkTupleType): InputIntrinsicType { + return { + Kind: InputTypeKind.Intrinsic, + Name: InputIntrinsicTypeKind.Unknown, + 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; + } + } + + return { + Kind: InputTypeKind.Primitive, + Name: fromBytesEncoding(bytesType.encode), + IsNullable: bytesType.nullable + }; +} + +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 + }; +} + +function fromSdkBuiltInType(builtInType: SdkBuiltInType): InputType { + const builtInKind: InputPrimitiveTypeKind = + mapTcgcTypeToCSharpInputTypeKind(builtInType); + return { + Kind: InputTypeKind.Primitive, + Name: builtInKind, + IsNullable: builtInType.nullable + } as InputPrimitiveType; +} + +function mapTcgcTypeToCSharpInputTypeKind( + type: SdkBuiltInType +): InputPrimitiveTypeKind { + switch (type.kind) { + case "numeric": + return InputPrimitiveTypeKind.Float128; + case "integer": + return InputPrimitiveTypeKind.Int64; + case "safeint": + return InputPrimitiveTypeKind.SafeInt; + case "int8": + return InputPrimitiveTypeKind.SByte; + case "int32": + return InputPrimitiveTypeKind.Int32; + case "int64": + return InputPrimitiveTypeKind.Int64; + case "uint8": + return InputPrimitiveTypeKind.Byte; + case "bytes": + switch (type.encode) { + case undefined: + case "": + case "base64": + return InputPrimitiveTypeKind.Bytes; + case "base64url": + return InputPrimitiveTypeKind.BytesBase64Url; + default: + logger.warn(`invalid encode '${type.encode}' for bytes.`); + return InputPrimitiveTypeKind.Bytes; + } + case "float": + return InputPrimitiveTypeKind.Float64; + case "float32": + return InputPrimitiveTypeKind.Float32; + case "float64": + return InputPrimitiveTypeKind.Float64; + case "decimal": + return InputPrimitiveTypeKind.Decimal; + case "decimal128": + return InputPrimitiveTypeKind.Decimal128; + case "uuid": + return InputPrimitiveTypeKind.Guid; + case "eTag": + return InputPrimitiveTypeKind.String; + case "azureLocation": + return InputPrimitiveTypeKind.AzureLocation; + case "string": + return InputPrimitiveTypeKind.String; + case "guid": // TODO: is this the same as uuid? + return InputPrimitiveTypeKind.Guid; + case "uri": + case "url": + return InputPrimitiveTypeKind.Uri; + case "boolean": + return InputPrimitiveTypeKind.Boolean; + case "plainDate": + return InputPrimitiveTypeKind.Date; + case "plainTime": + return InputPrimitiveTypeKind.Time; + case "any": + return InputPrimitiveTypeKind.Object; + case "int16": // TODO: add support for those types + case "uint16": + case "uint32": + case "uint64": + case "ipV4Address": + case "ipV6Address": + case "password": + case "armId": + case "ipAddress": + default: + throw new Error(`Unsupported built-in type kind '${type.kind}'`); + } +} + +function fromScalarType(scalarType: SdkType): InputPrimitiveType { + return { + Kind: InputTypeKind.Primitive, + Name: getCSharpInputTypeKindByPrimitiveModelName( + scalarType.kind, + scalarType.kind, + undefined // To-DO: encode not compatible + ), + IsNullable: scalarType.nullable + }; +} + +function fromIntrinsicType(scalarType: SdkType): InputIntrinsicType { + const name = (scalarType.__raw! as IntrinsicType).name; + return { + Kind: InputTypeKind.Intrinsic, + Name: getCSharpInputTypeKindByIntrinsic( + scalarType.__raw! as IntrinsicType + ), + IsNullable: false + }; +} + +function fromUnionType( + union: SdkUnionType, + context: SdkContext, + models: Map, + enums: Map +): InputUnionType | InputType { + let itemTypes: InputType[] = []; + for (const value of union.values) { + const inputType = fromSdkType(value, context, models, enums); + itemTypes.push(inputType); + } + + return itemTypes.length > 1 + ? { + Kind: InputTypeKind.Union, + Name: InputTypeKind.Union, + UnionItemTypes: itemTypes, + IsNullable: false + } + : itemTypes[0]; +} + +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) + : // 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 + ), + 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; + } +} + +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 { return { Name: enumValueType.name, Value: enumValueType.value, Description: enumValueType.description - } as InputEnumTypeValue; + }; +} + +function fromSdkDictionaryType( + dictionaryType: SdkDictionaryType, + context: SdkContext, + models: Map, + enums: Map +): InputDictionaryType { + return { + Kind: InputTypeKind.Dictionary, + Name: InputTypeKind.Dictionary, + KeyType: fromSdkType(dictionaryType.keyType, context, models, enums), + ValueType: fromSdkType( + dictionaryType.valueType, + context, + models, + enums + ), + IsNullable: dictionaryType.nullable + }; } -export function fromUsageFlags(usage: UsageFlags): Usage { +function fromSdkArrayType( + arrayType: SdkArrayType, + context: SdkContext, + models: Map, + enums: Map +): InputListType { + return { + Kind: InputTypeKind.Array, + Name: InputTypeKind.Array, + ElementType: fromSdkType(arrayType.valueType, context, models, enums), + IsNullable: arrayType.nullable + }; +} + +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)) return Usage.RoundTrip; else return Usage.None; } + +function fromSdkModelPropertyType( + propertyType: SdkModelPropertyType, + context: SdkContext, + 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 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, + context, + models, + enums, + literalTypeContext + ), + IsRequired: isRequired, + IsReadOnly: + propertyType.kind === "property" && isReadOnly(propertyType), + IsDiscriminator: isDiscriminator === true ? true : undefined // TODO: keep backward compatible to ease comparison. remove this after TCGC is merged + }; + + return modelProperty; +} + +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 60d3bb88d11..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", @@ -40,6 +42,5 @@ export enum InputPrimitiveTypeKind { Uri = "Uri", Enum = "Enum", SByte = "SByte", //int8 - Byte = "Byte", //uint8 - UnKnownKind = "UnknownKind" + Byte = "Byte" //uint8 } 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 70c3df7075d..2fd30e05eed 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/modelType.test.ts @@ -204,7 +204,7 @@ op test(@body input: Pet): Pet; ], IsExtensible: false, IsNullable: false, - Usage: "None" + Usage: "RoundTrip" }, IsRequired: true, IsReadOnly: false, @@ -338,7 +338,7 @@ op test(@body input: Pet): Pet; ], IsExtensible: false, 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 27925784134..b584c5db9e2 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/test/Unit/propertyType.test.ts @@ -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; @@ -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..942bf0eb818 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,10 @@ 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 502d0bf0f4f..0281e6f11ac 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/CadlRanchProjects.Tests/client-structure-multiple-client.cs b/test/CadlRanchProjects.Tests/client-structure-multiple-client.cs index e2489e9e702..502ec34dc7f 100644 --- a/test/CadlRanchProjects.Tests/client-structure-multiple-client.cs +++ b/test/CadlRanchProjects.Tests/client-structure-multiple-client.cs @@ -4,6 +4,7 @@ using AutoRest.TestServer.Tests.Infrastructure; using Azure; using Client.Structure.Service.Multiple.Client; +using Client.Structure.Service.Multiple.Client.Models; using NUnit.Framework; namespace CadlRanchProjects.Tests @@ -32,37 +33,37 @@ public void Client_Structure_mulitple_client_methods() [Test] public Task Client_Structure_Multiple_ClientA_RenamedOne() => Test(async (host) => { - Response response = await new ClientAClient(host, "multi-client").RenamedOneAsync(); + Response response = await new ClientAClient(host, ClientType.MultiClient).RenamedOneAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Multiple_ClientA_RenamedThree() => Test(async (host) => { - Response response = await new ClientAClient(host, "multi-client").RenamedThreeAsync(); + Response response = await new ClientAClient(host, ClientType.MultiClient).RenamedThreeAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Multiple_ClientA_RenamedFive() => Test(async (host) => { - Response response = await new ClientAClient(host, "multi-client").RenamedFiveAsync(); + Response response = await new ClientAClient(host, ClientType.MultiClient).RenamedFiveAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Multiple_ClientB_RenamedTwo() => Test(async (host) => { - Response response = await new ClientBClient(host, "multi-client").RenamedTwoAsync(); + Response response = await new ClientBClient(host, ClientType.MultiClient).RenamedTwoAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Multiple_ClientB_RenamedFour() => Test(async (host) => { - Response response = await new ClientBClient(host, "multi-client").RenamedFourAsync(); + Response response = await new ClientBClient(host, ClientType.MultiClient).RenamedFourAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Multiple_ClientB_RenamedSix() => Test(async (host) => { - Response response = await new ClientBClient(host, "multi-client").RenamedSixAsync(); + Response response = await new ClientBClient(host, ClientType.MultiClient).RenamedSixAsync(); Assert.AreEqual(204, response.Status); }); } diff --git a/test/CadlRanchProjects.Tests/client-structure-renamed-operation.cs b/test/CadlRanchProjects.Tests/client-structure-renamed-operation.cs index 4a592ad76c6..61f9533e8f8 100644 --- a/test/CadlRanchProjects.Tests/client-structure-renamed-operation.cs +++ b/test/CadlRanchProjects.Tests/client-structure-renamed-operation.cs @@ -3,6 +3,7 @@ using AutoRest.TestServer.Tests.Infrastructure; using Azure; using Client.Structure.Service.rename.operation; +using Client.Structure.Service.rename.operation.Models; using NUnit.Framework; namespace CadlRanchProjects.Tests @@ -33,37 +34,37 @@ public void Client_Structure_Renamed_Operation_methods() [Test] public Task Client_Structure_Service_Client_RenamedOne() => Test(async (host) => { - Response response = await new RenamedOperationClient(host, "renamed-operation").RenamedOneAsync(); + Response response = await new RenamedOperationClient(host, ClientType.RenamedOperation).RenamedOneAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Service_Client_RenamedThree() => Test(async (host) => { - Response response = await new RenamedOperationClient(host, "renamed-operation").RenamedThreeAsync(); + Response response = await new RenamedOperationClient(host, ClientType.RenamedOperation).RenamedThreeAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Service_Client_RenamedFive() => Test(async (host) => { - Response response = await new RenamedOperationClient(host, "renamed-operation").RenamedFiveAsync(); + Response response = await new RenamedOperationClient(host, ClientType.RenamedOperation).RenamedFiveAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Operation_Group_Client_RenamedTwo() => Test(async (host) => { - Response response = await new RenamedOperationClient(host, "renamed-operation").GetGroupClient().RenamedTwoAsync(); + Response response = await new RenamedOperationClient(host, ClientType.RenamedOperation).GetGroupClient().RenamedTwoAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Operation_Group_Client_RenamedFour() => Test(async (host) => { - Response response = await new RenamedOperationClient(host, "renamed-operation").GetGroupClient().RenamedFourAsync(); + Response response = await new RenamedOperationClient(host, ClientType.RenamedOperation).GetGroupClient().RenamedFourAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Operation_Group_Client_RenamedSix() => Test(async (host) => { - Response response = await new RenamedOperationClient(host, "renamed-operation").GetGroupClient().RenamedSixAsync(); + Response response = await new RenamedOperationClient(host, ClientType.RenamedOperation).GetGroupClient().RenamedSixAsync(); Assert.AreEqual(204, response.Status); }); } diff --git a/test/CadlRanchProjects.Tests/client-structure-two-operation-group.cs b/test/CadlRanchProjects.Tests/client-structure-two-operation-group.cs index 2da3ec81e42..5b07e9a713d 100644 --- a/test/CadlRanchProjects.Tests/client-structure-two-operation-group.cs +++ b/test/CadlRanchProjects.Tests/client-structure-two-operation-group.cs @@ -4,6 +4,7 @@ using AutoRest.TestServer.Tests.Infrastructure; using Azure; using Client.Structure.Service.TwoOperationGroup; +using Client.Structure.Service.TwoOperationGroup.Models; using NUnit.Framework; namespace CadlRanchProjects.Tests @@ -40,37 +41,37 @@ public void Client_Structure_Two_Operation_Group_methods() [Test] public Task Client_Structure_Operation_Group1_Client_One() => Test(async (host) => { - Response response = await new TwoOperationGroupClient(host).GetGroup1Client("two-operation-group").OneAsync(); + Response response = await new TwoOperationGroupClient(host).GetGroup1Client(ClientType.TwoOperationGroup).OneAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Operation_Group1_Client_Three() => Test(async (host) => { - Response response = await new TwoOperationGroupClient(host).GetGroup1Client("two-operation-group").ThreeAsync(); + Response response = await new TwoOperationGroupClient(host).GetGroup1Client(ClientType.TwoOperationGroup).ThreeAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Operation_Group1_Client_Four() => Test(async (host) => { - Response response = await new TwoOperationGroupClient(host).GetGroup1Client("two-operation-group").FourAsync(); + Response response = await new TwoOperationGroupClient(host).GetGroup1Client(ClientType.TwoOperationGroup).FourAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Operation_Group2_Client_Two() => Test(async (host) => { - Response response = await new TwoOperationGroupClient(host).GetGroup2Client("two-operation-group").TwoAsync(); + Response response = await new TwoOperationGroupClient(host).GetGroup2Client(ClientType.TwoOperationGroup).TwoAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Operation_Group2_Client_Five() => Test(async (host) => { - Response response = await new TwoOperationGroupClient(host).GetGroup2Client("two-operation-group").FiveAsync(); + Response response = await new TwoOperationGroupClient(host).GetGroup2Client(ClientType.TwoOperationGroup).FiveAsync(); Assert.AreEqual(204, response.Status); }); [Test] public Task Client_Structure_Operation_Group2_Client_Six() => Test(async (host) => { - Response response = await new TwoOperationGroupClient(host).GetGroup2Client("two-operation-group").SixAsync(); + Response response = await new TwoOperationGroupClient(host).GetGroup2Client(ClientType.TwoOperationGroup).SixAsync(); Assert.AreEqual(204, response.Status); }); } diff --git a/test/CadlRanchProjects.Tests/type-property-optionality.cs b/test/CadlRanchProjects.Tests/type-property-optionality.cs index a2ecf7624d1..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] @@ -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); @@ -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] @@ -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 b63ef82bf2f..001632931d1 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(UnionEnumValuePropertyProperty.Value2, response.Value.Property); + Assert.AreEqual(ExtendedEnum.EnumValue2, response.Value.Property); }); [Test] @@ -399,15 +399,14 @@ 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] 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); }); @@ -415,13 +414,13 @@ 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] 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 +433,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); }); } diff --git a/test/CadlRanchProjects.Tests/type-union.cs b/test/CadlRanchProjects.Tests/type-union.cs index 33f7747d148..bac87f3b0ff 100644 --- a/test/CadlRanchProjects.Tests/type-union.cs +++ b/test/CadlRanchProjects.Tests/type-union.cs @@ -21,13 +21,13 @@ public Task GetStringsOnly() => Test(async (host) => { var response = await new UnionClient(host, null).GetStringsOnlyClient().GetStringsOnlyAsync(); Assert.AreEqual(200, response.GetRawResponse().Status); - Assert.AreEqual(GetResponse9Prop.B, response.Value.Prop); + Assert.AreEqual(GetResponseProp4.B, response.Value.Prop); }); [Test] public Task SendStringsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetStringsOnlyClient().SendAsync(SendRequest9Prop.B); + var response = await new UnionClient(host, null).GetStringsOnlyClient().SendAsync(GetResponseProp4.B); Assert.AreEqual(204, response.Status); }); @@ -66,13 +66,13 @@ 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(GetResponseProp2._2, response.Value.Prop); }); [Test] public Task SendIntsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetIntsOnlyClient().SendAsync(BinaryData.FromObjectAsJson(2)); + var response = await new UnionClient(host, null).GetIntsOnlyClient().SendAsync(GetResponseProp2._2); Assert.AreEqual(204, response.Status); }); @@ -81,13 +81,13 @@ 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(GetResponseProp1._22, response.Value.Prop); }); [Test] public Task SendFloatsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetFloatsOnlyClient().SendAsync(BinaryData.FromObjectAsJson(2.2)); + var response = await new UnionClient(host, null).GetFloatsOnlyClient().SendAsync(GetResponseProp1._22); Assert.AreEqual(204, response.Status); }); @@ -112,15 +112,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.ToSerialString()), response.Value.Prop.Lr); - AssertEqual(BinaryData.FromObjectAsJson(UD.Up.ToSerialString()), 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.ToSerialString()), - BinaryData.FromObjectAsJson(UD.Up.ToSerialString()))); + 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/authentication/oauth2/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/authentication/oauth2/src/Generated/tspCodeModel.json index ce42e100784..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,80 +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": { - "$ref": "2" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "14", - "Name": "authorizationUrl", - "SerializedName": "authorizationUrl", - "Description": "", - "Type": { - "$id": "15", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "7" - }, - "Value": "https://login.microsoftonline.com/common/oauth2/authorize", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "16", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "17", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "18", + "$id": "5", "Name": "OAuth2Client", "Description": "Illustrates clients generated with OAuth2 authentication.", "Operations": [ { - "$id": "19", + "$id": "6", "Name": "valid", "ResourceName": "OAuth2", "Description": "Check whether client is authenticated", "Parameters": [ { - "$id": "20", + "$id": "7", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "21", + "$id": "8", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -173,9 +63,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "22", + "$id": "9", "Type": { - "$id": "23", + "$id": "10", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -184,11 +74,11 @@ } }, { - "$id": "24", + "$id": "11", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "25", + "$id": "12", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -203,9 +93,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "26", + "$id": "13", "Type": { - "$ref": "25" + "$ref": "12" }, "Value": "application/json" } @@ -213,7 +103,7 @@ ], "Responses": [ { - "$id": "27", + "$id": "14", "StatusCodes": [ 204 ], @@ -231,20 +121,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "28", + "$id": "15", "Name": "invalid", "ResourceName": "OAuth2", "Description": "Check whether client is authenticated. Will return an invalid bearer error.", "Parameters": [ { - "$ref": "20" + "$ref": "7" }, { - "$id": "29", + "$id": "16", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "30", + "$id": "17", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -259,9 +149,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "31", + "$id": "18", "Type": { - "$ref": "30" + "$ref": "17" }, "Value": "application/json" } @@ -269,7 +159,7 @@ ], "Responses": [ { - "$id": "32", + "$id": "19", "StatusCodes": [ 204 ], @@ -278,12 +168,12 @@ "IsErrorResponse": false }, { - "$id": "33", + "$id": "20", "StatusCodes": [ 403 ], "BodyType": { - "$ref": "9" + "$ref": "2" }, "BodyMediaType": "Json", "Headers": [], @@ -303,15 +193,15 @@ } ], "Protocol": { - "$id": "34" + "$id": "21" }, "Creatable": true } ], "Auth": { - "$id": "35", + "$id": "22", "OAuth2": { - "$id": "36", + "$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 c694c2a788c..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": "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": { - "$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/azure/client-generator-core/access/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/client-generator-core/access/src/Generated/tspCodeModel.json index e3f9268c523..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 @@ -164,32 +164,6 @@ { "$id": "20", "Kind": "Model", - "Name": "BaseModel", - "Namespace": "_Specs_.Azure.ClientGenerator.Core.Access.RelativeModelInOperation", - "Accessibility": "internal", - "Description": "Used in internal operations, should be generated but not exported.", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "21", - "Name": "name", - "SerializedName": "name", - "Description": "", - "Type": { - "$id": "22", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "23", - "Kind": "Model", "Name": "OuterModel", "Namespace": "_Specs_.Azure.ClientGenerator.Core.Access.RelativeModelInOperation", "Accessibility": "internal", @@ -197,7 +171,30 @@ "IsNullable": false, "Usage": "Output", "BaseModel": { - "$ref": "20" + "$id": "21", + "Kind": "Model", + "Name": "BaseModel", + "Namespace": "_Specs_.Azure.ClientGenerator.Core.Access.RelativeModelInOperation", + "Accessibility": "internal", + "Description": "Used in internal operations, should be generated but not exported.", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "22", + "Name": "name", + "SerializedName": "name", + "Description": "", + "Type": { + "$id": "23", + "Kind": "Primitive", + "Name": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] }, "Properties": [ { @@ -236,6 +233,9 @@ } ] }, + { + "$ref": "21" + }, { "$ref": "25" }, @@ -255,14 +255,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "30", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { @@ -1016,7 +1016,7 @@ 200 ], "BodyType": { - "$ref": "23" + "$ref": "20" }, "BodyMediaType": "Json", "Headers": [], diff --git a/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/azure/core/basic/src/Generated/tspCodeModel.json index 3d24c9a0622..f4b6d0cee2d 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", @@ -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": "bodyInput", - "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/client/naming/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/naming/src/Generated/tspCodeModel.json index eb42054ceba..9cfd2ceec02 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/client/structure/multi-client/src/Generated/ClientAClient.cs b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/ClientAClient.cs index 52cb215e9a8..7f25ba7557a 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.ToSerialString(), 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.ToSerialString(), 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.ToSerialString(), 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 35305241187..994babcddd7 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.ToSerialString(), 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.ToSerialString(), 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.ToSerialString(), 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.Serialization.cs b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Models/ClientType.Serialization.cs new file mode 100644 index 00000000000..c51226a65d1 --- /dev/null +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Models/ClientType.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Client.Structure.Service.Multiple.Client.Models +{ + internal static partial class ClientTypeExtensions + { + public static string ToSerialString(this ClientType value) => value switch + { + ClientType.Default => "default", + ClientType.MultiClient => "multi-client", + ClientType.RenamedOperation => "renamed-operation", + ClientType.TwoOperationGroup => "two-operation-group", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ClientType value.") + }; + + public static ClientType ToClientType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "default")) return ClientType.Default; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "multi-client")) return ClientType.MultiClient; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "renamed-operation")) return ClientType.RenamedOperation; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "two-operation-group")) return ClientType.TwoOperationGroup; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ClientType value."); + } + } +} 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..6b9926f2b91 --- /dev/null +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/Models/ClientType.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Client.Structure.Service.Multiple.Client.Models +{ + /// The ClientType. + public enum ClientType + { + /// default. + Default, + /// multi-client. + MultiClient, + /// renamed-operation. + RenamedOperation, + /// two-operation-group. + TwoOperationGroup + } +} 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 504038b14d7..29ead6c2a9e 100644 --- a/test/CadlRanchProjects/client/structure/multi-client/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/structure/multi-client/src/Generated/tspCodeModel.json @@ -32,10 +32,9 @@ } ], "Namespace": "Client.Structure.Service", - "Description": "", "IsExtensible": false, "IsNullable": false, - "Usage": "None" + "Usage": "Input" } ], "Models": [], 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 f00f0b39b7c..2fda7b00d69 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.ToSerialString(), 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.ToSerialString(), 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.ToSerialString(), 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.Serialization.cs b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Models/ClientType.Serialization.cs new file mode 100644 index 00000000000..3226f8df4ba --- /dev/null +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Models/ClientType.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Client.Structure.Service.rename.operation.Models +{ + internal static partial class ClientTypeExtensions + { + public static string ToSerialString(this ClientType value) => value switch + { + ClientType.Default => "default", + ClientType.MultiClient => "multi-client", + ClientType.RenamedOperation => "renamed-operation", + ClientType.TwoOperationGroup => "two-operation-group", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ClientType value.") + }; + + public static ClientType ToClientType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "default")) return ClientType.Default; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "multi-client")) return ClientType.MultiClient; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "renamed-operation")) return ClientType.RenamedOperation; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "two-operation-group")) return ClientType.TwoOperationGroup; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ClientType value."); + } + } +} 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..77bdca5d2c7 --- /dev/null +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/Models/ClientType.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Client.Structure.Service.rename.operation.Models +{ + /// The ClientType. + public enum ClientType + { + /// default. + Default, + /// multi-client. + MultiClient, + /// renamed-operation. + RenamedOperation, + /// two-operation-group. + TwoOperationGroup + } +} 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 f719ba8a4d0..5fb97c992c2 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.ToSerialString(), 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.ToSerialString(), 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.ToSerialString(), true); uri.AppendPath("/five", false); request.Uri = uri; request.Headers.Add("Accept", "application/json"); 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 17b75700484..25cb4dd664f 100644 --- a/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/client/structure/renamed-operation/src/Generated/tspCodeModel.json @@ -32,10 +32,9 @@ } ], "Namespace": "Client.Structure.Service", - "Description": "", "IsExtensible": false, "IsNullable": false, - "Usage": "None" + "Usage": "Input" } ], "Models": [], 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 d476a752110..48e75b86156 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.ToSerialString(), 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.ToSerialString(), 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.ToSerialString(), 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 70785a8a478..5608e1aaa00 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.ToSerialString(), 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.ToSerialString(), 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.ToSerialString(), 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.Serialization.cs b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Models/ClientType.Serialization.cs new file mode 100644 index 00000000000..4c03fe62ff1 --- /dev/null +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Models/ClientType.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Client.Structure.Service.TwoOperationGroup.Models +{ + internal static partial class ClientTypeExtensions + { + public static string ToSerialString(this ClientType value) => value switch + { + ClientType.Default => "default", + ClientType.MultiClient => "multi-client", + ClientType.RenamedOperation => "renamed-operation", + ClientType.TwoOperationGroup => "two-operation-group", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ClientType value.") + }; + + public static ClientType ToClientType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "default")) return ClientType.Default; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "multi-client")) return ClientType.MultiClient; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "renamed-operation")) return ClientType.RenamedOperation; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "two-operation-group")) return ClientType.TwoOperationGroup; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ClientType value."); + } + } +} 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..82d091077cd --- /dev/null +++ b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/Models/ClientType.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Client.Structure.Service.TwoOperationGroup.Models +{ + /// The ClientType. + public enum ClientType + { + /// default. + Default, + /// multi-client. + MultiClient, + /// renamed-operation. + RenamedOperation, + /// two-operation-group. + TwoOperationGroup + } +} 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/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/client/structure/two-operation-group/src/Generated/tspCodeModel.json index a996e0d731e..1329a879ddc 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 @@ -32,10 +32,9 @@ } ], "Namespace": "Client.Structure.Service", - "Description": "", "IsExtensible": false, "IsNullable": false, - "Usage": "None" + "Usage": "Input" } ], "Models": [], 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/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..e600e196984 100644 --- a/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/encode/datetime/src/Generated/tspCodeModel.json @@ -21,7 +21,7 @@ "Type": { "$id": "4", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -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/encode/datetime/tests/Generated/Samples/Samples_Property.cs b/test/CadlRanchProjects/encode/datetime/tests/Generated/Samples/Samples_Property.cs index 5a4e3f93fe6..1343567eb65 100644 --- a/test/CadlRanchProjects/encode/datetime/tests/Generated/Samples/Samples_Property.cs +++ b/test/CadlRanchProjects/encode/datetime/tests/Generated/Samples/Samples_Property.cs @@ -26,7 +26,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); @@ -42,7 +42,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); @@ -56,7 +56,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); } @@ -66,7 +66,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); } @@ -78,7 +78,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); @@ -94,7 +94,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); @@ -108,7 +108,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); } @@ -118,7 +118,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/payload/content-negotiation/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/payload/content-negotiation/src/Generated/tspCodeModel.json index ad47a5405c7..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": "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/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/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/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/model/inheritance/enum-discriminator/src/Generated/tspCodeModel.json index 8a5eabaa578..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 @@ -8,7 +8,7 @@ "$id": "2", "Kind": "Enum", "Name": "DogKind", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", 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 4f6ebff45a3..57d20670837 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 @@ -17,7 +17,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)); @@ -38,7 +38,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 efd6e509ab4..f1a575b7c1a 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 @@ -48,7 +48,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)); @@ -69,7 +69,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..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 @@ -8,66 +8,60 @@ { "$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 + } + ] + }, + "Properties": [ + { + "$id": "7", + "Name": "age", + "SerializedName": "age", + "Description": "", + "Type": { + "$id": "8", + "Kind": "Primitive", + "Name": "Int32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] }, "Properties": [ { @@ -85,6 +79,12 @@ "IsReadOnly": false } ] + }, + { + "$ref": "3" + }, + { + "$ref": "4" } ], "Clients": [ @@ -134,7 +134,7 @@ "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "8" + "$ref": "2" }, "Location": "Body", "IsRequired": true, @@ -266,7 +266,7 @@ 200 ], "BodyType": { - "$ref": "8" + "$ref": "2" }, "BodyMediaType": "Json", "Headers": [], @@ -297,7 +297,7 @@ "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "8" + "$ref": "2" }, "Location": "Body", "IsRequired": true, @@ -371,7 +371,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 f96f67db233..0c43b8844ad 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 @@ -75,7 +75,7 @@ internal static Element DeserializeElement(JsonElement element, ModelReaderWrite { return null; } - IReadOnlyList extension = default; + IList extension = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 34b73873fb5..0a6c82f7420 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 @@ -46,7 +46,7 @@ public partial class Element private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal Element() + public Element() { Extension = new ChangeTrackingList(); } @@ -54,13 +54,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 1c1f0f3c1ee..efdb716ec28 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 @@ -78,7 +78,7 @@ internal static Extension DeserializeExtension(JsonElement element, ModelReaderW return null; } sbyte level = default; - IReadOnlyList extension = default; + IList extension = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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..6e39fc6d791 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,58 @@ { "$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 + } + ] + }, + "Properties": [ + { + "$id": "6", + "Name": "level", + "SerializedName": "level", + "Description": "", + "Type": { + "$id": "7", + "Kind": "Primitive", + "Name": "SByte", "IsNullable": false }, - "IsRequired": false, + "IsRequired": true, "IsReadOnly": false } ] }, { - "$ref": "5" + "$ref": "3" } ], "Clients": [ @@ -109,7 +109,7 @@ "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "5" + "$ref": "2" }, "Location": "Body", "IsRequired": true, @@ -241,7 +241,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 74a029f9a51..50e05c585a8 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 @@ -112,7 +112,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); } @@ -122,7 +125,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 3dfc488063c..38411cb0a4a 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 81819d57356..85235c4833d 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 @@ -23,7 +23,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..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 @@ -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/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadFloat.xml b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadFloat.xml index 3a0b4f45c61..58dfaf808d5 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadFloat.xml +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadFloat.xml @@ -41,6 +41,7 @@ Response response = await client.GetExtendsDifferentSpreadFloatAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); ]]> This sample shows how to call GetExtendsDifferentSpreadFloatAsync with all parameters and parse the result. @@ -62,6 +64,7 @@ Response response = client.GetExtendsDifferentSpreadFloat(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); ]]> This sample shows how to call GetExtendsDifferentSpreadFloat with all parameters and parse the result. @@ -79,14 +83,14 @@ This sample shows how to call PutAsync. ", 123.45F); Response response = await client.PutAsync(body); ]]> This sample shows how to call PutAsync with all parameters. ", 123.45F); Response response = await client.PutAsync(body); ]]> @@ -96,14 +100,14 @@ This sample shows how to call Put. ", 123.45F); Response response = client.Put(body); ]]> This sample shows how to call Put with all parameters. ", 123.45F); Response response = client.Put(body); ]]> @@ -116,6 +120,7 @@ ExtendsDifferentSpreadFloat client = new AdditionalPropertiesClient().GetExtends using RequestContent content = RequestContent.Create(new { derivedProp = 123.45F, + name = "", }); Response response = await client.PutAsync(content); @@ -128,6 +133,7 @@ ExtendsDifferentSpreadFloat client = new AdditionalPropertiesClient().GetExtends using RequestContent content = RequestContent.Create(new { derivedProp = 123.45F, + name = "", }); Response response = await client.PutAsync(content); @@ -143,6 +149,7 @@ ExtendsDifferentSpreadFloat client = new AdditionalPropertiesClient().GetExtends using RequestContent content = RequestContent.Create(new { derivedProp = 123.45F, + name = "", }); Response response = client.Put(content); @@ -155,6 +162,7 @@ ExtendsDifferentSpreadFloat client = new AdditionalPropertiesClient().GetExtends using RequestContent content = RequestContent.Create(new { derivedProp = 123.45F, + name = "", }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadModel.xml b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadModel.xml index 1b7a82c0733..ae2c8517e50 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadModel.xml +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadModel.xml @@ -41,6 +41,7 @@ Response response = await client.GetExtendsDifferentSpreadModelAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("knownProp").ToString()); ]]> This sample shows how to call GetExtendsDifferentSpreadModelAsync with all parameters and parse the result. @@ -62,6 +64,7 @@ Response response = client.GetExtendsDifferentSpreadModel(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("knownProp").ToString()); ]]> This sample shows how to call GetExtendsDifferentSpreadModel with all parameters and parse the result. @@ -79,14 +83,14 @@ This sample shows how to call PutAsync. ")); +DifferentSpreadModelDerived body = new DifferentSpreadModelDerived("", new ModelForRecord("")); Response response = await client.PutAsync(body); ]]> This sample shows how to call PutAsync with all parameters. ")); +DifferentSpreadModelDerived body = new DifferentSpreadModelDerived("", new ModelForRecord("")); Response response = await client.PutAsync(body); ]]> @@ -96,14 +100,14 @@ This sample shows how to call Put. ")); +DifferentSpreadModelDerived body = new DifferentSpreadModelDerived("", new ModelForRecord("")); Response response = client.Put(body); ]]> This sample shows how to call Put with all parameters. ")); +DifferentSpreadModelDerived body = new DifferentSpreadModelDerived("", new ModelForRecord("")); Response response = client.Put(body); ]]> @@ -119,6 +123,7 @@ using RequestContent content = RequestContent.Create(new { state = "", }, + knownProp = "", }); Response response = await client.PutAsync(content); @@ -134,6 +139,7 @@ using RequestContent content = RequestContent.Create(new { state = "", }, + knownProp = "", }); Response response = await client.PutAsync(content); @@ -152,6 +158,7 @@ using RequestContent content = RequestContent.Create(new { state = "", }, + knownProp = "", }); Response response = client.Put(content); @@ -167,6 +174,7 @@ using RequestContent content = RequestContent.Create(new { state = "", }, + knownProp = "", }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadModelArray.xml b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadModelArray.xml index 3c306ea2366..1d990df3262 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadModelArray.xml +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadModelArray.xml @@ -41,6 +41,7 @@ Response response = await client.GetExtendsDifferentSpreadModelArrayAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp")[0].GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("knownProp").ToString()); ]]> This sample shows how to call GetExtendsDifferentSpreadModelArrayAsync with all parameters and parse the result. @@ -62,6 +64,7 @@ Response response = client.GetExtendsDifferentSpreadModelArray(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp")[0].GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("knownProp").ToString()); ]]> This sample shows how to call GetExtendsDifferentSpreadModelArray with all parameters and parse the result. @@ -79,7 +83,7 @@ This sample shows how to call PutAsync. ", new ModelForRecord[] { new ModelForRecord("") }); @@ -89,7 +93,7 @@ This sample shows how to call PutAsync with all parameters. ", new ModelForRecord[] { new ModelForRecord("") }); @@ -102,7 +106,7 @@ This sample shows how to call Put. ", new ModelForRecord[] { new ModelForRecord("") }); @@ -112,7 +116,7 @@ This sample shows how to call Put with all parameters. ", new ModelForRecord[] { new ModelForRecord("") }); @@ -134,6 +138,7 @@ using RequestContent content = RequestContent.Create(new state = "", } }, + knownProp = "", }); Response response = await client.PutAsync(content); @@ -152,6 +157,7 @@ using RequestContent content = RequestContent.Create(new state = "", } }, + knownProp = "", }); Response response = await client.PutAsync(content); @@ -173,6 +179,7 @@ using RequestContent content = RequestContent.Create(new state = "", } }, + knownProp = "", }); Response response = client.Put(content); @@ -191,6 +198,7 @@ using RequestContent content = RequestContent.Create(new state = "", } }, + knownProp = "", }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadString.xml b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadString.xml index 518f0271dfb..8518d533c83 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadString.xml +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Docs/ExtendsDifferentSpreadString.xml @@ -41,6 +41,7 @@ Response response = await client.GetExtendsDifferentSpreadStringAsync(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); ]]> This sample shows how to call GetExtendsDifferentSpreadStringAsync with all parameters and parse the result. @@ -62,6 +64,7 @@ Response response = client.GetExtendsDifferentSpreadString(null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); ]]> This sample shows how to call GetExtendsDifferentSpreadString with all parameters and parse the result. @@ -79,14 +83,14 @@ This sample shows how to call PutAsync. "); +DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(123.45F, ""); Response response = await client.PutAsync(body); ]]> This sample shows how to call PutAsync with all parameters. "); +DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(123.45F, ""); Response response = await client.PutAsync(body); ]]> @@ -96,14 +100,14 @@ This sample shows how to call Put. "); +DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(123.45F, ""); Response response = client.Put(body); ]]> This sample shows how to call Put with all parameters. "); +DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(123.45F, ""); Response response = client.Put(body); ]]> @@ -116,6 +120,7 @@ ExtendsDifferentSpreadString client = new AdditionalPropertiesClient().GetExtend using RequestContent content = RequestContent.Create(new { derivedProp = "", + id = 123.45F, }); Response response = await client.PutAsync(content); @@ -128,6 +133,7 @@ ExtendsDifferentSpreadString client = new AdditionalPropertiesClient().GetExtend using RequestContent content = RequestContent.Create(new { derivedProp = "", + id = 123.45F, }); Response response = await client.PutAsync(content); @@ -143,6 +149,7 @@ ExtendsDifferentSpreadString client = new AdditionalPropertiesClient().GetExtend using RequestContent content = RequestContent.Create(new { derivedProp = "", + id = 123.45F, }); Response response = client.Put(content); @@ -155,6 +162,7 @@ ExtendsDifferentSpreadString client = new AdditionalPropertiesClient().GetExtend using RequestContent content = RequestContent.Create(new { derivedProp = "", + id = 123.45F, }); Response response = client.Put(content); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs index 025b9af0e00..f2f0117a72c 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.Serialization.cs @@ -29,6 +29,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); @@ -58,6 +60,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()) @@ -67,10 +70,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) @@ -106,14 +114,14 @@ DifferentSpreadFloatDerived IPersistableModel.Creat /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DifferentSpreadFloatDerived FromResponse(Response response) + internal static new DifferentSpreadFloatDerived FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeDifferentSpreadFloatDerived(document.RootElement); } /// Convert into a . - internal virtual RequestContent ToRequestContent() + internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs index 798bcc86c52..78955286e5d 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatDerived.cs @@ -5,28 +5,32 @@ #nullable disable +using System; using System.Collections.Generic; namespace _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. @@ -36,7 +40,5 @@ internal DifferentSpreadFloatDerived() /// The index property. public float DerivedProp { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs new file mode 100644 index 00000000000..d60e8bda47d --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.Serialization.cs @@ -0,0 +1,123 @@ +// 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; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadFloatRecord : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + 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 response to deserialize the model from. + internal static DifferentSpreadFloatRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDifferentSpreadFloatRecord(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs new file mode 100644 index 00000000000..a4c9e015af1 --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadFloatRecord.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _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/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs index f2fde538807..8a0ba67f4ff 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.Serialization.cs @@ -34,6 +34,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); @@ -68,6 +70,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()) @@ -82,6 +85,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()) { @@ -90,7 +98,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) @@ -126,14 +134,14 @@ DifferentSpreadModelArrayDerived IPersistableModel Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DifferentSpreadModelArrayDerived FromResponse(Response response) + internal static new DifferentSpreadModelArrayDerived FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeDifferentSpreadModelArrayDerived(document.RootElement); } /// Convert into a . - internal virtual RequestContent ToRequestContent() + internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs index aaeeb7503cf..be5ad6c5f09 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayDerived.cs @@ -12,26 +12,27 @@ namespace _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. @@ -41,7 +42,5 @@ internal DifferentSpreadModelArrayDerived() /// The index property. public IList DerivedProp { get; } - /// Additional Properties. - public IDictionary> AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs new file mode 100644 index 00000000000..d528ea09c8e --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.Serialization.cs @@ -0,0 +1,133 @@ +// 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; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelArrayRecord : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + 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 response to deserialize the model from. + internal static DifferentSpreadModelArrayRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDifferentSpreadModelArrayRecord(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs new file mode 100644 index 00000000000..a05a3ed72ab --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelArrayRecord.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _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/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs index 7d45014e46d..74fe22d7d95 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.Serialization.cs @@ -29,6 +29,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); @@ -58,6 +60,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()) @@ -67,10 +70,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) @@ -106,14 +114,14 @@ DifferentSpreadModelDerived IPersistableModel.Creat /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DifferentSpreadModelDerived FromResponse(Response response) + internal static new DifferentSpreadModelDerived FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeDifferentSpreadModelDerived(document.RootElement); } /// Convert into a . - internal virtual RequestContent ToRequestContent() + internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs index 665451dda6b..fefb866a194 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelDerived.cs @@ -11,26 +11,27 @@ namespace _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. @@ -40,7 +41,5 @@ internal DifferentSpreadModelDerived() /// The index property. public ModelForRecord DerivedProp { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs new file mode 100644 index 00000000000..ca9944a04bf --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.Serialization.cs @@ -0,0 +1,123 @@ +// 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; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadModelRecord : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + 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 response to deserialize the model from. + internal static DifferentSpreadModelRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDifferentSpreadModelRecord(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs new file mode 100644 index 00000000000..777cf698d67 --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadModelRecord.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace _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/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs index 0592b89757d..0aa5520e2fa 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.Serialization.cs @@ -29,6 +29,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); @@ -58,6 +60,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()) @@ -67,10 +70,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) @@ -106,14 +114,14 @@ DifferentSpreadStringDerived IPersistableModel.Cre /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DifferentSpreadStringDerived FromResponse(Response response) + internal static new DifferentSpreadStringDerived FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeDifferentSpreadStringDerived(document.RootElement); } /// Convert into a . - internal virtual RequestContent ToRequestContent() + internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs index 7c8a328028c..b07287811ca 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringDerived.cs @@ -11,26 +11,26 @@ namespace _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. @@ -40,7 +40,5 @@ internal DifferentSpreadStringDerived() /// The index property. public string DerivedProp { get; set; } - /// Additional Properties. - public IDictionary AdditionalProperties { get; } } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs new file mode 100644 index 00000000000..73017ec3a61 --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.Serialization.cs @@ -0,0 +1,123 @@ +// 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; + +namespace _Type.Property.AdditionalProperties.Models +{ + public partial class DifferentSpreadStringRecord : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + 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 response to deserialize the model from. + internal static DifferentSpreadStringRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDifferentSpreadStringRecord(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs new file mode 100644 index 00000000000..e7db4180148 --- /dev/null +++ b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/Models/DifferentSpreadStringRecord.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace _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/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json index 66ab31006e4..e58d6eab452 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/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" diff --git a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadFloat.cs b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadFloat.cs index a004b50f918..c7393d13560 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadFloat.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadFloat.cs @@ -28,6 +28,7 @@ public void Example_ExtendsDifferentSpreadFloat_GetExtendsDifferentSpreadFloat_S JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -40,6 +41,7 @@ public async Task Example_ExtendsDifferentSpreadFloat_GetExtendsDifferentSpreadF JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -70,6 +72,7 @@ public void Example_ExtendsDifferentSpreadFloat_GetExtendsDifferentSpreadFloat_A JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -82,6 +85,7 @@ public async Task Example_ExtendsDifferentSpreadFloat_GetExtendsDifferentSpreadF JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); } [Test] @@ -111,6 +115,7 @@ public void Example_ExtendsDifferentSpreadFloat_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { derivedProp = 123.45F, + name = "", }); Response response = client.Put(content); @@ -126,6 +131,7 @@ public async Task Example_ExtendsDifferentSpreadFloat_Put_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { derivedProp = 123.45F, + name = "", }); Response response = await client.PutAsync(content); @@ -138,7 +144,7 @@ public void Example_ExtendsDifferentSpreadFloat_Put_ShortVersion_Convenience() { ExtendsDifferentSpreadFloat client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadFloatClient(); - DifferentSpreadFloatDerived body = new DifferentSpreadFloatDerived(123.45F); + DifferentSpreadFloatDerived body = new DifferentSpreadFloatDerived("", 123.45F); Response response = client.Put(body); } @@ -148,7 +154,7 @@ public async Task Example_ExtendsDifferentSpreadFloat_Put_ShortVersion_Convenien { ExtendsDifferentSpreadFloat client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadFloatClient(); - DifferentSpreadFloatDerived body = new DifferentSpreadFloatDerived(123.45F); + DifferentSpreadFloatDerived body = new DifferentSpreadFloatDerived("", 123.45F); Response response = await client.PutAsync(body); } @@ -161,6 +167,7 @@ public void Example_ExtendsDifferentSpreadFloat_Put_AllParameters() using RequestContent content = RequestContent.Create(new { derivedProp = 123.45F, + name = "", }); Response response = client.Put(content); @@ -176,6 +183,7 @@ public async Task Example_ExtendsDifferentSpreadFloat_Put_AllParameters_Async() using RequestContent content = RequestContent.Create(new { derivedProp = 123.45F, + name = "", }); Response response = await client.PutAsync(content); @@ -188,7 +196,7 @@ public void Example_ExtendsDifferentSpreadFloat_Put_AllParameters_Convenience() { ExtendsDifferentSpreadFloat client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadFloatClient(); - DifferentSpreadFloatDerived body = new DifferentSpreadFloatDerived(123.45F); + DifferentSpreadFloatDerived body = new DifferentSpreadFloatDerived("", 123.45F); Response response = client.Put(body); } @@ -198,7 +206,7 @@ public async Task Example_ExtendsDifferentSpreadFloat_Put_AllParameters_Convenie { ExtendsDifferentSpreadFloat client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadFloatClient(); - DifferentSpreadFloatDerived body = new DifferentSpreadFloatDerived(123.45F); + DifferentSpreadFloatDerived body = new DifferentSpreadFloatDerived("", 123.45F); Response response = await client.PutAsync(body); } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadModel.cs b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadModel.cs index 8c64f8713b1..d550dfc6844 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadModel.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadModel.cs @@ -28,6 +28,7 @@ public void Example_ExtendsDifferentSpreadModel_GetExtendsDifferentSpreadModel_S JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("knownProp").ToString()); } [Test] @@ -40,6 +41,7 @@ public async Task Example_ExtendsDifferentSpreadModel_GetExtendsDifferentSpreadM JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("knownProp").ToString()); } [Test] @@ -70,6 +72,7 @@ public void Example_ExtendsDifferentSpreadModel_GetExtendsDifferentSpreadModel_A JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("knownProp").ToString()); } [Test] @@ -82,6 +85,7 @@ public async Task Example_ExtendsDifferentSpreadModel_GetExtendsDifferentSpreadM JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("knownProp").ToString()); } [Test] @@ -114,6 +118,7 @@ public void Example_ExtendsDifferentSpreadModel_Put_ShortVersion() { state = "", }, + knownProp = "", }); Response response = client.Put(content); @@ -132,6 +137,7 @@ public async Task Example_ExtendsDifferentSpreadModel_Put_ShortVersion_Async() { state = "", }, + knownProp = "", }); Response response = await client.PutAsync(content); @@ -144,7 +150,7 @@ public void Example_ExtendsDifferentSpreadModel_Put_ShortVersion_Convenience() { ExtendsDifferentSpreadModel client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadModelClient(); - DifferentSpreadModelDerived body = new DifferentSpreadModelDerived(new ModelForRecord("")); + DifferentSpreadModelDerived body = new DifferentSpreadModelDerived("", new ModelForRecord("")); Response response = client.Put(body); } @@ -154,7 +160,7 @@ public async Task Example_ExtendsDifferentSpreadModel_Put_ShortVersion_Convenien { ExtendsDifferentSpreadModel client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadModelClient(); - DifferentSpreadModelDerived body = new DifferentSpreadModelDerived(new ModelForRecord("")); + DifferentSpreadModelDerived body = new DifferentSpreadModelDerived("", new ModelForRecord("")); Response response = await client.PutAsync(body); } @@ -170,6 +176,7 @@ public void Example_ExtendsDifferentSpreadModel_Put_AllParameters() { state = "", }, + knownProp = "", }); Response response = client.Put(content); @@ -188,6 +195,7 @@ public async Task Example_ExtendsDifferentSpreadModel_Put_AllParameters_Async() { state = "", }, + knownProp = "", }); Response response = await client.PutAsync(content); @@ -200,7 +208,7 @@ public void Example_ExtendsDifferentSpreadModel_Put_AllParameters_Convenience() { ExtendsDifferentSpreadModel client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadModelClient(); - DifferentSpreadModelDerived body = new DifferentSpreadModelDerived(new ModelForRecord("")); + DifferentSpreadModelDerived body = new DifferentSpreadModelDerived("", new ModelForRecord("")); Response response = client.Put(body); } @@ -210,7 +218,7 @@ public async Task Example_ExtendsDifferentSpreadModel_Put_AllParameters_Convenie { ExtendsDifferentSpreadModel client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadModelClient(); - DifferentSpreadModelDerived body = new DifferentSpreadModelDerived(new ModelForRecord("")); + DifferentSpreadModelDerived body = new DifferentSpreadModelDerived("", new ModelForRecord("")); Response response = await client.PutAsync(body); } } diff --git a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadModelArray.cs b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadModelArray.cs index 4b9dde4df89..287a134993a 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadModelArray.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadModelArray.cs @@ -28,6 +28,7 @@ public void Example_ExtendsDifferentSpreadModelArray_GetExtendsDifferentSpreadMo JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("knownProp").ToString()); } [Test] @@ -40,6 +41,7 @@ public async Task Example_ExtendsDifferentSpreadModelArray_GetExtendsDifferentSp JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("knownProp").ToString()); } [Test] @@ -70,6 +72,7 @@ public void Example_ExtendsDifferentSpreadModelArray_GetExtendsDifferentSpreadMo JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("knownProp").ToString()); } [Test] @@ -82,6 +85,7 @@ public async Task Example_ExtendsDifferentSpreadModelArray_GetExtendsDifferentSp JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp")[0].GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("knownProp").ToString()); } [Test] @@ -117,6 +121,7 @@ public void Example_ExtendsDifferentSpreadModelArray_Put_ShortVersion() state = "", } }, + knownProp = "", }); Response response = client.Put(content); @@ -138,6 +143,7 @@ public async Task Example_ExtendsDifferentSpreadModelArray_Put_ShortVersion_Asyn state = "", } }, + knownProp = "", }); Response response = await client.PutAsync(content); @@ -150,7 +156,7 @@ public void Example_ExtendsDifferentSpreadModelArray_Put_ShortVersion_Convenienc { ExtendsDifferentSpreadModelArray client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadModelArrayClient(); - DifferentSpreadModelArrayDerived body = new DifferentSpreadModelArrayDerived(new ModelForRecord[] + DifferentSpreadModelArrayDerived body = new DifferentSpreadModelArrayDerived("", new ModelForRecord[] { new ModelForRecord("") }); @@ -163,7 +169,7 @@ public async Task Example_ExtendsDifferentSpreadModelArray_Put_ShortVersion_Conv { ExtendsDifferentSpreadModelArray client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadModelArrayClient(); - DifferentSpreadModelArrayDerived body = new DifferentSpreadModelArrayDerived(new ModelForRecord[] + DifferentSpreadModelArrayDerived body = new DifferentSpreadModelArrayDerived("", new ModelForRecord[] { new ModelForRecord("") }); @@ -185,6 +191,7 @@ public void Example_ExtendsDifferentSpreadModelArray_Put_AllParameters() state = "", } }, + knownProp = "", }); Response response = client.Put(content); @@ -206,6 +213,7 @@ public async Task Example_ExtendsDifferentSpreadModelArray_Put_AllParameters_Asy state = "", } }, + knownProp = "", }); Response response = await client.PutAsync(content); @@ -218,7 +226,7 @@ public void Example_ExtendsDifferentSpreadModelArray_Put_AllParameters_Convenien { ExtendsDifferentSpreadModelArray client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadModelArrayClient(); - DifferentSpreadModelArrayDerived body = new DifferentSpreadModelArrayDerived(new ModelForRecord[] + DifferentSpreadModelArrayDerived body = new DifferentSpreadModelArrayDerived("", new ModelForRecord[] { new ModelForRecord("") }); @@ -231,7 +239,7 @@ public async Task Example_ExtendsDifferentSpreadModelArray_Put_AllParameters_Con { ExtendsDifferentSpreadModelArray client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadModelArrayClient(); - DifferentSpreadModelArrayDerived body = new DifferentSpreadModelArrayDerived(new ModelForRecord[] + DifferentSpreadModelArrayDerived body = new DifferentSpreadModelArrayDerived("", new ModelForRecord[] { new ModelForRecord("") }); diff --git a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadString.cs b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadString.cs index 74cccbe6fdc..aafec475e97 100644 --- a/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadString.cs +++ b/test/CadlRanchProjects/type/property/additional-properties/tests/Generated/Samples/Samples_ExtendsDifferentSpreadString.cs @@ -28,6 +28,7 @@ public void Example_ExtendsDifferentSpreadString_GetExtendsDifferentSpreadString JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] @@ -40,6 +41,7 @@ public async Task Example_ExtendsDifferentSpreadString_GetExtendsDifferentSpread JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] @@ -70,6 +72,7 @@ public void Example_ExtendsDifferentSpreadString_GetExtendsDifferentSpreadString JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] @@ -82,6 +85,7 @@ public async Task Example_ExtendsDifferentSpreadString_GetExtendsDifferentSpread JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("derivedProp").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); } [Test] @@ -111,6 +115,7 @@ public void Example_ExtendsDifferentSpreadString_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { derivedProp = "", + id = 123.45F, }); Response response = client.Put(content); @@ -126,6 +131,7 @@ public async Task Example_ExtendsDifferentSpreadString_Put_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { derivedProp = "", + id = 123.45F, }); Response response = await client.PutAsync(content); @@ -138,7 +144,7 @@ public void Example_ExtendsDifferentSpreadString_Put_ShortVersion_Convenience() { ExtendsDifferentSpreadString client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadStringClient(); - DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(""); + DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(123.45F, ""); Response response = client.Put(body); } @@ -148,7 +154,7 @@ public async Task Example_ExtendsDifferentSpreadString_Put_ShortVersion_Convenie { ExtendsDifferentSpreadString client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadStringClient(); - DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(""); + DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(123.45F, ""); Response response = await client.PutAsync(body); } @@ -161,6 +167,7 @@ public void Example_ExtendsDifferentSpreadString_Put_AllParameters() using RequestContent content = RequestContent.Create(new { derivedProp = "", + id = 123.45F, }); Response response = client.Put(content); @@ -176,6 +183,7 @@ public async Task Example_ExtendsDifferentSpreadString_Put_AllParameters_Async() using RequestContent content = RequestContent.Create(new { derivedProp = "", + id = 123.45F, }); Response response = await client.PutAsync(content); @@ -188,7 +196,7 @@ public void Example_ExtendsDifferentSpreadString_Put_AllParameters_Convenience() { ExtendsDifferentSpreadString client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadStringClient(); - DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(""); + DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(123.45F, ""); Response response = client.Put(body); } @@ -198,7 +206,7 @@ public async Task Example_ExtendsDifferentSpreadString_Put_AllParameters_Conveni { ExtendsDifferentSpreadString client = new AdditionalPropertiesClient().GetExtendsDifferentSpreadStringClient(); - DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(""); + DifferentSpreadStringDerived body = new DifferentSpreadStringDerived(123.45F, ""); Response response = await client.PutAsync(body); } } 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/tspCodeModel.json b/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json index 9fd3d359dc6..2cfbb209221 100644 --- a/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/nullable/src/Generated/tspCodeModel.json @@ -114,7 +114,7 @@ "Type": { "$id": "16", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": true }, "IsRequired": true, 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 57d93defecc..756e56ecf6c 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 @@ -203,7 +203,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); @@ -219,7 +219,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); @@ -235,7 +235,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); @@ -251,7 +251,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); @@ -267,7 +267,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); @@ -283,7 +283,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); @@ -299,7 +299,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); @@ -315,7 +315,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 36a0fa86e41..1bcf1934c26 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 @@ -30,14 +30,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) { @@ -77,7 +70,7 @@ internal static UnionFloatLiteralProperty DeserializeUnionFloatLiteralProperty(J { return null; } - BinaryData property = default; + UnionFloatLiteralPropertyProperty? property = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property0 in element.EnumerateObject()) @@ -88,7 +81,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 2800f7add86..5f94783f86e 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 @@ -30,14 +30,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) { @@ -77,7 +70,7 @@ internal static UnionIntLiteralProperty DeserializeUnionIntLiteralProperty(JsonE { return null; } - BinaryData property = default; + UnionIntLiteralPropertyProperty? property = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property0 in element.EnumerateObject()) @@ -88,7 +81,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 32487c072f1..819ab00726f 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 @@ -30,7 +30,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) { @@ -81,7 +81,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..41221690256 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,12 +139,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "9", + "$id": "18", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "10", + "$id": "19", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -89,7 +155,7 @@ ] }, { - "$id": "11", + "$id": "20", "Kind": "Model", "Name": "BytesProperty", "Namespace": "Type.Property.Optional", @@ -98,12 +164,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "12", + "$id": "21", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "13", + "$id": "22", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -114,7 +180,7 @@ ] }, { - "$id": "14", + "$id": "23", "Kind": "Model", "Name": "DatetimeProperty", "Namespace": "Type.Property.Optional", @@ -123,14 +189,14 @@ "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, @@ -139,7 +205,7 @@ ] }, { - "$id": "17", + "$id": "26", "Kind": "Model", "Name": "DurationProperty", "Namespace": "Type.Property.Optional", @@ -148,12 +214,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "18", + "$id": "27", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "19", + "$id": "28", "Kind": "Primitive", "Name": "DurationISO8601", "IsNullable": false @@ -164,7 +230,7 @@ ] }, { - "$id": "20", + "$id": "29", "Kind": "Model", "Name": "CollectionsByteProperty", "Namespace": "Type.Property.Optional", @@ -173,16 +239,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 @@ -195,7 +261,7 @@ ] }, { - "$id": "24", + "$id": "33", "Kind": "Model", "Name": "CollectionsModelProperty", "Namespace": "Type.Property.Optional", @@ -204,16 +270,16 @@ "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 }, @@ -223,7 +289,7 @@ ] }, { - "$id": "27", + "$id": "36", "Kind": "Model", "Name": "StringLiteralProperty", "Namespace": "Type.Property.Optional", @@ -232,12 +298,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "28", + "$id": "37", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "29", + "$id": "38", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -252,7 +318,7 @@ ] }, { - "$id": "30", + "$id": "39", "Kind": "Model", "Name": "IntLiteralProperty", "Namespace": "Type.Property.Optional", @@ -261,12 +327,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "31", + "$id": "40", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "32", + "$id": "41", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -281,7 +347,7 @@ ] }, { - "$id": "33", + "$id": "42", "Kind": "Model", "Name": "FloatLiteralProperty", "Namespace": "Type.Property.Optional", @@ -290,12 +356,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "34", + "$id": "43", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "35", + "$id": "44", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -310,7 +376,7 @@ ] }, { - "$id": "36", + "$id": "45", "Kind": "Model", "Name": "BooleanLiteralProperty", "Namespace": "Type.Property.Optional", @@ -319,16 +385,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 @@ -342,7 +408,7 @@ ] }, { - "$id": "40", + "$id": "49", "Kind": "Model", "Name": "UnionStringLiteralProperty", "Namespace": "Type.Property.Optional", @@ -351,43 +417,12 @@ "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 @@ -395,7 +430,7 @@ ] }, { - "$id": "47", + "$id": "51", "Kind": "Model", "Name": "UnionIntLiteralProperty", "Namespace": "Type.Property.Optional", @@ -404,43 +439,12 @@ "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 @@ -448,7 +452,7 @@ ] }, { - "$id": "54", + "$id": "53", "Kind": "Model", "Name": "UnionFloatLiteralProperty", "Namespace": "Type.Property.Optional", @@ -457,43 +461,12 @@ "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 @@ -501,7 +474,7 @@ ] }, { - "$id": "61", + "$id": "55", "Kind": "Model", "Name": "RequiredAndOptionalProperty", "Namespace": "Type.Property.Optional", @@ -510,12 +483,12 @@ "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 @@ -524,12 +497,12 @@ "IsReadOnly": false }, { - "$id": "64", + "$id": "58", "Name": "requiredProperty", "SerializedName": "requiredProperty", "Description": "required int property", "Type": { - "$id": "65", + "$id": "59", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -542,33 +515,33 @@ ], "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 +556,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "72", + "$id": "66", "Type": { - "$id": "73", + "$id": "67", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -594,11 +567,11 @@ } }, { - "$id": "74", + "$id": "68", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "75", + "$id": "69", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -613,9 +586,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "76", + "$id": "70", "Type": { - "$ref": "75" + "$ref": "69" }, "Value": "application/json" } @@ -623,12 +596,12 @@ ], "Responses": [ { - "$id": "77", + "$id": "71", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "8" + "$ref": "17" }, "BodyMediaType": "Json", "Headers": [], @@ -647,20 +620,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 +648,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "81", + "$id": "75", "Type": { - "$ref": "80" + "$ref": "74" }, "Value": "application/json" } @@ -685,12 +658,12 @@ ], "Responses": [ { - "$id": "82", + "$id": "76", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "8" + "$ref": "17" }, "BodyMediaType": "Json", "Headers": [], @@ -709,20 +682,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 +708,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 +727,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 +754,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "90", + "$id": "84", "Type": { - "$ref": "89" + "$ref": "83" }, "Value": "application/json" } @@ -791,7 +764,7 @@ ], "Responses": [ { - "$id": "91", + "$id": "85", "StatusCodes": [ 204 ], @@ -812,20 +785,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 +811,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 +830,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 +857,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "99", + "$id": "93", "Type": { - "$ref": "98" + "$ref": "92" }, "Value": "application/json" } @@ -894,7 +867,7 @@ ], "Responses": [ { - "$id": "100", + "$id": "94", "StatusCodes": [ 204 ], @@ -916,31 +889,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 +928,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "106", + "$id": "100", "Type": { - "$ref": "105" + "$ref": "99" }, "Value": "application/json" } @@ -965,12 +938,12 @@ ], "Responses": [ { - "$id": "107", + "$id": "101", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "11" + "$ref": "20" }, "BodyMediaType": "Json", "Headers": [], @@ -989,20 +962,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 +990,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "111", + "$id": "105", "Type": { - "$ref": "110" + "$ref": "104" }, "Value": "application/json" } @@ -1027,12 +1000,12 @@ ], "Responses": [ { - "$id": "112", + "$id": "106", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "11" + "$ref": "20" }, "BodyMediaType": "Json", "Headers": [], @@ -1051,20 +1024,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 +1050,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 +1069,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 +1096,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "120", + "$id": "114", "Type": { - "$ref": "119" + "$ref": "113" }, "Value": "application/json" } @@ -1133,7 +1106,7 @@ ], "Responses": [ { - "$id": "121", + "$id": "115", "StatusCodes": [ 204 ], @@ -1154,20 +1127,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 +1153,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 +1172,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 +1199,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "129", + "$id": "123", "Type": { - "$ref": "128" + "$ref": "122" }, "Value": "application/json" } @@ -1236,7 +1209,7 @@ ], "Responses": [ { - "$id": "130", + "$id": "124", "StatusCodes": [ 204 ], @@ -1258,31 +1231,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 +1270,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "136", + "$id": "130", "Type": { - "$ref": "135" + "$ref": "129" }, "Value": "application/json" } @@ -1307,12 +1280,12 @@ ], "Responses": [ { - "$id": "137", + "$id": "131", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "14" + "$ref": "23" }, "BodyMediaType": "Json", "Headers": [], @@ -1331,20 +1304,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 +1332,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "141", + "$id": "135", "Type": { - "$ref": "140" + "$ref": "134" }, "Value": "application/json" } @@ -1369,12 +1342,12 @@ ], "Responses": [ { - "$id": "142", + "$id": "136", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "14" + "$ref": "23" }, "BodyMediaType": "Json", "Headers": [], @@ -1393,20 +1366,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 +1392,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 +1411,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 +1438,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "150", + "$id": "144", "Type": { - "$ref": "149" + "$ref": "143" }, "Value": "application/json" } @@ -1475,7 +1448,7 @@ ], "Responses": [ { - "$id": "151", + "$id": "145", "StatusCodes": [ 204 ], @@ -1496,20 +1469,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 +1495,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 +1514,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 +1541,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "159", + "$id": "153", "Type": { - "$ref": "158" + "$ref": "152" }, "Value": "application/json" } @@ -1578,7 +1551,7 @@ ], "Responses": [ { - "$id": "160", + "$id": "154", "StatusCodes": [ 204 ], @@ -1600,31 +1573,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 +1612,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "166", + "$id": "160", "Type": { - "$ref": "165" + "$ref": "159" }, "Value": "application/json" } @@ -1649,12 +1622,12 @@ ], "Responses": [ { - "$id": "167", + "$id": "161", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "26" }, "BodyMediaType": "Json", "Headers": [], @@ -1673,20 +1646,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 +1674,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "171", + "$id": "165", "Type": { - "$ref": "170" + "$ref": "164" }, "Value": "application/json" } @@ -1711,12 +1684,12 @@ ], "Responses": [ { - "$id": "172", + "$id": "166", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "17" + "$ref": "26" }, "BodyMediaType": "Json", "Headers": [], @@ -1735,20 +1708,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 +1734,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 +1753,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 +1780,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "180", + "$id": "174", "Type": { - "$ref": "179" + "$ref": "173" }, "Value": "application/json" } @@ -1817,7 +1790,7 @@ ], "Responses": [ { - "$id": "181", + "$id": "175", "StatusCodes": [ 204 ], @@ -1838,20 +1811,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 +1837,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 +1856,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 +1883,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "189", + "$id": "183", "Type": { - "$ref": "188" + "$ref": "182" }, "Value": "application/json" } @@ -1920,7 +1893,7 @@ ], "Responses": [ { - "$id": "190", + "$id": "184", "StatusCodes": [ 204 ], @@ -1942,31 +1915,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 +1954,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "196", + "$id": "190", "Type": { - "$ref": "195" + "$ref": "189" }, "Value": "application/json" } @@ -1991,12 +1964,12 @@ ], "Responses": [ { - "$id": "197", + "$id": "191", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "20" + "$ref": "29" }, "BodyMediaType": "Json", "Headers": [], @@ -2015,20 +1988,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 +2016,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "201", + "$id": "195", "Type": { - "$ref": "200" + "$ref": "194" }, "Value": "application/json" } @@ -2053,12 +2026,12 @@ ], "Responses": [ { - "$id": "202", + "$id": "196", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "20" + "$ref": "29" }, "BodyMediaType": "Json", "Headers": [], @@ -2077,20 +2050,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 +2076,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 +2095,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 +2122,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "210", + "$id": "204", "Type": { - "$ref": "209" + "$ref": "203" }, "Value": "application/json" } @@ -2159,7 +2132,7 @@ ], "Responses": [ { - "$id": "211", + "$id": "205", "StatusCodes": [ 204 ], @@ -2180,20 +2153,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 +2179,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 +2198,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 +2225,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "219", + "$id": "213", "Type": { - "$ref": "218" + "$ref": "212" }, "Value": "application/json" } @@ -2262,7 +2235,7 @@ ], "Responses": [ { - "$id": "220", + "$id": "214", "StatusCodes": [ 204 ], @@ -2284,31 +2257,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 +2296,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "220", "Type": { - "$ref": "225" + "$ref": "219" }, "Value": "application/json" } @@ -2333,12 +2306,12 @@ ], "Responses": [ { - "$id": "227", + "$id": "221", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "24" + "$ref": "33" }, "BodyMediaType": "Json", "Headers": [], @@ -2357,20 +2330,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 +2358,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "231", + "$id": "225", "Type": { - "$ref": "230" + "$ref": "224" }, "Value": "application/json" } @@ -2395,12 +2368,12 @@ ], "Responses": [ { - "$id": "232", + "$id": "226", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "24" + "$ref": "33" }, "BodyMediaType": "Json", "Headers": [], @@ -2419,20 +2392,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 +2418,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 +2437,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 +2464,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "240", + "$id": "234", "Type": { - "$ref": "239" + "$ref": "233" }, "Value": "application/json" } @@ -2501,7 +2474,7 @@ ], "Responses": [ { - "$id": "241", + "$id": "235", "StatusCodes": [ 204 ], @@ -2522,20 +2495,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 +2521,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 +2540,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 +2567,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "249", + "$id": "243", "Type": { - "$ref": "248" + "$ref": "242" }, "Value": "application/json" } @@ -2604,7 +2577,7 @@ ], "Responses": [ { - "$id": "250", + "$id": "244", "StatusCodes": [ 204 ], @@ -2626,31 +2599,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 +2638,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "250", "Type": { - "$ref": "255" + "$ref": "249" }, "Value": "application/json" } @@ -2675,12 +2648,12 @@ ], "Responses": [ { - "$id": "257", + "$id": "251", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "27" + "$ref": "36" }, "BodyMediaType": "Json", "Headers": [], @@ -2699,20 +2672,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 +2700,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "261", + "$id": "255", "Type": { - "$ref": "260" + "$ref": "254" }, "Value": "application/json" } @@ -2737,12 +2710,12 @@ ], "Responses": [ { - "$id": "262", + "$id": "256", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "27" + "$ref": "36" }, "BodyMediaType": "Json", "Headers": [], @@ -2761,20 +2734,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 +2760,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 +2779,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 +2806,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "270", + "$id": "264", "Type": { - "$ref": "269" + "$ref": "263" }, "Value": "application/json" } @@ -2843,7 +2816,7 @@ ], "Responses": [ { - "$id": "271", + "$id": "265", "StatusCodes": [ 204 ], @@ -2864,20 +2837,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 +2863,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 +2882,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 +2909,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "279", + "$id": "273", "Type": { - "$ref": "278" + "$ref": "272" }, "Value": "application/json" } @@ -2946,7 +2919,7 @@ ], "Responses": [ { - "$id": "280", + "$id": "274", "StatusCodes": [ 204 ], @@ -2968,31 +2941,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 +2980,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "286", + "$id": "280", "Type": { - "$ref": "285" + "$ref": "279" }, "Value": "application/json" } @@ -3017,12 +2990,12 @@ ], "Responses": [ { - "$id": "287", + "$id": "281", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "39" }, "BodyMediaType": "Json", "Headers": [], @@ -3041,20 +3014,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 +3042,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "291", + "$id": "285", "Type": { - "$ref": "290" + "$ref": "284" }, "Value": "application/json" } @@ -3079,12 +3052,12 @@ ], "Responses": [ { - "$id": "292", + "$id": "286", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "39" }, "BodyMediaType": "Json", "Headers": [], @@ -3103,20 +3076,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 +3102,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 +3121,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 +3148,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "300", + "$id": "294", "Type": { - "$ref": "299" + "$ref": "293" }, "Value": "application/json" } @@ -3185,7 +3158,7 @@ ], "Responses": [ { - "$id": "301", + "$id": "295", "StatusCodes": [ 204 ], @@ -3206,20 +3179,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 +3205,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 +3224,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 +3251,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "309", + "$id": "303", "Type": { - "$ref": "308" + "$ref": "302" }, "Value": "application/json" } @@ -3288,7 +3261,7 @@ ], "Responses": [ { - "$id": "310", + "$id": "304", "StatusCodes": [ 204 ], @@ -3310,31 +3283,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 +3322,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "316", + "$id": "310", "Type": { - "$ref": "315" + "$ref": "309" }, "Value": "application/json" } @@ -3359,12 +3332,12 @@ ], "Responses": [ { - "$id": "317", + "$id": "311", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "33" + "$ref": "42" }, "BodyMediaType": "Json", "Headers": [], @@ -3383,20 +3356,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 +3384,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "321", + "$id": "315", "Type": { - "$ref": "320" + "$ref": "314" }, "Value": "application/json" } @@ -3421,12 +3394,12 @@ ], "Responses": [ { - "$id": "322", + "$id": "316", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "33" + "$ref": "42" }, "BodyMediaType": "Json", "Headers": [], @@ -3445,20 +3418,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 +3444,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 +3463,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 +3490,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "330", + "$id": "324", "Type": { - "$ref": "329" + "$ref": "323" }, "Value": "application/json" } @@ -3527,7 +3500,7 @@ ], "Responses": [ { - "$id": "331", + "$id": "325", "StatusCodes": [ 204 ], @@ -3548,20 +3521,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 +3547,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 +3566,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 +3593,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "339", + "$id": "333", "Type": { - "$ref": "338" + "$ref": "332" }, "Value": "application/json" } @@ -3630,7 +3603,7 @@ ], "Responses": [ { - "$id": "340", + "$id": "334", "StatusCodes": [ 204 ], @@ -3652,31 +3625,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 +3664,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "346", + "$id": "340", "Type": { - "$ref": "345" + "$ref": "339" }, "Value": "application/json" } @@ -3701,12 +3674,12 @@ ], "Responses": [ { - "$id": "347", + "$id": "341", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "36" + "$ref": "45" }, "BodyMediaType": "Json", "Headers": [], @@ -3725,20 +3698,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 +3726,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "351", + "$id": "345", "Type": { - "$ref": "350" + "$ref": "344" }, "Value": "application/json" } @@ -3763,12 +3736,12 @@ ], "Responses": [ { - "$id": "352", + "$id": "346", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "36" + "$ref": "45" }, "BodyMediaType": "Json", "Headers": [], @@ -3787,20 +3760,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 +3786,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 +3805,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 +3832,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "360", + "$id": "354", "Type": { - "$ref": "359" + "$ref": "353" }, "Value": "application/json" } @@ -3869,7 +3842,7 @@ ], "Responses": [ { - "$id": "361", + "$id": "355", "StatusCodes": [ 204 ], @@ -3890,20 +3863,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 +3889,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 +3908,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 +3935,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "369", + "$id": "363", "Type": { - "$ref": "368" + "$ref": "362" }, "Value": "application/json" } @@ -3972,7 +3945,7 @@ ], "Responses": [ { - "$id": "370", + "$id": "364", "StatusCodes": [ 204 ], @@ -3994,31 +3967,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 +4006,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "376", + "$id": "370", "Type": { - "$ref": "375" + "$ref": "369" }, "Value": "application/json" } @@ -4043,12 +4016,12 @@ ], "Responses": [ { - "$id": "377", + "$id": "371", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "40" + "$ref": "49" }, "BodyMediaType": "Json", "Headers": [], @@ -4067,20 +4040,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 +4068,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "381", + "$id": "375", "Type": { - "$ref": "380" + "$ref": "374" }, "Value": "application/json" } @@ -4105,12 +4078,12 @@ ], "Responses": [ { - "$id": "382", + "$id": "376", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "40" + "$ref": "49" }, "BodyMediaType": "Json", "Headers": [], @@ -4129,20 +4102,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 +4128,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 +4147,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 +4174,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "390", + "$id": "384", "Type": { - "$ref": "389" + "$ref": "383" }, "Value": "application/json" } @@ -4211,7 +4184,7 @@ ], "Responses": [ { - "$id": "391", + "$id": "385", "StatusCodes": [ 204 ], @@ -4232,20 +4205,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 +4231,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 +4250,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 +4277,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "399", + "$id": "393", "Type": { - "$ref": "398" + "$ref": "392" }, "Value": "application/json" } @@ -4314,7 +4287,7 @@ ], "Responses": [ { - "$id": "400", + "$id": "394", "StatusCodes": [ 204 ], @@ -4336,31 +4309,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 +4348,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "406", + "$id": "400", "Type": { - "$ref": "405" + "$ref": "399" }, "Value": "application/json" } @@ -4385,12 +4358,12 @@ ], "Responses": [ { - "$id": "407", + "$id": "401", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "47" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -4409,20 +4382,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 +4410,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "411", + "$id": "405", "Type": { - "$ref": "410" + "$ref": "404" }, "Value": "application/json" } @@ -4447,12 +4420,12 @@ ], "Responses": [ { - "$id": "412", + "$id": "406", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "47" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -4471,20 +4444,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 +4470,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 +4489,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 +4516,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "420", + "$id": "414", "Type": { - "$ref": "419" + "$ref": "413" }, "Value": "application/json" } @@ -4553,7 +4526,7 @@ ], "Responses": [ { - "$id": "421", + "$id": "415", "StatusCodes": [ 204 ], @@ -4574,20 +4547,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 +4573,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 +4592,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 +4619,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "429", + "$id": "423", "Type": { - "$ref": "428" + "$ref": "422" }, "Value": "application/json" } @@ -4656,7 +4629,7 @@ ], "Responses": [ { - "$id": "430", + "$id": "424", "StatusCodes": [ 204 ], @@ -4678,31 +4651,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 +4690,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "436", + "$id": "430", "Type": { - "$ref": "435" + "$ref": "429" }, "Value": "application/json" } @@ -4727,12 +4700,12 @@ ], "Responses": [ { - "$id": "437", + "$id": "431", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "54" + "$ref": "53" }, "BodyMediaType": "Json", "Headers": [], @@ -4751,20 +4724,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 +4752,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "441", + "$id": "435", "Type": { - "$ref": "440" + "$ref": "434" }, "Value": "application/json" } @@ -4789,12 +4762,12 @@ ], "Responses": [ { - "$id": "442", + "$id": "436", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "54" + "$ref": "53" }, "BodyMediaType": "Json", "Headers": [], @@ -4813,20 +4786,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 +4812,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 +4831,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 +4858,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "450", + "$id": "444", "Type": { - "$ref": "449" + "$ref": "443" }, "Value": "application/json" } @@ -4895,7 +4868,7 @@ ], "Responses": [ { - "$id": "451", + "$id": "445", "StatusCodes": [ 204 ], @@ -4916,20 +4889,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 +4915,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 +4934,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 +4961,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "459", + "$id": "453", "Type": { - "$ref": "458" + "$ref": "452" }, "Value": "application/json" } @@ -4998,7 +4971,7 @@ ], "Responses": [ { - "$id": "460", + "$id": "454", "StatusCodes": [ 204 ], @@ -5020,31 +4993,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 +5032,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "466", + "$id": "460", "Type": { - "$ref": "465" + "$ref": "459" }, "Value": "application/json" } @@ -5069,12 +5042,12 @@ ], "Responses": [ { - "$id": "467", + "$id": "461", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "61" + "$ref": "55" }, "BodyMediaType": "Json", "Headers": [], @@ -5093,20 +5066,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 +5094,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "471", + "$id": "465", "Type": { - "$ref": "470" + "$ref": "464" }, "Value": "application/json" } @@ -5131,12 +5104,12 @@ ], "Responses": [ { - "$id": "472", + "$id": "466", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "61" + "$ref": "55" }, "BodyMediaType": "Json", "Headers": [], @@ -5155,20 +5128,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 +5154,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 +5173,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 +5200,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "480", + "$id": "474", "Type": { - "$ref": "479" + "$ref": "473" }, "Value": "application/json" } @@ -5237,7 +5210,7 @@ ], "Responses": [ { - "$id": "481", + "$id": "475", "StatusCodes": [ 204 ], @@ -5258,20 +5231,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 +5257,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 +5276,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 +5303,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "489", + "$id": "483", "Type": { - "$ref": "488" + "$ref": "482" }, "Value": "application/json" } @@ -5340,7 +5313,7 @@ ], "Responses": [ { - "$id": "490", + "$id": "484", "StatusCodes": [ 204 ], @@ -5362,7 +5335,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 4676383bdbb..7861b7c1861 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 @@ -238,7 +238,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); @@ -253,7 +253,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); @@ -268,7 +268,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); } @@ -281,7 +281,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); } @@ -338,7 +338,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); @@ -353,7 +353,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); @@ -368,7 +368,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); } @@ -381,7 +381,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 1824c59e34f..489cd58929f 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 @@ -238,7 +238,7 @@ public void Example_UnionFloatLiteral_PutAll_AllParameters() using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = client.PutAll(content); @@ -253,7 +253,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); @@ -268,7 +268,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); } @@ -281,7 +281,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); } @@ -338,7 +338,7 @@ public void Example_UnionFloatLiteral_PutDefault_AllParameters() using RequestContent content = RequestContent.Create(new { - property = 1.25, + property = 1.25F, }); Response response = client.PutDefault(content); @@ -353,7 +353,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); @@ -368,7 +368,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); } @@ -381,7 +381,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 fd3d3965f42..a9104bf2d69 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 @@ -268,7 +268,7 @@ public void Example_UnionIntLiteral_PutAll_AllParameters_Convenience() UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = client.PutAll(body); } @@ -281,7 +281,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); } @@ -368,7 +368,7 @@ public void Example_UnionIntLiteral_PutDefault_AllParameters_Convenience() UnionIntLiteralProperty body = new UnionIntLiteralProperty { - Property = BinaryData.FromObjectAsJson(1), + Property = UnionIntLiteralPropertyProperty._1, }; Response response = client.PutDefault(body); } @@ -381,7 +381,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/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 203e8eb3bcc..f796e221899 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 @@ -67,14 +67,14 @@ internal static UnionEnumValueProperty DeserializeUnionEnumValueProperty(JsonEle { return null; } - UnionEnumValuePropertyProperty property = default; + ExtendedEnum property = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property0 in element.EnumerateObject()) { if (property0.NameEquals("property"u8)) { - property = new UnionEnumValuePropertyProperty(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 da3fea3dadd..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 @@ -53,13 +53,13 @@ public UnionEnumValueProperty() /// Initializes a new instance of . /// Property. /// Keeps track of any properties unknown to the library. - internal UnionEnumValueProperty(UnionEnumValuePropertyProperty property, IDictionary serializedAdditionalRawData) + internal UnionEnumValueProperty(ExtendedEnum property, IDictionary serializedAdditionalRawData) { Property = property; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Property. - public UnionEnumValuePropertyProperty Property { get; } = UnionEnumValuePropertyProperty.Value2; + public ExtendedEnum Property { get; } = ExtendedEnum.EnumValue2; } } diff --git a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValuePropertyProperty.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValuePropertyProperty.cs deleted file mode 100644 index 94ba3392438..00000000000 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionEnumValuePropertyProperty.cs +++ /dev/null @@ -1,48 +0,0 @@ -// 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 UnionEnumValueProperty_property. - public readonly partial struct UnionEnumValuePropertyProperty : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public UnionEnumValuePropertyProperty(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Value2Value = "value2"; - - /// value2. - public static UnionEnumValuePropertyProperty Value2 { get; } = new UnionEnumValuePropertyProperty(Value2Value); - /// Determines if two values are the same. - public static bool operator ==(UnionEnumValuePropertyProperty left, UnionEnumValuePropertyProperty right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UnionEnumValuePropertyProperty left, UnionEnumValuePropertyProperty right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UnionEnumValuePropertyProperty(string value) => new UnionEnumValuePropertyProperty(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UnionEnumValuePropertyProperty other && Equals(other); - /// - public bool Equals(UnionEnumValuePropertyProperty 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/UnionFloatLiteralProperty.Serialization.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/Models/UnionFloatLiteralProperty.Serialization.cs index ea17803fa85..a4fdb92d2dd 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 @@ -28,14 +28,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) @@ -74,14 +67,14 @@ internal static UnionFloatLiteralProperty DeserializeUnionFloatLiteralProperty(J { return null; } - BinaryData property = default; + UnionFloatLiteralPropertyProperty property = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 47f7b954007..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 @@ -47,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; @@ -69,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 92b8b71dea5..e3fe87dc578 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 @@ -28,14 +28,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) @@ -74,14 +67,14 @@ internal static UnionIntLiteralProperty DeserializeUnionIntLiteralProperty(JsonE { return null; } - BinaryData property = default; + UnionIntLiteralPropertyProperty property = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 70f5d8628df..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 @@ -47,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; @@ -69,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 3b37ee15d97..7e7c9ab5015 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 @@ -28,7 +28,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) @@ -74,7 +74,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/TypePropertyValueTypesModelFactory.cs b/test/CadlRanchProjects/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs index 9c248426dd5..5f1f1f923ba 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs @@ -45,7 +45,7 @@ public static BooleanLiteralProperty BooleanLiteralProperty(bool property = defa /// Initializes a new instance of . /// Property. /// A new instance for mocking. - public static UnionEnumValueProperty UnionEnumValueProperty(UnionEnumValuePropertyProperty property = default) + 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 998df278c5b..fb7416ebc01 100644 --- a/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/property/value-types/src/Generated/tspCodeModel.json @@ -33,7 +33,7 @@ "$id": "5", "Kind": "Enum", "Name": "InnerEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "6", @@ -114,18 +114,82 @@ { "$id": "14", "Kind": "Enum", - "Name": "UnionEnumValueProperty_property", + "Name": "UnionStringLiteralPropertyProperty", "EnumValueType": "String", "AllowedValues": [ { "$id": "15", - "Name": "value2", - "Value": "value2", - "Description": "value2" + "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" + }, + { + "$id": "23", + "Kind": "Enum", + "Name": "ExtendedEnum", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "24", + "Name": "EnumValue2", + "Value": "value2" } ], "Namespace": "Type.Property.ValueTypes", - "Description": "The UnionEnumValueProperty_property", "IsExtensible": true, "IsNullable": false, "Usage": "RoundTrip" @@ -133,7 +197,7 @@ ], "Models": [ { - "$id": "16", + "$id": "25", "Kind": "Model", "Name": "BooleanProperty", "Namespace": "Type.Property.ValueTypes", @@ -142,12 +206,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "17", + "$id": "26", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "18", + "$id": "27", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -158,7 +222,7 @@ ] }, { - "$id": "19", + "$id": "28", "Kind": "Model", "Name": "StringProperty", "Namespace": "Type.Property.ValueTypes", @@ -167,12 +231,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "20", + "$id": "29", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "21", + "$id": "30", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -183,7 +247,7 @@ ] }, { - "$id": "22", + "$id": "31", "Kind": "Model", "Name": "BytesProperty", "Namespace": "Type.Property.ValueTypes", @@ -192,12 +256,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "23", + "$id": "32", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "24", + "$id": "33", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -208,7 +272,7 @@ ] }, { - "$id": "25", + "$id": "34", "Kind": "Model", "Name": "IntProperty", "Namespace": "Type.Property.ValueTypes", @@ -217,12 +281,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "26", + "$id": "35", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "27", + "$id": "36", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -233,7 +297,7 @@ ] }, { - "$id": "28", + "$id": "37", "Kind": "Model", "Name": "FloatProperty", "Namespace": "Type.Property.ValueTypes", @@ -242,12 +306,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "29", + "$id": "38", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "30", + "$id": "39", "Kind": "Primitive", "Name": "Float32", "IsNullable": false @@ -258,7 +322,7 @@ ] }, { - "$id": "31", + "$id": "40", "Kind": "Model", "Name": "DecimalProperty", "Namespace": "Type.Property.ValueTypes", @@ -267,12 +331,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "32", + "$id": "41", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "33", + "$id": "42", "Kind": "Primitive", "Name": "Decimal", "IsNullable": false @@ -283,7 +347,7 @@ ] }, { - "$id": "34", + "$id": "43", "Kind": "Model", "Name": "Decimal128Property", "Namespace": "Type.Property.ValueTypes", @@ -292,12 +356,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "35", + "$id": "44", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "36", + "$id": "45", "Kind": "Primitive", "Name": "Decimal128", "IsNullable": false @@ -308,7 +372,7 @@ ] }, { - "$id": "37", + "$id": "46", "Kind": "Model", "Name": "DatetimeProperty", "Namespace": "Type.Property.ValueTypes", @@ -317,14 +381,14 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "38", + "$id": "47", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "39", + "$id": "48", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -333,7 +397,7 @@ ] }, { - "$id": "40", + "$id": "49", "Kind": "Model", "Name": "DurationProperty", "Namespace": "Type.Property.ValueTypes", @@ -342,12 +406,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "41", + "$id": "50", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "42", + "$id": "51", "Kind": "Primitive", "Name": "DurationISO8601", "IsNullable": false @@ -358,7 +422,7 @@ ] }, { - "$id": "43", + "$id": "52", "Kind": "Model", "Name": "EnumProperty", "Namespace": "Type.Property.ValueTypes", @@ -367,7 +431,7 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "44", + "$id": "53", "Name": "property", "SerializedName": "property", "Description": "Property", @@ -380,7 +444,7 @@ ] }, { - "$id": "45", + "$id": "54", "Kind": "Model", "Name": "ExtensibleEnumProperty", "Namespace": "Type.Property.ValueTypes", @@ -389,7 +453,7 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "46", + "$id": "55", "Name": "property", "SerializedName": "property", "Description": "Property", @@ -402,7 +466,7 @@ ] }, { - "$id": "47", + "$id": "56", "Kind": "Model", "Name": "ModelProperty", "Namespace": "Type.Property.ValueTypes", @@ -411,12 +475,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "48", + "$id": "57", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "49", + "$id": "58", "Kind": "Model", "Name": "InnerModel", "Namespace": "Type.Property.ValueTypes", @@ -425,12 +489,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "50", + "$id": "59", "Name": "property", "SerializedName": "property", "Description": "Required string property", "Type": { - "$id": "51", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -446,10 +510,10 @@ ] }, { - "$ref": "49" + "$ref": "58" }, { - "$id": "52", + "$id": "61", "Kind": "Model", "Name": "CollectionsStringProperty", "Namespace": "Type.Property.ValueTypes", @@ -458,16 +522,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "53", + "$id": "62", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "54", + "$id": "63", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "55", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -480,7 +544,7 @@ ] }, { - "$id": "56", + "$id": "65", "Kind": "Model", "Name": "CollectionsIntProperty", "Namespace": "Type.Property.ValueTypes", @@ -489,16 +553,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "57", + "$id": "66", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "58", + "$id": "67", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "59", + "$id": "68", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -511,7 +575,7 @@ ] }, { - "$id": "60", + "$id": "69", "Kind": "Model", "Name": "CollectionsModelProperty", "Namespace": "Type.Property.ValueTypes", @@ -520,16 +584,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "61", + "$id": "70", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "62", + "$id": "71", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "49" + "$ref": "58" }, "IsNullable": false }, @@ -539,7 +603,7 @@ ] }, { - "$id": "63", + "$id": "72", "Kind": "Model", "Name": "DictionaryStringProperty", "Namespace": "Type.Property.ValueTypes", @@ -548,22 +612,22 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "64", + "$id": "73", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "65", + "$id": "74", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "66", + "$id": "75", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "67", + "$id": "76", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -576,7 +640,7 @@ ] }, { - "$id": "68", + "$id": "77", "Kind": "Model", "Name": "NeverProperty", "Namespace": "Type.Property.ValueTypes", @@ -586,7 +650,7 @@ "Properties": [] }, { - "$id": "69", + "$id": "78", "Kind": "Model", "Name": "UnknownStringProperty", "Namespace": "Type.Property.ValueTypes", @@ -595,12 +659,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "70", + "$id": "79", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "71", + "$id": "80", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -611,7 +675,7 @@ ] }, { - "$id": "72", + "$id": "81", "Kind": "Model", "Name": "UnknownIntProperty", "Namespace": "Type.Property.ValueTypes", @@ -620,12 +684,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "73", + "$id": "82", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "74", + "$id": "83", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -636,7 +700,7 @@ ] }, { - "$id": "75", + "$id": "84", "Kind": "Model", "Name": "UnknownDictProperty", "Namespace": "Type.Property.ValueTypes", @@ -645,12 +709,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "76", + "$id": "85", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "77", + "$id": "86", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -661,7 +725,7 @@ ] }, { - "$id": "78", + "$id": "87", "Kind": "Model", "Name": "UnknownArrayProperty", "Namespace": "Type.Property.ValueTypes", @@ -670,12 +734,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "79", + "$id": "88", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "80", + "$id": "89", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -686,7 +750,7 @@ ] }, { - "$id": "81", + "$id": "90", "Kind": "Model", "Name": "StringLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -695,12 +759,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "82", + "$id": "91", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "83", + "$id": "92", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -715,7 +779,7 @@ ] }, { - "$id": "84", + "$id": "93", "Kind": "Model", "Name": "IntLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -724,12 +788,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "85", + "$id": "94", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "86", + "$id": "95", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -744,7 +808,7 @@ ] }, { - "$id": "87", + "$id": "96", "Kind": "Model", "Name": "FloatLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -753,12 +817,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "88", + "$id": "97", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "89", + "$id": "98", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -773,7 +837,7 @@ ] }, { - "$id": "90", + "$id": "99", "Kind": "Model", "Name": "BooleanLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -782,16 +846,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "91", + "$id": "100", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "92", + "$id": "101", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "93", + "$id": "102", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -805,7 +869,7 @@ ] }, { - "$id": "94", + "$id": "103", "Kind": "Model", "Name": "UnionStringLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -814,43 +878,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "95", + "$id": "104", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "96", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "97", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "98", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "hello", - "IsNullable": false - }, - { - "$id": "99", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "100", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "world", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "14" }, "IsRequired": true, "IsReadOnly": false @@ -858,7 +891,7 @@ ] }, { - "$id": "101", + "$id": "105", "Kind": "Model", "Name": "UnionIntLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -867,43 +900,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "102", + "$id": "106", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "103", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "104", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "105", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 42, - "IsNullable": false - }, - { - "$id": "106", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "107", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 43, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "17" }, "IsRequired": true, "IsReadOnly": false @@ -911,7 +913,7 @@ ] }, { - "$id": "108", + "$id": "107", "Kind": "Model", "Name": "UnionFloatLiteralProperty", "Namespace": "Type.Property.ValueTypes", @@ -920,43 +922,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "109", + "$id": "108", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "110", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "111", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "112", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 43.125, - "IsNullable": false - }, - { - "$id": "113", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "114", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 46.875, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "20" }, "IsRequired": true, "IsReadOnly": false @@ -964,7 +935,7 @@ ] }, { - "$id": "115", + "$id": "109", "Kind": "Model", "Name": "UnionEnumValueProperty", "Namespace": "Type.Property.ValueTypes", @@ -973,16 +944,16 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "116", + "$id": "110", "Name": "property", "SerializedName": "property", "Description": "Property", "Type": { - "$id": "117", + "$id": "111", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$ref": "14" + "$ref": "23" }, "Value": "value2", "IsNullable": false @@ -995,33 +966,33 @@ ], "Clients": [ { - "$id": "118", + "$id": "112", "Name": "ValueTypesClient", "Description": "", "Operations": [], "Protocol": { - "$id": "119" + "$id": "113" }, "Creatable": true }, { - "$id": "120", + "$id": "114", "Name": "Boolean", "Description": "", "Operations": [ { - "$id": "121", + "$id": "115", "Name": "get", "ResourceName": "Boolean", "Description": "Get call", "Parameters": [ { - "$id": "122", + "$id": "116", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "123", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1036,9 +1007,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "124", + "$id": "118", "Type": { - "$id": "125", + "$id": "119", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1047,11 +1018,11 @@ } }, { - "$id": "126", + "$id": "120", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "127", + "$id": "121", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1066,9 +1037,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "128", + "$id": "122", "Type": { - "$ref": "127" + "$ref": "121" }, "Value": "application/json" } @@ -1076,12 +1047,12 @@ ], "Responses": [ { - "$id": "129", + "$id": "123", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "16" + "$ref": "25" }, "BodyMediaType": "Json", "Headers": [], @@ -1100,21 +1071,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "130", + "$id": "124", "Name": "put", "ResourceName": "Boolean", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "131", + "$id": "125", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "16" + "$ref": "25" }, "Location": "Body", "IsRequired": true, @@ -1127,11 +1098,11 @@ "Kind": "Method" }, { - "$id": "132", + "$id": "126", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "133", + "$id": "127", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1146,19 +1117,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "134", + "$id": "128", "Type": { - "$ref": "133" + "$ref": "127" }, "Value": "application/json" } }, { - "$id": "135", + "$id": "129", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "136", + "$id": "130", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1173,9 +1144,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "137", + "$id": "131", "Type": { - "$ref": "136" + "$ref": "130" }, "Value": "application/json" } @@ -1183,7 +1154,7 @@ ], "Responses": [ { - "$id": "138", + "$id": "132", "StatusCodes": [ 204 ], @@ -1205,31 +1176,31 @@ } ], "Protocol": { - "$id": "139" + "$id": "133" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "140", + "$id": "134", "Name": "String", "Description": "", "Operations": [ { - "$id": "141", + "$id": "135", "Name": "get", "ResourceName": "String", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "142", + "$id": "136", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "143", + "$id": "137", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1244,9 +1215,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "144", + "$id": "138", "Type": { - "$ref": "143" + "$ref": "137" }, "Value": "application/json" } @@ -1254,12 +1225,12 @@ ], "Responses": [ { - "$id": "145", + "$id": "139", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "19" + "$ref": "28" }, "BodyMediaType": "Json", "Headers": [], @@ -1278,21 +1249,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "146", + "$id": "140", "Name": "put", "ResourceName": "String", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "147", + "$id": "141", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "19" + "$ref": "28" }, "Location": "Body", "IsRequired": true, @@ -1305,11 +1276,11 @@ "Kind": "Method" }, { - "$id": "148", + "$id": "142", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "149", + "$id": "143", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1324,19 +1295,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "150", + "$id": "144", "Type": { - "$ref": "149" + "$ref": "143" }, "Value": "application/json" } }, { - "$id": "151", + "$id": "145", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "152", + "$id": "146", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1351,9 +1322,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "153", + "$id": "147", "Type": { - "$ref": "152" + "$ref": "146" }, "Value": "application/json" } @@ -1361,7 +1332,7 @@ ], "Responses": [ { - "$id": "154", + "$id": "148", "StatusCodes": [ 204 ], @@ -1383,31 +1354,31 @@ } ], "Protocol": { - "$id": "155" + "$id": "149" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "156", + "$id": "150", "Name": "Bytes", "Description": "", "Operations": [ { - "$id": "157", + "$id": "151", "Name": "get", "ResourceName": "Bytes", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "158", + "$id": "152", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "159", + "$id": "153", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1422,9 +1393,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "160", + "$id": "154", "Type": { - "$ref": "159" + "$ref": "153" }, "Value": "application/json" } @@ -1432,12 +1403,12 @@ ], "Responses": [ { - "$id": "161", + "$id": "155", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "22" + "$ref": "31" }, "BodyMediaType": "Json", "Headers": [], @@ -1456,21 +1427,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "162", + "$id": "156", "Name": "put", "ResourceName": "Bytes", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "163", + "$id": "157", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "22" + "$ref": "31" }, "Location": "Body", "IsRequired": true, @@ -1483,11 +1454,11 @@ "Kind": "Method" }, { - "$id": "164", + "$id": "158", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "165", + "$id": "159", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1502,19 +1473,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "166", + "$id": "160", "Type": { - "$ref": "165" + "$ref": "159" }, "Value": "application/json" } }, { - "$id": "167", + "$id": "161", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "168", + "$id": "162", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1529,9 +1500,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "169", + "$id": "163", "Type": { - "$ref": "168" + "$ref": "162" }, "Value": "application/json" } @@ -1539,7 +1510,7 @@ ], "Responses": [ { - "$id": "170", + "$id": "164", "StatusCodes": [ 204 ], @@ -1561,31 +1532,31 @@ } ], "Protocol": { - "$id": "171" + "$id": "165" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "172", + "$id": "166", "Name": "Int", "Description": "", "Operations": [ { - "$id": "173", + "$id": "167", "Name": "get", "ResourceName": "Int", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "174", + "$id": "168", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "175", + "$id": "169", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1600,9 +1571,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "176", + "$id": "170", "Type": { - "$ref": "175" + "$ref": "169" }, "Value": "application/json" } @@ -1610,12 +1581,12 @@ ], "Responses": [ { - "$id": "177", + "$id": "171", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "25" + "$ref": "34" }, "BodyMediaType": "Json", "Headers": [], @@ -1634,21 +1605,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "178", + "$id": "172", "Name": "put", "ResourceName": "Int", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "179", + "$id": "173", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "25" + "$ref": "34" }, "Location": "Body", "IsRequired": true, @@ -1661,11 +1632,11 @@ "Kind": "Method" }, { - "$id": "180", + "$id": "174", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "181", + "$id": "175", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1680,19 +1651,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "182", + "$id": "176", "Type": { - "$ref": "181" + "$ref": "175" }, "Value": "application/json" } }, { - "$id": "183", + "$id": "177", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "184", + "$id": "178", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1707,9 +1678,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "185", + "$id": "179", "Type": { - "$ref": "184" + "$ref": "178" }, "Value": "application/json" } @@ -1717,7 +1688,7 @@ ], "Responses": [ { - "$id": "186", + "$id": "180", "StatusCodes": [ 204 ], @@ -1739,31 +1710,31 @@ } ], "Protocol": { - "$id": "187" + "$id": "181" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "188", + "$id": "182", "Name": "Float", "Description": "", "Operations": [ { - "$id": "189", + "$id": "183", "Name": "get", "ResourceName": "Float", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "190", + "$id": "184", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "191", + "$id": "185", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1778,9 +1749,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "192", + "$id": "186", "Type": { - "$ref": "191" + "$ref": "185" }, "Value": "application/json" } @@ -1788,12 +1759,12 @@ ], "Responses": [ { - "$id": "193", + "$id": "187", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "28" + "$ref": "37" }, "BodyMediaType": "Json", "Headers": [], @@ -1812,21 +1783,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "194", + "$id": "188", "Name": "put", "ResourceName": "Float", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "195", + "$id": "189", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "28" + "$ref": "37" }, "Location": "Body", "IsRequired": true, @@ -1839,11 +1810,11 @@ "Kind": "Method" }, { - "$id": "196", + "$id": "190", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "197", + "$id": "191", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1858,19 +1829,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "198", + "$id": "192", "Type": { - "$ref": "197" + "$ref": "191" }, "Value": "application/json" } }, { - "$id": "199", + "$id": "193", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "200", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1885,9 +1856,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "201", + "$id": "195", "Type": { - "$ref": "200" + "$ref": "194" }, "Value": "application/json" } @@ -1895,7 +1866,7 @@ ], "Responses": [ { - "$id": "202", + "$id": "196", "StatusCodes": [ 204 ], @@ -1917,31 +1888,31 @@ } ], "Protocol": { - "$id": "203" + "$id": "197" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "204", + "$id": "198", "Name": "Decimal", "Description": "", "Operations": [ { - "$id": "205", + "$id": "199", "Name": "get", "ResourceName": "Decimal", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "206", + "$id": "200", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "207", + "$id": "201", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1956,9 +1927,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "208", + "$id": "202", "Type": { - "$ref": "207" + "$ref": "201" }, "Value": "application/json" } @@ -1966,12 +1937,12 @@ ], "Responses": [ { - "$id": "209", + "$id": "203", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "31" + "$ref": "40" }, "BodyMediaType": "Json", "Headers": [], @@ -1990,21 +1961,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "210", + "$id": "204", "Name": "put", "ResourceName": "Decimal", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "211", + "$id": "205", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "31" + "$ref": "40" }, "Location": "Body", "IsRequired": true, @@ -2017,11 +1988,11 @@ "Kind": "Method" }, { - "$id": "212", + "$id": "206", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "213", + "$id": "207", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2036,19 +2007,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "214", + "$id": "208", "Type": { - "$ref": "213" + "$ref": "207" }, "Value": "application/json" } }, { - "$id": "215", + "$id": "209", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "216", + "$id": "210", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2063,9 +2034,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "217", + "$id": "211", "Type": { - "$ref": "216" + "$ref": "210" }, "Value": "application/json" } @@ -2073,7 +2044,7 @@ ], "Responses": [ { - "$id": "218", + "$id": "212", "StatusCodes": [ 204 ], @@ -2095,31 +2066,31 @@ } ], "Protocol": { - "$id": "219" + "$id": "213" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "220", + "$id": "214", "Name": "Decimal128", "Description": "", "Operations": [ { - "$id": "221", + "$id": "215", "Name": "get", "ResourceName": "Decimal128", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "222", + "$id": "216", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "223", + "$id": "217", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2134,9 +2105,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "224", + "$id": "218", "Type": { - "$ref": "223" + "$ref": "217" }, "Value": "application/json" } @@ -2144,12 +2115,12 @@ ], "Responses": [ { - "$id": "225", + "$id": "219", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "34" + "$ref": "43" }, "BodyMediaType": "Json", "Headers": [], @@ -2168,21 +2139,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "226", + "$id": "220", "Name": "put", "ResourceName": "Decimal128", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "227", + "$id": "221", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "34" + "$ref": "43" }, "Location": "Body", "IsRequired": true, @@ -2195,11 +2166,11 @@ "Kind": "Method" }, { - "$id": "228", + "$id": "222", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "229", + "$id": "223", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2214,19 +2185,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "230", + "$id": "224", "Type": { - "$ref": "229" + "$ref": "223" }, "Value": "application/json" } }, { - "$id": "231", + "$id": "225", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "232", + "$id": "226", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2241,9 +2212,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "233", + "$id": "227", "Type": { - "$ref": "232" + "$ref": "226" }, "Value": "application/json" } @@ -2251,7 +2222,7 @@ ], "Responses": [ { - "$id": "234", + "$id": "228", "StatusCodes": [ 204 ], @@ -2273,31 +2244,31 @@ } ], "Protocol": { - "$id": "235" + "$id": "229" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "236", + "$id": "230", "Name": "Datetime", "Description": "", "Operations": [ { - "$id": "237", + "$id": "231", "Name": "get", "ResourceName": "Datetime", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "238", + "$id": "232", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "239", + "$id": "233", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2312,9 +2283,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "240", + "$id": "234", "Type": { - "$ref": "239" + "$ref": "233" }, "Value": "application/json" } @@ -2322,12 +2293,12 @@ ], "Responses": [ { - "$id": "241", + "$id": "235", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "37" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2346,21 +2317,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "242", + "$id": "236", "Name": "put", "ResourceName": "Datetime", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "243", + "$id": "237", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "37" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2373,11 +2344,11 @@ "Kind": "Method" }, { - "$id": "244", + "$id": "238", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "245", + "$id": "239", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2392,19 +2363,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 @@ -2419,9 +2390,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "249", + "$id": "243", "Type": { - "$ref": "248" + "$ref": "242" }, "Value": "application/json" } @@ -2429,7 +2400,7 @@ ], "Responses": [ { - "$id": "250", + "$id": "244", "StatusCodes": [ 204 ], @@ -2451,31 +2422,31 @@ } ], "Protocol": { - "$id": "251" + "$id": "245" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "252", + "$id": "246", "Name": "Duration", "Description": "", "Operations": [ { - "$id": "253", + "$id": "247", "Name": "get", "ResourceName": "Duration", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "254", + "$id": "248", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "255", + "$id": "249", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2490,9 +2461,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "250", "Type": { - "$ref": "255" + "$ref": "249" }, "Value": "application/json" } @@ -2500,12 +2471,12 @@ ], "Responses": [ { - "$id": "257", + "$id": "251", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "40" + "$ref": "49" }, "BodyMediaType": "Json", "Headers": [], @@ -2524,21 +2495,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "258", + "$id": "252", "Name": "put", "ResourceName": "Duration", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "259", + "$id": "253", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "40" + "$ref": "49" }, "Location": "Body", "IsRequired": true, @@ -2551,11 +2522,11 @@ "Kind": "Method" }, { - "$id": "260", + "$id": "254", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "261", + "$id": "255", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2570,19 +2541,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "262", + "$id": "256", "Type": { - "$ref": "261" + "$ref": "255" }, "Value": "application/json" } }, { - "$id": "263", + "$id": "257", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "264", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2597,9 +2568,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "265", + "$id": "259", "Type": { - "$ref": "264" + "$ref": "258" }, "Value": "application/json" } @@ -2607,7 +2578,7 @@ ], "Responses": [ { - "$id": "266", + "$id": "260", "StatusCodes": [ 204 ], @@ -2629,31 +2600,31 @@ } ], "Protocol": { - "$id": "267" + "$id": "261" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "268", + "$id": "262", "Name": "Enum", "Description": "", "Operations": [ { - "$id": "269", + "$id": "263", "Name": "get", "ResourceName": "Enum", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "270", + "$id": "264", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "271", + "$id": "265", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2668,9 +2639,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "272", + "$id": "266", "Type": { - "$ref": "271" + "$ref": "265" }, "Value": "application/json" } @@ -2678,12 +2649,12 @@ ], "Responses": [ { - "$id": "273", + "$id": "267", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "43" + "$ref": "52" }, "BodyMediaType": "Json", "Headers": [], @@ -2702,21 +2673,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "274", + "$id": "268", "Name": "put", "ResourceName": "Enum", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "275", + "$id": "269", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "43" + "$ref": "52" }, "Location": "Body", "IsRequired": true, @@ -2729,11 +2700,11 @@ "Kind": "Method" }, { - "$id": "276", + "$id": "270", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "277", + "$id": "271", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2748,19 +2719,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "278", + "$id": "272", "Type": { - "$ref": "277" + "$ref": "271" }, "Value": "application/json" } }, { - "$id": "279", + "$id": "273", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "280", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2775,9 +2746,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "281", + "$id": "275", "Type": { - "$ref": "280" + "$ref": "274" }, "Value": "application/json" } @@ -2785,7 +2756,7 @@ ], "Responses": [ { - "$id": "282", + "$id": "276", "StatusCodes": [ 204 ], @@ -2807,31 +2778,31 @@ } ], "Protocol": { - "$id": "283" + "$id": "277" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "284", + "$id": "278", "Name": "ExtensibleEnum", "Description": "", "Operations": [ { - "$id": "285", + "$id": "279", "Name": "get", "ResourceName": "ExtensibleEnum", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "286", + "$id": "280", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "287", + "$id": "281", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2846,9 +2817,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "288", + "$id": "282", "Type": { - "$ref": "287" + "$ref": "281" }, "Value": "application/json" } @@ -2856,12 +2827,12 @@ ], "Responses": [ { - "$id": "289", + "$id": "283", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "45" + "$ref": "54" }, "BodyMediaType": "Json", "Headers": [], @@ -2880,21 +2851,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "290", + "$id": "284", "Name": "put", "ResourceName": "ExtensibleEnum", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "291", + "$id": "285", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "45" + "$ref": "54" }, "Location": "Body", "IsRequired": true, @@ -2907,11 +2878,11 @@ "Kind": "Method" }, { - "$id": "292", + "$id": "286", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "293", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2926,19 +2897,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "294", + "$id": "288", "Type": { - "$ref": "293" + "$ref": "287" }, "Value": "application/json" } }, { - "$id": "295", + "$id": "289", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "296", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2953,9 +2924,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "297", + "$id": "291", "Type": { - "$ref": "296" + "$ref": "290" }, "Value": "application/json" } @@ -2963,7 +2934,7 @@ ], "Responses": [ { - "$id": "298", + "$id": "292", "StatusCodes": [ 204 ], @@ -2985,31 +2956,31 @@ } ], "Protocol": { - "$id": "299" + "$id": "293" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "300", + "$id": "294", "Name": "Model", "Description": "", "Operations": [ { - "$id": "301", + "$id": "295", "Name": "get", "ResourceName": "Model", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "302", + "$id": "296", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "303", + "$id": "297", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3024,9 +2995,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "304", + "$id": "298", "Type": { - "$ref": "303" + "$ref": "297" }, "Value": "application/json" } @@ -3034,12 +3005,12 @@ ], "Responses": [ { - "$id": "305", + "$id": "299", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "47" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -3058,21 +3029,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "306", + "$id": "300", "Name": "put", "ResourceName": "Model", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "307", + "$id": "301", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "47" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -3085,11 +3056,11 @@ "Kind": "Method" }, { - "$id": "308", + "$id": "302", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "309", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3104,19 +3075,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "310", + "$id": "304", "Type": { - "$ref": "309" + "$ref": "303" }, "Value": "application/json" } }, { - "$id": "311", + "$id": "305", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "312", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3131,9 +3102,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "313", + "$id": "307", "Type": { - "$ref": "312" + "$ref": "306" }, "Value": "application/json" } @@ -3141,7 +3112,7 @@ ], "Responses": [ { - "$id": "314", + "$id": "308", "StatusCodes": [ 204 ], @@ -3163,31 +3134,31 @@ } ], "Protocol": { - "$id": "315" + "$id": "309" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "316", + "$id": "310", "Name": "CollectionsString", "Description": "", "Operations": [ { - "$id": "317", + "$id": "311", "Name": "get", "ResourceName": "CollectionsString", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "318", + "$id": "312", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "319", + "$id": "313", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3202,9 +3173,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "320", + "$id": "314", "Type": { - "$ref": "319" + "$ref": "313" }, "Value": "application/json" } @@ -3212,12 +3183,12 @@ ], "Responses": [ { - "$id": "321", + "$id": "315", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "52" + "$ref": "61" }, "BodyMediaType": "Json", "Headers": [], @@ -3236,21 +3207,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "322", + "$id": "316", "Name": "put", "ResourceName": "CollectionsString", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "323", + "$id": "317", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "52" + "$ref": "61" }, "Location": "Body", "IsRequired": true, @@ -3263,11 +3234,11 @@ "Kind": "Method" }, { - "$id": "324", + "$id": "318", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "325", + "$id": "319", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3282,19 +3253,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "326", + "$id": "320", "Type": { - "$ref": "325" + "$ref": "319" }, "Value": "application/json" } }, { - "$id": "327", + "$id": "321", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "328", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3309,9 +3280,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "329", + "$id": "323", "Type": { - "$ref": "328" + "$ref": "322" }, "Value": "application/json" } @@ -3319,7 +3290,7 @@ ], "Responses": [ { - "$id": "330", + "$id": "324", "StatusCodes": [ 204 ], @@ -3341,31 +3312,31 @@ } ], "Protocol": { - "$id": "331" + "$id": "325" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "332", + "$id": "326", "Name": "CollectionsInt", "Description": "", "Operations": [ { - "$id": "333", + "$id": "327", "Name": "get", "ResourceName": "CollectionsInt", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "334", + "$id": "328", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "335", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3380,9 +3351,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "336", + "$id": "330", "Type": { - "$ref": "335" + "$ref": "329" }, "Value": "application/json" } @@ -3390,12 +3361,12 @@ ], "Responses": [ { - "$id": "337", + "$id": "331", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "56" + "$ref": "65" }, "BodyMediaType": "Json", "Headers": [], @@ -3414,21 +3385,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "338", + "$id": "332", "Name": "put", "ResourceName": "CollectionsInt", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "339", + "$id": "333", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "56" + "$ref": "65" }, "Location": "Body", "IsRequired": true, @@ -3441,11 +3412,11 @@ "Kind": "Method" }, { - "$id": "340", + "$id": "334", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "341", + "$id": "335", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3460,19 +3431,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "342", + "$id": "336", "Type": { - "$ref": "341" + "$ref": "335" }, "Value": "application/json" } }, { - "$id": "343", + "$id": "337", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "344", + "$id": "338", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3487,9 +3458,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "345", + "$id": "339", "Type": { - "$ref": "344" + "$ref": "338" }, "Value": "application/json" } @@ -3497,7 +3468,7 @@ ], "Responses": [ { - "$id": "346", + "$id": "340", "StatusCodes": [ 204 ], @@ -3519,31 +3490,31 @@ } ], "Protocol": { - "$id": "347" + "$id": "341" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "348", + "$id": "342", "Name": "CollectionsModel", "Description": "", "Operations": [ { - "$id": "349", + "$id": "343", "Name": "get", "ResourceName": "CollectionsModel", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "350", + "$id": "344", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "351", + "$id": "345", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3558,9 +3529,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "352", + "$id": "346", "Type": { - "$ref": "351" + "$ref": "345" }, "Value": "application/json" } @@ -3568,12 +3539,12 @@ ], "Responses": [ { - "$id": "353", + "$id": "347", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "60" + "$ref": "69" }, "BodyMediaType": "Json", "Headers": [], @@ -3592,21 +3563,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "354", + "$id": "348", "Name": "put", "ResourceName": "CollectionsModel", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "355", + "$id": "349", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "60" + "$ref": "69" }, "Location": "Body", "IsRequired": true, @@ -3619,11 +3590,11 @@ "Kind": "Method" }, { - "$id": "356", + "$id": "350", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "357", + "$id": "351", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3638,19 +3609,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "358", + "$id": "352", "Type": { - "$ref": "357" + "$ref": "351" }, "Value": "application/json" } }, { - "$id": "359", + "$id": "353", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "360", + "$id": "354", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3665,9 +3636,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "361", + "$id": "355", "Type": { - "$ref": "360" + "$ref": "354" }, "Value": "application/json" } @@ -3675,7 +3646,7 @@ ], "Responses": [ { - "$id": "362", + "$id": "356", "StatusCodes": [ 204 ], @@ -3697,31 +3668,31 @@ } ], "Protocol": { - "$id": "363" + "$id": "357" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "364", + "$id": "358", "Name": "DictionaryString", "Description": "", "Operations": [ { - "$id": "365", + "$id": "359", "Name": "get", "ResourceName": "DictionaryString", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "366", + "$id": "360", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "367", + "$id": "361", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3736,9 +3707,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "368", + "$id": "362", "Type": { - "$ref": "367" + "$ref": "361" }, "Value": "application/json" } @@ -3746,12 +3717,12 @@ ], "Responses": [ { - "$id": "369", + "$id": "363", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "63" + "$ref": "72" }, "BodyMediaType": "Json", "Headers": [], @@ -3770,21 +3741,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "370", + "$id": "364", "Name": "put", "ResourceName": "DictionaryString", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "371", + "$id": "365", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "63" + "$ref": "72" }, "Location": "Body", "IsRequired": true, @@ -3797,11 +3768,11 @@ "Kind": "Method" }, { - "$id": "372", + "$id": "366", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "373", + "$id": "367", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3816,19 +3787,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "374", + "$id": "368", "Type": { - "$ref": "373" + "$ref": "367" }, "Value": "application/json" } }, { - "$id": "375", + "$id": "369", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "376", + "$id": "370", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3843,9 +3814,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "377", + "$id": "371", "Type": { - "$ref": "376" + "$ref": "370" }, "Value": "application/json" } @@ -3853,7 +3824,7 @@ ], "Responses": [ { - "$id": "378", + "$id": "372", "StatusCodes": [ 204 ], @@ -3875,31 +3846,31 @@ } ], "Protocol": { - "$id": "379" + "$id": "373" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "380", + "$id": "374", "Name": "Never", "Description": "", "Operations": [ { - "$id": "381", + "$id": "375", "Name": "get", "ResourceName": "Never", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "382", + "$id": "376", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "383", + "$id": "377", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3914,9 +3885,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "384", + "$id": "378", "Type": { - "$ref": "383" + "$ref": "377" }, "Value": "application/json" } @@ -3924,12 +3895,12 @@ ], "Responses": [ { - "$id": "385", + "$id": "379", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "68" + "$ref": "77" }, "BodyMediaType": "Json", "Headers": [], @@ -3948,21 +3919,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "386", + "$id": "380", "Name": "put", "ResourceName": "Never", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "387", + "$id": "381", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "68" + "$ref": "77" }, "Location": "Body", "IsRequired": true, @@ -3975,11 +3946,11 @@ "Kind": "Method" }, { - "$id": "388", + "$id": "382", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "389", + "$id": "383", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3994,19 +3965,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "390", + "$id": "384", "Type": { - "$ref": "389" + "$ref": "383" }, "Value": "application/json" } }, { - "$id": "391", + "$id": "385", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "392", + "$id": "386", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4021,9 +3992,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "393", + "$id": "387", "Type": { - "$ref": "392" + "$ref": "386" }, "Value": "application/json" } @@ -4031,7 +4002,7 @@ ], "Responses": [ { - "$id": "394", + "$id": "388", "StatusCodes": [ 204 ], @@ -4053,31 +4024,31 @@ } ], "Protocol": { - "$id": "395" + "$id": "389" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "396", + "$id": "390", "Name": "UnknownString", "Description": "", "Operations": [ { - "$id": "397", + "$id": "391", "Name": "get", "ResourceName": "UnknownString", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "398", + "$id": "392", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "399", + "$id": "393", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4092,9 +4063,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "400", + "$id": "394", "Type": { - "$ref": "399" + "$ref": "393" }, "Value": "application/json" } @@ -4102,12 +4073,12 @@ ], "Responses": [ { - "$id": "401", + "$id": "395", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "69" + "$ref": "78" }, "BodyMediaType": "Json", "Headers": [], @@ -4126,21 +4097,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "402", + "$id": "396", "Name": "put", "ResourceName": "UnknownString", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "403", + "$id": "397", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "69" + "$ref": "78" }, "Location": "Body", "IsRequired": true, @@ -4153,11 +4124,11 @@ "Kind": "Method" }, { - "$id": "404", + "$id": "398", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "405", + "$id": "399", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4172,19 +4143,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "406", + "$id": "400", "Type": { - "$ref": "405" + "$ref": "399" }, "Value": "application/json" } }, { - "$id": "407", + "$id": "401", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "408", + "$id": "402", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4199,9 +4170,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "409", + "$id": "403", "Type": { - "$ref": "408" + "$ref": "402" }, "Value": "application/json" } @@ -4209,7 +4180,7 @@ ], "Responses": [ { - "$id": "410", + "$id": "404", "StatusCodes": [ 204 ], @@ -4231,31 +4202,31 @@ } ], "Protocol": { - "$id": "411" + "$id": "405" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "412", + "$id": "406", "Name": "UnknownInt", "Description": "", "Operations": [ { - "$id": "413", + "$id": "407", "Name": "get", "ResourceName": "UnknownInt", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "414", + "$id": "408", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "415", + "$id": "409", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4270,9 +4241,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "416", + "$id": "410", "Type": { - "$ref": "415" + "$ref": "409" }, "Value": "application/json" } @@ -4280,12 +4251,12 @@ ], "Responses": [ { - "$id": "417", + "$id": "411", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "72" + "$ref": "81" }, "BodyMediaType": "Json", "Headers": [], @@ -4304,21 +4275,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "418", + "$id": "412", "Name": "put", "ResourceName": "UnknownInt", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "419", + "$id": "413", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "72" + "$ref": "81" }, "Location": "Body", "IsRequired": true, @@ -4331,11 +4302,11 @@ "Kind": "Method" }, { - "$id": "420", + "$id": "414", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "421", + "$id": "415", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4350,19 +4321,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "422", + "$id": "416", "Type": { - "$ref": "421" + "$ref": "415" }, "Value": "application/json" } }, { - "$id": "423", + "$id": "417", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "424", + "$id": "418", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4377,9 +4348,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "425", + "$id": "419", "Type": { - "$ref": "424" + "$ref": "418" }, "Value": "application/json" } @@ -4387,7 +4358,7 @@ ], "Responses": [ { - "$id": "426", + "$id": "420", "StatusCodes": [ 204 ], @@ -4409,31 +4380,31 @@ } ], "Protocol": { - "$id": "427" + "$id": "421" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "428", + "$id": "422", "Name": "UnknownDict", "Description": "", "Operations": [ { - "$id": "429", + "$id": "423", "Name": "get", "ResourceName": "UnknownDict", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "430", + "$id": "424", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "431", + "$id": "425", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4448,9 +4419,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "432", + "$id": "426", "Type": { - "$ref": "431" + "$ref": "425" }, "Value": "application/json" } @@ -4458,12 +4429,12 @@ ], "Responses": [ { - "$id": "433", + "$id": "427", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "75" + "$ref": "84" }, "BodyMediaType": "Json", "Headers": [], @@ -4482,21 +4453,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "434", + "$id": "428", "Name": "put", "ResourceName": "UnknownDict", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "435", + "$id": "429", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "75" + "$ref": "84" }, "Location": "Body", "IsRequired": true, @@ -4509,11 +4480,11 @@ "Kind": "Method" }, { - "$id": "436", + "$id": "430", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "437", + "$id": "431", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4528,19 +4499,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "438", + "$id": "432", "Type": { - "$ref": "437" + "$ref": "431" }, "Value": "application/json" } }, { - "$id": "439", + "$id": "433", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "440", + "$id": "434", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4555,9 +4526,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "441", + "$id": "435", "Type": { - "$ref": "440" + "$ref": "434" }, "Value": "application/json" } @@ -4565,7 +4536,7 @@ ], "Responses": [ { - "$id": "442", + "$id": "436", "StatusCodes": [ 204 ], @@ -4587,31 +4558,31 @@ } ], "Protocol": { - "$id": "443" + "$id": "437" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "444", + "$id": "438", "Name": "UnknownArray", "Description": "", "Operations": [ { - "$id": "445", + "$id": "439", "Name": "get", "ResourceName": "UnknownArray", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "446", + "$id": "440", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "447", + "$id": "441", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4626,9 +4597,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "448", + "$id": "442", "Type": { - "$ref": "447" + "$ref": "441" }, "Value": "application/json" } @@ -4636,12 +4607,12 @@ ], "Responses": [ { - "$id": "449", + "$id": "443", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "78" + "$ref": "87" }, "BodyMediaType": "Json", "Headers": [], @@ -4660,21 +4631,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "450", + "$id": "444", "Name": "put", "ResourceName": "UnknownArray", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "451", + "$id": "445", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "78" + "$ref": "87" }, "Location": "Body", "IsRequired": true, @@ -4687,11 +4658,11 @@ "Kind": "Method" }, { - "$id": "452", + "$id": "446", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "453", + "$id": "447", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4706,19 +4677,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "454", + "$id": "448", "Type": { - "$ref": "453" + "$ref": "447" }, "Value": "application/json" } }, { - "$id": "455", + "$id": "449", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "456", + "$id": "450", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4733,9 +4704,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "457", + "$id": "451", "Type": { - "$ref": "456" + "$ref": "450" }, "Value": "application/json" } @@ -4743,7 +4714,7 @@ ], "Responses": [ { - "$id": "458", + "$id": "452", "StatusCodes": [ 204 ], @@ -4765,31 +4736,31 @@ } ], "Protocol": { - "$id": "459" + "$id": "453" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "460", + "$id": "454", "Name": "StringLiteral", "Description": "", "Operations": [ { - "$id": "461", + "$id": "455", "Name": "get", "ResourceName": "StringLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "462", + "$id": "456", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "463", + "$id": "457", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4804,9 +4775,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "464", + "$id": "458", "Type": { - "$ref": "463" + "$ref": "457" }, "Value": "application/json" } @@ -4814,12 +4785,12 @@ ], "Responses": [ { - "$id": "465", + "$id": "459", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "81" + "$ref": "90" }, "BodyMediaType": "Json", "Headers": [], @@ -4838,21 +4809,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "466", + "$id": "460", "Name": "put", "ResourceName": "StringLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "467", + "$id": "461", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "81" + "$ref": "90" }, "Location": "Body", "IsRequired": true, @@ -4865,11 +4836,11 @@ "Kind": "Method" }, { - "$id": "468", + "$id": "462", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "469", + "$id": "463", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4884,19 +4855,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "470", + "$id": "464", "Type": { - "$ref": "469" + "$ref": "463" }, "Value": "application/json" } }, { - "$id": "471", + "$id": "465", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "472", + "$id": "466", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4911,9 +4882,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "473", + "$id": "467", "Type": { - "$ref": "472" + "$ref": "466" }, "Value": "application/json" } @@ -4921,7 +4892,7 @@ ], "Responses": [ { - "$id": "474", + "$id": "468", "StatusCodes": [ 204 ], @@ -4943,31 +4914,31 @@ } ], "Protocol": { - "$id": "475" + "$id": "469" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "476", + "$id": "470", "Name": "IntLiteral", "Description": "", "Operations": [ { - "$id": "477", + "$id": "471", "Name": "get", "ResourceName": "IntLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "478", + "$id": "472", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "479", + "$id": "473", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4982,9 +4953,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "480", + "$id": "474", "Type": { - "$ref": "479" + "$ref": "473" }, "Value": "application/json" } @@ -4992,12 +4963,12 @@ ], "Responses": [ { - "$id": "481", + "$id": "475", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "84" + "$ref": "93" }, "BodyMediaType": "Json", "Headers": [], @@ -5016,21 +4987,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "482", + "$id": "476", "Name": "put", "ResourceName": "IntLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "483", + "$id": "477", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "84" + "$ref": "93" }, "Location": "Body", "IsRequired": true, @@ -5043,11 +5014,11 @@ "Kind": "Method" }, { - "$id": "484", + "$id": "478", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "485", + "$id": "479", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5062,19 +5033,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 @@ -5089,9 +5060,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "489", + "$id": "483", "Type": { - "$ref": "488" + "$ref": "482" }, "Value": "application/json" } @@ -5099,7 +5070,7 @@ ], "Responses": [ { - "$id": "490", + "$id": "484", "StatusCodes": [ 204 ], @@ -5121,31 +5092,31 @@ } ], "Protocol": { - "$id": "491" + "$id": "485" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "492", + "$id": "486", "Name": "FloatLiteral", "Description": "", "Operations": [ { - "$id": "493", + "$id": "487", "Name": "get", "ResourceName": "FloatLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "494", + "$id": "488", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "495", + "$id": "489", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5160,9 +5131,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "496", + "$id": "490", "Type": { - "$ref": "495" + "$ref": "489" }, "Value": "application/json" } @@ -5170,12 +5141,12 @@ ], "Responses": [ { - "$id": "497", + "$id": "491", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "87" + "$ref": "96" }, "BodyMediaType": "Json", "Headers": [], @@ -5194,21 +5165,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "498", + "$id": "492", "Name": "put", "ResourceName": "FloatLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "499", + "$id": "493", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "87" + "$ref": "96" }, "Location": "Body", "IsRequired": true, @@ -5221,11 +5192,11 @@ "Kind": "Method" }, { - "$id": "500", + "$id": "494", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "501", + "$id": "495", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5240,19 +5211,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "502", + "$id": "496", "Type": { - "$ref": "501" + "$ref": "495" }, "Value": "application/json" } }, { - "$id": "503", + "$id": "497", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "504", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5267,9 +5238,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "505", + "$id": "499", "Type": { - "$ref": "504" + "$ref": "498" }, "Value": "application/json" } @@ -5277,7 +5248,7 @@ ], "Responses": [ { - "$id": "506", + "$id": "500", "StatusCodes": [ 204 ], @@ -5299,31 +5270,31 @@ } ], "Protocol": { - "$id": "507" + "$id": "501" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "508", + "$id": "502", "Name": "BooleanLiteral", "Description": "", "Operations": [ { - "$id": "509", + "$id": "503", "Name": "get", "ResourceName": "BooleanLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "510", + "$id": "504", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "511", + "$id": "505", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5338,9 +5309,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "512", + "$id": "506", "Type": { - "$ref": "511" + "$ref": "505" }, "Value": "application/json" } @@ -5348,12 +5319,12 @@ ], "Responses": [ { - "$id": "513", + "$id": "507", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "90" + "$ref": "99" }, "BodyMediaType": "Json", "Headers": [], @@ -5372,21 +5343,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "514", + "$id": "508", "Name": "put", "ResourceName": "BooleanLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "515", + "$id": "509", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "90" + "$ref": "99" }, "Location": "Body", "IsRequired": true, @@ -5399,11 +5370,11 @@ "Kind": "Method" }, { - "$id": "516", + "$id": "510", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "517", + "$id": "511", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5418,19 +5389,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "518", + "$id": "512", "Type": { - "$ref": "517" + "$ref": "511" }, "Value": "application/json" } }, { - "$id": "519", + "$id": "513", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "520", + "$id": "514", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5445,9 +5416,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "521", + "$id": "515", "Type": { - "$ref": "520" + "$ref": "514" }, "Value": "application/json" } @@ -5455,7 +5426,7 @@ ], "Responses": [ { - "$id": "522", + "$id": "516", "StatusCodes": [ 204 ], @@ -5477,31 +5448,31 @@ } ], "Protocol": { - "$id": "523" + "$id": "517" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "524", + "$id": "518", "Name": "UnionStringLiteral", "Description": "", "Operations": [ { - "$id": "525", + "$id": "519", "Name": "get", "ResourceName": "UnionStringLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "526", + "$id": "520", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "527", + "$id": "521", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5516,9 +5487,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "528", + "$id": "522", "Type": { - "$ref": "527" + "$ref": "521" }, "Value": "application/json" } @@ -5526,12 +5497,12 @@ ], "Responses": [ { - "$id": "529", + "$id": "523", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "94" + "$ref": "103" }, "BodyMediaType": "Json", "Headers": [], @@ -5550,21 +5521,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "530", + "$id": "524", "Name": "put", "ResourceName": "UnionStringLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "531", + "$id": "525", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "94" + "$ref": "103" }, "Location": "Body", "IsRequired": true, @@ -5577,11 +5548,11 @@ "Kind": "Method" }, { - "$id": "532", + "$id": "526", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "533", + "$id": "527", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5596,19 +5567,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "534", + "$id": "528", "Type": { - "$ref": "533" + "$ref": "527" }, "Value": "application/json" } }, { - "$id": "535", + "$id": "529", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "536", + "$id": "530", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5623,9 +5594,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "537", + "$id": "531", "Type": { - "$ref": "536" + "$ref": "530" }, "Value": "application/json" } @@ -5633,7 +5604,7 @@ ], "Responses": [ { - "$id": "538", + "$id": "532", "StatusCodes": [ 204 ], @@ -5655,31 +5626,31 @@ } ], "Protocol": { - "$id": "539" + "$id": "533" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "540", + "$id": "534", "Name": "UnionIntLiteral", "Description": "", "Operations": [ { - "$id": "541", + "$id": "535", "Name": "get", "ResourceName": "UnionIntLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "542", + "$id": "536", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "543", + "$id": "537", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5694,9 +5665,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "544", + "$id": "538", "Type": { - "$ref": "543" + "$ref": "537" }, "Value": "application/json" } @@ -5704,12 +5675,12 @@ ], "Responses": [ { - "$id": "545", + "$id": "539", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "101" + "$ref": "105" }, "BodyMediaType": "Json", "Headers": [], @@ -5728,21 +5699,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "546", + "$id": "540", "Name": "put", "ResourceName": "UnionIntLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "547", + "$id": "541", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "101" + "$ref": "105" }, "Location": "Body", "IsRequired": true, @@ -5755,11 +5726,11 @@ "Kind": "Method" }, { - "$id": "548", + "$id": "542", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "549", + "$id": "543", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5774,19 +5745,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "550", + "$id": "544", "Type": { - "$ref": "549" + "$ref": "543" }, "Value": "application/json" } }, { - "$id": "551", + "$id": "545", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "552", + "$id": "546", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5801,9 +5772,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "553", + "$id": "547", "Type": { - "$ref": "552" + "$ref": "546" }, "Value": "application/json" } @@ -5811,7 +5782,7 @@ ], "Responses": [ { - "$id": "554", + "$id": "548", "StatusCodes": [ 204 ], @@ -5833,31 +5804,31 @@ } ], "Protocol": { - "$id": "555" + "$id": "549" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "556", + "$id": "550", "Name": "UnionFloatLiteral", "Description": "", "Operations": [ { - "$id": "557", + "$id": "551", "Name": "get", "ResourceName": "UnionFloatLiteral", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "558", + "$id": "552", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "559", + "$id": "553", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5872,9 +5843,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "560", + "$id": "554", "Type": { - "$ref": "559" + "$ref": "553" }, "Value": "application/json" } @@ -5882,12 +5853,12 @@ ], "Responses": [ { - "$id": "561", + "$id": "555", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "107" }, "BodyMediaType": "Json", "Headers": [], @@ -5906,21 +5877,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "562", + "$id": "556", "Name": "put", "ResourceName": "UnionFloatLiteral", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "563", + "$id": "557", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "108" + "$ref": "107" }, "Location": "Body", "IsRequired": true, @@ -5933,11 +5904,11 @@ "Kind": "Method" }, { - "$id": "564", + "$id": "558", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "565", + "$id": "559", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5952,19 +5923,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "566", + "$id": "560", "Type": { - "$ref": "565" + "$ref": "559" }, "Value": "application/json" } }, { - "$id": "567", + "$id": "561", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "568", + "$id": "562", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5979,9 +5950,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "569", + "$id": "563", "Type": { - "$ref": "568" + "$ref": "562" }, "Value": "application/json" } @@ -5989,7 +5960,7 @@ ], "Responses": [ { - "$id": "570", + "$id": "564", "StatusCodes": [ 204 ], @@ -6011,31 +5982,31 @@ } ], "Protocol": { - "$id": "571" + "$id": "565" }, "Creatable": false, "Parent": "ValueTypesClient" }, { - "$id": "572", + "$id": "566", "Name": "UnionEnumValue", "Description": "", "Operations": [ { - "$id": "573", + "$id": "567", "Name": "get", "ResourceName": "UnionEnumValue", "Description": "Get call", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "574", + "$id": "568", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "575", + "$id": "569", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6050,9 +6021,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "576", + "$id": "570", "Type": { - "$ref": "575" + "$ref": "569" }, "Value": "application/json" } @@ -6060,12 +6031,12 @@ ], "Responses": [ { - "$id": "577", + "$id": "571", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "115" + "$ref": "109" }, "BodyMediaType": "Json", "Headers": [], @@ -6084,21 +6055,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "578", + "$id": "572", "Name": "put", "ResourceName": "UnionEnumValue", "Description": "Put operation", "Parameters": [ { - "$ref": "122" + "$ref": "116" }, { - "$id": "579", + "$id": "573", "Name": "body", "NameInRequest": "body", "Description": "body", "Type": { - "$ref": "115" + "$ref": "109" }, "Location": "Body", "IsRequired": true, @@ -6111,11 +6082,11 @@ "Kind": "Method" }, { - "$id": "580", + "$id": "574", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "581", + "$id": "575", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6130,19 +6101,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "582", + "$id": "576", "Type": { - "$ref": "581" + "$ref": "575" }, "Value": "application/json" } }, { - "$id": "583", + "$id": "577", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "584", + "$id": "578", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6157,9 +6128,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "585", + "$id": "579", "Type": { - "$ref": "584" + "$ref": "578" }, "Value": "application/json" } @@ -6167,7 +6138,7 @@ ], "Responses": [ { - "$id": "586", + "$id": "580", "StatusCodes": [ 204 ], @@ -6189,7 +6160,7 @@ } ], "Protocol": { - "$id": "587" + "$id": "581" }, "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 22f4d85a786..08a50c6fa90 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 @@ -110,7 +110,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); @@ -125,7 +125,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); @@ -138,7 +138,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); } @@ -148,7 +148,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); } @@ -160,7 +160,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); @@ -175,7 +175,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); @@ -188,7 +188,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); } @@ -198,7 +198,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 d73e3728941..d93d907fa33 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 @@ -110,7 +110,7 @@ public void Example_UnionFloatLiteral_Put_ShortVersion() using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = client.Put(content); @@ -125,7 +125,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); @@ -138,7 +138,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); } @@ -148,7 +148,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); } @@ -160,7 +160,7 @@ public void Example_UnionFloatLiteral_Put_AllParameters() using RequestContent content = RequestContent.Create(new { - property = 43.125, + property = 43.125F, }); Response response = client.Put(content); @@ -175,7 +175,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); @@ -188,7 +188,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); } @@ -198,7 +198,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 c3f6ea382d0..e143daada8d 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 @@ -138,7 +138,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); } @@ -148,7 +148,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); } @@ -188,7 +188,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); } @@ -198,7 +198,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/CadlRanchProjects/type/union/src/Generated/Docs/EnumsOnly.xml b/test/CadlRanchProjects/type/union/src/Generated/Docs/EnumsOnly.xml index 6f872c47da5..e740112b602 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Docs/EnumsOnly.xml +++ b/test/CadlRanchProjects/type/union/src/Generated/Docs/EnumsOnly.xml @@ -83,14 +83,14 @@ This sample shows how to call SendAsync. This sample shows how to call SendAsync with all parameters. @@ -100,14 +100,14 @@ This sample shows how to call Send. This sample shows how to call Send with all parameters. diff --git a/test/CadlRanchProjects/type/union/src/Generated/Docs/FloatsOnly.xml b/test/CadlRanchProjects/type/union/src/Generated/Docs/FloatsOnly.xml index 17c1e20eb92..3488f78eda5 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Docs/FloatsOnly.xml +++ b/test/CadlRanchProjects/type/union/src/Generated/Docs/FloatsOnly.xml @@ -73,34 +73,34 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("prop").ToString()); ]]> - + This sample shows how to call SendAsync. This sample shows how to call SendAsync with all parameters. - + This sample shows how to call Send. This sample shows how to call Send with all parameters. @@ -111,7 +111,7 @@ FloatsOnly client = new UnionClient().GetFloatsOnlyClient(); using RequestContent content = RequestContent.Create(new { - prop = 1.1, + prop = 1.1F, }); Response response = await client.SendAsync(content); @@ -123,7 +123,7 @@ FloatsOnly client = new UnionClient().GetFloatsOnlyClient(); using RequestContent content = RequestContent.Create(new { - prop = 1.1, + prop = 1.1F, }); Response response = await client.SendAsync(content); @@ -138,7 +138,7 @@ FloatsOnly client = new UnionClient().GetFloatsOnlyClient(); using RequestContent content = RequestContent.Create(new { - prop = 1.1, + prop = 1.1F, }); Response response = client.Send(content); @@ -150,7 +150,7 @@ FloatsOnly client = new UnionClient().GetFloatsOnlyClient(); using RequestContent content = RequestContent.Create(new { - prop = 1.1, + prop = 1.1F, }); Response response = client.Send(content); diff --git a/test/CadlRanchProjects/type/union/src/Generated/Docs/IntsOnly.xml b/test/CadlRanchProjects/type/union/src/Generated/Docs/IntsOnly.xml index 3b106dc03ab..d36c2d43ad1 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Docs/IntsOnly.xml +++ b/test/CadlRanchProjects/type/union/src/Generated/Docs/IntsOnly.xml @@ -73,34 +73,34 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("prop").ToString()); ]]> - + This sample shows how to call SendAsync. This sample shows how to call SendAsync with all parameters. - + This sample shows how to call Send. This sample shows how to call Send with all parameters. diff --git a/test/CadlRanchProjects/type/union/src/Generated/Docs/StringsOnly.xml b/test/CadlRanchProjects/type/union/src/Generated/Docs/StringsOnly.xml index f5268549cba..8b7241bb5c0 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Docs/StringsOnly.xml +++ b/test/CadlRanchProjects/type/union/src/Generated/Docs/StringsOnly.xml @@ -73,34 +73,34 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("prop").ToString()); ]]> - + This sample shows how to call SendAsync. This sample shows how to call SendAsync with all parameters. - + This sample shows how to call Send. This sample shows how to call Send with all parameters. diff --git a/test/CadlRanchProjects/type/union/src/Generated/FloatsOnly.cs b/test/CadlRanchProjects/type/union/src/Generated/FloatsOnly.cs index e8e384591f0..936b15c69cb 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/FloatsOnly.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/FloatsOnly.cs @@ -138,12 +138,9 @@ public virtual Response GetFloatsOnly(RequestContext context) /// Send. /// /// The cancellation token to use. - /// is null. - /// - public virtual async Task SendAsync(BinaryData prop, CancellationToken cancellationToken = default) + /// + public virtual async Task SendAsync(GetResponseProp1 prop, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(prop, nameof(prop)); - SendRequest5 sendRequest5 = new SendRequest5(prop, null); RequestContext context = FromCancellationToken(cancellationToken); Response response = await SendAsync(sendRequest5.ToRequestContent(), context).ConfigureAwait(false); @@ -153,12 +150,9 @@ public virtual async Task SendAsync(BinaryData prop, CancellationToken /// Send. /// /// The cancellation token to use. - /// is null. - /// - public virtual Response Send(BinaryData prop, CancellationToken cancellationToken = default) + /// + public virtual Response Send(GetResponseProp1 prop, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(prop, nameof(prop)); - SendRequest5 sendRequest5 = new SendRequest5(prop, null); RequestContext context = FromCancellationToken(cancellationToken); Response response = Send(sendRequest5.ToRequestContent(), context); @@ -175,7 +169,7 @@ public virtual Response Send(BinaryData prop, CancellationToken cancellationToke /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -214,7 +208,7 @@ public virtual async Task SendAsync(RequestContent content, RequestCon /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/test/CadlRanchProjects/type/union/src/Generated/IntsOnly.cs b/test/CadlRanchProjects/type/union/src/Generated/IntsOnly.cs index 25f28464923..29277076746 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/IntsOnly.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/IntsOnly.cs @@ -138,12 +138,9 @@ public virtual Response GetIntsOnly(RequestContext context) /// Send. /// /// The cancellation token to use. - /// is null. - /// - public virtual async Task SendAsync(BinaryData prop, CancellationToken cancellationToken = default) + /// + public virtual async Task SendAsync(GetResponseProp2 prop, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(prop, nameof(prop)); - SendRequest6 sendRequest6 = new SendRequest6(prop, null); RequestContext context = FromCancellationToken(cancellationToken); Response response = await SendAsync(sendRequest6.ToRequestContent(), context).ConfigureAwait(false); @@ -153,12 +150,9 @@ public virtual async Task SendAsync(BinaryData prop, CancellationToken /// Send. /// /// The cancellation token to use. - /// is null. - /// - public virtual Response Send(BinaryData prop, CancellationToken cancellationToken = default) + /// + public virtual Response Send(GetResponseProp2 prop, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(prop, nameof(prop)); - SendRequest6 sendRequest6 = new SendRequest6(prop, null); RequestContext context = FromCancellationToken(cancellationToken); Response response = Send(sendRequest6.ToRequestContent(), context); @@ -175,7 +169,7 @@ public virtual Response Send(BinaryData prop, CancellationToken cancellationToke /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -214,7 +208,7 @@ public virtual async Task SendAsync(RequestContent content, RequestCon /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCases.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCases.Serialization.cs index 48416033427..85a3f61907b 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCases.Serialization.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCases.Serialization.cs @@ -28,23 +28,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStartObject(); writer.WritePropertyName("lr"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Lr); -#else - using (JsonDocument document = JsonDocument.Parse(Lr)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteStringValue(Lr.ToSerialString()); writer.WritePropertyName("ud"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Ud); -#else - using (JsonDocument document = JsonDocument.Parse(Ud)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteStringValue(Ud.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -83,20 +69,20 @@ internal static EnumsOnlyCases DeserializeEnumsOnlyCases(JsonElement element, Mo { return null; } - BinaryData lr = default; - BinaryData ud = default; + EnumsOnlyCasesLr lr = default; + EnumsOnlyCasesUd ud = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("lr"u8)) { - lr = BinaryData.FromString(property.Value.GetRawText()); + lr = property.Value.GetString().ToEnumsOnlyCasesLr(); continue; } if (property.NameEquals("ud"u8)) { - ud = BinaryData.FromString(property.Value.GetRawText()); + ud = property.Value.GetString().ToEnumsOnlyCasesUd(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCases.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCases.cs index e3fc1935c54..426167a84fa 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCases.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCases.cs @@ -48,12 +48,8 @@ public partial class EnumsOnlyCases /// Initializes a new instance of . /// This should be receive/send the left variant. /// This should be receive/send the up variant. - /// or is null. - public EnumsOnlyCases(BinaryData lr, BinaryData ud) + public EnumsOnlyCases(EnumsOnlyCasesLr lr, EnumsOnlyCasesUd ud) { - Argument.AssertNotNull(lr, nameof(lr)); - Argument.AssertNotNull(ud, nameof(ud)); - Lr = lr; Ud = ud; } @@ -62,7 +58,7 @@ public EnumsOnlyCases(BinaryData lr, BinaryData ud) /// This should be receive/send the left variant. /// This should be receive/send the up variant. /// Keeps track of any properties unknown to the library. - internal EnumsOnlyCases(BinaryData lr, BinaryData ud, IDictionary serializedAdditionalRawData) + internal EnumsOnlyCases(EnumsOnlyCasesLr lr, EnumsOnlyCasesUd ud, IDictionary serializedAdditionalRawData) { Lr = lr; Ud = ud; @@ -74,89 +70,9 @@ internal EnumsOnlyCases() { } - /// - /// This should be receive/send the left variant - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// 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 Lr { get; set; } - /// - /// This should be receive/send the up variant - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// 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 Ud { get; set; } + /// This should be receive/send the left variant. + public EnumsOnlyCasesLr Lr { get; set; } + /// This should be receive/send the up variant. + public EnumsOnlyCasesUd Ud { get; set; } } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesLr.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesLr.Serialization.cs new file mode 100644 index 00000000000..e3631a5bd49 --- /dev/null +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesLr.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Union.Models +{ + internal static partial class EnumsOnlyCasesLrExtensions + { + public static string ToSerialString(this EnumsOnlyCasesLr value) => value switch + { + EnumsOnlyCasesLr.Left => "left", + EnumsOnlyCasesLr.Right => "right", + EnumsOnlyCasesLr.Up => "up", + EnumsOnlyCasesLr.Down => "down", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnumsOnlyCasesLr value.") + }; + + public static EnumsOnlyCasesLr ToEnumsOnlyCasesLr(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "left")) return EnumsOnlyCasesLr.Left; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "right")) return EnumsOnlyCasesLr.Right; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "up")) return EnumsOnlyCasesLr.Up; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "down")) return EnumsOnlyCasesLr.Down; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnumsOnlyCasesLr value."); + } + } +} diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/LR.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesLr.cs similarity index 57% rename from test/CadlRanchProjects/type/union/src/Generated/Models/LR.cs rename to test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesLr.cs index 1efcce1f9c8..5813e269290 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/LR.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesLr.cs @@ -7,12 +7,16 @@ namespace _Type.Union.Models { - /// The LR. - public enum LR + /// The EnumsOnlyCasesLr. + public enum EnumsOnlyCasesLr { /// left. Left, /// right. - Right + Right, + /// up. + Up, + /// down. + Down } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/LR.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesUd.Serialization.cs similarity index 50% rename from test/CadlRanchProjects/type/union/src/Generated/Models/LR.Serialization.cs rename to test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesUd.Serialization.cs index 217ae423fa4..567e6677e25 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/LR.Serialization.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesUd.Serialization.cs @@ -9,20 +9,20 @@ namespace _Type.Union.Models { - internal static partial class LRExtensions + internal static partial class EnumsOnlyCasesUdExtensions { - public static string ToSerialString(this LR value) => value switch + public static string ToSerialString(this EnumsOnlyCasesUd value) => value switch { - LR.Left => "left", - LR.Right => "right", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown LR value.") + EnumsOnlyCasesUd.Up => "up", + EnumsOnlyCasesUd.Down => "down", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnumsOnlyCasesUd value.") }; - public static LR ToLR(this string value) + public static EnumsOnlyCasesUd ToEnumsOnlyCasesUd(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "left")) return LR.Left; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "right")) return LR.Right; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown LR value."); + if (StringComparer.OrdinalIgnoreCase.Equals(value, "up")) return EnumsOnlyCasesUd.Up; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "down")) return EnumsOnlyCasesUd.Down; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnumsOnlyCasesUd value."); } } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/UD.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesUd.cs similarity index 77% rename from test/CadlRanchProjects/type/union/src/Generated/Models/UD.cs rename to test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesUd.cs index 91db3d987a9..7e1a8f1e0a6 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/UD.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/EnumsOnlyCasesUd.cs @@ -7,8 +7,8 @@ namespace _Type.Union.Models { - /// The UD. - public enum UD + /// The EnumsOnlyCasesUd. + public enum EnumsOnlyCasesUd { /// up. Up, diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse5.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse5.Serialization.cs index 692bcfe3cda..03bacd09f2c 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse5.Serialization.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse5.Serialization.cs @@ -28,14 +28,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Prop); -#else - using (JsonDocument document = JsonDocument.Parse(Prop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue(Prop.ToSerialSingle()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -74,14 +67,14 @@ internal static GetResponse5 DeserializeGetResponse5(JsonElement element, ModelR { return null; } - BinaryData prop = default; + GetResponseProp1 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = BinaryData.FromString(property.Value.GetRawText()); + prop = property.Value.GetSingle().ToGetResponseProp1(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse5.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse5.cs index 232bfdaf0ac..1e147b00b2a 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse5.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse5.cs @@ -47,18 +47,15 @@ public partial class GetResponse5 /// Initializes a new instance of . /// - /// is null. - internal GetResponse5(BinaryData prop) + internal GetResponse5(GetResponseProp1 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - Prop = prop; } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal GetResponse5(BinaryData prop, IDictionary serializedAdditionalRawData) + internal GetResponse5(GetResponseProp1 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -69,50 +66,7 @@ internal GetResponse5() { } - /// - /// Gets the prop - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1.1 - /// - /// - /// 2.2 - /// - /// - /// 3.3 - /// - /// - /// - /// 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 Prop { get; } + /// Gets the prop. + public GetResponseProp1 Prop { get; } } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse6.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse6.Serialization.cs index 0adc55f3b69..df9f6bc8872 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse6.Serialization.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse6.Serialization.cs @@ -28,14 +28,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Prop); -#else - using (JsonDocument document = JsonDocument.Parse(Prop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue((int)Prop); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -74,14 +67,14 @@ internal static GetResponse6 DeserializeGetResponse6(JsonElement element, ModelR { return null; } - BinaryData prop = default; + GetResponseProp2 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = BinaryData.FromString(property.Value.GetRawText()); + prop = property.Value.GetInt32().ToGetResponseProp2(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse6.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse6.cs index d4e8595ea2c..50621af7d81 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse6.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse6.cs @@ -47,18 +47,15 @@ public partial class GetResponse6 /// Initializes a new instance of . /// - /// is null. - internal GetResponse6(BinaryData prop) + internal GetResponse6(GetResponseProp2 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - Prop = prop; } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal GetResponse6(BinaryData prop, IDictionary serializedAdditionalRawData) + internal GetResponse6(GetResponseProp2 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -69,50 +66,7 @@ internal GetResponse6() { } - /// - /// Gets the prop - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1 - /// - /// - /// 2 - /// - /// - /// 3 - /// - /// - /// - /// 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 Prop { get; } + /// Gets the prop. + public GetResponseProp2 Prop { get; } } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9.Serialization.cs index 48d4d467bcb..2298ef7b2b3 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9.Serialization.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9.Serialization.cs @@ -28,7 +28,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); - writer.WriteStringValue(Prop.ToString()); + writer.WriteStringValue(Prop.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -67,14 +67,14 @@ internal static GetResponse9 DeserializeGetResponse9(JsonElement element, ModelR { return null; } - GetResponse9Prop prop = default; + GetResponseProp4 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = new GetResponse9Prop(property.Value.GetString()); + prop = property.Value.GetString().ToGetResponseProp4(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9.cs index dbafb04cf27..7fba92c6f50 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9.cs @@ -47,7 +47,7 @@ public partial class GetResponse9 /// Initializes a new instance of . /// - internal GetResponse9(GetResponse9Prop prop) + internal GetResponse9(GetResponseProp4 prop) { Prop = prop; } @@ -55,7 +55,7 @@ internal GetResponse9(GetResponse9Prop prop) /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal GetResponse9(GetResponse9Prop prop, IDictionary serializedAdditionalRawData) + internal GetResponse9(GetResponseProp4 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -67,6 +67,6 @@ internal GetResponse9() } /// Gets the prop. - public GetResponse9Prop Prop { get; } + public GetResponseProp4 Prop { get; } } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9Prop.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9Prop.cs deleted file mode 100644 index 18f2fa86ac7..00000000000 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponse9Prop.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Union.Models -{ - /// Enum for prop in GetResponse9. - public readonly partial struct GetResponse9Prop : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public GetResponse9Prop(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AValue = "a"; - private const string BValue = "b"; - private const string CValue = "c"; - - /// a. - public static GetResponse9Prop A { get; } = new GetResponse9Prop(AValue); - /// b. - public static GetResponse9Prop B { get; } = new GetResponse9Prop(BValue); - /// c. - public static GetResponse9Prop C { get; } = new GetResponse9Prop(CValue); - /// Determines if two values are the same. - public static bool operator ==(GetResponse9Prop left, GetResponse9Prop right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(GetResponse9Prop left, GetResponse9Prop right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator GetResponse9Prop(string value) => new GetResponse9Prop(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is GetResponse9Prop other && Equals(other); - /// - public bool Equals(GetResponse9Prop 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/union/src/Generated/Models/GetResponseProp1.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp1.Serialization.cs new file mode 100644 index 00000000000..175bd77cde1 --- /dev/null +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp1.Serialization.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Union.Models +{ + internal static partial class GetResponseProp1Extensions + { + public static float ToSerialSingle(this GetResponseProp1 value) => value switch + { + GetResponseProp1._11 => 1.1F, + GetResponseProp1._22 => 2.2F, + GetResponseProp1._33 => 3.3F, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp1 value.") + }; + + public static GetResponseProp1 ToGetResponseProp1(this float value) + { + if (value == 1.1F) return GetResponseProp1._11; + if (value == 2.2F) return GetResponseProp1._22; + if (value == 3.3F) return GetResponseProp1._33; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp1 value."); + } + } +} diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp1.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp1.cs new file mode 100644 index 00000000000..c9acf837e23 --- /dev/null +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp1.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Type.Union.Models +{ + /// The GetResponseProp1. + public enum GetResponseProp1 + { + /// 1.1. + _11, + /// 2.2. + _22, + /// 3.3. + _33 + } +} diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp2.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp2.Serialization.cs new file mode 100644 index 00000000000..ee00370668f --- /dev/null +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp2.Serialization.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Union.Models +{ + internal static partial class GetResponseProp2Extensions + { + public static GetResponseProp2 ToGetResponseProp2(this int value) + { + if (value == 1) return GetResponseProp2._1; + if (value == 2) return GetResponseProp2._2; + if (value == 3) return GetResponseProp2._3; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp2 value."); + } + } +} diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp2.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp2.cs new file mode 100644 index 00000000000..b19f3d0b946 --- /dev/null +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp2.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Type.Union.Models +{ + /// The GetResponseProp2. + public enum GetResponseProp2 + { + /// 1. + _1 = 1, + /// 2. + _2 = 2, + /// 3. + _3 = 3 + } +} diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp4.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp4.Serialization.cs new file mode 100644 index 00000000000..bf05c53d208 --- /dev/null +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp4.Serialization.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace _Type.Union.Models +{ + internal static partial class GetResponseProp4Extensions + { + public static string ToSerialString(this GetResponseProp4 value) => value switch + { + GetResponseProp4.A => "a", + GetResponseProp4.B => "b", + GetResponseProp4.C => "c", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp4 value.") + }; + + public static GetResponseProp4 ToGetResponseProp4(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "a")) return GetResponseProp4.A; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "b")) return GetResponseProp4.B; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "c")) return GetResponseProp4.C; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp4 value."); + } + } +} diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp4.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp4.cs new file mode 100644 index 00000000000..c709c998bc4 --- /dev/null +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/GetResponseProp4.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Type.Union.Models +{ + /// The GetResponseProp4. + public enum GetResponseProp4 + { + /// a. + A, + /// b. + B, + /// c. + C + } +} diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest5.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest5.Serialization.cs index 92de57566a6..40c0d67e334 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest5.Serialization.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest5.Serialization.cs @@ -28,14 +28,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Prop); -#else - using (JsonDocument document = JsonDocument.Parse(Prop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue(Prop.ToSerialSingle()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -74,14 +67,14 @@ internal static SendRequest5 DeserializeSendRequest5(JsonElement element, ModelR { return null; } - BinaryData prop = default; + GetResponseProp1 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = BinaryData.FromString(property.Value.GetRawText()); + prop = property.Value.GetSingle().ToGetResponseProp1(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest5.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest5.cs index 4baa3c02fc7..8975acfb336 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest5.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest5.cs @@ -47,18 +47,15 @@ internal partial class SendRequest5 /// Initializes a new instance of . /// - /// is null. - public SendRequest5(BinaryData prop) + public SendRequest5(GetResponseProp1 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - Prop = prop; } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal SendRequest5(BinaryData prop, IDictionary serializedAdditionalRawData) + internal SendRequest5(GetResponseProp1 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -69,50 +66,7 @@ internal SendRequest5() { } - /// - /// Gets the prop - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1.1 - /// - /// - /// 2.2 - /// - /// - /// 3.3 - /// - /// - /// - /// 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 Prop { get; } + /// Gets the prop. + public GetResponseProp1 Prop { get; } } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest6.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest6.Serialization.cs index 471d425a7c7..b873de341fd 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest6.Serialization.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest6.Serialization.cs @@ -28,14 +28,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Prop); -#else - using (JsonDocument document = JsonDocument.Parse(Prop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue((int)Prop); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -74,14 +67,14 @@ internal static SendRequest6 DeserializeSendRequest6(JsonElement element, ModelR { return null; } - BinaryData prop = default; + GetResponseProp2 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = BinaryData.FromString(property.Value.GetRawText()); + prop = property.Value.GetInt32().ToGetResponseProp2(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest6.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest6.cs index 20cf3cbf8d1..22163dec509 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest6.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest6.cs @@ -47,18 +47,15 @@ internal partial class SendRequest6 /// Initializes a new instance of . /// - /// is null. - public SendRequest6(BinaryData prop) + public SendRequest6(GetResponseProp2 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - Prop = prop; } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal SendRequest6(BinaryData prop, IDictionary serializedAdditionalRawData) + internal SendRequest6(GetResponseProp2 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -69,50 +66,7 @@ internal SendRequest6() { } - /// - /// Gets the prop - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1 - /// - /// - /// 2 - /// - /// - /// 3 - /// - /// - /// - /// 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 Prop { get; } + /// Gets the prop. + public GetResponseProp2 Prop { get; } } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9.Serialization.cs index 3944c238025..25d22244a9d 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9.Serialization.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9.Serialization.cs @@ -28,7 +28,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); - writer.WriteStringValue(Prop.ToString()); + writer.WriteStringValue(Prop.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -67,14 +67,14 @@ internal static SendRequest9 DeserializeSendRequest9(JsonElement element, ModelR { return null; } - SendRequest9Prop prop = default; + GetResponseProp4 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = new SendRequest9Prop(property.Value.GetString()); + prop = property.Value.GetString().ToGetResponseProp4(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9.cs index cca67bdd524..4df5030bef8 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9.cs @@ -47,7 +47,7 @@ internal partial class SendRequest9 /// Initializes a new instance of . /// - public SendRequest9(SendRequest9Prop prop) + public SendRequest9(GetResponseProp4 prop) { Prop = prop; } @@ -55,7 +55,7 @@ public SendRequest9(SendRequest9Prop prop) /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal SendRequest9(SendRequest9Prop prop, IDictionary serializedAdditionalRawData) + internal SendRequest9(GetResponseProp4 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -67,6 +67,6 @@ internal SendRequest9() } /// Gets the prop. - public SendRequest9Prop Prop { get; } + public GetResponseProp4 Prop { get; } } } diff --git a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9Prop.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9Prop.cs deleted file mode 100644 index c52e7e71660..00000000000 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/SendRequest9Prop.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Union.Models -{ - /// Enum for prop in SendRequest9. - public readonly partial struct SendRequest9Prop : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SendRequest9Prop(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AValue = "a"; - private const string BValue = "b"; - private const string CValue = "c"; - - /// a. - public static SendRequest9Prop A { get; } = new SendRequest9Prop(AValue); - /// b. - public static SendRequest9Prop B { get; } = new SendRequest9Prop(BValue); - /// c. - public static SendRequest9Prop C { get; } = new SendRequest9Prop(CValue); - /// Determines if two values are the same. - public static bool operator ==(SendRequest9Prop left, SendRequest9Prop right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SendRequest9Prop left, SendRequest9Prop right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SendRequest9Prop(string value) => new SendRequest9Prop(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SendRequest9Prop other && Equals(other); - /// - public bool Equals(SendRequest9Prop 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/union/src/Generated/Models/UD.Serialization.cs b/test/CadlRanchProjects/type/union/src/Generated/Models/UD.Serialization.cs deleted file mode 100644 index 00a23c78d54..00000000000 --- a/test/CadlRanchProjects/type/union/src/Generated/Models/UD.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace _Type.Union.Models -{ - internal static partial class UDExtensions - { - public static string ToSerialString(this UD value) => value switch - { - UD.Up => "up", - UD.Down => "down", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UD value.") - }; - - public static UD ToUD(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "up")) return UD.Up; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "down")) return UD.Down; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UD value."); - } - } -} diff --git a/test/CadlRanchProjects/type/union/src/Generated/StringsOnly.cs b/test/CadlRanchProjects/type/union/src/Generated/StringsOnly.cs index bc9236de0fb..528b6247e3b 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/StringsOnly.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/StringsOnly.cs @@ -138,8 +138,8 @@ public virtual Response GetStringsOnly(RequestContext context) /// Send. /// /// The cancellation token to use. - /// - public virtual async Task SendAsync(SendRequest9Prop prop, CancellationToken cancellationToken = default) + /// + public virtual async Task SendAsync(GetResponseProp4 prop, CancellationToken cancellationToken = default) { SendRequest9 sendRequest9 = new SendRequest9(prop, null); RequestContext context = FromCancellationToken(cancellationToken); @@ -150,8 +150,8 @@ public virtual async Task SendAsync(SendRequest9Prop prop, Cancellatio /// Send. /// /// The cancellation token to use. - /// - public virtual Response Send(SendRequest9Prop prop, CancellationToken cancellationToken = default) + /// + public virtual Response Send(GetResponseProp4 prop, CancellationToken cancellationToken = default) { SendRequest9 sendRequest9 = new SendRequest9(prop, null); RequestContext context = FromCancellationToken(cancellationToken); @@ -169,7 +169,7 @@ public virtual Response Send(SendRequest9Prop prop, CancellationToken cancellati /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -208,7 +208,7 @@ public virtual async Task SendAsync(RequestContent content, RequestCon /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/test/CadlRanchProjects/type/union/src/Generated/TypeUnionModelFactory.cs b/test/CadlRanchProjects/type/union/src/Generated/TypeUnionModelFactory.cs index 389c02baa0d..a31eafb7144 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/TypeUnionModelFactory.cs +++ b/test/CadlRanchProjects/type/union/src/Generated/TypeUnionModelFactory.cs @@ -15,7 +15,7 @@ public static partial class TypeUnionModelFactory /// Initializes a new instance of . /// /// A new instance for mocking. - public static GetResponse9 GetResponse9(GetResponse9Prop prop = default) + public static GetResponse9 GetResponse9(GetResponseProp4 prop = default) { return new GetResponse9(prop, serializedAdditionalRawData: null); } @@ -39,7 +39,7 @@ public static GetResponse7 GetResponse7(StringExtensibleNamedUnion prop = defaul /// Initializes a new instance of . /// /// A new instance for mocking. - public static GetResponse6 GetResponse6(BinaryData prop = null) + public static GetResponse6 GetResponse6(GetResponseProp2 prop = default) { return new GetResponse6(prop, serializedAdditionalRawData: null); } @@ -47,7 +47,7 @@ public static GetResponse6 GetResponse6(BinaryData prop = null) /// Initializes a new instance of . /// /// A new instance for mocking. - public static GetResponse5 GetResponse5(BinaryData prop = null) + public static GetResponse5 GetResponse5(GetResponseProp1 prop = default) { return new GetResponse5(prop, serializedAdditionalRawData: null); } diff --git a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json index 6e2ff0b1835..ac6dc7507d1 100644 --- a/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjects/type/union/src/Generated/tspCodeModel.json @@ -7,16 +7,43 @@ { "$id": "2", "Kind": "Enum", - "Name": "GetResponseProp3", - "EnumValueType": "string", + "Name": "GetResponseProp4", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", + "Name": "a", + "Value": "a" + }, + { + "$id": "4", "Name": "b", "Value": "b" }, { - "$id": "4", + "$id": "5", + "Name": "c", + "Value": "c" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "6", + "Kind": "Enum", + "Name": "GetResponseProp3", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "7", + "Name": "b", + "Value": "b" + }, + { + "$id": "8", "Name": "c", "Value": "c" } @@ -27,18 +54,18 @@ "Usage": "RoundTrip" }, { - "$id": "5", + "$id": "9", "Kind": "Enum", "Name": "StringExtensibleNamedUnion", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "6", + "$id": "10", "Name": "OptionB", "Value": "b" }, { - "$id": "7", + "$id": "11", "Name": "c", "Value": "c" } @@ -49,47 +76,109 @@ "Usage": "RoundTrip" }, { - "$id": "8", + "$id": "12", "Kind": "Enum", - "Name": "LR", + "Name": "GetResponseProp2", + "EnumValueType": "Int32", + "AllowedValues": [ + { + "$id": "13", + "Name": "1", + "Value": 1 + }, + { + "$id": "14", + "Name": "2", + "Value": 2 + }, + { + "$id": "15", + "Name": "3", + "Value": 3 + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "16", + "Kind": "Enum", + "Name": "GetResponseProp1", + "EnumValueType": "Float32", + "AllowedValues": [ + { + "$id": "17", + "Name": "1.1", + "Value": 1.1 + }, + { + "$id": "18", + "Name": "2.2", + "Value": 2.2 + }, + { + "$id": "19", + "Name": "3.3", + "Value": 3.3 + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "20", + "Kind": "Enum", + "Name": "EnumsOnlyCasesLr", "EnumValueType": "String", "AllowedValues": [ { - "$id": "9", + "$id": "21", "Name": "left", "Value": "left" }, { - "$id": "10", + "$id": "22", "Name": "right", "Value": "right" + }, + { + "$id": "23", + "Name": "up", + "Value": "up" + }, + { + "$id": "24", + "Name": "down", + "Value": "down" } ], - "Namespace": "Type.Union", - "Description": "", + "Namespace": "", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" }, { - "$id": "11", + "$id": "25", "Kind": "Enum", - "Name": "UD", + "Name": "EnumsOnlyCasesUd", "EnumValueType": "String", "AllowedValues": [ { - "$id": "12", + "$id": "26", "Name": "up", "Value": "up" }, { - "$id": "13", + "$id": "27", "Name": "down", "Value": "down" } ], - "Namespace": "Type.Union", - "Description": "", + "Namespace": "", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -97,7 +186,7 @@ ], "Models": [ { - "$id": "14", + "$id": "28", "Kind": "Model", "Name": "GetResponse9", "Namespace": "Type.Union", @@ -105,56 +194,12 @@ "Usage": "Output", "Properties": [ { - "$id": "15", + "$id": "29", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "16", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "17", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "18", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "a", - "IsNullable": false - }, - { - "$id": "19", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "20", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "b", - "IsNullable": false - }, - { - "$id": "21", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "22", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "c", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "2" }, "IsRequired": true, "IsReadOnly": false @@ -162,7 +207,7 @@ ] }, { - "$id": "23", + "$id": "30", "Kind": "Model", "Name": "SendRequest9", "Namespace": "Type.Union", @@ -170,56 +215,12 @@ "Usage": "Input", "Properties": [ { - "$id": "24", + "$id": "31", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "25", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "26", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "27", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "a", - "IsNullable": false - }, - { - "$id": "28", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "29", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "b", - "IsNullable": false - }, - { - "$id": "30", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "31", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "c", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "2" }, "IsRequired": true, "IsReadOnly": false @@ -240,7 +241,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$ref": "2" + "$ref": "6" }, "IsRequired": true, "IsReadOnly": false @@ -261,7 +262,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$ref": "2" + "$ref": "6" }, "IsRequired": true, "IsReadOnly": false @@ -282,7 +283,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$ref": "5" + "$ref": "9" }, "IsRequired": true, "IsReadOnly": false @@ -303,7 +304,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$ref": "5" + "$ref": "9" }, "IsRequired": true, "IsReadOnly": false @@ -324,51 +325,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$id": "42", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "43", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "44", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 1, - "IsNullable": false - }, - { - "$id": "45", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "46", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 2, - "IsNullable": false - }, - { - "$id": "47", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "48", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 3, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "12" }, "IsRequired": true, "IsReadOnly": false @@ -376,7 +333,7 @@ ] }, { - "$id": "49", + "$id": "42", "Kind": "Model", "Name": "SendRequest6", "Namespace": "Type.Union", @@ -384,56 +341,12 @@ "Usage": "Input", "Properties": [ { - "$id": "50", + "$id": "43", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "51", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "52", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "53", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 1, - "IsNullable": false - }, - { - "$id": "54", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "55", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 2, - "IsNullable": false - }, - { - "$id": "56", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "57", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 3, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "12" }, "IsRequired": true, "IsReadOnly": false @@ -441,7 +354,7 @@ ] }, { - "$id": "58", + "$id": "44", "Kind": "Model", "Name": "GetResponse5", "Namespace": "Type.Union", @@ -449,56 +362,12 @@ "Usage": "Output", "Properties": [ { - "$id": "59", + "$id": "45", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "60", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "61", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "62", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 1.1, - "IsNullable": false - }, - { - "$id": "63", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "64", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 2.2, - "IsNullable": false - }, - { - "$id": "65", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "66", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 3.3, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "16" }, "IsRequired": true, "IsReadOnly": false @@ -506,7 +375,7 @@ ] }, { - "$id": "67", + "$id": "46", "Kind": "Model", "Name": "SendRequest5", "Namespace": "Type.Union", @@ -514,56 +383,12 @@ "Usage": "Input", "Properties": [ { - "$id": "68", + "$id": "47", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "69", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "70", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "71", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 1.1, - "IsNullable": false - }, - { - "$id": "72", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "73", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 2.2, - "IsNullable": false - }, - { - "$id": "74", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "75", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 3.3, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "16" }, "IsRequired": true, "IsReadOnly": false @@ -571,7 +396,7 @@ ] }, { - "$id": "76", + "$id": "48", "Kind": "Model", "Name": "GetResponse4", "Namespace": "Type.Union", @@ -579,17 +404,17 @@ "Usage": "Output", "Properties": [ { - "$id": "77", + "$id": "49", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "78", + "$id": "50", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "79", + "$id": "51", "Kind": "Model", "Name": "Cat", "Namespace": "Type.Union", @@ -597,12 +422,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "80", + "$id": "52", "Name": "name", "SerializedName": "name", "Description": "", "Type": { - "$id": "81", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -613,7 +438,7 @@ ] }, { - "$id": "82", + "$id": "54", "Kind": "Model", "Name": "Dog", "Namespace": "Type.Union", @@ -621,12 +446,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "83", + "$id": "55", "Name": "bark", "SerializedName": "bark", "Description": "", "Type": { - "$id": "84", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -645,13 +470,13 @@ ] }, { - "$ref": "79" + "$ref": "51" }, { - "$ref": "82" + "$ref": "54" }, { - "$id": "85", + "$id": "57", "Kind": "Model", "Name": "SendRequest4", "Namespace": "Type.Union", @@ -659,20 +484,20 @@ "Usage": "Input", "Properties": [ { - "$id": "86", + "$id": "58", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "87", + "$id": "59", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$ref": "82" + "$ref": "54" } ], "IsNullable": false @@ -683,7 +508,7 @@ ] }, { - "$id": "88", + "$id": "60", "Kind": "Model", "Name": "GetResponse3", "Namespace": "Type.Union", @@ -691,12 +516,12 @@ "Usage": "Output", "Properties": [ { - "$id": "89", + "$id": "61", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "90", + "$id": "62", "Kind": "Model", "Name": "EnumsOnlyCases", "Namespace": "Type.Union", @@ -704,45 +529,23 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "91", + "$id": "63", "Name": "lr", "SerializedName": "lr", "Description": "This should be receive/send the left variant", "Type": { - "$id": "92", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$ref": "8" - }, - { - "$ref": "11" - } - ], - "IsNullable": false + "$ref": "20" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "93", + "$id": "64", "Name": "ud", "SerializedName": "ud", "Description": "This should be receive/send the up variant", "Type": { - "$id": "94", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$ref": "11" - }, - { - "$ref": "11" - } - ], - "IsNullable": false + "$ref": "25" }, "IsRequired": true, "IsReadOnly": false @@ -755,10 +558,10 @@ ] }, { - "$ref": "90" + "$ref": "62" }, { - "$id": "95", + "$id": "65", "Kind": "Model", "Name": "SendRequest3", "Namespace": "Type.Union", @@ -766,12 +569,12 @@ "Usage": "Input", "Properties": [ { - "$id": "96", + "$id": "66", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "90" + "$ref": "62" }, "IsRequired": true, "IsReadOnly": false @@ -779,7 +582,7 @@ ] }, { - "$id": "97", + "$id": "67", "Kind": "Model", "Name": "GetResponse2", "Namespace": "Type.Union", @@ -787,12 +590,12 @@ "Usage": "Output", "Properties": [ { - "$id": "98", + "$id": "68", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "99", + "$id": "69", "Kind": "Model", "Name": "StringAndArrayCases", "Namespace": "Type.Union", @@ -800,27 +603,27 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "100", + "$id": "70", "Name": "string", "SerializedName": "string", "Description": "This should be receive/send the string variant", "Type": { - "$id": "101", + "$id": "71", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "102", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "103", + "$id": "73", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "104", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -834,27 +637,27 @@ "IsReadOnly": false }, { - "$id": "105", + "$id": "75", "Name": "array", "SerializedName": "array", "Description": "This should be receive/send the array variant", "Type": { - "$id": "106", + "$id": "76", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "107", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "108", + "$id": "78", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "109", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -875,10 +678,10 @@ ] }, { - "$ref": "99" + "$ref": "69" }, { - "$id": "110", + "$id": "80", "Kind": "Model", "Name": "SendRequest2", "Namespace": "Type.Union", @@ -886,12 +689,12 @@ "Usage": "Input", "Properties": [ { - "$id": "111", + "$id": "81", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "99" + "$ref": "69" }, "IsRequired": true, "IsReadOnly": false @@ -899,7 +702,7 @@ ] }, { - "$id": "112", + "$id": "82", "Kind": "Model", "Name": "GetResponse1", "Namespace": "Type.Union", @@ -907,12 +710,12 @@ "Usage": "Output", "Properties": [ { - "$id": "113", + "$id": "83", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "114", + "$id": "84", "Kind": "Model", "Name": "MixedLiteralsCases", "Namespace": "Type.Union", @@ -920,21 +723,21 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "115", + "$id": "85", "Name": "stringLiteral", "SerializedName": "stringLiteral", "Description": "This should be receive/send the \"a\" variant", "Type": { - "$id": "116", + "$id": "86", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "117", + "$id": "87", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "118", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -943,11 +746,11 @@ "IsNullable": false }, { - "$id": "119", + "$id": "89", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "120", + "$id": "90", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -956,24 +759,24 @@ "IsNullable": false }, { - "$id": "121", + "$id": "91", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "122", + "$id": "92", "Kind": "Primitive", - "Name": "Float64", + "Name": "Float32", "IsNullable": false }, "Value": 3.3, "IsNullable": false }, { - "$id": "123", + "$id": "93", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "124", + "$id": "94", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -988,21 +791,21 @@ "IsReadOnly": false }, { - "$id": "125", + "$id": "95", "Name": "intLiteral", "SerializedName": "intLiteral", "Description": "This should be receive/send the 2 variant", "Type": { - "$id": "126", + "$id": "96", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "127", + "$id": "97", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "128", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1011,11 +814,11 @@ "IsNullable": false }, { - "$id": "129", + "$id": "99", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "130", + "$id": "100", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1024,24 +827,24 @@ "IsNullable": false }, { - "$id": "131", + "$id": "101", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "132", + "$id": "102", "Kind": "Primitive", - "Name": "Float64", + "Name": "Float32", "IsNullable": false }, "Value": 3.3, "IsNullable": false }, { - "$id": "133", + "$id": "103", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "134", + "$id": "104", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1056,21 +859,21 @@ "IsReadOnly": false }, { - "$id": "135", + "$id": "105", "Name": "floatLiteral", "SerializedName": "floatLiteral", "Description": "This should be receive/send the 3.3 variant", "Type": { - "$id": "136", + "$id": "106", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "137", + "$id": "107", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "138", + "$id": "108", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1079,11 +882,11 @@ "IsNullable": false }, { - "$id": "139", + "$id": "109", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "140", + "$id": "110", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1092,24 +895,24 @@ "IsNullable": false }, { - "$id": "141", + "$id": "111", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "142", + "$id": "112", "Kind": "Primitive", - "Name": "Float64", + "Name": "Float32", "IsNullable": false }, "Value": 3.3, "IsNullable": false }, { - "$id": "143", + "$id": "113", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "144", + "$id": "114", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1124,21 +927,21 @@ "IsReadOnly": false }, { - "$id": "145", + "$id": "115", "Name": "booleanLiteral", "SerializedName": "booleanLiteral", "Description": "This should be receive/send the true variant", "Type": { - "$id": "146", + "$id": "116", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "147", + "$id": "117", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "148", + "$id": "118", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1147,11 +950,11 @@ "IsNullable": false }, { - "$id": "149", + "$id": "119", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "150", + "$id": "120", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1160,24 +963,24 @@ "IsNullable": false }, { - "$id": "151", + "$id": "121", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "152", + "$id": "122", "Kind": "Primitive", - "Name": "Float64", + "Name": "Float32", "IsNullable": false }, "Value": 3.3, "IsNullable": false }, { - "$id": "153", + "$id": "123", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "154", + "$id": "124", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1199,10 +1002,10 @@ ] }, { - "$ref": "114" + "$ref": "84" }, { - "$id": "155", + "$id": "125", "Kind": "Model", "Name": "SendRequest1", "Namespace": "Type.Union", @@ -1210,12 +1013,12 @@ "Usage": "Input", "Properties": [ { - "$id": "156", + "$id": "126", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "114" + "$ref": "84" }, "IsRequired": true, "IsReadOnly": false @@ -1223,7 +1026,7 @@ ] }, { - "$id": "157", + "$id": "127", "Kind": "Model", "Name": "GetResponse", "Namespace": "Type.Union", @@ -1231,12 +1034,12 @@ "Usage": "Output", "Properties": [ { - "$id": "158", + "$id": "128", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "159", + "$id": "129", "Kind": "Model", "Name": "MixedTypesCases", "Namespace": "Type.Union", @@ -1244,24 +1047,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "160", + "$id": "130", "Name": "model", "SerializedName": "model", "Description": "This should be receive/send the Cat variant", "Type": { - "$id": "161", + "$id": "131", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "162", + "$id": "132", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "163", + "$id": "133", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1270,13 +1073,13 @@ "IsNullable": false }, { - "$id": "164", + "$id": "134", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "165", + "$id": "135", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1288,24 +1091,24 @@ "IsReadOnly": false }, { - "$id": "166", + "$id": "136", "Name": "literal", "SerializedName": "literal", "Description": "This should be receive/send the \"a\" variant", "Type": { - "$id": "167", + "$id": "137", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "168", + "$id": "138", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "169", + "$id": "139", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1314,13 +1117,13 @@ "IsNullable": false }, { - "$id": "170", + "$id": "140", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "171", + "$id": "141", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1332,24 +1135,24 @@ "IsReadOnly": false }, { - "$id": "172", + "$id": "142", "Name": "int", "SerializedName": "int", "Description": "This should be receive/send the int variant", "Type": { - "$id": "173", + "$id": "143", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "174", + "$id": "144", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "175", + "$id": "145", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1358,13 +1161,13 @@ "IsNullable": false }, { - "$id": "176", + "$id": "146", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "177", + "$id": "147", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1376,24 +1179,24 @@ "IsReadOnly": false }, { - "$id": "178", + "$id": "148", "Name": "boolean", "SerializedName": "boolean", "Description": "This should be receive/send the boolean variant", "Type": { - "$id": "179", + "$id": "149", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "180", + "$id": "150", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "181", + "$id": "151", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1402,13 +1205,13 @@ "IsNullable": false }, { - "$id": "182", + "$id": "152", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "183", + "$id": "153", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1420,28 +1223,28 @@ "IsReadOnly": false }, { - "$id": "184", + "$id": "154", "Name": "array", "SerializedName": "array", "Description": "This should be receive/send 4 element with Cat, \"a\", int, and boolean", "Type": { - "$id": "185", + "$id": "155", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "186", + "$id": "156", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "187", + "$id": "157", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "188", + "$id": "158", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1450,13 +1253,13 @@ "IsNullable": false }, { - "$id": "189", + "$id": "159", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "190", + "$id": "160", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1477,10 +1280,10 @@ ] }, { - "$ref": "159" + "$ref": "129" }, { - "$id": "191", + "$id": "161", "Kind": "Model", "Name": "SendRequest", "Namespace": "Type.Union", @@ -1488,12 +1291,12 @@ "Usage": "Input", "Properties": [ { - "$id": "192", + "$id": "162", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "159" + "$ref": "129" }, "IsRequired": true, "IsReadOnly": false @@ -1503,32 +1306,32 @@ ], "Clients": [ { - "$id": "193", + "$id": "163", "Name": "UnionClient", "Description": "", "Operations": [], "Protocol": { - "$id": "194" + "$id": "164" }, "Creatable": true }, { - "$id": "195", + "$id": "165", "Name": "StringsOnly", "Description": "Describe union of string \"a\" | \"b\" | \"c\"", "Operations": [ { - "$id": "196", + "$id": "166", "Name": "get", "ResourceName": "StringsOnly", "Parameters": [ { - "$id": "197", + "$id": "167", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "198", + "$id": "168", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1543,9 +1346,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "199", + "$id": "169", "Type": { - "$id": "200", + "$id": "170", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1554,11 +1357,11 @@ } }, { - "$id": "201", + "$id": "171", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "172", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1573,9 +1376,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "173", "Type": { - "$ref": "202" + "$ref": "172" }, "Value": "application/json" } @@ -1583,12 +1386,12 @@ ], "Responses": [ { - "$id": "204", + "$id": "174", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "14" + "$ref": "28" }, "BodyMediaType": "Json", "Headers": [], @@ -1607,19 +1410,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "205", + "$id": "175", "Name": "send", "ResourceName": "StringsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "206", + "$id": "176", "Name": "SendRequest9", "NameInRequest": "", "Type": { - "$ref": "23" + "$ref": "30" }, "Location": "Body", "IsRequired": true, @@ -1632,11 +1435,11 @@ "Kind": "Spread" }, { - "$id": "207", + "$id": "177", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "208", + "$id": "178", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1651,19 +1454,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "209", + "$id": "179", "Type": { - "$ref": "208" + "$ref": "178" }, "Value": "application/json" } }, { - "$id": "210", + "$id": "180", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "211", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1678,9 +1481,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "212", + "$id": "182", "Type": { - "$ref": "211" + "$ref": "181" }, "Value": "application/json" } @@ -1688,7 +1491,7 @@ ], "Responses": [ { - "$id": "213", + "$id": "183", "StatusCodes": [ 204 ], @@ -1710,30 +1513,30 @@ } ], "Protocol": { - "$id": "214" + "$id": "184" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "215", + "$id": "185", "Name": "StringExtensible", "Description": "Describe union of string string | \"b\" | \"c\"", "Operations": [ { - "$id": "216", + "$id": "186", "Name": "get", "ResourceName": "StringExtensible", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "217", + "$id": "187", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "218", + "$id": "188", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1748,9 +1551,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "219", + "$id": "189", "Type": { - "$ref": "218" + "$ref": "188" }, "Value": "application/json" } @@ -1758,7 +1561,7 @@ ], "Responses": [ { - "$id": "220", + "$id": "190", "StatusCodes": [ 200 ], @@ -1782,15 +1585,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "221", + "$id": "191", "Name": "send", "ResourceName": "StringExtensible", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "222", + "$id": "192", "Name": "SendRequest8", "NameInRequest": "", "Type": { @@ -1807,11 +1610,11 @@ "Kind": "Spread" }, { - "$id": "223", + "$id": "193", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "224", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1826,19 +1629,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "225", + "$id": "195", "Type": { - "$ref": "224" + "$ref": "194" }, "Value": "application/json" } }, { - "$id": "226", + "$id": "196", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "227", + "$id": "197", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1853,9 +1656,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "228", + "$id": "198", "Type": { - "$ref": "227" + "$ref": "197" }, "Value": "application/json" } @@ -1863,7 +1666,7 @@ ], "Responses": [ { - "$id": "229", + "$id": "199", "StatusCodes": [ 204 ], @@ -1885,30 +1688,30 @@ } ], "Protocol": { - "$id": "230" + "$id": "200" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "231", + "$id": "201", "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": "232", + "$id": "202", "Name": "get", "ResourceName": "StringExtensibleNamed", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "233", + "$id": "203", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "234", + "$id": "204", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1923,9 +1726,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "235", + "$id": "205", "Type": { - "$ref": "234" + "$ref": "204" }, "Value": "application/json" } @@ -1933,7 +1736,7 @@ ], "Responses": [ { - "$id": "236", + "$id": "206", "StatusCodes": [ 200 ], @@ -1957,15 +1760,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "237", + "$id": "207", "Name": "send", "ResourceName": "StringExtensibleNamed", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "238", + "$id": "208", "Name": "SendRequest7", "NameInRequest": "", "Type": { @@ -1982,11 +1785,11 @@ "Kind": "Spread" }, { - "$id": "239", + "$id": "209", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "240", + "$id": "210", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2001,19 +1804,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "241", + "$id": "211", "Type": { - "$ref": "240" + "$ref": "210" }, "Value": "application/json" } }, { - "$id": "242", + "$id": "212", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "243", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2028,9 +1831,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "244", + "$id": "214", "Type": { - "$ref": "243" + "$ref": "213" }, "Value": "application/json" } @@ -2038,7 +1841,7 @@ ], "Responses": [ { - "$id": "245", + "$id": "215", "StatusCodes": [ 204 ], @@ -2060,30 +1863,30 @@ } ], "Protocol": { - "$id": "246" + "$id": "216" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "247", + "$id": "217", "Name": "IntsOnly", "Description": "Describe union of integer 1 | 2 | 3", "Operations": [ { - "$id": "248", + "$id": "218", "Name": "get", "ResourceName": "IntsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "249", + "$id": "219", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "250", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2098,9 +1901,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "251", + "$id": "221", "Type": { - "$ref": "250" + "$ref": "220" }, "Value": "application/json" } @@ -2108,7 +1911,7 @@ ], "Responses": [ { - "$id": "252", + "$id": "222", "StatusCodes": [ 200 ], @@ -2132,19 +1935,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "253", + "$id": "223", "Name": "send", "ResourceName": "IntsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "254", + "$id": "224", "Name": "SendRequest6", "NameInRequest": "", "Type": { - "$ref": "49" + "$ref": "42" }, "Location": "Body", "IsRequired": true, @@ -2157,11 +1960,11 @@ "Kind": "Spread" }, { - "$id": "255", + "$id": "225", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "256", + "$id": "226", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2176,19 +1979,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "257", + "$id": "227", "Type": { - "$ref": "256" + "$ref": "226" }, "Value": "application/json" } }, { - "$id": "258", + "$id": "228", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "259", + "$id": "229", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2203,9 +2006,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "260", + "$id": "230", "Type": { - "$ref": "259" + "$ref": "229" }, "Value": "application/json" } @@ -2213,7 +2016,7 @@ ], "Responses": [ { - "$id": "261", + "$id": "231", "StatusCodes": [ 204 ], @@ -2235,30 +2038,30 @@ } ], "Protocol": { - "$id": "262" + "$id": "232" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "263", + "$id": "233", "Name": "FloatsOnly", "Description": "Describe union of floats 1.1 | 2.2 | 3.3", "Operations": [ { - "$id": "264", + "$id": "234", "Name": "get", "ResourceName": "FloatsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "265", + "$id": "235", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "266", + "$id": "236", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2273,9 +2076,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "267", + "$id": "237", "Type": { - "$ref": "266" + "$ref": "236" }, "Value": "application/json" } @@ -2283,12 +2086,12 @@ ], "Responses": [ { - "$id": "268", + "$id": "238", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "58" + "$ref": "44" }, "BodyMediaType": "Json", "Headers": [], @@ -2307,19 +2110,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "269", + "$id": "239", "Name": "send", "ResourceName": "FloatsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "270", + "$id": "240", "Name": "SendRequest5", "NameInRequest": "", "Type": { - "$ref": "67" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2332,11 +2135,11 @@ "Kind": "Spread" }, { - "$id": "271", + "$id": "241", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "272", + "$id": "242", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2351,19 +2154,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "243", "Type": { - "$ref": "272" + "$ref": "242" }, "Value": "application/json" } }, { - "$id": "274", + "$id": "244", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "275", + "$id": "245", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2378,9 +2181,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "276", + "$id": "246", "Type": { - "$ref": "275" + "$ref": "245" }, "Value": "application/json" } @@ -2388,7 +2191,7 @@ ], "Responses": [ { - "$id": "277", + "$id": "247", "StatusCodes": [ 204 ], @@ -2410,30 +2213,30 @@ } ], "Protocol": { - "$id": "278" + "$id": "248" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "279", + "$id": "249", "Name": "ModelsOnly", "Description": "Describe union of models", "Operations": [ { - "$id": "280", + "$id": "250", "Name": "get", "ResourceName": "ModelsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "281", + "$id": "251", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "282", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2448,9 +2251,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "283", + "$id": "253", "Type": { - "$ref": "282" + "$ref": "252" }, "Value": "application/json" } @@ -2458,12 +2261,12 @@ ], "Responses": [ { - "$id": "284", + "$id": "254", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "76" + "$ref": "48" }, "BodyMediaType": "Json", "Headers": [], @@ -2482,19 +2285,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "285", + "$id": "255", "Name": "send", "ResourceName": "ModelsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "286", + "$id": "256", "Name": "SendRequest4", "NameInRequest": "", "Type": { - "$ref": "85" + "$ref": "57" }, "Location": "Body", "IsRequired": true, @@ -2507,11 +2310,11 @@ "Kind": "Spread" }, { - "$id": "287", + "$id": "257", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "288", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2526,19 +2329,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "289", + "$id": "259", "Type": { - "$ref": "288" + "$ref": "258" }, "Value": "application/json" } }, { - "$id": "290", + "$id": "260", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "291", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2553,9 +2356,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "262", "Type": { - "$ref": "291" + "$ref": "261" }, "Value": "application/json" } @@ -2563,7 +2366,7 @@ ], "Responses": [ { - "$id": "293", + "$id": "263", "StatusCodes": [ 204 ], @@ -2585,30 +2388,30 @@ } ], "Protocol": { - "$id": "294" + "$id": "264" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "295", + "$id": "265", "Name": "EnumsOnly", "Description": "Describe union of 2 different enums", "Operations": [ { - "$id": "296", + "$id": "266", "Name": "get", "ResourceName": "EnumsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "297", + "$id": "267", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "298", + "$id": "268", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2623,9 +2426,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "299", + "$id": "269", "Type": { - "$ref": "298" + "$ref": "268" }, "Value": "application/json" } @@ -2633,12 +2436,12 @@ ], "Responses": [ { - "$id": "300", + "$id": "270", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "88" + "$ref": "60" }, "BodyMediaType": "Json", "Headers": [], @@ -2657,19 +2460,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "301", + "$id": "271", "Name": "send", "ResourceName": "EnumsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "302", + "$id": "272", "Name": "SendRequest3", "NameInRequest": "", "Type": { - "$ref": "95" + "$ref": "65" }, "Location": "Body", "IsRequired": true, @@ -2682,11 +2485,11 @@ "Kind": "Spread" }, { - "$id": "303", + "$id": "273", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "304", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2701,19 +2504,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "305", + "$id": "275", "Type": { - "$ref": "304" + "$ref": "274" }, "Value": "application/json" } }, { - "$id": "306", + "$id": "276", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "307", + "$id": "277", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2728,9 +2531,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "308", + "$id": "278", "Type": { - "$ref": "307" + "$ref": "277" }, "Value": "application/json" } @@ -2738,7 +2541,7 @@ ], "Responses": [ { - "$id": "309", + "$id": "279", "StatusCodes": [ 204 ], @@ -2760,30 +2563,30 @@ } ], "Protocol": { - "$id": "310" + "$id": "280" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "311", + "$id": "281", "Name": "StringAndArray", "Description": "Describe union of a string and an array of strings", "Operations": [ { - "$id": "312", + "$id": "282", "Name": "get", "ResourceName": "StringAndArray", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "313", + "$id": "283", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "314", + "$id": "284", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2798,9 +2601,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "315", + "$id": "285", "Type": { - "$ref": "314" + "$ref": "284" }, "Value": "application/json" } @@ -2808,12 +2611,12 @@ ], "Responses": [ { - "$id": "316", + "$id": "286", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "97" + "$ref": "67" }, "BodyMediaType": "Json", "Headers": [], @@ -2832,19 +2635,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "317", + "$id": "287", "Name": "send", "ResourceName": "StringAndArray", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "318", + "$id": "288", "Name": "SendRequest2", "NameInRequest": "", "Type": { - "$ref": "110" + "$ref": "80" }, "Location": "Body", "IsRequired": true, @@ -2857,11 +2660,11 @@ "Kind": "Spread" }, { - "$id": "319", + "$id": "289", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "320", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2876,19 +2679,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "321", + "$id": "291", "Type": { - "$ref": "320" + "$ref": "290" }, "Value": "application/json" } }, { - "$id": "322", + "$id": "292", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "323", + "$id": "293", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2903,9 +2706,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "324", + "$id": "294", "Type": { - "$ref": "323" + "$ref": "293" }, "Value": "application/json" } @@ -2913,7 +2716,7 @@ ], "Responses": [ { - "$id": "325", + "$id": "295", "StatusCodes": [ 204 ], @@ -2935,30 +2738,30 @@ } ], "Protocol": { - "$id": "326" + "$id": "296" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "327", + "$id": "297", "Name": "MixedLiterals", "Description": "Describe union of floats \"a\" | 2 | 3.3", "Operations": [ { - "$id": "328", + "$id": "298", "Name": "get", "ResourceName": "MixedLiterals", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "329", + "$id": "299", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "330", + "$id": "300", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2973,9 +2776,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "331", + "$id": "301", "Type": { - "$ref": "330" + "$ref": "300" }, "Value": "application/json" } @@ -2983,12 +2786,12 @@ ], "Responses": [ { - "$id": "332", + "$id": "302", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "112" + "$ref": "82" }, "BodyMediaType": "Json", "Headers": [], @@ -3007,19 +2810,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "333", + "$id": "303", "Name": "send", "ResourceName": "MixedLiterals", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "334", + "$id": "304", "Name": "SendRequest1", "NameInRequest": "", "Type": { - "$ref": "155" + "$ref": "125" }, "Location": "Body", "IsRequired": true, @@ -3032,11 +2835,11 @@ "Kind": "Spread" }, { - "$id": "335", + "$id": "305", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "336", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3051,19 +2854,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "337", + "$id": "307", "Type": { - "$ref": "336" + "$ref": "306" }, "Value": "application/json" } }, { - "$id": "338", + "$id": "308", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "339", + "$id": "309", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3078,9 +2881,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "340", + "$id": "310", "Type": { - "$ref": "339" + "$ref": "309" }, "Value": "application/json" } @@ -3088,7 +2891,7 @@ ], "Responses": [ { - "$id": "341", + "$id": "311", "StatusCodes": [ 204 ], @@ -3110,30 +2913,30 @@ } ], "Protocol": { - "$id": "342" + "$id": "312" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "343", + "$id": "313", "Name": "MixedTypes", "Description": "Describe union of floats \"a\" | 2 | 3.3", "Operations": [ { - "$id": "344", + "$id": "314", "Name": "get", "ResourceName": "MixedTypes", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "345", + "$id": "315", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "346", + "$id": "316", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3148,9 +2951,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "347", + "$id": "317", "Type": { - "$ref": "346" + "$ref": "316" }, "Value": "application/json" } @@ -3158,12 +2961,12 @@ ], "Responses": [ { - "$id": "348", + "$id": "318", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "157" + "$ref": "127" }, "BodyMediaType": "Json", "Headers": [], @@ -3182,19 +2985,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "349", + "$id": "319", "Name": "send", "ResourceName": "MixedTypes", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "350", + "$id": "320", "Name": "SendRequest", "NameInRequest": "", "Type": { - "$ref": "191" + "$ref": "161" }, "Location": "Body", "IsRequired": true, @@ -3207,11 +3010,11 @@ "Kind": "Spread" }, { - "$id": "351", + "$id": "321", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "352", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3226,19 +3029,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "353", + "$id": "323", "Type": { - "$ref": "352" + "$ref": "322" }, "Value": "application/json" } }, { - "$id": "354", + "$id": "324", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "355", + "$id": "325", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3253,9 +3056,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "356", + "$id": "326", "Type": { - "$ref": "355" + "$ref": "325" }, "Value": "application/json" } @@ -3263,7 +3066,7 @@ ], "Responses": [ { - "$id": "357", + "$id": "327", "StatusCodes": [ 204 ], @@ -3285,7 +3088,7 @@ } ], "Protocol": { - "$id": "358" + "$id": "328" }, "Creatable": false, "Parent": "UnionClient" diff --git a/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_EnumsOnly.cs b/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_EnumsOnly.cs index fe9b28cdafa..35e0fbe73c8 100644 --- a/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_EnumsOnly.cs +++ b/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_EnumsOnly.cs @@ -150,7 +150,7 @@ public void Example_EnumsOnly_Send_ShortVersion_Convenience() { EnumsOnly client = new UnionClient().GetEnumsOnlyClient(); - EnumsOnlyCases prop = new EnumsOnlyCases(BinaryData.FromObjectAsJson("left"), BinaryData.FromObjectAsJson("up")); + EnumsOnlyCases prop = new EnumsOnlyCases(EnumsOnlyCasesLr.Left, EnumsOnlyCasesUd.Up); Response response = client.Send(prop); } @@ -160,7 +160,7 @@ public async Task Example_EnumsOnly_Send_ShortVersion_Convenience_Async() { EnumsOnly client = new UnionClient().GetEnumsOnlyClient(); - EnumsOnlyCases prop = new EnumsOnlyCases(BinaryData.FromObjectAsJson("left"), BinaryData.FromObjectAsJson("up")); + EnumsOnlyCases prop = new EnumsOnlyCases(EnumsOnlyCasesLr.Left, EnumsOnlyCasesUd.Up); Response response = await client.SendAsync(prop); } @@ -208,7 +208,7 @@ public void Example_EnumsOnly_Send_AllParameters_Convenience() { EnumsOnly client = new UnionClient().GetEnumsOnlyClient(); - EnumsOnlyCases prop = new EnumsOnlyCases(BinaryData.FromObjectAsJson("left"), BinaryData.FromObjectAsJson("up")); + EnumsOnlyCases prop = new EnumsOnlyCases(EnumsOnlyCasesLr.Left, EnumsOnlyCasesUd.Up); Response response = client.Send(prop); } @@ -218,7 +218,7 @@ public async Task Example_EnumsOnly_Send_AllParameters_Convenience_Async() { EnumsOnly client = new UnionClient().GetEnumsOnlyClient(); - EnumsOnlyCases prop = new EnumsOnlyCases(BinaryData.FromObjectAsJson("left"), BinaryData.FromObjectAsJson("up")); + EnumsOnlyCases prop = new EnumsOnlyCases(EnumsOnlyCasesLr.Left, EnumsOnlyCasesUd.Up); Response response = await client.SendAsync(prop); } } diff --git a/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_FloatsOnly.cs b/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_FloatsOnly.cs index 80116dd8abd..586f6541054 100644 --- a/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_FloatsOnly.cs +++ b/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_FloatsOnly.cs @@ -110,7 +110,7 @@ public void Example_FloatsOnly_Send_ShortVersion() using RequestContent content = RequestContent.Create(new { - prop = 1.1, + prop = 1.1F, }); Response response = client.Send(content); @@ -125,7 +125,7 @@ public async Task Example_FloatsOnly_Send_ShortVersion_Async() using RequestContent content = RequestContent.Create(new { - prop = 1.1, + prop = 1.1F, }); Response response = await client.SendAsync(content); @@ -138,7 +138,7 @@ public void Example_FloatsOnly_Send_ShortVersion_Convenience() { FloatsOnly client = new UnionClient().GetFloatsOnlyClient(); - Response response = client.Send(BinaryData.FromObjectAsJson(1.1)); + Response response = client.Send(GetResponseProp1._11); } [Test] @@ -147,7 +147,7 @@ public async Task Example_FloatsOnly_Send_ShortVersion_Convenience_Async() { FloatsOnly client = new UnionClient().GetFloatsOnlyClient(); - Response response = await client.SendAsync(BinaryData.FromObjectAsJson(1.1)); + Response response = await client.SendAsync(GetResponseProp1._11); } [Test] @@ -158,7 +158,7 @@ public void Example_FloatsOnly_Send_AllParameters() using RequestContent content = RequestContent.Create(new { - prop = 1.1, + prop = 1.1F, }); Response response = client.Send(content); @@ -173,7 +173,7 @@ public async Task Example_FloatsOnly_Send_AllParameters_Async() using RequestContent content = RequestContent.Create(new { - prop = 1.1, + prop = 1.1F, }); Response response = await client.SendAsync(content); @@ -186,7 +186,7 @@ public void Example_FloatsOnly_Send_AllParameters_Convenience() { FloatsOnly client = new UnionClient().GetFloatsOnlyClient(); - Response response = client.Send(BinaryData.FromObjectAsJson(1.1)); + Response response = client.Send(GetResponseProp1._11); } [Test] @@ -195,7 +195,7 @@ public async Task Example_FloatsOnly_Send_AllParameters_Convenience_Async() { FloatsOnly client = new UnionClient().GetFloatsOnlyClient(); - Response response = await client.SendAsync(BinaryData.FromObjectAsJson(1.1)); + Response response = await client.SendAsync(GetResponseProp1._11); } } } diff --git a/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_IntsOnly.cs b/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_IntsOnly.cs index 8fcaf4ea5ed..f713e95e7fb 100644 --- a/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_IntsOnly.cs +++ b/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_IntsOnly.cs @@ -138,7 +138,7 @@ public void Example_IntsOnly_Send_ShortVersion_Convenience() { IntsOnly client = new UnionClient().GetIntsOnlyClient(); - Response response = client.Send(BinaryData.FromObjectAsJson(1)); + Response response = client.Send(GetResponseProp2._1); } [Test] @@ -147,7 +147,7 @@ public async Task Example_IntsOnly_Send_ShortVersion_Convenience_Async() { IntsOnly client = new UnionClient().GetIntsOnlyClient(); - Response response = await client.SendAsync(BinaryData.FromObjectAsJson(1)); + Response response = await client.SendAsync(GetResponseProp2._1); } [Test] @@ -186,7 +186,7 @@ public void Example_IntsOnly_Send_AllParameters_Convenience() { IntsOnly client = new UnionClient().GetIntsOnlyClient(); - Response response = client.Send(BinaryData.FromObjectAsJson(1)); + Response response = client.Send(GetResponseProp2._1); } [Test] @@ -195,7 +195,7 @@ public async Task Example_IntsOnly_Send_AllParameters_Convenience_Async() { IntsOnly client = new UnionClient().GetIntsOnlyClient(); - Response response = await client.SendAsync(BinaryData.FromObjectAsJson(1)); + Response response = await client.SendAsync(GetResponseProp2._1); } } } diff --git a/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_StringsOnly.cs b/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_StringsOnly.cs index 47ca37ae8cb..68ca02f88d2 100644 --- a/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_StringsOnly.cs +++ b/test/CadlRanchProjects/type/union/tests/Generated/Samples/Samples_StringsOnly.cs @@ -138,7 +138,7 @@ public void Example_StringsOnly_Send_ShortVersion_Convenience() { StringsOnly client = new UnionClient().GetStringsOnlyClient(); - Response response = client.Send(SendRequest9Prop.A); + Response response = client.Send(GetResponseProp4.A); } [Test] @@ -147,7 +147,7 @@ public async Task Example_StringsOnly_Send_ShortVersion_Convenience_Async() { StringsOnly client = new UnionClient().GetStringsOnlyClient(); - Response response = await client.SendAsync(SendRequest9Prop.A); + Response response = await client.SendAsync(GetResponseProp4.A); } [Test] @@ -186,7 +186,7 @@ public void Example_StringsOnly_Send_AllParameters_Convenience() { StringsOnly client = new UnionClient().GetStringsOnlyClient(); - Response response = client.Send(SendRequest9Prop.A); + Response response = client.Send(GetResponseProp4.A); } [Test] @@ -195,7 +195,7 @@ public async Task Example_StringsOnly_Send_AllParameters_Convenience_Async() { StringsOnly client = new UnionClient().GetStringsOnlyClient(); - Response response = await client.SendAsync(SendRequest9Prop.A); + Response response = await client.SendAsync(GetResponseProp4.A); } } } diff --git a/test/CadlRanchProjectsNonAzure.Tests/type-union.cs b/test/CadlRanchProjectsNonAzure.Tests/type-union.cs index a88caa8ebf4..38e363f7728 100644 --- a/test/CadlRanchProjectsNonAzure.Tests/type-union.cs +++ b/test/CadlRanchProjectsNonAzure.Tests/type-union.cs @@ -21,13 +21,13 @@ public Task GetStringsOnly() => Test(async (host) => { var response = await new UnionClient(host, null).GetStringsOnlyClient().GetStringsOnlyAsync(); Assert.AreEqual(200, response.GetRawResponse().Status); - Assert.AreEqual(GetResponse9Prop.B, response.Value.Prop); + Assert.AreEqual(GetResponseProp4.B, response.Value.Prop); }); [Test] public Task SendStringsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetStringsOnlyClient().SendAsync(SendRequest9Prop.B); + var response = await new UnionClient(host, null).GetStringsOnlyClient().SendAsync(GetResponseProp4.B); Assert.AreEqual(204, response.GetRawResponse().Status); }); @@ -66,13 +66,13 @@ 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(GetResponseProp2._2, response.Value.Prop); }); [Test] public Task SendIntsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetIntsOnlyClient().SendAsync(BinaryData.FromObjectAsJson(2)); + var response = await new UnionClient(host, null).GetIntsOnlyClient().SendAsync(GetResponseProp2._2); Assert.AreEqual(204, response.GetRawResponse().Status); }); @@ -81,13 +81,13 @@ 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(GetResponseProp1._22, response.Value.Prop); }); [Test] public Task SendFloatsOnly() => Test(async (host) => { - var response = await new UnionClient(host, null).GetFloatsOnlyClient().SendAsync(BinaryData.FromObjectAsJson(2.2)); + var response = await new UnionClient(host, null).GetFloatsOnlyClient().SendAsync(GetResponseProp1._22); Assert.AreEqual(204, response.GetRawResponse().Status); }); @@ -112,15 +112,15 @@ 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.ToSerialString()), response.Value.Prop.Lr); - AssertEqual(BinaryData.FromObjectAsJson(UD.Up.ToSerialString()), 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.ToSerialString()), - BinaryData.FromObjectAsJson(UD.Up.ToSerialString()))); + var response = await new UnionClient(host, null).GetEnumsOnlyClient().SendAsync(new EnumsOnlyCases(EnumsOnlyCasesLr.Right, + EnumsOnlyCasesUd.Up)); Assert.AreEqual(204, response.GetRawResponse().Status); }); 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/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/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/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", 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" diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/FloatsOnly.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/FloatsOnly.cs index da629b3bfb4..e708231a5a3 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/FloatsOnly.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/FloatsOnly.cs @@ -99,11 +99,8 @@ public virtual ClientResult GetFloatsOnly(RequestOptions options) /// Send. /// - /// is null. - public virtual async Task SendAsync(BinaryData prop) + public virtual async Task SendAsync(GetResponseProp1 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - SendRequest5 sendRequest5 = new SendRequest5(prop, null); ClientResult result = await SendAsync(sendRequest5.ToBinaryContent(), null).ConfigureAwait(false); return result; @@ -111,11 +108,8 @@ public virtual async Task SendAsync(BinaryData prop) /// Send. /// - /// is null. - public virtual ClientResult Send(BinaryData prop) + public virtual ClientResult Send(GetResponseProp1 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - SendRequest5 sendRequest5 = new SendRequest5(prop, null); ClientResult result = Send(sendRequest5.ToBinaryContent(), null); return result; @@ -131,7 +125,7 @@ public virtual ClientResult Send(BinaryData prop) /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -159,7 +153,7 @@ public virtual async Task SendAsync(BinaryContent content, Request /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/IntsOnly.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/IntsOnly.cs index a11cc761e06..6d076199118 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/IntsOnly.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/IntsOnly.cs @@ -99,11 +99,8 @@ public virtual ClientResult GetIntsOnly(RequestOptions options) /// Send. /// - /// is null. - public virtual async Task SendAsync(BinaryData prop) + public virtual async Task SendAsync(GetResponseProp2 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - SendRequest6 sendRequest6 = new SendRequest6(prop, null); ClientResult result = await SendAsync(sendRequest6.ToBinaryContent(), null).ConfigureAwait(false); return result; @@ -111,11 +108,8 @@ public virtual async Task SendAsync(BinaryData prop) /// Send. /// - /// is null. - public virtual ClientResult Send(BinaryData prop) + public virtual ClientResult Send(GetResponseProp2 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - SendRequest6 sendRequest6 = new SendRequest6(prop, null); ClientResult result = Send(sendRequest6.ToBinaryContent(), null); return result; @@ -131,7 +125,7 @@ public virtual ClientResult Send(BinaryData prop) /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -159,7 +153,7 @@ public virtual async Task SendAsync(BinaryContent content, Request /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCases.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCases.Serialization.cs index 55342c04f56..79db8ab6de3 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCases.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCases.Serialization.cs @@ -22,23 +22,9 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteStartObject(); writer.WritePropertyName("lr"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Lr); -#else - using (JsonDocument document = JsonDocument.Parse(Lr)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteStringValue(Lr.ToSerialString()); writer.WritePropertyName("ud"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Ud); -#else - using (JsonDocument document = JsonDocument.Parse(Ud)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteStringValue(Ud.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,20 +63,20 @@ internal static EnumsOnlyCases DeserializeEnumsOnlyCases(JsonElement element, Mo { return null; } - BinaryData lr = default; - BinaryData ud = default; + EnumsOnlyCasesLr lr = default; + EnumsOnlyCasesUd ud = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("lr"u8)) { - lr = BinaryData.FromString(property.Value.GetRawText()); + lr = property.Value.GetString().ToEnumsOnlyCasesLr(); continue; } if (property.NameEquals("ud"u8)) { - ud = BinaryData.FromString(property.Value.GetRawText()); + ud = property.Value.GetString().ToEnumsOnlyCasesUd(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCases.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCases.cs index 2b0bc0571d8..c4e38d5e9d7 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCases.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCases.cs @@ -45,12 +45,8 @@ public partial class EnumsOnlyCases /// Initializes a new instance of . /// This should be receive/send the left variant. /// This should be receive/send the up variant. - /// or is null. - public EnumsOnlyCases(BinaryData lr, BinaryData ud) + public EnumsOnlyCases(EnumsOnlyCasesLr lr, EnumsOnlyCasesUd ud) { - Argument.AssertNotNull(lr, nameof(lr)); - Argument.AssertNotNull(ud, nameof(ud)); - Lr = lr; Ud = ud; } @@ -59,7 +55,7 @@ public EnumsOnlyCases(BinaryData lr, BinaryData ud) /// This should be receive/send the left variant. /// This should be receive/send the up variant. /// Keeps track of any properties unknown to the library. - internal EnumsOnlyCases(BinaryData lr, BinaryData ud, IDictionary serializedAdditionalRawData) + internal EnumsOnlyCases(EnumsOnlyCasesLr lr, EnumsOnlyCasesUd ud, IDictionary serializedAdditionalRawData) { Lr = lr; Ud = ud; @@ -71,89 +67,9 @@ internal EnumsOnlyCases() { } - /// - /// This should be receive/send the left variant - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// 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 Lr { get; set; } - /// - /// This should be receive/send the up variant - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// 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 Ud { get; set; } + /// This should be receive/send the left variant. + public EnumsOnlyCasesLr Lr { get; set; } + /// This should be receive/send the up variant. + public EnumsOnlyCasesUd Ud { get; set; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesLr.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesLr.Serialization.cs new file mode 100644 index 00000000000..597127aa54a --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesLr.Serialization.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; + +namespace Scm._Type.Union.Models +{ + internal static partial class EnumsOnlyCasesLrExtensions + { + public static string ToSerialString(this EnumsOnlyCasesLr value) => value switch + { + EnumsOnlyCasesLr.Left => "left", + EnumsOnlyCasesLr.Right => "right", + EnumsOnlyCasesLr.Up => "up", + EnumsOnlyCasesLr.Down => "down", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnumsOnlyCasesLr value.") + }; + + public static EnumsOnlyCasesLr ToEnumsOnlyCasesLr(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "left")) return EnumsOnlyCasesLr.Left; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "right")) return EnumsOnlyCasesLr.Right; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "up")) return EnumsOnlyCasesLr.Up; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "down")) return EnumsOnlyCasesLr.Down; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnumsOnlyCasesLr value."); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesLr.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesLr.cs new file mode 100644 index 00000000000..5e928a1287f --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesLr.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +namespace Scm._Type.Union.Models +{ + /// The EnumsOnlyCasesLr. + public enum EnumsOnlyCasesLr + { + /// left. + Left, + /// right. + Right, + /// up. + Up, + /// down. + Down + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesUd.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesUd.Serialization.cs new file mode 100644 index 00000000000..7749a1d3efe --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesUd.Serialization.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; + +namespace Scm._Type.Union.Models +{ + internal static partial class EnumsOnlyCasesUdExtensions + { + public static string ToSerialString(this EnumsOnlyCasesUd value) => value switch + { + EnumsOnlyCasesUd.Up => "up", + EnumsOnlyCasesUd.Down => "down", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnumsOnlyCasesUd value.") + }; + + public static EnumsOnlyCasesUd ToEnumsOnlyCasesUd(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "up")) return EnumsOnlyCasesUd.Up; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "down")) return EnumsOnlyCasesUd.Down; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EnumsOnlyCasesUd value."); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/UD.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesUd.cs similarity index 69% rename from test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/UD.cs rename to test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesUd.cs index e4993248678..5516ec9a85b 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/UD.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/EnumsOnlyCasesUd.cs @@ -4,8 +4,8 @@ namespace Scm._Type.Union.Models { - /// The UD. - public enum UD + /// The EnumsOnlyCasesUd. + public enum EnumsOnlyCasesUd { /// up. Up, diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse5.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse5.Serialization.cs index 5e0f7301a51..84e0af36026 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse5.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse5.Serialization.cs @@ -22,14 +22,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Prop); -#else - using (JsonDocument document = JsonDocument.Parse(Prop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue(Prop.ToSerialSingle()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -68,14 +61,14 @@ internal static GetResponse5 DeserializeGetResponse5(JsonElement element, ModelR { return null; } - BinaryData prop = default; + GetResponseProp1 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = BinaryData.FromString(property.Value.GetRawText()); + prop = property.Value.GetSingle().ToGetResponseProp1(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse5.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse5.cs index 16183356172..734f982b633 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse5.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse5.cs @@ -44,18 +44,15 @@ public partial class GetResponse5 /// Initializes a new instance of . /// - /// is null. - internal GetResponse5(BinaryData prop) + internal GetResponse5(GetResponseProp1 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - Prop = prop; } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal GetResponse5(BinaryData prop, IDictionary serializedAdditionalRawData) + internal GetResponse5(GetResponseProp1 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -66,50 +63,7 @@ internal GetResponse5() { } - /// - /// Gets the prop - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1.1 - /// - /// - /// 2.2 - /// - /// - /// 3.3 - /// - /// - /// - /// 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 Prop { get; } + /// Gets the prop. + public GetResponseProp1 Prop { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse6.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse6.Serialization.cs index 4de46bb1e49..af2ff4ec434 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse6.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse6.Serialization.cs @@ -22,14 +22,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Prop); -#else - using (JsonDocument document = JsonDocument.Parse(Prop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue((int)Prop); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -68,14 +61,14 @@ internal static GetResponse6 DeserializeGetResponse6(JsonElement element, ModelR { return null; } - BinaryData prop = default; + GetResponseProp2 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = BinaryData.FromString(property.Value.GetRawText()); + prop = property.Value.GetInt32().ToGetResponseProp2(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse6.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse6.cs index 318f5d3644e..d846f129da8 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse6.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse6.cs @@ -44,18 +44,15 @@ public partial class GetResponse6 /// Initializes a new instance of . /// - /// is null. - internal GetResponse6(BinaryData prop) + internal GetResponse6(GetResponseProp2 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - Prop = prop; } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal GetResponse6(BinaryData prop, IDictionary serializedAdditionalRawData) + internal GetResponse6(GetResponseProp2 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -66,50 +63,7 @@ internal GetResponse6() { } - /// - /// Gets the prop - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1 - /// - /// - /// 2 - /// - /// - /// 3 - /// - /// - /// - /// 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 Prop { get; } + /// Gets the prop. + public GetResponseProp2 Prop { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9.Serialization.cs index 94ea00a2a35..2a04d84ee7d 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9.Serialization.cs @@ -22,7 +22,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); - writer.WriteStringValue(Prop.ToString()); + writer.WriteStringValue(Prop.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -61,14 +61,14 @@ internal static GetResponse9 DeserializeGetResponse9(JsonElement element, ModelR { return null; } - GetResponse9Prop prop = default; + GetResponseProp4 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = new GetResponse9Prop(property.Value.GetString()); + prop = property.Value.GetString().ToGetResponseProp4(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9.cs index 1ebe1188af0..c2dfaee0825 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9.cs @@ -44,7 +44,7 @@ public partial class GetResponse9 /// Initializes a new instance of . /// - internal GetResponse9(GetResponse9Prop prop) + internal GetResponse9(GetResponseProp4 prop) { Prop = prop; } @@ -52,7 +52,7 @@ internal GetResponse9(GetResponse9Prop prop) /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal GetResponse9(GetResponse9Prop prop, IDictionary serializedAdditionalRawData) + internal GetResponse9(GetResponseProp4 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -64,6 +64,6 @@ internal GetResponse9() } /// Gets the prop. - public GetResponse9Prop Prop { get; } + public GetResponseProp4 Prop { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9Prop.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9Prop.cs deleted file mode 100644 index 101ef4a73d6..00000000000 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponse9Prop.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Scm._Type.Union.Models -{ - /// Enum for prop in GetResponse9. - public readonly partial struct GetResponse9Prop : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public GetResponse9Prop(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AValue = "a"; - private const string BValue = "b"; - private const string CValue = "c"; - - /// a. - public static GetResponse9Prop A { get; } = new GetResponse9Prop(AValue); - /// b. - public static GetResponse9Prop B { get; } = new GetResponse9Prop(BValue); - /// c. - public static GetResponse9Prop C { get; } = new GetResponse9Prop(CValue); - /// Determines if two values are the same. - public static bool operator ==(GetResponse9Prop left, GetResponse9Prop right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(GetResponse9Prop left, GetResponse9Prop right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator GetResponse9Prop(string value) => new GetResponse9Prop(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is GetResponse9Prop other && Equals(other); - /// - public bool Equals(GetResponse9Prop 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/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp1.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp1.Serialization.cs new file mode 100644 index 00000000000..f5e617c35fa --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp1.Serialization.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; + +namespace Scm._Type.Union.Models +{ + internal static partial class GetResponseProp1Extensions + { + public static float ToSerialSingle(this GetResponseProp1 value) => value switch + { + GetResponseProp1._11 => 1.1F, + GetResponseProp1._22 => 2.2F, + GetResponseProp1._33 => 3.3F, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp1 value.") + }; + + public static GetResponseProp1 ToGetResponseProp1(this float value) + { + if (value == 1.1F) return GetResponseProp1._11; + if (value == 2.2F) return GetResponseProp1._22; + if (value == 3.3F) return GetResponseProp1._33; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp1 value."); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp1.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp1.cs new file mode 100644 index 00000000000..97400954162 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp1.cs @@ -0,0 +1,17 @@ +// + +#nullable disable + +namespace Scm._Type.Union.Models +{ + /// The GetResponseProp1. + public enum GetResponseProp1 + { + /// 1.1. + _11, + /// 2.2. + _22, + /// 3.3. + _33 + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp2.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp2.Serialization.cs new file mode 100644 index 00000000000..4e24e0ad787 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp2.Serialization.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; + +namespace Scm._Type.Union.Models +{ + internal static partial class GetResponseProp2Extensions + { + public static GetResponseProp2 ToGetResponseProp2(this int value) + { + if (value == 1) return GetResponseProp2._1; + if (value == 2) return GetResponseProp2._2; + if (value == 3) return GetResponseProp2._3; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp2 value."); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp2.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp2.cs new file mode 100644 index 00000000000..b92d9da7d88 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp2.cs @@ -0,0 +1,17 @@ +// + +#nullable disable + +namespace Scm._Type.Union.Models +{ + /// The GetResponseProp2. + public enum GetResponseProp2 + { + /// 1. + _1 = 1, + /// 2. + _2 = 2, + /// 3. + _3 = 3 + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp4.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp4.Serialization.cs new file mode 100644 index 00000000000..0534b14fbea --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp4.Serialization.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; + +namespace Scm._Type.Union.Models +{ + internal static partial class GetResponseProp4Extensions + { + public static string ToSerialString(this GetResponseProp4 value) => value switch + { + GetResponseProp4.A => "a", + GetResponseProp4.B => "b", + GetResponseProp4.C => "c", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp4 value.") + }; + + public static GetResponseProp4 ToGetResponseProp4(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "a")) return GetResponseProp4.A; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "b")) return GetResponseProp4.B; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "c")) return GetResponseProp4.C; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown GetResponseProp4 value."); + } + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp4.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp4.cs new file mode 100644 index 00000000000..7a486c6e522 --- /dev/null +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/GetResponseProp4.cs @@ -0,0 +1,17 @@ +// + +#nullable disable + +namespace Scm._Type.Union.Models +{ + /// The GetResponseProp4. + public enum GetResponseProp4 + { + /// a. + A, + /// b. + B, + /// c. + C + } +} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/LR.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/LR.Serialization.cs deleted file mode 100644 index 9ad1080237c..00000000000 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/LR.Serialization.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System; - -namespace Scm._Type.Union.Models -{ - internal static partial class LRExtensions - { - public static string ToSerialString(this LR value) => value switch - { - LR.Left => "left", - LR.Right => "right", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown LR value.") - }; - - public static LR ToLR(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "left")) return LR.Left; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "right")) return LR.Right; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown LR value."); - } - } -} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/LR.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/LR.cs deleted file mode 100644 index b8b54d01aaf..00000000000 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/LR.cs +++ /dev/null @@ -1,15 +0,0 @@ -// - -#nullable disable - -namespace Scm._Type.Union.Models -{ - /// The LR. - public enum LR - { - /// left. - Left, - /// right. - Right - } -} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest5.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest5.Serialization.cs index 3f5d1b4f71d..560f69c4e6c 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest5.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest5.Serialization.cs @@ -22,14 +22,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Prop); -#else - using (JsonDocument document = JsonDocument.Parse(Prop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue(Prop.ToSerialSingle()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -68,14 +61,14 @@ internal static SendRequest5 DeserializeSendRequest5(JsonElement element, ModelR { return null; } - BinaryData prop = default; + GetResponseProp1 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = BinaryData.FromString(property.Value.GetRawText()); + prop = property.Value.GetSingle().ToGetResponseProp1(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest5.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest5.cs index 446429d5d5f..450eacbfb26 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest5.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest5.cs @@ -44,18 +44,15 @@ internal partial class SendRequest5 /// Initializes a new instance of . /// - /// is null. - public SendRequest5(BinaryData prop) + public SendRequest5(GetResponseProp1 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - Prop = prop; } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal SendRequest5(BinaryData prop, IDictionary serializedAdditionalRawData) + internal SendRequest5(GetResponseProp1 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -66,50 +63,7 @@ internal SendRequest5() { } - /// - /// Gets the prop - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1.1 - /// - /// - /// 2.2 - /// - /// - /// 3.3 - /// - /// - /// - /// 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 Prop { get; } + /// Gets the prop. + public GetResponseProp1 Prop { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest6.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest6.Serialization.cs index c015b928558..476849bf919 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest6.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest6.Serialization.cs @@ -22,14 +22,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Prop); -#else - using (JsonDocument document = JsonDocument.Parse(Prop)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteNumberValue((int)Prop); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -68,14 +61,14 @@ internal static SendRequest6 DeserializeSendRequest6(JsonElement element, ModelR { return null; } - BinaryData prop = default; + GetResponseProp2 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = BinaryData.FromString(property.Value.GetRawText()); + prop = property.Value.GetInt32().ToGetResponseProp2(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest6.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest6.cs index 2a56f46fd87..998e4aeeb01 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest6.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest6.cs @@ -44,18 +44,15 @@ internal partial class SendRequest6 /// Initializes a new instance of . /// - /// is null. - public SendRequest6(BinaryData prop) + public SendRequest6(GetResponseProp2 prop) { - Argument.AssertNotNull(prop, nameof(prop)); - Prop = prop; } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal SendRequest6(BinaryData prop, IDictionary serializedAdditionalRawData) + internal SendRequest6(GetResponseProp2 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -66,50 +63,7 @@ internal SendRequest6() { } - /// - /// Gets the prop - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// 1 - /// - /// - /// 2 - /// - /// - /// 3 - /// - /// - /// - /// 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 Prop { get; } + /// Gets the prop. + public GetResponseProp2 Prop { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9.Serialization.cs index b8b2b312a7c..24f3dc255c5 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9.Serialization.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9.Serialization.cs @@ -22,7 +22,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WriteStartObject(); writer.WritePropertyName("prop"u8); - writer.WriteStringValue(Prop.ToString()); + writer.WriteStringValue(Prop.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -61,14 +61,14 @@ internal static SendRequest9 DeserializeSendRequest9(JsonElement element, ModelR { return null; } - SendRequest9Prop prop = default; + GetResponseProp4 prop = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("prop"u8)) { - prop = new SendRequest9Prop(property.Value.GetString()); + prop = property.Value.GetString().ToGetResponseProp4(); continue; } if (options.Format != "W") diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9.cs index 90f150d6440..ca1903231c0 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9.cs @@ -44,7 +44,7 @@ internal partial class SendRequest9 /// Initializes a new instance of . /// - public SendRequest9(SendRequest9Prop prop) + public SendRequest9(GetResponseProp4 prop) { Prop = prop; } @@ -52,7 +52,7 @@ public SendRequest9(SendRequest9Prop prop) /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal SendRequest9(SendRequest9Prop prop, IDictionary serializedAdditionalRawData) + internal SendRequest9(GetResponseProp4 prop, IDictionary serializedAdditionalRawData) { Prop = prop; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -64,6 +64,6 @@ internal SendRequest9() } /// Gets the prop. - public SendRequest9Prop Prop { get; } + public GetResponseProp4 Prop { get; } } } diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9Prop.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9Prop.cs deleted file mode 100644 index 4bd62c6442b..00000000000 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/SendRequest9Prop.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Scm._Type.Union.Models -{ - /// Enum for prop in SendRequest9. - public readonly partial struct SendRequest9Prop : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SendRequest9Prop(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AValue = "a"; - private const string BValue = "b"; - private const string CValue = "c"; - - /// a. - public static SendRequest9Prop A { get; } = new SendRequest9Prop(AValue); - /// b. - public static SendRequest9Prop B { get; } = new SendRequest9Prop(BValue); - /// c. - public static SendRequest9Prop C { get; } = new SendRequest9Prop(CValue); - /// Determines if two values are the same. - public static bool operator ==(SendRequest9Prop left, SendRequest9Prop right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SendRequest9Prop left, SendRequest9Prop right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SendRequest9Prop(string value) => new SendRequest9Prop(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SendRequest9Prop other && Equals(other); - /// - public bool Equals(SendRequest9Prop 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/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/UD.Serialization.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/UD.Serialization.cs deleted file mode 100644 index 480392ba900..00000000000 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/Models/UD.Serialization.cs +++ /dev/null @@ -1,25 +0,0 @@ -// - -#nullable disable - -using System; - -namespace Scm._Type.Union.Models -{ - internal static partial class UDExtensions - { - public static string ToSerialString(this UD value) => value switch - { - UD.Up => "up", - UD.Down => "down", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UD value.") - }; - - public static UD ToUD(this string value) - { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "up")) return UD.Up; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "down")) return UD.Down; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UD value."); - } - } -} diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/ScmTypeUnionModelFactory.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/ScmTypeUnionModelFactory.cs index a74ffe7e3a5..e34d4b7ec86 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/ScmTypeUnionModelFactory.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/ScmTypeUnionModelFactory.cs @@ -12,7 +12,7 @@ public static partial class ScmTypeUnionModelFactory /// Initializes a new instance of . /// /// A new instance for mocking. - public static GetResponse9 GetResponse9(GetResponse9Prop prop = default) + public static GetResponse9 GetResponse9(GetResponseProp4 prop = default) { return new GetResponse9(prop, serializedAdditionalRawData: null); } @@ -36,7 +36,7 @@ public static GetResponse7 GetResponse7(StringExtensibleNamedUnion prop = defaul /// Initializes a new instance of . /// /// A new instance for mocking. - public static GetResponse6 GetResponse6(BinaryData prop = null) + public static GetResponse6 GetResponse6(GetResponseProp2 prop = default) { return new GetResponse6(prop, serializedAdditionalRawData: null); } @@ -44,7 +44,7 @@ public static GetResponse6 GetResponse6(BinaryData prop = null) /// Initializes a new instance of . /// /// A new instance for mocking. - public static GetResponse5 GetResponse5(BinaryData prop = null) + public static GetResponse5 GetResponse5(GetResponseProp1 prop = default) { return new GetResponse5(prop, serializedAdditionalRawData: null); } diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/StringsOnly.cs b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/StringsOnly.cs index 1462acb10f9..8721b4a9641 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/StringsOnly.cs +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/StringsOnly.cs @@ -99,7 +99,7 @@ public virtual ClientResult GetStringsOnly(RequestOptions options) /// Send. /// - public virtual async Task SendAsync(SendRequest9Prop prop) + public virtual async Task SendAsync(GetResponseProp4 prop) { SendRequest9 sendRequest9 = new SendRequest9(prop, null); ClientResult result = await SendAsync(sendRequest9.ToBinaryContent(), null).ConfigureAwait(false); @@ -108,7 +108,7 @@ public virtual async Task SendAsync(SendRequest9Prop prop) /// Send. /// - public virtual ClientResult Send(SendRequest9Prop prop) + public virtual ClientResult Send(GetResponseProp4 prop) { SendRequest9 sendRequest9 = new SendRequest9(prop, null); ClientResult result = Send(sendRequest9.ToBinaryContent(), null); @@ -125,7 +125,7 @@ public virtual ClientResult Send(SendRequest9Prop prop) /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -153,7 +153,7 @@ public virtual async Task SendAsync(BinaryContent content, Request /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// diff --git a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/tspCodeModel.json b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/tspCodeModel.json index 6e2ff0b1835..ac6dc7507d1 100644 --- a/test/CadlRanchProjectsNonAzure/type/union/src/Generated/tspCodeModel.json +++ b/test/CadlRanchProjectsNonAzure/type/union/src/Generated/tspCodeModel.json @@ -7,16 +7,43 @@ { "$id": "2", "Kind": "Enum", - "Name": "GetResponseProp3", - "EnumValueType": "string", + "Name": "GetResponseProp4", + "EnumValueType": "String", "AllowedValues": [ { "$id": "3", + "Name": "a", + "Value": "a" + }, + { + "$id": "4", "Name": "b", "Value": "b" }, { - "$id": "4", + "$id": "5", + "Name": "c", + "Value": "c" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "6", + "Kind": "Enum", + "Name": "GetResponseProp3", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "7", + "Name": "b", + "Value": "b" + }, + { + "$id": "8", "Name": "c", "Value": "c" } @@ -27,18 +54,18 @@ "Usage": "RoundTrip" }, { - "$id": "5", + "$id": "9", "Kind": "Enum", "Name": "StringExtensibleNamedUnion", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "6", + "$id": "10", "Name": "OptionB", "Value": "b" }, { - "$id": "7", + "$id": "11", "Name": "c", "Value": "c" } @@ -49,47 +76,109 @@ "Usage": "RoundTrip" }, { - "$id": "8", + "$id": "12", "Kind": "Enum", - "Name": "LR", + "Name": "GetResponseProp2", + "EnumValueType": "Int32", + "AllowedValues": [ + { + "$id": "13", + "Name": "1", + "Value": 1 + }, + { + "$id": "14", + "Name": "2", + "Value": 2 + }, + { + "$id": "15", + "Name": "3", + "Value": 3 + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "16", + "Kind": "Enum", + "Name": "GetResponseProp1", + "EnumValueType": "Float32", + "AllowedValues": [ + { + "$id": "17", + "Name": "1.1", + "Value": 1.1 + }, + { + "$id": "18", + "Name": "2.2", + "Value": 2.2 + }, + { + "$id": "19", + "Name": "3.3", + "Value": 3.3 + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "20", + "Kind": "Enum", + "Name": "EnumsOnlyCasesLr", "EnumValueType": "String", "AllowedValues": [ { - "$id": "9", + "$id": "21", "Name": "left", "Value": "left" }, { - "$id": "10", + "$id": "22", "Name": "right", "Value": "right" + }, + { + "$id": "23", + "Name": "up", + "Value": "up" + }, + { + "$id": "24", + "Name": "down", + "Value": "down" } ], - "Namespace": "Type.Union", - "Description": "", + "Namespace": "", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" }, { - "$id": "11", + "$id": "25", "Kind": "Enum", - "Name": "UD", + "Name": "EnumsOnlyCasesUd", "EnumValueType": "String", "AllowedValues": [ { - "$id": "12", + "$id": "26", "Name": "up", "Value": "up" }, { - "$id": "13", + "$id": "27", "Name": "down", "Value": "down" } ], - "Namespace": "Type.Union", - "Description": "", + "Namespace": "", "IsExtensible": false, "IsNullable": false, "Usage": "RoundTrip" @@ -97,7 +186,7 @@ ], "Models": [ { - "$id": "14", + "$id": "28", "Kind": "Model", "Name": "GetResponse9", "Namespace": "Type.Union", @@ -105,56 +194,12 @@ "Usage": "Output", "Properties": [ { - "$id": "15", + "$id": "29", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "16", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "17", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "18", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "a", - "IsNullable": false - }, - { - "$id": "19", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "20", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "b", - "IsNullable": false - }, - { - "$id": "21", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "22", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "c", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "2" }, "IsRequired": true, "IsReadOnly": false @@ -162,7 +207,7 @@ ] }, { - "$id": "23", + "$id": "30", "Kind": "Model", "Name": "SendRequest9", "Namespace": "Type.Union", @@ -170,56 +215,12 @@ "Usage": "Input", "Properties": [ { - "$id": "24", + "$id": "31", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "25", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "26", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "27", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "a", - "IsNullable": false - }, - { - "$id": "28", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "29", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "b", - "IsNullable": false - }, - { - "$id": "30", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "31", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "c", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "2" }, "IsRequired": true, "IsReadOnly": false @@ -240,7 +241,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$ref": "2" + "$ref": "6" }, "IsRequired": true, "IsReadOnly": false @@ -261,7 +262,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$ref": "2" + "$ref": "6" }, "IsRequired": true, "IsReadOnly": false @@ -282,7 +283,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$ref": "5" + "$ref": "9" }, "IsRequired": true, "IsReadOnly": false @@ -303,7 +304,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$ref": "5" + "$ref": "9" }, "IsRequired": true, "IsReadOnly": false @@ -324,51 +325,7 @@ "SerializedName": "prop", "Description": "", "Type": { - "$id": "42", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "43", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "44", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 1, - "IsNullable": false - }, - { - "$id": "45", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "46", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 2, - "IsNullable": false - }, - { - "$id": "47", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "48", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 3, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "12" }, "IsRequired": true, "IsReadOnly": false @@ -376,7 +333,7 @@ ] }, { - "$id": "49", + "$id": "42", "Kind": "Model", "Name": "SendRequest6", "Namespace": "Type.Union", @@ -384,56 +341,12 @@ "Usage": "Input", "Properties": [ { - "$id": "50", + "$id": "43", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "51", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "52", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "53", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 1, - "IsNullable": false - }, - { - "$id": "54", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "55", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 2, - "IsNullable": false - }, - { - "$id": "56", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "57", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": false - }, - "Value": 3, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "12" }, "IsRequired": true, "IsReadOnly": false @@ -441,7 +354,7 @@ ] }, { - "$id": "58", + "$id": "44", "Kind": "Model", "Name": "GetResponse5", "Namespace": "Type.Union", @@ -449,56 +362,12 @@ "Usage": "Output", "Properties": [ { - "$id": "59", + "$id": "45", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "60", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "61", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "62", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 1.1, - "IsNullable": false - }, - { - "$id": "63", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "64", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 2.2, - "IsNullable": false - }, - { - "$id": "65", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "66", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 3.3, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "16" }, "IsRequired": true, "IsReadOnly": false @@ -506,7 +375,7 @@ ] }, { - "$id": "67", + "$id": "46", "Kind": "Model", "Name": "SendRequest5", "Namespace": "Type.Union", @@ -514,56 +383,12 @@ "Usage": "Input", "Properties": [ { - "$id": "68", + "$id": "47", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "69", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "70", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "71", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 1.1, - "IsNullable": false - }, - { - "$id": "72", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "73", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 2.2, - "IsNullable": false - }, - { - "$id": "74", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "75", - "Kind": "Primitive", - "Name": "Float64", - "IsNullable": false - }, - "Value": 3.3, - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "16" }, "IsRequired": true, "IsReadOnly": false @@ -571,7 +396,7 @@ ] }, { - "$id": "76", + "$id": "48", "Kind": "Model", "Name": "GetResponse4", "Namespace": "Type.Union", @@ -579,17 +404,17 @@ "Usage": "Output", "Properties": [ { - "$id": "77", + "$id": "49", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "78", + "$id": "50", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "79", + "$id": "51", "Kind": "Model", "Name": "Cat", "Namespace": "Type.Union", @@ -597,12 +422,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "80", + "$id": "52", "Name": "name", "SerializedName": "name", "Description": "", "Type": { - "$id": "81", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -613,7 +438,7 @@ ] }, { - "$id": "82", + "$id": "54", "Kind": "Model", "Name": "Dog", "Namespace": "Type.Union", @@ -621,12 +446,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "83", + "$id": "55", "Name": "bark", "SerializedName": "bark", "Description": "", "Type": { - "$id": "84", + "$id": "56", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -645,13 +470,13 @@ ] }, { - "$ref": "79" + "$ref": "51" }, { - "$ref": "82" + "$ref": "54" }, { - "$id": "85", + "$id": "57", "Kind": "Model", "Name": "SendRequest4", "Namespace": "Type.Union", @@ -659,20 +484,20 @@ "Usage": "Input", "Properties": [ { - "$id": "86", + "$id": "58", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "87", + "$id": "59", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$ref": "82" + "$ref": "54" } ], "IsNullable": false @@ -683,7 +508,7 @@ ] }, { - "$id": "88", + "$id": "60", "Kind": "Model", "Name": "GetResponse3", "Namespace": "Type.Union", @@ -691,12 +516,12 @@ "Usage": "Output", "Properties": [ { - "$id": "89", + "$id": "61", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "90", + "$id": "62", "Kind": "Model", "Name": "EnumsOnlyCases", "Namespace": "Type.Union", @@ -704,45 +529,23 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "91", + "$id": "63", "Name": "lr", "SerializedName": "lr", "Description": "This should be receive/send the left variant", "Type": { - "$id": "92", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$ref": "8" - }, - { - "$ref": "11" - } - ], - "IsNullable": false + "$ref": "20" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "93", + "$id": "64", "Name": "ud", "SerializedName": "ud", "Description": "This should be receive/send the up variant", "Type": { - "$id": "94", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$ref": "11" - }, - { - "$ref": "11" - } - ], - "IsNullable": false + "$ref": "25" }, "IsRequired": true, "IsReadOnly": false @@ -755,10 +558,10 @@ ] }, { - "$ref": "90" + "$ref": "62" }, { - "$id": "95", + "$id": "65", "Kind": "Model", "Name": "SendRequest3", "Namespace": "Type.Union", @@ -766,12 +569,12 @@ "Usage": "Input", "Properties": [ { - "$id": "96", + "$id": "66", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "90" + "$ref": "62" }, "IsRequired": true, "IsReadOnly": false @@ -779,7 +582,7 @@ ] }, { - "$id": "97", + "$id": "67", "Kind": "Model", "Name": "GetResponse2", "Namespace": "Type.Union", @@ -787,12 +590,12 @@ "Usage": "Output", "Properties": [ { - "$id": "98", + "$id": "68", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "99", + "$id": "69", "Kind": "Model", "Name": "StringAndArrayCases", "Namespace": "Type.Union", @@ -800,27 +603,27 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "100", + "$id": "70", "Name": "string", "SerializedName": "string", "Description": "This should be receive/send the string variant", "Type": { - "$id": "101", + "$id": "71", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "102", + "$id": "72", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "103", + "$id": "73", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "104", + "$id": "74", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -834,27 +637,27 @@ "IsReadOnly": false }, { - "$id": "105", + "$id": "75", "Name": "array", "SerializedName": "array", "Description": "This should be receive/send the array variant", "Type": { - "$id": "106", + "$id": "76", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "107", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "108", + "$id": "78", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "109", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -875,10 +678,10 @@ ] }, { - "$ref": "99" + "$ref": "69" }, { - "$id": "110", + "$id": "80", "Kind": "Model", "Name": "SendRequest2", "Namespace": "Type.Union", @@ -886,12 +689,12 @@ "Usage": "Input", "Properties": [ { - "$id": "111", + "$id": "81", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "99" + "$ref": "69" }, "IsRequired": true, "IsReadOnly": false @@ -899,7 +702,7 @@ ] }, { - "$id": "112", + "$id": "82", "Kind": "Model", "Name": "GetResponse1", "Namespace": "Type.Union", @@ -907,12 +710,12 @@ "Usage": "Output", "Properties": [ { - "$id": "113", + "$id": "83", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "114", + "$id": "84", "Kind": "Model", "Name": "MixedLiteralsCases", "Namespace": "Type.Union", @@ -920,21 +723,21 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "115", + "$id": "85", "Name": "stringLiteral", "SerializedName": "stringLiteral", "Description": "This should be receive/send the \"a\" variant", "Type": { - "$id": "116", + "$id": "86", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "117", + "$id": "87", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "118", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -943,11 +746,11 @@ "IsNullable": false }, { - "$id": "119", + "$id": "89", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "120", + "$id": "90", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -956,24 +759,24 @@ "IsNullable": false }, { - "$id": "121", + "$id": "91", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "122", + "$id": "92", "Kind": "Primitive", - "Name": "Float64", + "Name": "Float32", "IsNullable": false }, "Value": 3.3, "IsNullable": false }, { - "$id": "123", + "$id": "93", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "124", + "$id": "94", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -988,21 +791,21 @@ "IsReadOnly": false }, { - "$id": "125", + "$id": "95", "Name": "intLiteral", "SerializedName": "intLiteral", "Description": "This should be receive/send the 2 variant", "Type": { - "$id": "126", + "$id": "96", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "127", + "$id": "97", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "128", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1011,11 +814,11 @@ "IsNullable": false }, { - "$id": "129", + "$id": "99", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "130", + "$id": "100", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1024,24 +827,24 @@ "IsNullable": false }, { - "$id": "131", + "$id": "101", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "132", + "$id": "102", "Kind": "Primitive", - "Name": "Float64", + "Name": "Float32", "IsNullable": false }, "Value": 3.3, "IsNullable": false }, { - "$id": "133", + "$id": "103", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "134", + "$id": "104", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1056,21 +859,21 @@ "IsReadOnly": false }, { - "$id": "135", + "$id": "105", "Name": "floatLiteral", "SerializedName": "floatLiteral", "Description": "This should be receive/send the 3.3 variant", "Type": { - "$id": "136", + "$id": "106", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "137", + "$id": "107", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "138", + "$id": "108", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1079,11 +882,11 @@ "IsNullable": false }, { - "$id": "139", + "$id": "109", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "140", + "$id": "110", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1092,24 +895,24 @@ "IsNullable": false }, { - "$id": "141", + "$id": "111", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "142", + "$id": "112", "Kind": "Primitive", - "Name": "Float64", + "Name": "Float32", "IsNullable": false }, "Value": 3.3, "IsNullable": false }, { - "$id": "143", + "$id": "113", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "144", + "$id": "114", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1124,21 +927,21 @@ "IsReadOnly": false }, { - "$id": "145", + "$id": "115", "Name": "booleanLiteral", "SerializedName": "booleanLiteral", "Description": "This should be receive/send the true variant", "Type": { - "$id": "146", + "$id": "116", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "147", + "$id": "117", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "148", + "$id": "118", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1147,11 +950,11 @@ "IsNullable": false }, { - "$id": "149", + "$id": "119", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "150", + "$id": "120", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1160,24 +963,24 @@ "IsNullable": false }, { - "$id": "151", + "$id": "121", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "152", + "$id": "122", "Kind": "Primitive", - "Name": "Float64", + "Name": "Float32", "IsNullable": false }, "Value": 3.3, "IsNullable": false }, { - "$id": "153", + "$id": "123", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "154", + "$id": "124", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1199,10 +1002,10 @@ ] }, { - "$ref": "114" + "$ref": "84" }, { - "$id": "155", + "$id": "125", "Kind": "Model", "Name": "SendRequest1", "Namespace": "Type.Union", @@ -1210,12 +1013,12 @@ "Usage": "Input", "Properties": [ { - "$id": "156", + "$id": "126", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "114" + "$ref": "84" }, "IsRequired": true, "IsReadOnly": false @@ -1223,7 +1026,7 @@ ] }, { - "$id": "157", + "$id": "127", "Kind": "Model", "Name": "GetResponse", "Namespace": "Type.Union", @@ -1231,12 +1034,12 @@ "Usage": "Output", "Properties": [ { - "$id": "158", + "$id": "128", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$id": "159", + "$id": "129", "Kind": "Model", "Name": "MixedTypesCases", "Namespace": "Type.Union", @@ -1244,24 +1047,24 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "160", + "$id": "130", "Name": "model", "SerializedName": "model", "Description": "This should be receive/send the Cat variant", "Type": { - "$id": "161", + "$id": "131", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "162", + "$id": "132", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "163", + "$id": "133", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1270,13 +1073,13 @@ "IsNullable": false }, { - "$id": "164", + "$id": "134", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "165", + "$id": "135", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1288,24 +1091,24 @@ "IsReadOnly": false }, { - "$id": "166", + "$id": "136", "Name": "literal", "SerializedName": "literal", "Description": "This should be receive/send the \"a\" variant", "Type": { - "$id": "167", + "$id": "137", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "168", + "$id": "138", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "169", + "$id": "139", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1314,13 +1117,13 @@ "IsNullable": false }, { - "$id": "170", + "$id": "140", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "171", + "$id": "141", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1332,24 +1135,24 @@ "IsReadOnly": false }, { - "$id": "172", + "$id": "142", "Name": "int", "SerializedName": "int", "Description": "This should be receive/send the int variant", "Type": { - "$id": "173", + "$id": "143", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "174", + "$id": "144", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "175", + "$id": "145", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1358,13 +1161,13 @@ "IsNullable": false }, { - "$id": "176", + "$id": "146", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "177", + "$id": "147", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1376,24 +1179,24 @@ "IsReadOnly": false }, { - "$id": "178", + "$id": "148", "Name": "boolean", "SerializedName": "boolean", "Description": "This should be receive/send the boolean variant", "Type": { - "$id": "179", + "$id": "149", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "180", + "$id": "150", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "181", + "$id": "151", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1402,13 +1205,13 @@ "IsNullable": false }, { - "$id": "182", + "$id": "152", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "183", + "$id": "153", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1420,28 +1223,28 @@ "IsReadOnly": false }, { - "$id": "184", + "$id": "154", "Name": "array", "SerializedName": "array", "Description": "This should be receive/send 4 element with Cat, \"a\", int, and boolean", "Type": { - "$id": "185", + "$id": "155", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "186", + "$id": "156", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$ref": "79" + "$ref": "51" }, { - "$id": "187", + "$id": "157", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "188", + "$id": "158", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1450,13 +1253,13 @@ "IsNullable": false }, { - "$id": "189", + "$id": "159", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "190", + "$id": "160", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1477,10 +1280,10 @@ ] }, { - "$ref": "159" + "$ref": "129" }, { - "$id": "191", + "$id": "161", "Kind": "Model", "Name": "SendRequest", "Namespace": "Type.Union", @@ -1488,12 +1291,12 @@ "Usage": "Input", "Properties": [ { - "$id": "192", + "$id": "162", "Name": "prop", "SerializedName": "prop", "Description": "", "Type": { - "$ref": "159" + "$ref": "129" }, "IsRequired": true, "IsReadOnly": false @@ -1503,32 +1306,32 @@ ], "Clients": [ { - "$id": "193", + "$id": "163", "Name": "UnionClient", "Description": "", "Operations": [], "Protocol": { - "$id": "194" + "$id": "164" }, "Creatable": true }, { - "$id": "195", + "$id": "165", "Name": "StringsOnly", "Description": "Describe union of string \"a\" | \"b\" | \"c\"", "Operations": [ { - "$id": "196", + "$id": "166", "Name": "get", "ResourceName": "StringsOnly", "Parameters": [ { - "$id": "197", + "$id": "167", "Name": "host", "NameInRequest": "host", "Description": "TestServer endpoint", "Type": { - "$id": "198", + "$id": "168", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1543,9 +1346,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "199", + "$id": "169", "Type": { - "$id": "200", + "$id": "170", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1554,11 +1357,11 @@ } }, { - "$id": "201", + "$id": "171", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "172", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1573,9 +1376,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "173", "Type": { - "$ref": "202" + "$ref": "172" }, "Value": "application/json" } @@ -1583,12 +1386,12 @@ ], "Responses": [ { - "$id": "204", + "$id": "174", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "14" + "$ref": "28" }, "BodyMediaType": "Json", "Headers": [], @@ -1607,19 +1410,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "205", + "$id": "175", "Name": "send", "ResourceName": "StringsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "206", + "$id": "176", "Name": "SendRequest9", "NameInRequest": "", "Type": { - "$ref": "23" + "$ref": "30" }, "Location": "Body", "IsRequired": true, @@ -1632,11 +1435,11 @@ "Kind": "Spread" }, { - "$id": "207", + "$id": "177", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "208", + "$id": "178", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1651,19 +1454,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "209", + "$id": "179", "Type": { - "$ref": "208" + "$ref": "178" }, "Value": "application/json" } }, { - "$id": "210", + "$id": "180", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "211", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1678,9 +1481,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "212", + "$id": "182", "Type": { - "$ref": "211" + "$ref": "181" }, "Value": "application/json" } @@ -1688,7 +1491,7 @@ ], "Responses": [ { - "$id": "213", + "$id": "183", "StatusCodes": [ 204 ], @@ -1710,30 +1513,30 @@ } ], "Protocol": { - "$id": "214" + "$id": "184" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "215", + "$id": "185", "Name": "StringExtensible", "Description": "Describe union of string string | \"b\" | \"c\"", "Operations": [ { - "$id": "216", + "$id": "186", "Name": "get", "ResourceName": "StringExtensible", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "217", + "$id": "187", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "218", + "$id": "188", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1748,9 +1551,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "219", + "$id": "189", "Type": { - "$ref": "218" + "$ref": "188" }, "Value": "application/json" } @@ -1758,7 +1561,7 @@ ], "Responses": [ { - "$id": "220", + "$id": "190", "StatusCodes": [ 200 ], @@ -1782,15 +1585,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "221", + "$id": "191", "Name": "send", "ResourceName": "StringExtensible", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "222", + "$id": "192", "Name": "SendRequest8", "NameInRequest": "", "Type": { @@ -1807,11 +1610,11 @@ "Kind": "Spread" }, { - "$id": "223", + "$id": "193", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "224", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1826,19 +1629,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "225", + "$id": "195", "Type": { - "$ref": "224" + "$ref": "194" }, "Value": "application/json" } }, { - "$id": "226", + "$id": "196", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "227", + "$id": "197", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1853,9 +1656,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "228", + "$id": "198", "Type": { - "$ref": "227" + "$ref": "197" }, "Value": "application/json" } @@ -1863,7 +1666,7 @@ ], "Responses": [ { - "$id": "229", + "$id": "199", "StatusCodes": [ 204 ], @@ -1885,30 +1688,30 @@ } ], "Protocol": { - "$id": "230" + "$id": "200" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "231", + "$id": "201", "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": "232", + "$id": "202", "Name": "get", "ResourceName": "StringExtensibleNamed", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "233", + "$id": "203", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "234", + "$id": "204", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1923,9 +1726,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "235", + "$id": "205", "Type": { - "$ref": "234" + "$ref": "204" }, "Value": "application/json" } @@ -1933,7 +1736,7 @@ ], "Responses": [ { - "$id": "236", + "$id": "206", "StatusCodes": [ 200 ], @@ -1957,15 +1760,15 @@ "GenerateConvenienceMethod": true }, { - "$id": "237", + "$id": "207", "Name": "send", "ResourceName": "StringExtensibleNamed", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "238", + "$id": "208", "Name": "SendRequest7", "NameInRequest": "", "Type": { @@ -1982,11 +1785,11 @@ "Kind": "Spread" }, { - "$id": "239", + "$id": "209", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "240", + "$id": "210", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2001,19 +1804,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "241", + "$id": "211", "Type": { - "$ref": "240" + "$ref": "210" }, "Value": "application/json" } }, { - "$id": "242", + "$id": "212", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "243", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2028,9 +1831,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "244", + "$id": "214", "Type": { - "$ref": "243" + "$ref": "213" }, "Value": "application/json" } @@ -2038,7 +1841,7 @@ ], "Responses": [ { - "$id": "245", + "$id": "215", "StatusCodes": [ 204 ], @@ -2060,30 +1863,30 @@ } ], "Protocol": { - "$id": "246" + "$id": "216" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "247", + "$id": "217", "Name": "IntsOnly", "Description": "Describe union of integer 1 | 2 | 3", "Operations": [ { - "$id": "248", + "$id": "218", "Name": "get", "ResourceName": "IntsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "249", + "$id": "219", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "250", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2098,9 +1901,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "251", + "$id": "221", "Type": { - "$ref": "250" + "$ref": "220" }, "Value": "application/json" } @@ -2108,7 +1911,7 @@ ], "Responses": [ { - "$id": "252", + "$id": "222", "StatusCodes": [ 200 ], @@ -2132,19 +1935,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "253", + "$id": "223", "Name": "send", "ResourceName": "IntsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "254", + "$id": "224", "Name": "SendRequest6", "NameInRequest": "", "Type": { - "$ref": "49" + "$ref": "42" }, "Location": "Body", "IsRequired": true, @@ -2157,11 +1960,11 @@ "Kind": "Spread" }, { - "$id": "255", + "$id": "225", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "256", + "$id": "226", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2176,19 +1979,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "257", + "$id": "227", "Type": { - "$ref": "256" + "$ref": "226" }, "Value": "application/json" } }, { - "$id": "258", + "$id": "228", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "259", + "$id": "229", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2203,9 +2006,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "260", + "$id": "230", "Type": { - "$ref": "259" + "$ref": "229" }, "Value": "application/json" } @@ -2213,7 +2016,7 @@ ], "Responses": [ { - "$id": "261", + "$id": "231", "StatusCodes": [ 204 ], @@ -2235,30 +2038,30 @@ } ], "Protocol": { - "$id": "262" + "$id": "232" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "263", + "$id": "233", "Name": "FloatsOnly", "Description": "Describe union of floats 1.1 | 2.2 | 3.3", "Operations": [ { - "$id": "264", + "$id": "234", "Name": "get", "ResourceName": "FloatsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "265", + "$id": "235", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "266", + "$id": "236", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2273,9 +2076,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "267", + "$id": "237", "Type": { - "$ref": "266" + "$ref": "236" }, "Value": "application/json" } @@ -2283,12 +2086,12 @@ ], "Responses": [ { - "$id": "268", + "$id": "238", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "58" + "$ref": "44" }, "BodyMediaType": "Json", "Headers": [], @@ -2307,19 +2110,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "269", + "$id": "239", "Name": "send", "ResourceName": "FloatsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "270", + "$id": "240", "Name": "SendRequest5", "NameInRequest": "", "Type": { - "$ref": "67" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2332,11 +2135,11 @@ "Kind": "Spread" }, { - "$id": "271", + "$id": "241", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "272", + "$id": "242", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2351,19 +2154,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "243", "Type": { - "$ref": "272" + "$ref": "242" }, "Value": "application/json" } }, { - "$id": "274", + "$id": "244", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "275", + "$id": "245", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2378,9 +2181,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "276", + "$id": "246", "Type": { - "$ref": "275" + "$ref": "245" }, "Value": "application/json" } @@ -2388,7 +2191,7 @@ ], "Responses": [ { - "$id": "277", + "$id": "247", "StatusCodes": [ 204 ], @@ -2410,30 +2213,30 @@ } ], "Protocol": { - "$id": "278" + "$id": "248" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "279", + "$id": "249", "Name": "ModelsOnly", "Description": "Describe union of models", "Operations": [ { - "$id": "280", + "$id": "250", "Name": "get", "ResourceName": "ModelsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "281", + "$id": "251", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "282", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2448,9 +2251,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "283", + "$id": "253", "Type": { - "$ref": "282" + "$ref": "252" }, "Value": "application/json" } @@ -2458,12 +2261,12 @@ ], "Responses": [ { - "$id": "284", + "$id": "254", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "76" + "$ref": "48" }, "BodyMediaType": "Json", "Headers": [], @@ -2482,19 +2285,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "285", + "$id": "255", "Name": "send", "ResourceName": "ModelsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "286", + "$id": "256", "Name": "SendRequest4", "NameInRequest": "", "Type": { - "$ref": "85" + "$ref": "57" }, "Location": "Body", "IsRequired": true, @@ -2507,11 +2310,11 @@ "Kind": "Spread" }, { - "$id": "287", + "$id": "257", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "288", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2526,19 +2329,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "289", + "$id": "259", "Type": { - "$ref": "288" + "$ref": "258" }, "Value": "application/json" } }, { - "$id": "290", + "$id": "260", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "291", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2553,9 +2356,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "292", + "$id": "262", "Type": { - "$ref": "291" + "$ref": "261" }, "Value": "application/json" } @@ -2563,7 +2366,7 @@ ], "Responses": [ { - "$id": "293", + "$id": "263", "StatusCodes": [ 204 ], @@ -2585,30 +2388,30 @@ } ], "Protocol": { - "$id": "294" + "$id": "264" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "295", + "$id": "265", "Name": "EnumsOnly", "Description": "Describe union of 2 different enums", "Operations": [ { - "$id": "296", + "$id": "266", "Name": "get", "ResourceName": "EnumsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "297", + "$id": "267", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "298", + "$id": "268", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2623,9 +2426,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "299", + "$id": "269", "Type": { - "$ref": "298" + "$ref": "268" }, "Value": "application/json" } @@ -2633,12 +2436,12 @@ ], "Responses": [ { - "$id": "300", + "$id": "270", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "88" + "$ref": "60" }, "BodyMediaType": "Json", "Headers": [], @@ -2657,19 +2460,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "301", + "$id": "271", "Name": "send", "ResourceName": "EnumsOnly", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "302", + "$id": "272", "Name": "SendRequest3", "NameInRequest": "", "Type": { - "$ref": "95" + "$ref": "65" }, "Location": "Body", "IsRequired": true, @@ -2682,11 +2485,11 @@ "Kind": "Spread" }, { - "$id": "303", + "$id": "273", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "304", + "$id": "274", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2701,19 +2504,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "305", + "$id": "275", "Type": { - "$ref": "304" + "$ref": "274" }, "Value": "application/json" } }, { - "$id": "306", + "$id": "276", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "307", + "$id": "277", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2728,9 +2531,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "308", + "$id": "278", "Type": { - "$ref": "307" + "$ref": "277" }, "Value": "application/json" } @@ -2738,7 +2541,7 @@ ], "Responses": [ { - "$id": "309", + "$id": "279", "StatusCodes": [ 204 ], @@ -2760,30 +2563,30 @@ } ], "Protocol": { - "$id": "310" + "$id": "280" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "311", + "$id": "281", "Name": "StringAndArray", "Description": "Describe union of a string and an array of strings", "Operations": [ { - "$id": "312", + "$id": "282", "Name": "get", "ResourceName": "StringAndArray", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "313", + "$id": "283", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "314", + "$id": "284", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2798,9 +2601,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "315", + "$id": "285", "Type": { - "$ref": "314" + "$ref": "284" }, "Value": "application/json" } @@ -2808,12 +2611,12 @@ ], "Responses": [ { - "$id": "316", + "$id": "286", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "97" + "$ref": "67" }, "BodyMediaType": "Json", "Headers": [], @@ -2832,19 +2635,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "317", + "$id": "287", "Name": "send", "ResourceName": "StringAndArray", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "318", + "$id": "288", "Name": "SendRequest2", "NameInRequest": "", "Type": { - "$ref": "110" + "$ref": "80" }, "Location": "Body", "IsRequired": true, @@ -2857,11 +2660,11 @@ "Kind": "Spread" }, { - "$id": "319", + "$id": "289", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "320", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2876,19 +2679,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "321", + "$id": "291", "Type": { - "$ref": "320" + "$ref": "290" }, "Value": "application/json" } }, { - "$id": "322", + "$id": "292", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "323", + "$id": "293", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2903,9 +2706,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "324", + "$id": "294", "Type": { - "$ref": "323" + "$ref": "293" }, "Value": "application/json" } @@ -2913,7 +2716,7 @@ ], "Responses": [ { - "$id": "325", + "$id": "295", "StatusCodes": [ 204 ], @@ -2935,30 +2738,30 @@ } ], "Protocol": { - "$id": "326" + "$id": "296" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "327", + "$id": "297", "Name": "MixedLiterals", "Description": "Describe union of floats \"a\" | 2 | 3.3", "Operations": [ { - "$id": "328", + "$id": "298", "Name": "get", "ResourceName": "MixedLiterals", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "329", + "$id": "299", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "330", + "$id": "300", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2973,9 +2776,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "331", + "$id": "301", "Type": { - "$ref": "330" + "$ref": "300" }, "Value": "application/json" } @@ -2983,12 +2786,12 @@ ], "Responses": [ { - "$id": "332", + "$id": "302", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "112" + "$ref": "82" }, "BodyMediaType": "Json", "Headers": [], @@ -3007,19 +2810,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "333", + "$id": "303", "Name": "send", "ResourceName": "MixedLiterals", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "334", + "$id": "304", "Name": "SendRequest1", "NameInRequest": "", "Type": { - "$ref": "155" + "$ref": "125" }, "Location": "Body", "IsRequired": true, @@ -3032,11 +2835,11 @@ "Kind": "Spread" }, { - "$id": "335", + "$id": "305", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "336", + "$id": "306", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3051,19 +2854,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "337", + "$id": "307", "Type": { - "$ref": "336" + "$ref": "306" }, "Value": "application/json" } }, { - "$id": "338", + "$id": "308", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "339", + "$id": "309", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3078,9 +2881,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "340", + "$id": "310", "Type": { - "$ref": "339" + "$ref": "309" }, "Value": "application/json" } @@ -3088,7 +2891,7 @@ ], "Responses": [ { - "$id": "341", + "$id": "311", "StatusCodes": [ 204 ], @@ -3110,30 +2913,30 @@ } ], "Protocol": { - "$id": "342" + "$id": "312" }, "Creatable": false, "Parent": "UnionClient" }, { - "$id": "343", + "$id": "313", "Name": "MixedTypes", "Description": "Describe union of floats \"a\" | 2 | 3.3", "Operations": [ { - "$id": "344", + "$id": "314", "Name": "get", "ResourceName": "MixedTypes", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "345", + "$id": "315", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "346", + "$id": "316", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3148,9 +2951,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "347", + "$id": "317", "Type": { - "$ref": "346" + "$ref": "316" }, "Value": "application/json" } @@ -3158,12 +2961,12 @@ ], "Responses": [ { - "$id": "348", + "$id": "318", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "157" + "$ref": "127" }, "BodyMediaType": "Json", "Headers": [], @@ -3182,19 +2985,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "349", + "$id": "319", "Name": "send", "ResourceName": "MixedTypes", "Parameters": [ { - "$ref": "197" + "$ref": "167" }, { - "$id": "350", + "$id": "320", "Name": "SendRequest", "NameInRequest": "", "Type": { - "$ref": "191" + "$ref": "161" }, "Location": "Body", "IsRequired": true, @@ -3207,11 +3010,11 @@ "Kind": "Spread" }, { - "$id": "351", + "$id": "321", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "352", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3226,19 +3029,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "353", + "$id": "323", "Type": { - "$ref": "352" + "$ref": "322" }, "Value": "application/json" } }, { - "$id": "354", + "$id": "324", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "355", + "$id": "325", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3253,9 +3056,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "356", + "$id": "326", "Type": { - "$ref": "355" + "$ref": "325" }, "Value": "application/json" } @@ -3263,7 +3066,7 @@ ], "Responses": [ { - "$id": "357", + "$id": "327", "StatusCodes": [ 204 ], @@ -3285,7 +3088,7 @@ } ], "Protocol": { - "$id": "358" + "$id": "328" }, "Creatable": false, "Parent": "UnionClient" diff --git a/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json index 7b195facf49..e38dc6ceafb 100644 --- a/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ApiVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -46,7 +46,6 @@ } ], "Namespace": "ApiVersionInTsp", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" diff --git a/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Authoring-TypeSpec/src/Generated/tspCodeModel.json index 98439933534..9b6c22e3f52 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", @@ -83,7 +83,7 @@ "$id": "12", "Kind": "Enum", "Name": "JobStatus", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "13", @@ -140,7 +140,6 @@ } ], "Namespace": "AuthoringTypeSpec", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -280,7 +279,7 @@ "Type": { "$id": "40", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -294,7 +293,7 @@ "Type": { "$id": "42", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -308,7 +307,7 @@ "Type": { "$id": "44", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -322,7 +321,7 @@ "Type": { "$id": "46", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -698,7 +697,7 @@ "Type": { "$id": "91", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -712,7 +711,7 @@ "Type": { "$id": "93", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -726,7 +725,7 @@ "Type": { "$id": "95", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -856,7 +855,7 @@ "Type": { "$id": "111", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -870,7 +869,7 @@ "Type": { "$id": "113", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -884,7 +883,7 @@ "Type": { "$id": "115", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -1106,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": "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 - } - ] } ], "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 @@ -1304,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 @@ -1335,11 +1181,11 @@ "Kind": "Client" }, { - "$id": "170", + "$id": "152", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "171", + "$id": "153", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1355,7 +1201,7 @@ "Kind": "Method" }, { - "$id": "172", + "$id": "154", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -1373,11 +1219,11 @@ "Kind": "Method" }, { - "$id": "173", + "$id": "155", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "174", + "$id": "156", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1392,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 @@ -1419,9 +1265,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "178", + "$id": "160", "Type": { - "$ref": "177" + "$ref": "159" }, "Value": "application/json" } @@ -1429,7 +1275,7 @@ ], "Responses": [ { - "$id": "179", + "$id": "161", "StatusCodes": [ 201 ], @@ -1439,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 @@ -1457,7 +1303,7 @@ ] }, { - "$id": "182", + "$id": "164", "StatusCodes": [ 200 ], @@ -1467,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 @@ -1494,10 +1340,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "185", + "$id": "167", "FinalStateVia": 2, "FinalResponse": { - "$id": "186", + "$id": "168", "StatusCodes": [ 200 ], @@ -1511,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, @@ -1544,11 +1390,11 @@ "Kind": "Client" }, { - "$id": "190", + "$id": "172", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "191", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1564,11 +1410,11 @@ "Kind": "Method" }, { - "$id": "192", + "$id": "174", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "193", + "$id": "175", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1583,9 +1429,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "194", + "$id": "176", "Type": { - "$ref": "193" + "$ref": "175" }, "Value": "application/json" } @@ -1593,7 +1439,7 @@ ], "Responses": [ { - "$id": "195", + "$id": "177", "StatusCodes": [ 200 ], @@ -1617,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, @@ -1650,11 +1496,11 @@ "Kind": "Client" }, { - "$id": "199", + "$id": "181", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "200", + "$id": "182", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1670,11 +1516,11 @@ "Kind": "Method" }, { - "$id": "201", + "$id": "183", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "184", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1689,9 +1535,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "185", "Type": { - "$ref": "202" + "$ref": "184" }, "Value": "application/json" } @@ -1699,7 +1545,7 @@ ], "Responses": [ { - "$id": "204", + "$id": "186", "StatusCodes": [ 202 ], @@ -1709,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 @@ -1733,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 ], @@ -1747,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, @@ -1780,11 +1626,11 @@ "Kind": "Client" }, { - "$id": "212", + "$id": "194", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "213", + "$id": "195", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1799,9 +1645,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "214", + "$id": "196", "Type": { - "$ref": "213" + "$ref": "195" }, "Value": "application/json" } @@ -1809,7 +1655,7 @@ ], "Responses": [ { - "$id": "215", + "$id": "197", "StatusCodes": [ 200 ], @@ -1830,7 +1676,7 @@ "Path": "/authoring/analyze-text/projects", "BufferResponse": true, "Paging": { - "$id": "216", + "$id": "198", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1838,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, @@ -1871,11 +1717,11 @@ "Kind": "Client" }, { - "$id": "220", + "$id": "202", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "221", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1891,11 +1737,11 @@ "Kind": "Method" }, { - "$id": "222", + "$id": "204", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "223", + "$id": "205", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1911,11 +1757,11 @@ "Kind": "Method" }, { - "$id": "224", + "$id": "206", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "225", + "$id": "207", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1930,9 +1776,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "226", + "$id": "208", "Type": { - "$ref": "225" + "$ref": "207" }, "Value": "application/json" } @@ -1940,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 @@ -1968,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 ], @@ -1982,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, @@ -2015,11 +1861,11 @@ "Kind": "Client" }, { - "$id": "235", + "$id": "217", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "236", + "$id": "218", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2035,11 +1881,11 @@ "Kind": "Method" }, { - "$id": "237", + "$id": "219", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "238", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2054,9 +1900,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "239", + "$id": "221", "Type": { - "$ref": "238" + "$ref": "220" }, "Value": "application/json" } @@ -2064,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 @@ -2092,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 ], @@ -2106,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, @@ -2139,11 +1985,11 @@ "Kind": "Client" }, { - "$id": "248", + "$id": "230", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "249", + "$id": "231", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2159,7 +2005,7 @@ "Kind": "Method" }, { - "$id": "250", + "$id": "232", "Name": "body", "NameInRequest": "body", "Type": { @@ -2176,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 @@ -2195,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 @@ -2222,9 +2068,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "238", "Type": { - "$ref": "255" + "$ref": "237" }, "Value": "application/json" } @@ -2232,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 @@ -2263,10 +2109,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "260", + "$id": "242", "FinalStateVia": 3, "FinalResponse": { - "$id": "261", + "$id": "243", "StatusCodes": [ 200 ], @@ -2278,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, @@ -2322,11 +2168,11 @@ "Kind": "Client" }, { - "$id": "267", + "$id": "249", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "268", + "$id": "250", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2342,11 +2188,11 @@ "Kind": "Method" }, { - "$id": "269", + "$id": "251", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "270", + "$id": "252", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2362,11 +2208,11 @@ "Kind": "Method" }, { - "$id": "271", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "272", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2381,9 +2227,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "255", "Type": { - "$ref": "272" + "$ref": "254" }, "Value": "application/json" } @@ -2391,7 +2237,7 @@ ], "Responses": [ { - "$id": "274", + "$id": "256", "StatusCodes": [ 200 ], @@ -2415,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, @@ -2448,11 +2294,11 @@ "Kind": "Client" }, { - "$id": "278", + "$id": "260", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "279", + "$id": "261", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2468,11 +2314,11 @@ "Kind": "Method" }, { - "$id": "280", + "$id": "262", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "281", + "$id": "263", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2488,7 +2334,7 @@ "Kind": "Method" }, { - "$id": "282", + "$id": "264", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -2506,11 +2352,11 @@ "Kind": "Method" }, { - "$id": "283", + "$id": "265", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "284", + "$id": "266", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2525,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 @@ -2552,9 +2398,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "288", + "$id": "270", "Type": { - "$ref": "287" + "$ref": "269" }, "Value": "application/json" } @@ -2562,7 +2408,7 @@ ], "Responses": [ { - "$id": "289", + "$id": "271", "StatusCodes": [ 201 ], @@ -2572,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 @@ -2590,7 +2436,7 @@ ] }, { - "$id": "292", + "$id": "274", "StatusCodes": [ 200 ], @@ -2600,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 @@ -2627,10 +2473,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "295", + "$id": "277", "FinalStateVia": 2, "FinalResponse": { - "$id": "296", + "$id": "278", "StatusCodes": [ 200 ], @@ -2644,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, @@ -2677,11 +2523,11 @@ "Kind": "Client" }, { - "$id": "300", + "$id": "282", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "301", + "$id": "283", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2697,11 +2543,11 @@ "Kind": "Method" }, { - "$id": "302", + "$id": "284", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "303", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2717,11 +2563,11 @@ "Kind": "Method" }, { - "$id": "304", + "$id": "286", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "305", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2736,9 +2582,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "306", + "$id": "288", "Type": { - "$ref": "305" + "$ref": "287" }, "Value": "application/json" } @@ -2746,7 +2592,7 @@ ], "Responses": [ { - "$id": "307", + "$id": "289", "StatusCodes": [ 202 ], @@ -2756,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 @@ -2780,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 ], @@ -2794,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, @@ -2827,11 +2673,11 @@ "Kind": "Client" }, { - "$id": "315", + "$id": "297", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "316", + "$id": "298", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2847,11 +2693,11 @@ "Kind": "Method" }, { - "$id": "317", + "$id": "299", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "318", + "$id": "300", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2866,9 +2712,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "319", + "$id": "301", "Type": { - "$ref": "318" + "$ref": "300" }, "Value": "application/json" } @@ -2876,7 +2722,7 @@ ], "Responses": [ { - "$id": "320", + "$id": "302", "StatusCodes": [ 200 ], @@ -2897,7 +2743,7 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments", "BufferResponse": true, "Paging": { - "$id": "321", + "$id": "303", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -2905,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, @@ -2938,11 +2784,11 @@ "Kind": "Client" }, { - "$id": "325", + "$id": "307", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "326", + "$id": "308", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2958,7 +2804,7 @@ "Kind": "Method" }, { - "$id": "327", + "$id": "309", "Name": "body", "NameInRequest": "body", "Description": "The body schema of the operation.", @@ -2976,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 @@ -2995,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 @@ -3022,9 +2868,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "333", + "$id": "315", "Type": { - "$ref": "332" + "$ref": "314" }, "Value": "application/json" } @@ -3032,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 @@ -3063,10 +2909,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "337", + "$id": "319", "FinalStateVia": 3, "FinalResponse": { - "$id": "338", + "$id": "320", "StatusCodes": [ 200 ], @@ -3078,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, @@ -3122,11 +2968,11 @@ "Kind": "Client" }, { - "$id": "344", + "$id": "326", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "345", + "$id": "327", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3142,11 +2988,11 @@ "Kind": "Method" }, { - "$id": "346", + "$id": "328", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "347", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3162,11 +3008,11 @@ "Kind": "Method" }, { - "$id": "348", + "$id": "330", "Name": "jobId", "NameInRequest": "jobId", "Type": { - "$id": "349", + "$id": "331", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3182,11 +3028,11 @@ "Kind": "Method" }, { - "$id": "350", + "$id": "332", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "351", + "$id": "333", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3201,9 +3047,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "352", + "$id": "334", "Type": { - "$ref": "351" + "$ref": "333" }, "Value": "application/json" } @@ -3211,7 +3057,7 @@ ], "Responses": [ { - "$id": "353", + "$id": "335", "StatusCodes": [ 200 ], @@ -3235,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, @@ -3268,11 +3114,11 @@ "Kind": "Client" }, { - "$id": "357", + "$id": "339", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "358", + "$id": "340", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3288,11 +3134,11 @@ "Kind": "Method" }, { - "$id": "359", + "$id": "341", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "360", + "$id": "342", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3308,11 +3154,11 @@ "Kind": "Method" }, { - "$id": "361", + "$id": "343", "Name": "jobId", "NameInRequest": "jobId", "Type": { - "$id": "362", + "$id": "344", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3328,11 +3174,11 @@ "Kind": "Method" }, { - "$id": "363", + "$id": "345", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "364", + "$id": "346", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3347,9 +3193,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "365", + "$id": "347", "Type": { - "$ref": "364" + "$ref": "346" }, "Value": "application/json" } @@ -3357,7 +3203,7 @@ ], "Responses": [ { - "$id": "366", + "$id": "348", "StatusCodes": [ 200 ], @@ -3382,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 @@ -3421,11 +3267,11 @@ "Kind": "Method" }, { - "$id": "372", + "$id": "354", "Name": "skip", "NameInRequest": "skip", "Type": { - "$id": "373", + "$id": "355", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3441,11 +3287,11 @@ "Kind": "Method" }, { - "$id": "374", + "$id": "356", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Type": { - "$id": "375", + "$id": "357", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3461,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, @@ -3485,11 +3331,11 @@ "Kind": "Client" }, { - "$id": "378", + "$id": "360", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "379", + "$id": "361", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3504,9 +3350,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "380", + "$id": "362", "Type": { - "$ref": "379" + "$ref": "361" }, "Value": "application/json" } @@ -3514,7 +3360,7 @@ ], "Responses": [ { - "$id": "381", + "$id": "363", "StatusCodes": [ 200 ], @@ -3535,7 +3381,7 @@ "Path": "/authoring/analyze-text/projects/global/languages", "BufferResponse": true, "Paging": { - "$id": "382", + "$id": "364", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -3543,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 @@ -3571,11 +3417,11 @@ "Kind": "Method" }, { - "$id": "386", + "$id": "368", "Name": "skip", "NameInRequest": "skip", "Type": { - "$id": "387", + "$id": "369", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3591,11 +3437,11 @@ "Kind": "Method" }, { - "$id": "388", + "$id": "370", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Type": { - "$id": "389", + "$id": "371", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3611,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, @@ -3635,11 +3481,11 @@ "Kind": "Client" }, { - "$id": "392", + "$id": "374", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "393", + "$id": "375", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3654,9 +3500,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "394", + "$id": "376", "Type": { - "$ref": "393" + "$ref": "375" }, "Value": "application/json" } @@ -3664,7 +3510,7 @@ ], "Responses": [ { - "$id": "395", + "$id": "377", "StatusCodes": [ 200 ], @@ -3685,7 +3531,7 @@ "Path": "/authoring/analyze-text/projects/global/training-config-versions", "BufferResponse": true, "Paging": { - "$id": "396", + "$id": "378", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -3694,7 +3540,7 @@ } ], "Protocol": { - "$id": "397" + "$id": "379" }, "Creatable": false, "Parent": "AuthoringTypeSpecClient" diff --git a/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Customizations-TypeSpec/src/Generated/tspCodeModel.json index f1c94f17a62..0f51cf833c1 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", @@ -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/FirstTest-TypeSpec.tsp b/test/TestProjects/FirstTest-TypeSpec/FirstTest-TypeSpec.tsp index 58ec549359b..557876ea952 100644 --- a/test/TestProjects/FirstTest-TypeSpec/FirstTest-TypeSpec.tsp +++ b/test/TestProjects/FirstTest-TypeSpec/FirstTest-TypeSpec.tsp @@ -246,7 +246,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/Docs/FirstTestTypeSpecClient.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml index 89d4abc34b3..b4bdf072182 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(123); +Extension input = new Extension(123) +{ + 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(123); +Extension input = new Extension(123) +{ + Extension = { default }, +}; Response response = client.RecursiveExtension(input); ]]> @@ -1552,7 +1558,10 @@ FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); Extendible input = new Extendible { - Extension = { new ThereLevelExtension(123) }, + Extension = {new ThereLevelExtension(123) + { + Extension = {default}, + }}, }; Response response = await client.ThreeLevelRecursiveAsync(input); ]]> @@ -1574,7 +1583,10 @@ FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); Extendible input = new Extendible { - Extension = { new ThereLevelExtension(123) }, + Extension = {new ThereLevelExtension(123) + { + Extension = {default}, + }}, }; Response response = client.ThreeLevelRecursive(input); ]]> diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecModelFactory.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecModelFactory.cs index 48fff07920a..873bae1b8df 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecModelFactory.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecModelFactory.cs @@ -51,16 +51,6 @@ public static Thing Thing(string name = null, BinaryData requiredUnion = null, T 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 . /// /// @@ -72,16 +62,6 @@ public static Extension Extension(IEnumerable extension = null, sbyte 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 . /// /// 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 c7ea66f7361..6732083a7c3 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; } - IReadOnlyList extension = default; + IList extension = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 fa96fe8a2f3..cb3de3bfa13 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/Element.cs @@ -46,7 +46,7 @@ public partial class Element private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal Element() + public Element() { Extension = new ChangeTrackingList(); } @@ -54,13 +54,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 c5f6a5a18ac..e7ec315ca85 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; } sbyte level = default; - IReadOnlyList extension = default; + IList extension = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 307850d241a..69288afc8cf 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(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/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.Serialization.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.Serialization.cs index 053cf21f26b..aacddf454db 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; } - IReadOnlyList extension = default; + IList extension = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 5ce023050bc..515e8359b2a 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Models/ThereLevelElement.cs @@ -46,7 +46,7 @@ public partial class ThereLevelElement private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ThereLevelElement() + public ThereLevelElement() { Extension = new ChangeTrackingList(); } @@ -54,13 +54,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 e0d9da60853..628e2c19ff3 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; } sbyte level = default; - IReadOnlyList extension = default; + IList extension = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 f59bf9ef7f2..a650907cdce 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(sbyte level) /// /// Keeps track of any properties unknown to the library. /// - internal ThereLevelExtension(IReadOnlyList extension, IDictionary serializedAdditionalRawData, sbyte level) : base(extension, serializedAdditionalRawData) + internal ThereLevelExtension(IList extension, IDictionary serializedAdditionalRawData, sbyte 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 f5d24de35fe..5131dcd8ba5 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/tspCodeModel.json @@ -198,7 +198,7 @@ "Value": "4" } ], - "Namespace": "FirstTestTypeSpec", + "Namespace": "", "Description": "Simple enum", "IsExtensible": false, "IsNullable": true, @@ -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", @@ -320,7 +320,7 @@ "$id": "42", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "Float32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "43", @@ -348,7 +348,7 @@ "$id": "46", "Kind": "Enum", "Name": "DaysOfWeekExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "47", @@ -394,92 +394,16 @@ { "$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" } ], "Namespace": "FirstTestTypeSpec", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -487,7 +411,7 @@ ], "Models": [ { - "$id": "65", + "$id": "56", "Kind": "Model", "Name": "Thing", "Namespace": "FirstTestTypeSpec", @@ -496,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 @@ -510,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 @@ -538,7 +462,7 @@ "IsNullable": false }, { - "$id": "73", + "$id": "64", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -550,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": { @@ -568,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": { @@ -586,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": { @@ -604,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 @@ -625,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": { @@ -643,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": { @@ -661,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": { @@ -679,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 @@ -700,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 @@ -714,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 @@ -734,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 @@ -756,7 +680,7 @@ ] }, { - "$id": "100", + "$id": "91", "Kind": "Model", "Name": "Friend", "Namespace": "FirstTestTypeSpec", @@ -765,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 @@ -781,7 +705,7 @@ ] }, { - "$id": "103", + "$id": "94", "Kind": "Model", "Name": "ModelWithFormat", "Namespace": "FirstTestTypeSpec", @@ -789,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 @@ -803,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 @@ -819,7 +743,7 @@ ] }, { - "$id": "108", + "$id": "99", "Kind": "Model", "Name": "ProjectedModel", "Namespace": "FirstTestTypeSpec", @@ -828,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 @@ -844,7 +768,7 @@ ] }, { - "$id": "111", + "$id": "102", "Kind": "Model", "Name": "ReturnsAnonymousModelResponse", "Namespace": "FirstTestTypeSpec", @@ -853,63 +777,63 @@ "Properties": [] }, { - "$id": "112", + "$id": "103", "Kind": "Model", - "Name": "Element", + "Name": "Extension", "Namespace": "FirstTestTypeSpec", - "Description": "element", + "Description": "extension", "IsNullable": false, - "Usage": "None", + "Usage": "Input", + "BaseModel": { + "$id": "104", + "Kind": "Model", + "Name": "Element", + "Namespace": "FirstTestTypeSpec", + "Description": "element", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "105", + "Name": "extension", + "SerializedName": "extension", + "Description": "", + "Type": { + "$id": "106", + "Kind": "Array", + "Name": "Array", + "ElementType": { + "$ref": "103" + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, "Properties": [ { - "$id": "113", - "Name": "extension", - "SerializedName": "extension", + "$id": "107", + "Name": "level", + "SerializedName": "level", "Description": "", "Type": { - "$id": "114", - "Kind": "Array", - "Name": "Array", - "ElementType": { - "$id": "115", - "Kind": "Model", - "Name": "Extension", - "Namespace": "FirstTestTypeSpec", - "Description": "extension", - "IsNullable": false, - "Usage": "Input", - "BaseModel": { - "$ref": "112" - }, - "Properties": [ - { - "$id": "116", - "Name": "level", - "SerializedName": "level", - "Description": "", - "Type": { - "$id": "117", - "Kind": "Primitive", - "Name": "SByte", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, + "$id": "108", + "Kind": "Primitive", + "Name": "SByte", "IsNullable": false }, - "IsRequired": false, + "IsRequired": true, "IsReadOnly": false } ] }, { - "$ref": "115" + "$ref": "104" }, { - "$id": "118", + "$id": "109", "Kind": "Model", "Name": "Extendible", "Namespace": "FirstTestTypeSpec", @@ -918,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", @@ -935,25 +859,25 @@ "IsNullable": false, "Usage": "Input", "BaseModel": { - "$id": "122", + "$id": "113", "Kind": "Model", "Name": "ThereLevelElement", "Namespace": "FirstTestTypeSpec", "Description": "element", "IsNullable": false, - "Usage": "None", + "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 }, @@ -964,12 +888,12 @@ }, "Properties": [ { - "$id": "125", + "$id": "116", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "126", + "$id": "117", "Kind": "Primitive", "Name": "SByte", "IsNullable": false @@ -987,38 +911,13 @@ ] }, { - "$ref": "122" + "$ref": "112" }, { - "$ref": "121" + "$ref": "113" }, { - "$id": "127", - "Kind": "Model", - "Name": "BaseModel", - "Namespace": "FirstTestTypeSpec", - "Description": "parenetModel", - "IsNullable": false, - "Usage": "Input", - "Properties": [ - { - "$id": "128", - "Name": "level", - "SerializedName": "level", - "Description": "", - "Type": { - "$id": "129", - "Kind": "Primitive", - "Name": "SByte", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "130", + "$id": "118", "Kind": "Model", "Name": "ChildModel", "Namespace": "FirstTestTypeSpec", @@ -1026,20 +925,42 @@ "IsNullable": false, "Usage": "Input", "BaseModel": { - "$ref": "127" + "$id": "119", + "Kind": "Model", + "Name": "BaseModel", + "Namespace": "FirstTestTypeSpec", + "Description": "parenetModel", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "120", + "Name": "level", + "SerializedName": "level", + "Description": "", + "Type": { + "$id": "121", + "Kind": "Primitive", + "Name": "SByte", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] }, "Properties": [ { - "$id": "131", + "$id": "122", "Name": "parent", "SerializedName": "parent", "Description": "", "Type": { - "$id": "132", + "$id": "123", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "127" + "$ref": "119" }, "IsNullable": false }, @@ -1049,7 +970,10 @@ ] }, { - "$id": "133", + "$ref": "119" + }, + { + "$id": "124", "Kind": "Model", "Name": "ContainSelf", "Namespace": "FirstTestTypeSpec", @@ -1058,12 +982,12 @@ "Usage": "Input", "Properties": [ { - "$id": "134", + "$id": "125", "Name": "self", "SerializedName": "self", "Description": "", "Type": { - "$ref": "133" + "$ref": "124" }, "IsRequired": true, "IsReadOnly": false @@ -1071,7 +995,7 @@ ] }, { - "$id": "135", + "$id": "126", "Kind": "Model", "Name": "ModelWithProjectedEnum", "Namespace": "FirstTestTypeSpec", @@ -1079,7 +1003,7 @@ "Usage": "Input", "Properties": [ { - "$id": "136", + "$id": "127", "Name": "enumProperty", "SerializedName": "enumProperty", "Description": "enum with projected name used in a model", @@ -1092,7 +1016,7 @@ ] }, { - "$id": "137", + "$id": "128", "Kind": "Model", "Name": "AzureLocationModel", "Namespace": "FirstTestTypeSpec", @@ -1100,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 @@ -1116,7 +1040,7 @@ ] }, { - "$id": "140", + "$id": "131", "Kind": "Model", "Name": "RoundTripModel", "Namespace": "FirstTestTypeSpec", @@ -1125,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 @@ -1139,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 @@ -1153,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": { @@ -1170,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 @@ -1193,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", @@ -1215,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": { @@ -1232,7 +1156,7 @@ "IsReadOnly": false }, { - "$id": "154", + "$id": "145", "Name": "floatExtensibleEnum", "SerializedName": "floatExtensibleEnum", "Description": "this is a float based extensible enum", @@ -1243,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": { @@ -1260,7 +1184,7 @@ "IsReadOnly": false }, { - "$id": "157", + "$id": "148", "Name": "floatFixedEnum", "SerializedName": "floatFixedEnum", "Description": "this is a float based fixed enum", @@ -1271,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": { @@ -1288,7 +1212,7 @@ "IsReadOnly": false }, { - "$id": "160", + "$id": "151", "Name": "intFixedEnum", "SerializedName": "intFixedEnum", "Description": "this is a int based fixed enum", @@ -1299,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": { @@ -1316,7 +1240,7 @@ "IsReadOnly": false }, { - "$id": "163", + "$id": "154", "Name": "stringFixedEnum", "SerializedName": "stringFixedEnum", "Description": "this is a string based fixed enum", @@ -1327,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 @@ -1341,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 @@ -1355,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 @@ -1381,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 @@ -1407,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 @@ -1433,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 @@ -1459,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", @@ -1473,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 @@ -1487,7 +1411,7 @@ "IsReadOnly": false }, { - "$id": "188", + "$id": "179", "Name": "requiredExtensibleEnum", "SerializedName": "requiredExtensibleEnum", "Description": "required nullable extensible enum type", @@ -1498,7 +1422,7 @@ "IsReadOnly": false }, { - "$id": "189", + "$id": "180", "Name": "requiredFixedEnum", "SerializedName": "requiredFixedEnum", "Description": "required nullable fixed enum type", @@ -1514,33 +1438,33 @@ "IsReadOnly": false }, { - "$id": "190", + "$id": "181", "Name": "unionList", "SerializedName": "unionList", "Description": "this is a list of union types", "Type": { - "$id": "191", + "$id": "182", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "192", + "$id": "183", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "193", + "$id": "184", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "194", + "$id": "185", "Kind": "Primitive", "Name": "Int32", "IsNullable": false }, { - "$id": "195", + "$id": "186", "Kind": "Model", "Name": "ModelForUnion", "Namespace": "FirstTestTypeSpec", @@ -1549,12 +1473,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "196", + "$id": "187", "Name": "name", "SerializedName": "name", "Description": "name of the ModelForUnion", "Type": { - "$id": "197", + "$id": "188", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1563,12 +1487,12 @@ "IsReadOnly": false }, { - "$id": "198", + "$id": "189", "Name": "age", "SerializedName": "age", "Description": "age of the ModelForUnion", "Type": { - "$id": "199", + "$id": "190", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1579,11 +1503,11 @@ ] }, { - "$id": "200", + "$id": "191", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "195" + "$ref": "186" }, "IsNullable": false } @@ -1598,102 +1522,30 @@ ] }, { - "$ref": "185" - }, - { - "$ref": "195" + "$ref": "176" }, { - "$id": "201", - "Kind": "Model", - "Name": "AuthFlow", - "Namespace": "FirstTestTypeSpec", - "Description": "The auth flow model", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "202", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$ref": "54" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "203", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "204", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "59" - }, - "Value": "https://api.example.com/oauth2/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "205", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "206", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "61" - }, - "Value": "https://api.example.com/oauth2/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "207", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "208", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] + "$ref": "186" } ], "Clients": [ { - "$id": "209", + "$id": "192", "Name": "FirstTestTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "210", + "$id": "193", "Name": "topAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level method", "Parameters": [ { - "$id": "211", + "$id": "194", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "212", + "$id": "195", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -1709,11 +1561,11 @@ "Kind": "Client" }, { - "$id": "213", + "$id": "196", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "214", + "$id": "197", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1729,11 +1581,11 @@ "Kind": "Method" }, { - "$id": "215", + "$id": "198", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "216", + "$id": "199", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1748,9 +1600,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "217", + "$id": "200", "Type": { - "$ref": "216" + "$ref": "199" }, "Value": "application/json" } @@ -1758,12 +1610,12 @@ ], "Responses": [ { - "$id": "218", + "$id": "201", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1782,20 +1634,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "219", + "$id": "202", "Name": "topAction2", "ResourceName": "FirstTestTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "220", + "$id": "203", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "221", + "$id": "204", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1810,9 +1662,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "222", + "$id": "205", "Type": { - "$ref": "221" + "$ref": "204" }, "Value": "application/json" } @@ -1820,12 +1672,12 @@ ], "Responses": [ { - "$id": "223", + "$id": "206", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1844,20 +1696,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "224", + "$id": "207", "Name": "patchAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "225", + "$id": "208", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "65" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -1870,11 +1722,11 @@ "Kind": "Method" }, { - "$id": "226", + "$id": "209", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "227", + "$id": "210", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1889,19 +1741,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "228", + "$id": "211", "Type": { - "$ref": "227" + "$ref": "210" }, "Value": "application/json" } }, { - "$id": "229", + "$id": "212", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "230", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1916,9 +1768,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "231", + "$id": "214", "Type": { - "$ref": "230" + "$ref": "213" }, "Value": "application/json" } @@ -1926,12 +1778,12 @@ ], "Responses": [ { - "$id": "232", + "$id": "215", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1953,21 +1805,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "233", + "$id": "216", "Name": "anonymousBody", "ResourceName": "FirstTestTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "234", + "$id": "217", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", "Type": { - "$ref": "65" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -1980,11 +1832,11 @@ "Kind": "Method" }, { - "$id": "235", + "$id": "218", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "236", + "$id": "219", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1999,19 +1851,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "237", + "$id": "220", "Type": { - "$ref": "236" + "$ref": "219" }, "Value": "application/json" } }, { - "$id": "238", + "$id": "221", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "239", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2026,9 +1878,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "240", + "$id": "223", "Type": { - "$ref": "239" + "$ref": "222" }, "Value": "application/json" } @@ -2036,12 +1888,12 @@ ], "Responses": [ { - "$id": "241", + "$id": "224", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -2063,21 +1915,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "242", + "$id": "225", "Name": "friendlyModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "243", + "$id": "226", "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, @@ -2090,11 +1942,11 @@ "Kind": "Method" }, { - "$id": "244", + "$id": "227", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "245", + "$id": "228", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2109,19 +1961,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "246", + "$id": "229", "Type": { - "$ref": "245" + "$ref": "228" }, "Value": "application/json" } }, { - "$id": "247", + "$id": "230", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "248", + "$id": "231", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2136,9 +1988,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "249", + "$id": "232", "Type": { - "$ref": "248" + "$ref": "231" }, "Value": "application/json" } @@ -2146,12 +1998,12 @@ ], "Responses": [ { - "$id": "250", + "$id": "233", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "100" + "$ref": "91" }, "BodyMediaType": "Json", "Headers": [], @@ -2173,19 +2025,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "251", + "$id": "234", "Name": "addTimeHeader", "ResourceName": "FirstTestTypeSpec", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "252", + "$id": "235", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "253", + "$id": "236", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -2201,11 +2053,11 @@ "Kind": "Method" }, { - "$id": "254", + "$id": "237", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "255", + "$id": "238", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2220,9 +2072,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "256", + "$id": "239", "Type": { - "$ref": "255" + "$ref": "238" }, "Value": "application/json" } @@ -2230,7 +2082,7 @@ ], "Responses": [ { - "$id": "257", + "$id": "240", "StatusCodes": [ 204 ], @@ -2248,20 +2100,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "258", + "$id": "241", "Name": "stringFormat", "ResourceName": "FirstTestTypeSpec", "Description": "paramete has string format.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "259", + "$id": "242", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "260", + "$id": "243", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -2277,11 +2129,11 @@ "Kind": "Method" }, { - "$id": "261", + "$id": "244", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "103" + "$ref": "94" }, "Location": "Body", "IsRequired": true, @@ -2294,11 +2146,11 @@ "Kind": "Method" }, { - "$id": "262", + "$id": "245", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "263", + "$id": "246", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2313,19 +2165,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "264", + "$id": "247", "Type": { - "$ref": "263" + "$ref": "246" }, "Value": "application/json" } }, { - "$id": "265", + "$id": "248", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "266", + "$id": "249", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2340,9 +2192,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "267", + "$id": "250", "Type": { - "$ref": "266" + "$ref": "249" }, "Value": "application/json" } @@ -2350,7 +2202,7 @@ ], "Responses": [ { - "$id": "268", + "$id": "251", "StatusCodes": [ 204 ], @@ -2371,21 +2223,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "269", + "$id": "252", "Name": "projectedNameModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its projected name", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "270", + "$id": "253", "Name": "ProjectedModel", "NameInRequest": "ModelWithProjectedName", "Description": "this is a model with a projected name", "Type": { - "$ref": "108" + "$ref": "99" }, "Location": "Body", "IsRequired": true, @@ -2398,11 +2250,11 @@ "Kind": "Method" }, { - "$id": "271", + "$id": "254", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "272", + "$id": "255", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2417,19 +2269,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "273", + "$id": "256", "Type": { - "$ref": "272" + "$ref": "255" }, "Value": "application/json" } }, { - "$id": "274", + "$id": "257", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "275", + "$id": "258", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2444,9 +2296,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "276", + "$id": "259", "Type": { - "$ref": "275" + "$ref": "258" }, "Value": "application/json" } @@ -2454,12 +2306,12 @@ ], "Responses": [ { - "$id": "277", + "$id": "260", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "108" + "$ref": "99" }, "BodyMediaType": "Json", "Headers": [], @@ -2481,20 +2333,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "278", + "$id": "261", "Name": "returnsAnonymousModel", "ResourceName": "FirstTestTypeSpec", "Description": "return anonymous model", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "279", + "$id": "262", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "280", + "$id": "263", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2509,9 +2361,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "281", + "$id": "264", "Type": { - "$ref": "280" + "$ref": "263" }, "Value": "application/json" } @@ -2519,12 +2371,12 @@ ], "Responses": [ { - "$id": "282", + "$id": "265", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "111" + "$ref": "102" }, "BodyMediaType": "Json", "Headers": [], @@ -2543,20 +2395,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "283", + "$id": "266", "Name": "headAsBoolean", "ResourceName": "FirstTestTypeSpec", "Description": "head as boolean.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "284", + "$id": "267", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "285", + "$id": "268", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2572,11 +2424,11 @@ "Kind": "Method" }, { - "$id": "286", + "$id": "269", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "287", + "$id": "270", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2591,9 +2443,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "288", + "$id": "271", "Type": { - "$ref": "287" + "$ref": "270" }, "Value": "application/json" } @@ -2601,7 +2453,7 @@ ], "Responses": [ { - "$id": "289", + "$id": "272", "StatusCodes": [ 204 ], @@ -2619,20 +2471,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "290", + "$id": "273", "Name": "stringBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is string.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "291", + "$id": "274", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "292", + "$id": "275", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2648,11 +2500,11 @@ "Kind": "Method" }, { - "$id": "293", + "$id": "276", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "294", + "$id": "277", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2667,19 +2519,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "295", + "$id": "278", "Type": { - "$ref": "294" + "$ref": "277" }, "Value": "application/json" } }, { - "$id": "296", + "$id": "279", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "297", + "$id": "280", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2694,9 +2546,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "298", + "$id": "281", "Type": { - "$ref": "297" + "$ref": "280" }, "Value": "application/json" } @@ -2704,7 +2556,7 @@ ], "Responses": [ { - "$id": "299", + "$id": "282", "StatusCodes": [ 204 ], @@ -2725,20 +2577,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "300", + "$id": "283", "Name": "boolBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is bool.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "301", + "$id": "284", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "302", + "$id": "285", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2754,11 +2606,11 @@ "Kind": "Method" }, { - "$id": "303", + "$id": "286", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "304", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2773,19 +2625,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "305", + "$id": "288", "Type": { - "$ref": "304" + "$ref": "287" }, "Value": "application/json" } }, { - "$id": "306", + "$id": "289", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "307", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2800,9 +2652,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "308", + "$id": "291", "Type": { - "$ref": "307" + "$ref": "290" }, "Value": "application/json" } @@ -2810,7 +2662,7 @@ ], "Responses": [ { - "$id": "309", + "$id": "292", "StatusCodes": [ 204 ], @@ -2831,20 +2683,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "310", + "$id": "293", "Name": "dateTimeBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is datetime.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "311", + "$id": "294", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "312", + "$id": "295", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -2860,11 +2712,11 @@ "Kind": "Method" }, { - "$id": "313", + "$id": "296", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "314", + "$id": "297", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2879,19 +2731,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "315", + "$id": "298", "Type": { - "$ref": "314" + "$ref": "297" }, "Value": "application/json" } }, { - "$id": "316", + "$id": "299", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "317", + "$id": "300", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2906,9 +2758,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "318", + "$id": "301", "Type": { - "$ref": "317" + "$ref": "300" }, "Value": "application/json" } @@ -2916,7 +2768,7 @@ ], "Responses": [ { - "$id": "319", + "$id": "302", "StatusCodes": [ 204 ], @@ -2937,20 +2789,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "320", + "$id": "303", "Name": "returnString", "ResourceName": "FirstTestTypeSpec", "Description": "The return type is datetime.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "321", + "$id": "304", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "322", + "$id": "305", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2965,9 +2817,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "323", + "$id": "306", "Type": { - "$ref": "322" + "$ref": "305" }, "Value": "application/json" } @@ -2975,12 +2827,12 @@ ], "Responses": [ { - "$id": "324", + "$id": "307", "StatusCodes": [ 200 ], "BodyType": { - "$id": "325", + "$id": "308", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3002,19 +2854,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "326", + "$id": "309", "Name": "returnUnknown", "ResourceName": "FirstTestTypeSpec", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "327", + "$id": "310", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "328", + "$id": "311", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3029,9 +2881,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "329", + "$id": "312", "Type": { - "$ref": "328" + "$ref": "311" }, "Value": "application/json" } @@ -3039,12 +2891,12 @@ ], "Responses": [ { - "$id": "330", + "$id": "313", "StatusCodes": [ 200 ], "BodyType": { - "$id": "331", + "$id": "314", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -3066,20 +2918,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "332", + "$id": "315", "Name": "recursiveExtension", "ResourceName": "FirstTestTypeSpec", "Description": "test parent reference child", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "333", + "$id": "316", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "115" + "$ref": "103" }, "Location": "Body", "IsRequired": true, @@ -3092,11 +2944,11 @@ "Kind": "Method" }, { - "$id": "334", + "$id": "317", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "335", + "$id": "318", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3111,19 +2963,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "336", + "$id": "319", "Type": { - "$ref": "335" + "$ref": "318" }, "Value": "application/json" } }, { - "$id": "337", + "$id": "320", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "338", + "$id": "321", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3138,9 +2990,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "339", + "$id": "322", "Type": { - "$ref": "338" + "$ref": "321" }, "Value": "application/json" } @@ -3148,7 +3000,7 @@ ], "Responses": [ { - "$id": "340", + "$id": "323", "StatusCodes": [ 204 ], @@ -3169,20 +3021,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "341", + "$id": "324", "Name": "threeLevelRecursive", "ResourceName": "FirstTestTypeSpec", "Description": "test three level recursive extension", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "342", + "$id": "325", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "118" + "$ref": "109" }, "Location": "Body", "IsRequired": true, @@ -3195,11 +3047,11 @@ "Kind": "Method" }, { - "$id": "343", + "$id": "326", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "344", + "$id": "327", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3214,19 +3066,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "345", + "$id": "328", "Type": { - "$ref": "344" + "$ref": "327" }, "Value": "application/json" } }, { - "$id": "346", + "$id": "329", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "347", + "$id": "330", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3241,9 +3093,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "348", + "$id": "331", "Type": { - "$ref": "347" + "$ref": "330" }, "Value": "application/json" } @@ -3251,7 +3103,7 @@ ], "Responses": [ { - "$id": "349", + "$id": "332", "StatusCodes": [ 204 ], @@ -3272,20 +3124,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "350", + "$id": "333", "Name": "recursiveModels", "ResourceName": "FirstTestTypeSpec", "Description": "test child reference parent", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "351", + "$id": "334", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "130" + "$ref": "118" }, "Location": "Body", "IsRequired": true, @@ -3298,11 +3150,11 @@ "Kind": "Method" }, { - "$id": "352", + "$id": "335", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "353", + "$id": "336", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3317,19 +3169,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "354", + "$id": "337", "Type": { - "$ref": "353" + "$ref": "336" }, "Value": "application/json" } }, { - "$id": "355", + "$id": "338", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "356", + "$id": "339", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3344,9 +3196,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "357", + "$id": "340", "Type": { - "$ref": "356" + "$ref": "339" }, "Value": "application/json" } @@ -3354,7 +3206,7 @@ ], "Responses": [ { - "$id": "358", + "$id": "341", "StatusCodes": [ 204 ], @@ -3375,20 +3227,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "359", + "$id": "342", "Name": "ContainSelfModels", "ResourceName": "FirstTestTypeSpec", "Description": "test contain self models", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "360", + "$id": "343", "Name": "input", "NameInRequest": "input", "Type": { - "$ref": "133" + "$ref": "124" }, "Location": "Body", "IsRequired": true, @@ -3401,11 +3253,11 @@ "Kind": "Method" }, { - "$id": "361", + "$id": "344", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "362", + "$id": "345", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3420,19 +3272,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "363", + "$id": "346", "Type": { - "$ref": "362" + "$ref": "345" }, "Value": "application/json" } }, { - "$id": "364", + "$id": "347", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "365", + "$id": "348", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3447,9 +3299,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "366", + "$id": "349", "Type": { - "$ref": "365" + "$ref": "348" }, "Value": "application/json" } @@ -3457,7 +3309,7 @@ ], "Responses": [ { - "$id": "367", + "$id": "350", "StatusCodes": [ 204 ], @@ -3478,16 +3330,16 @@ "GenerateConvenienceMethod": true }, { - "$id": "368", + "$id": "351", "Name": "enumParameter", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "369", + "$id": "352", "Name": "p1", "NameInRequest": "p1", "Type": { @@ -3504,11 +3356,11 @@ "Kind": "Method" }, { - "$id": "370", + "$id": "353", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "371", + "$id": "354", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3523,9 +3375,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "372", + "$id": "355", "Type": { - "$ref": "371" + "$ref": "354" }, "Value": "application/json" } @@ -3533,7 +3385,7 @@ ], "Responses": [ { - "$id": "373", + "$id": "356", "StatusCodes": [ 204 ], @@ -3551,20 +3403,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "374", + "$id": "357", "Name": "bodyIsModelWithProjectedEnum", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "375", + "$id": "358", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "135" + "$ref": "126" }, "Location": "Body", "IsRequired": true, @@ -3577,11 +3429,11 @@ "Kind": "Method" }, { - "$id": "376", + "$id": "359", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "377", + "$id": "360", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3596,19 +3448,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "378", + "$id": "361", "Type": { - "$ref": "377" + "$ref": "360" }, "Value": "application/json" } }, { - "$id": "379", + "$id": "362", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "380", + "$id": "363", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3623,9 +3475,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "381", + "$id": "364", "Type": { - "$ref": "380" + "$ref": "363" }, "Value": "application/json" } @@ -3633,7 +3485,7 @@ ], "Responses": [ { - "$id": "382", + "$id": "365", "StatusCodes": [ 204 ], @@ -3654,30 +3506,30 @@ "GenerateConvenienceMethod": true }, { - "$id": "383", + "$id": "366", "Name": "optionalDictionary", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "384", + "$id": "367", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "385", + "$id": "368", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "386", + "$id": "369", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "387", + "$id": "370", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -3695,11 +3547,11 @@ "Kind": "Method" }, { - "$id": "388", + "$id": "371", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "389", + "$id": "372", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3714,19 +3566,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "390", + "$id": "373", "Type": { - "$ref": "389" + "$ref": "372" }, "Value": "application/json" } }, { - "$id": "391", + "$id": "374", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "392", + "$id": "375", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3741,9 +3593,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "393", + "$id": "376", "Type": { - "$ref": "392" + "$ref": "375" }, "Value": "application/json" } @@ -3751,7 +3603,7 @@ ], "Responses": [ { - "$id": "394", + "$id": "377", "StatusCodes": [ 204 ], @@ -3772,20 +3624,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "395", + "$id": "378", "Name": "azureLocationOp", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "396", + "$id": "379", "Name": "location", "NameInRequest": "location", "Type": { - "$id": "397", + "$id": "380", "Kind": "Primitive", "Name": "AzureLocation", "IsNullable": false @@ -3801,11 +3653,11 @@ "Kind": "Method" }, { - "$id": "398", + "$id": "381", "Name": "regenLocation", "NameInRequest": "regen-location", "Type": { - "$id": "399", + "$id": "382", "Kind": "Primitive", "Name": "AzureLocation", "IsNullable": false @@ -3821,11 +3673,11 @@ "Kind": "Method" }, { - "$id": "400", + "$id": "383", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "137" + "$ref": "128" }, "Location": "Body", "IsRequired": false, @@ -3838,11 +3690,11 @@ "Kind": "Method" }, { - "$id": "401", + "$id": "384", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "402", + "$id": "385", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3857,19 +3709,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "403", + "$id": "386", "Type": { - "$ref": "402" + "$ref": "385" }, "Value": "application/json" } }, { - "$id": "404", + "$id": "387", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "405", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3884,9 +3736,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "406", + "$id": "389", "Type": { - "$ref": "405" + "$ref": "388" }, "Value": "application/json" } @@ -3894,7 +3746,7 @@ ], "Responses": [ { - "$id": "407", + "$id": "390", "StatusCodes": [ 204 ], @@ -3916,41 +3768,41 @@ } ], "Protocol": { - "$id": "408" + "$id": "391" }, "Creatable": true }, { - "$id": "409", + "$id": "392", "Name": "Hello", "Description": "", "Operations": [], "Protocol": { - "$id": "410" + "$id": "393" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "411", + "$id": "394", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "412", + "$id": "395", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "413", + "$id": "396", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "414", + "$id": "397", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3966,11 +3818,11 @@ "Kind": "Method" }, { - "$id": "415", + "$id": "398", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "416", + "$id": "399", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3986,11 +3838,11 @@ "Kind": "Method" }, { - "$id": "417", + "$id": "400", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "418", + "$id": "401", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4006,11 +3858,11 @@ "Kind": "Method" }, { - "$id": "419", + "$id": "402", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "420", + "$id": "403", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4025,9 +3877,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "421", + "$id": "404", "Type": { - "$ref": "420" + "$ref": "403" }, "Value": "application/json" } @@ -4035,12 +3887,12 @@ ], "Responses": [ { - "$id": "422", + "$id": "405", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4060,31 +3912,31 @@ } ], "Protocol": { - "$id": "423" + "$id": "406" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "424", + "$id": "407", "Name": "HelloDemo2", "Description": "", "Operations": [ { - "$id": "425", + "$id": "408", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "426", + "$id": "409", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "427", + "$id": "410", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4100,15 +3952,15 @@ "Kind": "Method" }, { - "$id": "428", + "$id": "411", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "429", + "$id": "412", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "430", + "$id": "413", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4118,9 +3970,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "431", + "$id": "414", "Type": { - "$ref": "429" + "$ref": "412" }, "Value": "text/plain" }, @@ -4134,11 +3986,11 @@ "Kind": "Constant" }, { - "$id": "432", + "$id": "415", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "433", + "$id": "416", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4154,11 +4006,11 @@ "Kind": "Method" }, { - "$id": "434", + "$id": "417", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "140" + "$ref": "131" }, "Location": "Body", "IsRequired": true, @@ -4171,11 +4023,11 @@ "Kind": "Method" }, { - "$id": "435", + "$id": "418", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "436", + "$id": "419", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4190,9 +4042,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "437", + "$id": "420", "Type": { - "$ref": "436" + "$ref": "419" }, "Value": "application/json" } @@ -4200,12 +4052,12 @@ ], "Responses": [ { - "$id": "438", + "$id": "421", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "140" + "$ref": "131" }, "BodyMediaType": "Json", "Headers": [], @@ -4227,20 +4079,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "439", + "$id": "422", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "440", + "$id": "423", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "441", + "$id": "424", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4256,11 +4108,11 @@ "Kind": "Method" }, { - "$id": "442", + "$id": "425", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "443", + "$id": "426", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4276,11 +4128,11 @@ "Kind": "Method" }, { - "$id": "444", + "$id": "427", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "140" + "$ref": "131" }, "Location": "Body", "IsRequired": true, @@ -4293,11 +4145,11 @@ "Kind": "Method" }, { - "$id": "445", + "$id": "428", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "446", + "$id": "429", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4312,19 +4164,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "447", + "$id": "430", "Type": { - "$ref": "446" + "$ref": "429" }, "Value": "application/json" } }, { - "$id": "448", + "$id": "431", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "449", + "$id": "432", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4339,9 +4191,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "450", + "$id": "433", "Type": { - "$ref": "449" + "$ref": "432" }, "Value": "application/json" } @@ -4349,12 +4201,12 @@ ], "Responses": [ { - "$id": "451", + "$id": "434", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "140" + "$ref": "131" }, "BodyMediaType": "Json", "Headers": [], @@ -4376,20 +4228,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "452", + "$id": "435", "Name": "helloDemoAgain", "ResourceName": "Demo2", "Description": "Return hi in demo2", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "453", + "$id": "436", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "454", + "$id": "437", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4404,9 +4256,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "455", + "$id": "438", "Type": { - "$ref": "454" + "$ref": "437" }, "Value": "application/json" } @@ -4414,12 +4266,12 @@ ], "Responses": [ { - "$id": "456", + "$id": "439", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4438,20 +4290,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "457", + "$id": "440", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "458", + "$id": "441", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "65" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -4464,11 +4316,11 @@ "Kind": "Method" }, { - "$id": "459", + "$id": "442", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "460", + "$id": "443", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4483,19 +4335,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "461", + "$id": "444", "Type": { - "$ref": "460" + "$ref": "443" }, "Value": "application/json" } }, { - "$id": "462", + "$id": "445", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "463", + "$id": "446", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4510,9 +4362,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "464", + "$id": "447", "Type": { - "$ref": "463" + "$ref": "446" }, "Value": "application/json" } @@ -4520,12 +4372,12 @@ ], "Responses": [ { - "$id": "465", + "$id": "448", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4547,24 +4399,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "466", + "$id": "449", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "467", + "$id": "450", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "468", + "$id": "451", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "469", + "$id": "452", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4574,9 +4426,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "470", + "$id": "453", "Type": { - "$ref": "468" + "$ref": "451" }, "Value": "test" }, @@ -4590,15 +4442,15 @@ "Kind": "Constant" }, { - "$id": "471", + "$id": "454", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "472", + "$id": "455", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "473", + "$id": "456", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -4608,9 +4460,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "474", + "$id": "457", "Type": { - "$ref": "472" + "$ref": "455" }, "Value": 123 }, @@ -4624,15 +4476,15 @@ "Kind": "Constant" }, { - "$id": "475", + "$id": "458", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "476", + "$id": "459", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "477", + "$id": "460", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4642,9 +4494,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "478", + "$id": "461", "Type": { - "$ref": "476" + "$ref": "459" }, "Value": true }, @@ -4658,11 +4510,11 @@ "Kind": "Constant" }, { - "$id": "479", + "$id": "462", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "480", + "$id": "463", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4677,9 +4529,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "481", + "$id": "464", "Type": { - "$ref": "480" + "$ref": "463" }, "Value": "application/json" } @@ -4687,12 +4539,12 @@ ], "Responses": [ { - "$id": "482", + "$id": "465", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4712,27 +4564,27 @@ } ], "Protocol": { - "$id": "483" + "$id": "466" }, "Creatable": false, "Parent": "Hello" }, { - "$id": "484", + "$id": "467", "Name": "EnumTest", "Description": "", "Operations": [ { - "$id": "485", + "$id": "468", "Name": "createUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "486", + "$id": "469", "Name": "input", "NameInRequest": "input", "Type": { @@ -4749,11 +4601,11 @@ "Kind": "Method" }, { - "$id": "487", + "$id": "470", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "488", + "$id": "471", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4768,19 +4620,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "489", + "$id": "472", "Type": { - "$ref": "488" + "$ref": "471" }, "Value": "application/json" } }, { - "$id": "490", + "$id": "473", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "491", + "$id": "474", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4795,9 +4647,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "492", + "$id": "475", "Type": { - "$ref": "491" + "$ref": "474" }, "Value": "application/json" } @@ -4805,7 +4657,7 @@ ], "Responses": [ { - "$id": "493", + "$id": "476", "StatusCodes": [ 204 ], @@ -4827,31 +4679,31 @@ } ], "Protocol": { - "$id": "494" + "$id": "477" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "495", + "$id": "478", "Name": "ProtocolAndConvenient", "Description": "", "Operations": [ { - "$id": "496", + "$id": "479", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "497", + "$id": "480", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "65" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -4864,11 +4716,11 @@ "Kind": "Method" }, { - "$id": "498", + "$id": "481", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "499", + "$id": "482", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4883,19 +4735,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "500", + "$id": "483", "Type": { - "$ref": "499" + "$ref": "482" }, "Value": "application/json" } }, { - "$id": "501", + "$id": "484", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "502", + "$id": "485", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4910,9 +4762,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "503", + "$id": "486", "Type": { - "$ref": "502" + "$ref": "485" }, "Value": "application/json" } @@ -4920,12 +4772,12 @@ ], "Responses": [ { - "$id": "504", + "$id": "487", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -4947,20 +4799,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "505", + "$id": "488", "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": "211" + "$ref": "194" }, { - "$id": "506", + "$id": "489", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "507", + "$id": "490", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4975,9 +4827,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "508", + "$id": "491", "Type": { - "$ref": "507" + "$ref": "490" }, "Value": "application/json" } @@ -4985,7 +4837,7 @@ ], "Responses": [ { - "$id": "509", + "$id": "492", "StatusCodes": [ 204 ], @@ -5004,31 +4856,31 @@ } ], "Protocol": { - "$id": "510" + "$id": "493" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "511", + "$id": "494", "Name": "Entity", "Description": "", "Operations": [ { - "$id": "512", + "$id": "495", "Name": "doSomething", "ResourceName": "Entity", "Description": "doSomething for entity", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "513", + "$id": "496", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "514", + "$id": "497", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5044,11 +4896,11 @@ "Kind": "Method" }, { - "$id": "515", + "$id": "498", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "516", + "$id": "499", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5063,9 +4915,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "517", + "$id": "500", "Type": { - "$ref": "516" + "$ref": "499" }, "Value": "application/json" } @@ -5073,12 +4925,12 @@ ], "Responses": [ { - "$id": "518", + "$id": "501", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -5098,31 +4950,31 @@ } ], "Protocol": { - "$id": "519" + "$id": "502" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" }, { - "$id": "520", + "$id": "503", "Name": "Glossary", "Description": "", "Operations": [ { - "$id": "521", + "$id": "504", "Name": "doSomething", "ResourceName": "Glossary", "Description": "doSomething for glossary", "Parameters": [ { - "$ref": "211" + "$ref": "194" }, { - "$id": "522", + "$id": "505", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "523", + "$id": "506", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5138,11 +4990,11 @@ "Kind": "Method" }, { - "$id": "524", + "$id": "507", "Name": "h1", "NameInRequest": "h1", "Type": { - "$id": "525", + "$id": "508", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5158,11 +5010,11 @@ "Kind": "Method" }, { - "$id": "526", + "$id": "509", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "527", + "$id": "510", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5177,9 +5029,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "528", + "$id": "511", "Type": { - "$ref": "527" + "$ref": "510" }, "Value": "application/json" } @@ -5187,12 +5039,12 @@ ], "Responses": [ { - "$id": "529", + "$id": "512", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -5212,20 +5064,20 @@ } ], "Protocol": { - "$id": "530" + "$id": "513" }, "Creatable": false, "Parent": "FirstTestTypeSpecClient" } ], "Auth": { - "$id": "531", + "$id": "514", "ApiKey": { - "$id": "532", + "$id": "515", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "533", + "$id": "516", "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 2dfa1112b15..baf41fff072 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(123); + Extension input = new Extension(123) + { + 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(123); + Extension input = new Extension(123) + { + 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(123) }, + Extension = {new ThereLevelExtension(123) +{ +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(123) }, + Extension = {new ThereLevelExtension(123) +{ +Extension = {default}, +}}, }; Response response = await client.ThreeLevelRecursiveAsync(input); } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs index 1724a43ebc6..9f95323fc2a 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(123); + Extension input = new Extension(123) + { + 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(123) }, + Extension = {new ThereLevelExtension(123) +{ +Extension = {default}, +}}, }; Response response = await client.ThreeLevelRecursiveAsync(input); } diff --git a/test/TestProjects/LatestVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/LatestVersion-TypeSpec/src/Generated/tspCodeModel.json index 7519f975cd0..aad5c86d08a 100644 --- a/test/TestProjects/LatestVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/LatestVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -73,7 +73,6 @@ } ], "Namespace": "TypeSpec.Versioning.Latest", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -400,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 @@ -485,11 +466,11 @@ "Kind": "Client" }, { - "$id": "63", + "$id": "61", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "64", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -505,11 +486,11 @@ "Kind": "Method" }, { - "$id": "65", + "$id": "63", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "66", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -525,11 +506,11 @@ "Kind": "Method" }, { - "$id": "67", + "$id": "65", "Name": "projectedFileFormat", "NameInRequest": "projectedFileFormat", "Type": { - "$id": "68", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -545,11 +526,11 @@ "Kind": "Method" }, { - "$id": "69", + "$id": "67", "Name": "maxLines", "NameInRequest": "maxLines", "Type": { - "$id": "70", + "$id": "68", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -565,11 +546,11 @@ "Kind": "Method" }, { - "$id": "71", + "$id": "69", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "72", + "$id": "70", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -584,9 +565,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "73", + "$id": "71", "Type": { - "$ref": "72" + "$ref": "70" }, "Value": "application/json" } @@ -594,7 +575,7 @@ ], "Responses": [ { - "$id": "74", + "$id": "72", "StatusCodes": [ 202 ], @@ -604,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 @@ -628,10 +609,10 @@ "Path": "/versioning/resources/{name}:export", "BufferResponse": true, "LongRunning": { - "$id": "77", + "$id": "75", "FinalStateVia": 3, "FinalResponse": { - "$id": "78", + "$id": "76", "StatusCodes": [ 200 ], @@ -646,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, @@ -676,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 @@ -703,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 @@ -724,11 +705,11 @@ "Kind": "Method" }, { - "$id": "87", + "$id": "85", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "88", + "$id": "86", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -743,9 +724,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "89", + "$id": "87", "Type": { - "$ref": "88" + "$ref": "86" }, "Value": "application/json" } @@ -753,7 +734,7 @@ ], "Responses": [ { - "$id": "90", + "$id": "88", "StatusCodes": [ 200 ], @@ -774,7 +755,7 @@ "Path": "/versioning/resources", "BufferResponse": true, "Paging": { - "$id": "91", + "$id": "89", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -782,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, @@ -812,11 +793,11 @@ "Kind": "Client" }, { - "$id": "95", + "$id": "93", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "96", + "$id": "94", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -832,7 +813,7 @@ "Kind": "Method" }, { - "$id": "97", + "$id": "95", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -850,11 +831,11 @@ "Kind": "Method" }, { - "$id": "98", + "$id": "96", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "99", + "$id": "97", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -869,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 @@ -896,9 +877,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "103", + "$id": "101", "Type": { - "$ref": "102" + "$ref": "100" }, "Value": "application/json" } @@ -906,7 +887,7 @@ ], "Responses": [ { - "$id": "104", + "$id": "102", "StatusCodes": [ 201 ], @@ -916,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 @@ -934,7 +915,7 @@ ] }, { - "$id": "107", + "$id": "105", "StatusCodes": [ 200 ], @@ -944,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 @@ -971,10 +952,10 @@ ], "BufferResponse": true, "LongRunning": { - "$id": "110", + "$id": "108", "FinalStateVia": 2, "FinalResponse": { - "$id": "111", + "$id": "109", "StatusCodes": [ 200 ], @@ -989,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 90663b858dc..fa89cba0ca1 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", @@ -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,54 +79,54 @@ "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": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, "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": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, "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": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, "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,215 +366,90 @@ "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": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, "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": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, "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": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": false, "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": { - "$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 +465,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 +486,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 +507,11 @@ "Kind": "Method" }, { - "$id": "86", + "$id": "64", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "87", + "$id": "65", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -726,9 +526,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "88", + "$id": "66", "Type": { - "$ref": "87" + "$ref": "65" }, "Value": "application/json" } @@ -736,22 +536,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 +573,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 +604,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 +625,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 +646,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 +664,11 @@ "Kind": "Method" }, { - "$id": "100", + "$id": "78", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "101", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -883,19 +683,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 +710,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "105", + "$id": "83", "Type": { - "$ref": "104" + "$ref": "82" }, "Value": "application/json" } @@ -920,55 +720,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 +777,11 @@ "IsNullable": false }, { - "$id": "115", + "$id": "93", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "116", + "$id": "94", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1009,15 +809,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 +828,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/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 21afd2daa7e..3f62ef93c33 100644 --- a/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/MixAPIVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -19,7 +19,6 @@ } ], "Namespace": "MixApiVersion", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -172,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": "body", - "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 @@ -288,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 @@ -319,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 @@ -340,11 +269,11 @@ "Kind": "Method" }, { - "$id": "43", + "$id": "35", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "44", + "$id": "36", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -359,9 +288,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "45", + "$id": "37", "Type": { - "$ref": "44" + "$ref": "36" }, "Value": "application/json" } @@ -369,7 +298,7 @@ ], "Responses": [ { - "$id": "46", + "$id": "38", "StatusCodes": [ 204 ], @@ -387,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 @@ -417,11 +346,11 @@ "Kind": "Method" }, { - "$id": "50", + "$id": "42", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "51", + "$id": "43", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -436,9 +365,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "52", + "$id": "44", "Type": { - "$ref": "51" + "$ref": "43" }, "Value": "application/json" } @@ -446,7 +375,7 @@ ], "Responses": [ { - "$id": "53", + "$id": "45", "StatusCodes": [ 200 ], @@ -461,7 +390,7 @@ ] }, { - "$id": "54", + "$id": "46", "StatusCodes": [ 304 ], @@ -485,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 @@ -511,9 +440,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "59", + "$id": "51", "Type": { - "$ref": "57" + "$ref": "49" }, "Value": "2022-07-09" }, @@ -527,7 +456,7 @@ "Kind": "Constant" }, { - "$id": "60", + "$id": "52", "Name": "pet", "NameInRequest": "pet", "Type": { @@ -544,11 +473,11 @@ "Kind": "Method" }, { - "$id": "61", + "$id": "53", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "62", + "$id": "54", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -563,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 @@ -590,9 +519,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "66", + "$id": "58", "Type": { - "$ref": "65" + "$ref": "57" }, "Value": "application/json" } @@ -600,7 +529,7 @@ ], "Responses": [ { - "$id": "67", + "$id": "59", "StatusCodes": [ 200 ], @@ -628,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, @@ -673,11 +602,11 @@ "Kind": "Client" }, { - "$id": "73", + "$id": "65", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "74", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -692,9 +621,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "75", + "$id": "67", "Type": { - "$ref": "74" + "$ref": "66" }, "Value": "application/json" } @@ -702,7 +631,7 @@ ], "Responses": [ { - "$id": "76", + "$id": "68", "StatusCodes": [ 200 ], @@ -723,7 +652,7 @@ "Path": "/pets/toys/Toy", "BufferResponse": true, "Paging": { - "$id": "77", + "$id": "69", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -732,7 +661,7 @@ } ], "Protocol": { - "$id": "78" + "$id": "70" }, "Creatable": false, "Parent": "MixApiVersionClient" 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 2efdbcb23d3..0b342414b1b 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/ModelReaderWriterValidationTypeSpecModelFactory.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/ModelReaderWriterValidationTypeSpecModelFactory.cs @@ -34,48 +34,48 @@ public static ModelWithPersistableOnly ModelWithPersistableOnly(string name = nu 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( + return new AvailabilitySetData( id, name, resourceType, location, tags, - serializedAdditionalRawData: null); + 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( + return new TrackedResourceData( id, name, resourceType, location, tags, - serializedAdditionalRawData: null, - sku, - properties); + 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 20e60401066..033deeb570e 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; - IReadOnlyDictionary tags = default; + IDictionary tags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 a6afd739756..a6f182f2335 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/AvailabilitySetData.cs @@ -30,7 +30,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 76661e7b2ab..e9f51ea5374 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; - IReadOnlyDictionary tags = default; + IDictionary tags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = 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 4c079b227c2..e4556018928 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/Models/TrackedResourceData.cs @@ -48,7 +48,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)); @@ -63,7 +63,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; @@ -85,8 +85,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 96972903e77..8fb56abe192 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/src/Generated/tspCodeModel.json @@ -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", @@ -150,7 +150,7 @@ "$id": "21", "Kind": "Enum", "Name": "ProviderAuthorizationConsentState", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "22", @@ -352,106 +352,103 @@ { "$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 }, - "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 }, - "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 + }, + { + "$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 }, - "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 + } + ] }, "Properties": [ { @@ -602,6 +599,9 @@ } ] }, + { + "$ref": "49" + }, { "$ref": "63" }, @@ -1752,7 +1752,7 @@ "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "61" + "$ref": "48" }, "Location": "Body", "IsRequired": true, @@ -1826,7 +1826,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 0b92fc8e18f..8bf5e3f01bf 100644 --- a/test/TestProjects/ModelReaderWriterValidation-TypeSpec/tests/Generated/Samples/Samples_ModelReaderWriterValidationTypeSpecClient.cs +++ b/test/TestProjects/ModelReaderWriterValidation-TypeSpec/tests/Generated/Samples/Samples_ModelReaderWriterValidationTypeSpecClient.cs @@ -616,6 +616,10 @@ public void Example_ModelReaderWriterValidationTypeSpec_Op4_AllParameters_Conven PlatformFaultDomainCount = 1234, PlatformUpdateDomainCount = 1234, }, + Tags = +{ +["key"] = "" +}, }; Response response = client.Op4(body); } @@ -644,6 +648,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 045f66e186b..4a546b31a18 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); ]]> @@ -1342,7 +1350,10 @@ RoundTripOptionalModel input = new RoundTripOptionalModel OptionalModelWithPropertiesOnBase = new DerivedModelWithProperties(new CollectionItem[] { default - }), + }) + { + OptionalPropertyOnBase = "", + }, OptionalFixedStringEnum = FixedStringEnum.One, OptionalExtensibleEnum = ExtensibleEnum.One, OptionalIntRecord = @@ -1399,7 +1410,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 56d0eae76aa..3ca0b1ed54d 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithARequiredProperty.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/BaseModelWithARequiredProperty.cs @@ -48,7 +48,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)); @@ -70,6 +70,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 ca0e7c1ca93..2f062f265f7 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/Facet.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/Facet.cs @@ -48,7 +48,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 f948d3042e4..593f6750835 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 a3f750e3527..c070cf9b9c4 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/Int32ValuesFacet.cs @@ -11,7 +11,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'. @@ -30,7 +30,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 1a99f5c48c7..cfa52cb910f 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/NoUseBase.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/NoUseBase.cs @@ -48,7 +48,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)); @@ -70,6 +70,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 9a3410bebe3..e7705768a08 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, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - 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 writing '{format}' format."); + throw new FormatException($"The model {nameof(NumericValuesFacet)} does not support writing '{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 reading '{format}' format."); + throw new FormatException($"The model {nameof(NumericValuesFacet)} does not support reading '{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 ??= ModelSerializationExtensions.WireOptions; @@ -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 = rawDataDictionary; - 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 writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(NumericValuesFacet)} does not support writing '{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 reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(NumericValuesFacet)} does not support reading '{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 . 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 7922e583c85..72dd7cc9582 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacetint32.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/NumericValuesFacet.cs @@ -11,15 +11,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)); @@ -28,24 +28,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 e98a7a8718d..132f839848a 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 rawDataDictionary = 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 870cf7e6765..45fced046d4 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/Models/RoundTripPrimitiveModel.cs @@ -26,7 +26,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)); @@ -55,7 +55,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; @@ -75,24 +75,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 7f1690829f6..40a72856f96 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs +++ b/test/TestProjects/Models-TypeSpec/src/Generated/ModelsTypeSpecModelFactory.cs @@ -14,14 +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 string. /// Required int. @@ -177,23 +169,34 @@ public static RoundTripModel RoundTripModel(string requiredString = null, int re 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 . @@ -318,14 +321,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. /// @@ -335,26 +330,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. diff --git a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json index 9c8776cd0f3..498797f6195 100644 --- a/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Models-TypeSpec/src/Generated/tspCodeModel.json @@ -38,7 +38,7 @@ "$id": "6", "Kind": "Enum", "Name": "FixedIntEnum", - "EnumValueType": "Float32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "7", @@ -67,7 +67,7 @@ "$id": "10", "Kind": "Enum", "Name": "ExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "11", @@ -125,7 +125,7 @@ "$id": "18", "Kind": "Enum", "Name": "ExtensibleIntEnum", - "EnumValueType": "int32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "19", @@ -182,7 +182,6 @@ } ], "Namespace": "ModelsTypeSpec", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -192,31 +191,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 +198,29 @@ "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 + } + ] }, "Properties": [ { @@ -232,14 +228,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 }, { @@ -258,6 +254,9 @@ } ] }, + { + "$ref": "27" + }, { "$id": "34", "Kind": "Model", @@ -273,14 +272,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 } ] @@ -390,7 +389,7 @@ "Namespace": "ModelsTypeSpec", "Description": "Base model", "IsNullable": false, - "Usage": "Input", + "Usage": "RoundTrip", "Properties": [] }, "IsRequired": true, @@ -776,10 +775,10 @@ "$ref": "61" }, { - "$ref": "66" + "$ref": "65" }, { - "$ref": "65" + "$ref": "66" }, { "$id": "102", @@ -953,14 +952,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 }, { @@ -1349,7 +1348,7 @@ "Namespace": "ModelsTypeSpec", "Description": "Model used both as input and output with primitive types", "IsNullable": false, - "Usage": "RoundTrip", + "Usage": "Output", "BaseModel": { "$ref": "51" }, @@ -1460,7 +1459,7 @@ "Type": { "$id": "195", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -1628,7 +1627,7 @@ "Namespace": "ModelsTypeSpec", "Description": "Base model with properties", "IsNullable": false, - "Usage": "None", + "Usage": "RoundTrip", "Properties": [ { "$id": "218", @@ -1817,10 +1816,10 @@ ] }, { - "$ref": "217" + "$ref": "216" }, { - "$ref": "216" + "$ref": "217" }, { "$id": "242", @@ -2540,38 +2539,35 @@ { "$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 + } + ] }, "Properties": [ { @@ -2593,6 +2589,9 @@ } ] }, + { + "$ref": "335" + }, { "$id": "340", "Kind": "Model", @@ -2608,14 +2607,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 }, { @@ -2637,85 +2636,79 @@ { "$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 + } + ] + }, + "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 }, - "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 + } + ] }, "Properties": [ { @@ -2738,6 +2731,12 @@ } ] }, + { + "$ref": "346" + }, + { + "$ref": "347" + }, { "$id": "357", "Kind": "Model", @@ -2748,7 +2747,7 @@ "DiscriminatorValue": "A", "Usage": "RoundTrip", "BaseModel": { - "$ref": "29" + "$ref": "26" }, "Properties": [ { @@ -2784,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, @@ -2813,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, @@ -2842,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, @@ -2871,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, @@ -2939,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 @@ -2969,11 +2929,11 @@ "Kind": "Client" }, { - "$id": "383", + "$id": "378", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "29" + "$ref": "26" }, "Location": "Body", "IsRequired": true, @@ -2986,11 +2946,11 @@ "Kind": "Method" }, { - "$id": "384", + "$id": "379", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "385", + "$id": "380", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3005,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 @@ -3032,9 +2992,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "389", + "$id": "384", "Type": { - "$ref": "388" + "$ref": "383" }, "Value": "application/json" } @@ -3042,12 +3002,12 @@ ], "Responses": [ { - "$id": "390", + "$id": "385", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "29" + "$ref": "26" }, "BodyMediaType": "Json", "Headers": [], @@ -3069,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 @@ -3096,9 +3056,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "394", + "$id": "389", "Type": { - "$ref": "393" + "$ref": "388" }, "Value": "application/json" } @@ -3106,7 +3066,7 @@ ], "Responses": [ { - "$id": "395", + "$id": "390", "StatusCodes": [ 200 ], @@ -3130,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": { @@ -3156,11 +3116,11 @@ "Kind": "Method" }, { - "$id": "398", + "$id": "393", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "399", + "$id": "394", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3175,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 @@ -3202,9 +3162,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "403", + "$id": "398", "Type": { - "$ref": "402" + "$ref": "397" }, "Value": "application/json" } @@ -3212,7 +3172,7 @@ ], "Responses": [ { - "$id": "404", + "$id": "399", "StatusCodes": [ 200 ], @@ -3239,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": { @@ -3265,11 +3225,11 @@ "Kind": "Method" }, { - "$id": "407", + "$id": "402", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "408", + "$id": "403", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3284,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 @@ -3311,9 +3271,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "412", + "$id": "407", "Type": { - "$ref": "411" + "$ref": "406" }, "Value": "application/json" } @@ -3321,7 +3281,7 @@ ], "Responses": [ { - "$id": "413", + "$id": "408", "StatusCodes": [ 200 ], @@ -3348,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": { @@ -3374,11 +3334,11 @@ "Kind": "Method" }, { - "$id": "416", + "$id": "411", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "417", + "$id": "412", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3393,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 @@ -3420,9 +3380,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "421", + "$id": "416", "Type": { - "$ref": "420" + "$ref": "415" }, "Value": "application/json" } @@ -3430,7 +3390,7 @@ ], "Responses": [ { - "$id": "422", + "$id": "417", "StatusCodes": [ 200 ], @@ -3457,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": { @@ -3484,11 +3444,11 @@ "Kind": "Method" }, { - "$id": "425", + "$id": "420", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "426", + "$id": "421", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3503,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 @@ -3530,9 +3490,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "430", + "$id": "425", "Type": { - "$ref": "429" + "$ref": "424" }, "Value": "application/json" } @@ -3540,7 +3500,7 @@ ], "Responses": [ { - "$id": "431", + "$id": "426", "StatusCodes": [ 200 ], @@ -3567,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": { @@ -3593,11 +3553,11 @@ "Kind": "Method" }, { - "$id": "434", + "$id": "429", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "435", + "$id": "430", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3612,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 @@ -3639,9 +3599,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "439", + "$id": "434", "Type": { - "$ref": "438" + "$ref": "433" }, "Value": "application/json" } @@ -3649,7 +3609,7 @@ ], "Responses": [ { - "$id": "440", + "$id": "435", "StatusCodes": [ 200 ], @@ -3676,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": { @@ -3702,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 @@ -3721,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 @@ -3748,9 +3708,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "448", + "$id": "443", "Type": { - "$ref": "447" + "$ref": "442" }, "Value": "application/json" } @@ -3758,7 +3718,7 @@ ], "Responses": [ { - "$id": "449", + "$id": "444", "StatusCodes": [ 200 ], @@ -3779,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": { @@ -3805,11 +3765,11 @@ "Kind": "Method" }, { - "$id": "452", + "$id": "447", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "453", + "$id": "448", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3824,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 @@ -3851,9 +3811,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "457", + "$id": "452", "Type": { - "$ref": "456" + "$ref": "451" }, "Value": "application/json" } @@ -3861,7 +3821,7 @@ ], "Responses": [ { - "$id": "458", + "$id": "453", "StatusCodes": [ 200 ], @@ -3888,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 @@ -3916,9 +3876,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "462", + "$id": "457", "Type": { - "$ref": "461" + "$ref": "456" }, "Value": "application/json" } @@ -3926,7 +3886,7 @@ ], "Responses": [ { - "$id": "463", + "$id": "458", "StatusCodes": [ 200 ], @@ -3950,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": { @@ -3976,11 +3936,11 @@ "Kind": "Method" }, { - "$id": "466", + "$id": "461", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "467", + "$id": "462", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3995,9 +3955,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "468", + "$id": "463", "Type": { - "$ref": "467" + "$ref": "462" }, "Value": "application/json" } @@ -4005,7 +3965,7 @@ ], "Responses": [ { - "$id": "469", + "$id": "464", "StatusCodes": [ 200 ], @@ -4029,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": { @@ -4055,11 +4015,11 @@ "Kind": "Method" }, { - "$id": "472", + "$id": "467", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "473", + "$id": "468", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4074,9 +4034,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "474", + "$id": "469", "Type": { - "$ref": "473" + "$ref": "468" }, "Value": "application/json" } @@ -4084,7 +4044,7 @@ ], "Responses": [ { - "$id": "475", + "$id": "470", "StatusCodes": [ 200 ], @@ -4108,20 +4068,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 +4094,11 @@ "Kind": "Method" }, { - "$id": "478", + "$id": "473", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "479", + "$id": "474", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4153,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 @@ -4180,9 +4140,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "483", + "$id": "478", "Type": { - "$ref": "482" + "$ref": "477" }, "Value": "application/json" } @@ -4190,12 +4150,12 @@ ], "Responses": [ { - "$id": "484", + "$id": "479", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "337" + "$ref": "334" }, "BodyMediaType": "Json", "Headers": [], @@ -4217,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 @@ -4257,11 +4217,11 @@ "Kind": "Client" }, { - "$id": "490", + "$id": "485", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "491", + "$id": "486", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4276,9 +4236,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "492", + "$id": "487", "Type": { - "$ref": "491" + "$ref": "486" }, "Value": "application/json" } @@ -4286,7 +4246,7 @@ ], "Responses": [ { - "$id": "493", + "$id": "488", "StatusCodes": [ 200 ], @@ -4310,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 @@ -4337,9 +4297,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "497", + "$id": "492", "Type": { - "$ref": "496" + "$ref": "491" }, "Value": "application/json" } @@ -4347,7 +4307,7 @@ ], "Responses": [ { - "$id": "498", + "$id": "493", "StatusCodes": [ 200 ], @@ -4371,19 +4331,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 +4356,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 +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 @@ -4442,9 +4402,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "506", + "$id": "501", "Type": { - "$ref": "505" + "$ref": "500" }, "Value": "application/json" } @@ -4452,7 +4412,7 @@ ], "Responses": [ { - "$id": "507", + "$id": "502", "StatusCodes": [ 204 ], @@ -4474,7 +4434,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 631817d85fc..0fff68ffd9b 100644 --- a/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs +++ b/test/TestProjects/Models-TypeSpec/tests/Generated/Samples/Samples_ModelsTypeSpecClient.cs @@ -64,7 +64,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); } @@ -75,7 +78,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); } @@ -134,6 +140,7 @@ public void Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_Al { OptionalInt = 1234, OptionalString = "", + Kind = "A", }; Response response = client.PutBaseModelWithDiscriminatorDefinedOnBase(body); } @@ -149,6 +156,7 @@ public async Task Example_ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnB { OptionalInt = 1234, OptionalString = "", + Kind = "A", }; Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(body); } @@ -1620,7 +1628,10 @@ public void Example_ModelsTypeSpec_InputToRoundTripOptional_AllParameters_Conven OptionalModelWithPropertiesOnBase = new DerivedModelWithProperties(new CollectionItem[] { default - }), + }) + { + OptionalPropertyOnBase = "", + }, OptionalFixedStringEnum = FixedStringEnum.One, OptionalExtensibleEnum = ExtensibleEnum.One, OptionalIntRecord = @@ -1669,7 +1680,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 be018076757..1f842e578b4 100644 --- a/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs +++ b/test/TestProjects/Models-TypeSpec/tests/Generated/Tests/ModelsTypeSpecClientTests.cs @@ -44,7 +44,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); } @@ -76,6 +79,7 @@ public async Task ModelsTypeSpec_PutBaseModelWithDiscriminatorDefinedOnBase_AllP { OptionalInt = 1234, OptionalString = "", + Kind = "A", }; Response response = await client.PutBaseModelWithDiscriminatorDefinedOnBaseAsync(body); } @@ -728,7 +732,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/TestProjects/OldestVersion-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/OldestVersion-TypeSpec/src/Generated/tspCodeModel.json index bbe74353c3e..f369b243abc 100644 --- a/test/TestProjects/OldestVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/OldestVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -73,7 +73,6 @@ } ], "Namespace": "TypeSpec.Versioning.Oldest", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -400,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 @@ -485,11 +466,11 @@ "Kind": "Client" }, { - "$id": "63", + "$id": "61", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "64", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -505,11 +486,11 @@ "Kind": "Method" }, { - "$id": "65", + "$id": "63", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "66", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -525,11 +506,11 @@ "Kind": "Method" }, { - "$id": "67", + "$id": "65", "Name": "removedQueryParam", "NameInRequest": "removedQueryParam", "Type": { - "$id": "68", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -545,11 +526,11 @@ "Kind": "Method" }, { - "$id": "69", + "$id": "67", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "70", + "$id": "68", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -564,9 +545,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "71", + "$id": "69", "Type": { - "$ref": "70" + "$ref": "68" }, "Value": "application/json" } @@ -574,7 +555,7 @@ ], "Responses": [ { - "$id": "72", + "$id": "70", "StatusCodes": [ 202 ], @@ -584,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 @@ -608,10 +589,10 @@ "Path": "/versioning/resources/{name}:export", "BufferResponse": true, "LongRunning": { - "$id": "75", + "$id": "73", "FinalStateVia": 3, "FinalResponse": { - "$id": "76", + "$id": "74", "StatusCodes": [ 200 ], @@ -626,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, @@ -656,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 @@ -683,11 +664,11 @@ "Kind": "Method" }, { - "$id": "83", + "$id": "81", "Name": "expand", "NameInRequest": "expand", "Type": { - "$id": "84", + "$id": "82", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -703,11 +684,11 @@ "Kind": "Method" }, { - "$id": "85", + "$id": "83", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "86", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -722,9 +703,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "87", + "$id": "85", "Type": { - "$ref": "86" + "$ref": "84" }, "Value": "application/json" } @@ -732,7 +713,7 @@ ], "Responses": [ { - "$id": "88", + "$id": "86", "StatusCodes": [ 200 ], @@ -753,7 +734,7 @@ "Path": "/versioning/resources", "BufferResponse": true, "Paging": { - "$id": "89", + "$id": "87", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -761,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, @@ -791,11 +772,11 @@ "Kind": "Client" }, { - "$id": "93", + "$id": "91", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "94", + "$id": "92", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -811,7 +792,7 @@ "Kind": "Method" }, { - "$id": "95", + "$id": "93", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -829,11 +810,11 @@ "Kind": "Method" }, { - "$id": "96", + "$id": "94", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "97", + "$id": "95", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -848,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 @@ -875,9 +856,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "101", + "$id": "99", "Type": { - "$ref": "100" + "$ref": "98" }, "Value": "application/json" } @@ -885,7 +866,7 @@ ], "Responses": [ { - "$id": "102", + "$id": "100", "StatusCodes": [ 201 ], @@ -900,7 +881,7 @@ ] }, { - "$id": "103", + "$id": "101", "StatusCodes": [ 200 ], @@ -928,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 f2145abaf06..71fe949722b 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", @@ -51,92 +51,16 @@ { "$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" } ], "Namespace": "Pagination", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -144,7 +68,7 @@ ], "Models": [ { - "$id": "19", + "$id": "10", "Kind": "Model", "Name": "ListLedgerEntryInputBody", "Namespace": "Pagination", @@ -153,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 @@ -167,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 @@ -183,7 +107,7 @@ ] }, { - "$id": "24", + "$id": "15", "Kind": "Model", "Name": "PagedLedgerEntries", "Namespace": "Pagination", @@ -192,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", @@ -209,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 @@ -223,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 @@ -237,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 @@ -258,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 @@ -274,10 +198,10 @@ ] }, { - "$ref": "27" + "$ref": "18" }, { - "$id": "36", + "$id": "27", "Kind": "Model", "Name": "PagedDimensionValueListItem", "Namespace": "Azure.Core.Foundations", @@ -286,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", @@ -303,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 @@ -330,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 @@ -346,10 +270,10 @@ ] }, { - "$ref": "39" + "$ref": "30" }, { - "$id": "45", + "$id": "36", "Kind": "Model", "Name": "PagedLedgerEntry", "Namespace": "Azure.Core", @@ -358,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 }, @@ -375,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 @@ -391,7 +315,7 @@ ] }, { - "$id": "50", + "$id": "41", "Kind": "Model", "Name": "PagedTextBlocklist", "Namespace": "Azure.Core.Foundations", @@ -400,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", @@ -418,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 @@ -432,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 @@ -453,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 @@ -469,10 +393,10 @@ ] }, { - "$ref": "53" + "$ref": "44" }, { - "$id": "60", + "$id": "51", "Kind": "Model", "Name": "PagedTextBlockItem", "Namespace": "Azure.Core.Foundations", @@ -481,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", @@ -499,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 @@ -513,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 @@ -527,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 @@ -548,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 @@ -564,10 +488,10 @@ ] }, { - "$ref": "63" + "$ref": "54" }, { - "$id": "72", + "$id": "63", "Kind": "Model", "Name": "BatchPoolListResult", "Namespace": "Pagination", @@ -576,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", @@ -594,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 @@ -608,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 @@ -622,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 @@ -643,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 @@ -659,151 +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": { - "$ref": "8" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "86", - "Name": "tokenUrl", - "SerializedName": "tokenUrl", - "Description": "", - "Type": { - "$id": "87", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "13" - }, - "Value": "https://pagnation.azure.com/token", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "88", - "Name": "refreshUrl", - "SerializedName": "refreshUrl", - "Description": "", - "Type": { - "$id": "89", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$ref": "15" - }, - "Value": "https://pagination.azure.com/refresh", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "90", - "Name": "scopes", - "SerializedName": "scopes", - "Description": "", - "Type": { - "$id": "91", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "92", - "Kind": "Model", - "Name": "ListLedgerEntryInput", - "Namespace": "Pagination", - "Description": "Input model for the ListPaginationLedgerEntries", - "IsNullable": false, - "Usage": "Input", - "Properties": [ - { - "$id": "93", - "Name": "bodyInput", - "SerializedName": "bodyInput", - "Description": "Body parameter", - "Type": { - "$ref": "19" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] - }, - { - "$id": "94", - "Kind": "Model", - "Name": "MetricDimensions", - "Namespace": "Pagination", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "95", - "Kind": "Model", - "Name": "TestRuns", - "Namespace": "Pagination", - "Description": "Load test run model", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "96", - "Kind": "Model", - "Name": "Dimension", - "Namespace": "Pagination", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "97", - "Kind": "Model", - "Name": "BatchRequestHeaders", - "Namespace": "Pagination", - "Description": "Client related response header values", - "IsNullable": false, - "Usage": "None", - "Properties": [] + "$ref": "66" }, { - "$id": "98", - "Kind": "Model", - "Name": "BatchResponseHeaders", - "Namespace": "Pagination", - "Description": "Client related response header values", - "IsNullable": false, - "Usage": "None", - "Properties": [] - }, - { - "$id": "99", + "$id": "75", "Kind": "Model", "Name": "BatchError", "Namespace": "Pagination", @@ -812,12 +595,12 @@ "Usage": "Output", "Properties": [ { - "$id": "100", + "$id": "76", "Name": "code", "SerializedName": "code", "Description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.", "Type": { - "$id": "101", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -830,23 +613,23 @@ ], "Clients": [ { - "$id": "102", + "$id": "78", "Name": "PaginationClient", "Description": "", "Operations": [ { - "$id": "103", + "$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": "104", + "$id": "80", "Name": "pagnationUri", "NameInRequest": "pagnationUri", "Type": { - "$id": "105", + "$id": "81", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -862,21 +645,21 @@ "Kind": "Client" }, { - "$id": "106", + "$id": "82", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "107", + "$id": "83", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$id": "108", + "$id": "84", "Type": { - "$id": "109", + "$id": "85", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -893,12 +676,12 @@ "Kind": "Client" }, { - "$id": "110", + "$id": "86", "Name": "bodyInput", "NameInRequest": "bodyInput", "Description": "Body parameter", "Type": { - "$ref": "19" + "$ref": "10" }, "Location": "Body", "IsRequired": true, @@ -911,11 +694,11 @@ "Kind": "Method" }, { - "$id": "111", + "$id": "87", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "112", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -930,19 +713,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "113", + "$id": "89", "Type": { - "$ref": "112" + "$ref": "88" }, "Value": "application/json" } }, { - "$id": "114", + "$id": "90", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "115", + "$id": "91", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -957,9 +740,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "116", + "$id": "92", "Type": { - "$ref": "115" + "$ref": "91" }, "Value": "application/json" } @@ -967,12 +750,12 @@ ], "Responses": [ { - "$id": "117", + "$id": "93", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "24" + "$ref": "15" }, "BodyMediaType": "Json", "Headers": [], @@ -991,7 +774,7 @@ ], "BufferResponse": true, "Paging": { - "$id": "118", + "$id": "94", "NextLinkName": "customNextLink", "ItemName": "entries" }, @@ -1000,39 +783,39 @@ } ], "Protocol": { - "$id": "119" + "$id": "95" }, "Creatable": true }, { - "$id": "120", + "$id": "96", "Name": "AdditionalParameter", "Description": "", "Operations": [ { - "$id": "121", + "$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": "104" + "$ref": "80" }, { - "$id": "122", + "$id": "98", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "123", + "$id": "99", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1044,12 +827,12 @@ "Kind": "Client" }, { - "$id": "124", + "$id": "100", "Name": "testRunId", "NameInRequest": "testRunId", "Description": "Unique test run name as identifier", "Type": { - "$id": "125", + "$id": "101", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1065,12 +848,12 @@ "Kind": "Method" }, { - "$id": "126", + "$id": "102", "Name": "name", "NameInRequest": "name", "Description": "Dimension name", "Type": { - "$id": "127", + "$id": "103", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1086,7 +869,7 @@ "Kind": "Method" }, { - "$id": "128", + "$id": "104", "Name": "interval", "NameInRequest": "interval", "Description": "The interval (i.e. timegrain) of the query.", @@ -1104,12 +887,12 @@ "Kind": "Method" }, { - "$id": "129", + "$id": "105", "Name": "metricName", "NameInRequest": "metricName", "Description": "Metric name", "Type": { - "$id": "130", + "$id": "106", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1125,12 +908,12 @@ "Kind": "Method" }, { - "$id": "131", + "$id": "107", "Name": "metricNamespace", "NameInRequest": "metricNamespace", "Description": "Metric namespace to query metric definitions for.", "Type": { - "$id": "132", + "$id": "108", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1146,12 +929,12 @@ "Kind": "Method" }, { - "$id": "133", + "$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": "134", + "$id": "110", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1167,11 +950,11 @@ "Kind": "Method" }, { - "$id": "135", + "$id": "111", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "136", + "$id": "112", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1186,9 +969,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "137", + "$id": "113", "Type": { - "$ref": "136" + "$ref": "112" }, "Value": "application/json" } @@ -1196,12 +979,12 @@ ], "Responses": [ { - "$id": "138", + "$id": "114", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "36" + "$ref": "27" }, "BodyMediaType": "Json", "Headers": [], @@ -1217,7 +1000,7 @@ "Path": "/app/test-runs/{testRunId}/metric-dimensions/{name}/values", "BufferResponse": true, "Paging": { - "$id": "139", + "$id": "115", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1226,39 +1009,39 @@ } ], "Protocol": { - "$id": "140" + "$id": "116" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "141", + "$id": "117", "Name": "UseFoundationsResourceList", "Description": "", "Operations": [ { - "$id": "142", + "$id": "118", "Name": "list", "ResourceName": "LedgerEntry", "Description": "List upload detail for the discovery resource.", "Parameters": [ { - "$ref": "104" + "$ref": "80" }, { - "$id": "143", + "$id": "119", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "144", + "$id": "120", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1270,11 +1053,11 @@ "Kind": "Client" }, { - "$id": "145", + "$id": "121", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "146", + "$id": "122", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1289,9 +1072,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "147", + "$id": "123", "Type": { - "$ref": "146" + "$ref": "122" }, "Value": "application/json" } @@ -1299,12 +1082,12 @@ ], "Responses": [ { - "$id": "148", + "$id": "124", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "45" + "$ref": "36" }, "BodyMediaType": "Json", "Headers": [], @@ -1320,7 +1103,7 @@ "Path": "/app/adp/transactions", "BufferResponse": true, "Paging": { - "$id": "149", + "$id": "125", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1329,40 +1112,40 @@ } ], "Protocol": { - "$id": "150" + "$id": "126" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "151", + "$id": "127", "Name": "TwoTypesItem", "Description": "", "Operations": [ { - "$id": "152", + "$id": "128", "Name": "listTextBlocklists", "ResourceName": "TextBlocklist", "Summary": "Get All Text Blocklists", "Description": "Get all text blocklists details.", "Parameters": [ { - "$ref": "104" + "$ref": "80" }, { - "$id": "153", + "$id": "129", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "154", + "$id": "130", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1374,11 +1157,11 @@ "Kind": "Client" }, { - "$id": "155", + "$id": "131", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "156", + "$id": "132", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1393,9 +1176,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "157", + "$id": "133", "Type": { - "$ref": "156" + "$ref": "132" }, "Value": "application/json" } @@ -1403,12 +1186,12 @@ ], "Responses": [ { - "$id": "158", + "$id": "134", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "50" + "$ref": "41" }, "BodyMediaType": "Json", "Headers": [], @@ -1424,7 +1207,7 @@ "Path": "/app/text/blocklists", "BufferResponse": true, "Paging": { - "$id": "159", + "$id": "135", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1432,29 +1215,29 @@ "GenerateConvenienceMethod": true }, { - "$id": "160", + "$id": "136", "Name": "listTextBlocklistItems", "ResourceName": "TextBlockItem", "Summary": "Get All BlockItems By blocklistName", "Description": "Get all blockItems in a text blocklist", "Parameters": [ { - "$ref": "104" + "$ref": "80" }, { - "$id": "161", + "$id": "137", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "162", + "$id": "138", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1466,12 +1249,12 @@ "Kind": "Client" }, { - "$id": "163", + "$id": "139", "Name": "blocklistName", "NameInRequest": "blocklistName", "Description": "Text blocklist name. Only supports the following characters: 0-9 A-Z a-z - . _ ~", "Type": { - "$id": "164", + "$id": "140", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1487,12 +1270,12 @@ "Kind": "Method" }, { - "$id": "165", + "$id": "141", "Name": "top", "NameInRequest": "top", "Description": "The number of result items to return.", "Type": { - "$id": "166", + "$id": "142", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1508,12 +1291,12 @@ "Kind": "Method" }, { - "$id": "167", + "$id": "143", "Name": "skip", "NameInRequest": "skip", "Description": "The number of result items to skip.", "Type": { - "$id": "168", + "$id": "144", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1529,12 +1312,12 @@ "Kind": "Method" }, { - "$id": "169", + "$id": "145", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Description": "The maximum number of result items per page.", "Type": { - "$id": "170", + "$id": "146", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1550,11 +1333,11 @@ "Kind": "Method" }, { - "$id": "171", + "$id": "147", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "172", + "$id": "148", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1569,9 +1352,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "173", + "$id": "149", "Type": { - "$ref": "172" + "$ref": "148" }, "Value": "application/json" } @@ -1579,12 +1362,12 @@ ], "Responses": [ { - "$id": "174", + "$id": "150", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "60" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -1600,7 +1383,7 @@ "Path": "/app/text/blocklists/{blocklistName}/blockItems", "BufferResponse": true, "Paging": { - "$id": "175", + "$id": "151", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -1609,39 +1392,39 @@ } ], "Protocol": { - "$id": "176" + "$id": "152" }, "Creatable": false, "Parent": "PaginationClient" }, { - "$id": "177", + "$id": "153", "Name": "Pools", "Description": "", "Operations": [ { - "$id": "178", + "$id": "154", "Name": "listPools", "ResourceName": "Pools", "Description": "Lists all of the Pools in the specified Account.", "Parameters": [ { - "$ref": "104" + "$ref": "80" }, { - "$id": "179", + "$id": "155", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "180", + "$id": "156", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "Location": "Query", "DefaultValue": { - "$ref": "108" + "$ref": "84" }, "IsRequired": true, "IsApiVersion": true, @@ -1653,12 +1436,12 @@ "Kind": "Client" }, { - "$id": "181", + "$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": "182", + "$id": "158", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1674,16 +1457,16 @@ "Kind": "Method" }, { - "$id": "183", + "$id": "159", "Name": "$select", "NameInRequest": "$select", "Description": "An OData $select clause.", "Type": { - "$id": "184", + "$id": "160", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "185", + "$id": "161", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1702,16 +1485,16 @@ "ArraySerializationDelimiter": "," }, { - "$id": "186", + "$id": "162", "Name": "$expand", "NameInRequest": "$expand", "Description": "An OData $expand clause.", "Type": { - "$id": "187", + "$id": "163", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "188", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1730,11 +1513,11 @@ "ArraySerializationDelimiter": "," }, { - "$id": "189", + "$id": "165", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "190", + "$id": "166", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1749,9 +1532,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "191", + "$id": "167", "Type": { - "$ref": "190" + "$ref": "166" }, "Value": "application/json" } @@ -1759,12 +1542,12 @@ ], "Responses": [ { - "$id": "192", + "$id": "168", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "72" + "$ref": "63" }, "BodyMediaType": "Json", "Headers": [], @@ -1780,7 +1563,7 @@ "Path": "/app/pools", "BufferResponse": true, "Paging": { - "$id": "193", + "$id": "169", "NextLinkName": "odata.nextLink", "ItemName": "value" }, @@ -1789,16 +1572,16 @@ } ], "Protocol": { - "$id": "194" + "$id": "170" }, "Creatable": false, "Parent": "PaginationClient" } ], "Auth": { - "$id": "195", + "$id": "171", "OAuth2": { - "$id": "196", + "$id": "172", "Scopes": [ "https://pagination.azure.com/.default" ] diff --git a/test/TestProjects/Parameters-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Parameters-TypeSpec/src/Generated/tspCodeModel.json index f523bc4f88d..272eb6c423c 100644 --- a/test/TestProjects/Parameters-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Parameters-TypeSpec/src/Generated/tspCodeModel.json @@ -18,7 +18,6 @@ } ], "Namespace": "ParametersCadl", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" diff --git a/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/PetStore-TypeSpec/src/Generated/tspCodeModel.json index e22a5fbec92..10b22106341 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", @@ -96,14 +96,14 @@ "Name": "kind", "SerializedName": "kind", "Description": "Discriminator", - "IsRequired": true, - "IsReadOnly": false, "Type": { "$id": "14", "Kind": "Primitive", "Name": "String", "IsNullable": false }, + "IsRequired": true, + "IsReadOnly": false, "IsDiscriminator": true }, { @@ -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 840d35b5e55..7ccaec8f1d8 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", @@ -49,7 +49,6 @@ } ], "Namespace": "RenameGetList", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -189,7 +188,7 @@ "Type": { "$id": "26", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -203,7 +202,7 @@ "Type": { "$id": "28", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -217,7 +216,7 @@ "Type": { "$id": "30", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -231,7 +230,7 @@ "Type": { "$id": "32", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeRFC3339", "IsNullable": false }, "IsRequired": true, @@ -349,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 @@ -403,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 @@ -434,11 +424,11 @@ "Kind": "Client" }, { - "$id": "57", + "$id": "56", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "58", + "$id": "57", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -454,11 +444,11 @@ "Kind": "Method" }, { - "$id": "59", + "$id": "58", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "60", + "$id": "59", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -473,9 +463,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "61", + "$id": "60", "Type": { - "$ref": "60" + "$ref": "59" }, "Value": "application/json" } @@ -483,7 +473,7 @@ ], "Responses": [ { - "$id": "62", + "$id": "61", "StatusCodes": [ 200 ], @@ -507,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, @@ -540,11 +530,11 @@ "Kind": "Client" }, { - "$id": "66", + "$id": "65", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "67", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -559,9 +549,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "68", + "$id": "67", "Type": { - "$ref": "67" + "$ref": "66" }, "Value": "application/json" } @@ -569,7 +559,7 @@ ], "Responses": [ { - "$id": "69", + "$id": "68", "StatusCodes": [ 200 ], @@ -590,7 +580,7 @@ "Path": "/authoring/analyze-text/projects", "BufferResponse": true, "Paging": { - "$id": "70", + "$id": "69", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -599,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, @@ -643,11 +633,11 @@ "Kind": "Client" }, { - "$id": "76", + "$id": "75", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "77", + "$id": "76", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -663,11 +653,11 @@ "Kind": "Method" }, { - "$id": "78", + "$id": "77", "Name": "deploymentName", "NameInRequest": "deploymentName", "Type": { - "$id": "79", + "$id": "78", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -683,11 +673,11 @@ "Kind": "Method" }, { - "$id": "80", + "$id": "79", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "81", + "$id": "80", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -702,9 +692,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "82", + "$id": "81", "Type": { - "$ref": "81" + "$ref": "80" }, "Value": "application/json" } @@ -712,7 +702,7 @@ ], "Responses": [ { - "$id": "83", + "$id": "82", "StatusCodes": [ 200 ], @@ -736,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, @@ -769,11 +759,11 @@ "Kind": "Client" }, { - "$id": "87", + "$id": "86", "Name": "projectName", "NameInRequest": "projectName", "Type": { - "$id": "88", + "$id": "87", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -789,11 +779,11 @@ "Kind": "Method" }, { - "$id": "89", + "$id": "88", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "90", + "$id": "89", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -808,9 +798,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "91", + "$id": "90", "Type": { - "$ref": "90" + "$ref": "89" }, "Value": "application/json" } @@ -818,7 +808,7 @@ ], "Responses": [ { - "$id": "92", + "$id": "91", "StatusCodes": [ 200 ], @@ -839,7 +829,7 @@ "Path": "/authoring/analyze-text/projects/{projectName}/deployments", "BufferResponse": true, "Paging": { - "$id": "93", + "$id": "92", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -848,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 34cc5a0fa10..4b38e8047f3 100644 --- a/test/TestProjects/SpecificVersion-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/SpecificVersion-TypeSpec/src/Generated/tspCodeModel.json @@ -73,7 +73,6 @@ } ], "Namespace": "TypeSpec.Versioning.Specific", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -386,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 @@ -471,11 +452,11 @@ "Kind": "Client" }, { - "$id": "61", + "$id": "59", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "62", + "$id": "60", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -491,11 +472,11 @@ "Kind": "Method" }, { - "$id": "63", + "$id": "61", "Name": "projectFileVersion", "NameInRequest": "projectFileVersion", "Type": { - "$id": "64", + "$id": "62", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -511,11 +492,11 @@ "Kind": "Method" }, { - "$id": "65", + "$id": "63", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "66", + "$id": "64", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -530,9 +511,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "67", + "$id": "65", "Type": { - "$ref": "66" + "$ref": "64" }, "Value": "application/json" } @@ -540,7 +521,7 @@ ], "Responses": [ { - "$id": "68", + "$id": "66", "StatusCodes": [ 202 ], @@ -550,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 @@ -574,10 +555,10 @@ "Path": "/versioning/resources/{name}:export", "BufferResponse": true, "LongRunning": { - "$id": "71", + "$id": "69", "FinalStateVia": 3, "FinalResponse": { - "$id": "72", + "$id": "70", "StatusCodes": [ 200 ], @@ -592,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, @@ -622,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 @@ -649,11 +630,11 @@ "Kind": "Method" }, { - "$id": "79", + "$id": "77", "Name": "expand", "NameInRequest": "expand", "Type": { - "$id": "80", + "$id": "78", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -669,11 +650,11 @@ "Kind": "Method" }, { - "$id": "81", + "$id": "79", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "82", + "$id": "80", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -688,9 +669,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "83", + "$id": "81", "Type": { - "$ref": "82" + "$ref": "80" }, "Value": "application/json" } @@ -698,7 +679,7 @@ ], "Responses": [ { - "$id": "84", + "$id": "82", "StatusCodes": [ 200 ], @@ -719,7 +700,7 @@ "Path": "/versioning/resources", "BufferResponse": true, "Paging": { - "$id": "85", + "$id": "83", "NextLinkName": "nextLink", "ItemName": "value" }, @@ -727,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, @@ -757,11 +738,11 @@ "Kind": "Client" }, { - "$id": "89", + "$id": "87", "Name": "name", "NameInRequest": "name", "Type": { - "$id": "90", + "$id": "88", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -777,7 +758,7 @@ "Kind": "Method" }, { - "$id": "91", + "$id": "89", "Name": "resource", "NameInRequest": "resource", "Description": "The resource instance.", @@ -795,11 +776,11 @@ "Kind": "Method" }, { - "$id": "92", + "$id": "90", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "93", + "$id": "91", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -814,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 @@ -841,9 +822,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "97", + "$id": "95", "Type": { - "$ref": "96" + "$ref": "94" }, "Value": "application/json" } @@ -851,7 +832,7 @@ ], "Responses": [ { - "$id": "98", + "$id": "96", "StatusCodes": [ 201 ], @@ -866,7 +847,7 @@ ] }, { - "$id": "99", + "$id": "97", "StatusCodes": [ 200 ], @@ -894,7 +875,7 @@ } ], "Protocol": { - "$id": "100" + "$id": "98" }, "Creatable": false, "Parent": "SpecificClient" diff --git a/test/TestProjects/Spread-TypeSpec/src/Generated/tspCodeModel.json b/test/TestProjects/Spread-TypeSpec/src/Generated/tspCodeModel.json index 9132039ae81..c9ad0bf63fc 100644 --- a/test/TestProjects/Spread-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/TestProjects/Spread-TypeSpec/src/Generated/tspCodeModel.json @@ -19,7 +19,6 @@ } ], "Namespace": "SpreadTypeSpec", - "Description": "", "IsExtensible": false, "IsNullable": false, "Usage": "None" 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 3dbfc95bb11..e6af453a44b 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 @@ -198,7 +198,7 @@ union DaysOfWeekExtensibleEnum { model ModelWithFormat { @doc("url format") - @format("Uri") + @format("uri") sourceUrl: string; @doc("uuid format") 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 f42f4fe0d12..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 @@ -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", @@ -262,7 +262,7 @@ "$id": "34", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "Float32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "35", @@ -290,7 +290,7 @@ "$id": "38", "Kind": "Enum", "Name": "DaysOfWeekExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "39", @@ -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,98 +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": { - "$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 - } - ] } ], "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 @@ -1153,11 +1006,11 @@ "Kind": "Client" }, { - "$id": "148", + "$id": "131", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "149", + "$id": "132", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1173,11 +1026,11 @@ "Kind": "Method" }, { - "$id": "150", + "$id": "133", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "151", + "$id": "134", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1192,9 +1045,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "152", + "$id": "135", "Type": { - "$ref": "151" + "$ref": "134" }, "Value": "application/json" } @@ -1202,12 +1055,12 @@ ], "Responses": [ { - "$id": "153", + "$id": "136", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1226,20 +1079,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 @@ -1254,9 +1107,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "157", + "$id": "140", "Type": { - "$ref": "156" + "$ref": "139" }, "Value": "application/json" } @@ -1264,12 +1117,12 @@ ], "Responses": [ { - "$id": "158", + "$id": "141", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1288,20 +1141,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, @@ -1314,11 +1167,11 @@ "Kind": "Method" }, { - "$id": "161", + "$id": "144", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "162", + "$id": "145", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1333,19 +1186,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 @@ -1360,9 +1213,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "166", + "$id": "149", "Type": { - "$ref": "165" + "$ref": "148" }, "Value": "application/json" } @@ -1370,12 +1223,12 @@ ], "Responses": [ { - "$id": "167", + "$id": "150", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1397,21 +1250,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, @@ -1424,11 +1277,11 @@ "Kind": "Method" }, { - "$id": "170", + "$id": "153", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "171", + "$id": "154", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1443,19 +1296,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 @@ -1470,9 +1323,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "158", "Type": { - "$ref": "174" + "$ref": "157" }, "Value": "application/json" } @@ -1480,12 +1333,12 @@ ], "Responses": [ { - "$id": "176", + "$id": "159", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1507,21 +1360,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, @@ -1534,11 +1387,11 @@ "Kind": "Method" }, { - "$id": "179", + "$id": "162", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "180", + "$id": "163", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1553,19 +1406,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 @@ -1580,9 +1433,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "184", + "$id": "167", "Type": { - "$ref": "183" + "$ref": "166" }, "Value": "application/json" } @@ -1590,12 +1443,12 @@ ], "Responses": [ { - "$id": "185", + "$id": "168", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "84" + "$ref": "75" }, "BodyMediaType": "Json", "Headers": [], @@ -1617,19 +1470,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 @@ -1645,11 +1498,11 @@ "Kind": "Method" }, { - "$id": "189", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "190", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1664,9 +1517,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "191", + "$id": "174", "Type": { - "$ref": "190" + "$ref": "173" }, "Value": "application/json" } @@ -1674,7 +1527,7 @@ ], "Responses": [ { - "$id": "192", + "$id": "175", "StatusCodes": [ 204 ], @@ -1692,20 +1545,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 @@ -1721,11 +1574,11 @@ "Kind": "Method" }, { - "$id": "196", + "$id": "179", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "87" + "$ref": "78" }, "Location": "Body", "IsRequired": true, @@ -1738,11 +1591,11 @@ "Kind": "Method" }, { - "$id": "197", + "$id": "180", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "198", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1757,19 +1610,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 @@ -1784,9 +1637,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "202", + "$id": "185", "Type": { - "$ref": "201" + "$ref": "184" }, "Value": "application/json" } @@ -1794,7 +1647,7 @@ ], "Responses": [ { - "$id": "203", + "$id": "186", "StatusCodes": [ 204 ], @@ -1816,41 +1669,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 @@ -1866,11 +1719,11 @@ "Kind": "Method" }, { - "$id": "211", + "$id": "194", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "212", + "$id": "195", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1886,11 +1739,11 @@ "Kind": "Method" }, { - "$id": "213", + "$id": "196", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "214", + "$id": "197", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1906,11 +1759,11 @@ "Kind": "Method" }, { - "$id": "215", + "$id": "198", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "216", + "$id": "199", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1925,9 +1778,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "217", + "$id": "200", "Type": { - "$ref": "216" + "$ref": "199" }, "Value": "application/json" } @@ -1935,12 +1788,12 @@ ], "Responses": [ { - "$id": "218", + "$id": "201", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -1960,31 +1813,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 @@ -2000,15 +1853,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 @@ -2018,9 +1871,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "227", + "$id": "210", "Type": { - "$ref": "225" + "$ref": "208" }, "Value": "text/plain" }, @@ -2034,11 +1887,11 @@ "Kind": "Constant" }, { - "$id": "228", + "$id": "211", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "229", + "$id": "212", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2054,11 +1907,11 @@ "Kind": "Method" }, { - "$id": "230", + "$id": "213", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "92" + "$ref": "83" }, "Location": "Body", "IsRequired": true, @@ -2071,11 +1924,11 @@ "Kind": "Method" }, { - "$id": "231", + "$id": "214", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "232", + "$id": "215", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2090,9 +1943,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "233", + "$id": "216", "Type": { - "$ref": "232" + "$ref": "215" }, "Value": "application/json" } @@ -2100,12 +1953,12 @@ ], "Responses": [ { - "$id": "234", + "$id": "217", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "92" + "$ref": "83" }, "BodyMediaType": "Json", "Headers": [], @@ -2127,20 +1980,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 @@ -2156,11 +2009,11 @@ "Kind": "Method" }, { - "$id": "238", + "$id": "221", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "239", + "$id": "222", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2176,11 +2029,11 @@ "Kind": "Method" }, { - "$id": "240", + "$id": "223", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "92" + "$ref": "83" }, "Location": "Body", "IsRequired": true, @@ -2193,11 +2046,11 @@ "Kind": "Method" }, { - "$id": "241", + "$id": "224", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "242", + "$id": "225", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2212,19 +2065,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 @@ -2239,9 +2092,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "246", + "$id": "229", "Type": { - "$ref": "245" + "$ref": "228" }, "Value": "application/json" } @@ -2249,12 +2102,12 @@ ], "Responses": [ { - "$id": "247", + "$id": "230", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "92" + "$ref": "83" }, "BodyMediaType": "Json", "Headers": [], @@ -2276,20 +2129,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, @@ -2302,11 +2155,11 @@ "Kind": "Method" }, { - "$id": "250", + "$id": "233", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "251", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2321,19 +2174,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 @@ -2348,9 +2201,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "255", + "$id": "238", "Type": { - "$ref": "254" + "$ref": "237" }, "Value": "application/json" } @@ -2358,12 +2211,12 @@ ], "Responses": [ { - "$id": "256", + "$id": "239", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2385,24 +2238,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 @@ -2412,9 +2265,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "261", + "$id": "244", "Type": { - "$ref": "259" + "$ref": "242" }, "Value": "test" }, @@ -2428,15 +2281,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 @@ -2446,9 +2299,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "265", + "$id": "248", "Type": { - "$ref": "263" + "$ref": "246" }, "Value": 123 }, @@ -2462,15 +2315,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 @@ -2480,9 +2333,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "269", + "$id": "252", "Type": { - "$ref": "267" + "$ref": "250" }, "Value": true }, @@ -2496,11 +2349,11 @@ "Kind": "Constant" }, { - "$id": "270", + "$id": "253", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "271", + "$id": "254", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2515,9 +2368,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "272", + "$id": "255", "Type": { - "$ref": "271" + "$ref": "254" }, "Value": "application/json" } @@ -2525,12 +2378,12 @@ ], "Responses": [ { - "$id": "273", + "$id": "256", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2550,27 +2403,27 @@ } ], "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": "create extensible enum", "Parameters": [ { - "$ref": "146" + "$ref": "129" }, { - "$id": "277", + "$id": "260", "Name": "input", "NameInRequest": "input", "Type": { @@ -2587,11 +2440,11 @@ "Kind": "Method" }, { - "$id": "278", + "$id": "261", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "279", + "$id": "262", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2606,19 +2459,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "280", + "$id": "263", "Type": { - "$ref": "279" + "$ref": "262" }, "Value": "application/json" } }, { - "$id": "281", + "$id": "264", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "282", + "$id": "265", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2633,9 +2486,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "283", + "$id": "266", "Type": { - "$ref": "282" + "$ref": "265" }, "Value": "application/json" } @@ -2643,7 +2496,7 @@ ], "Responses": [ { - "$id": "284", + "$id": "267", "StatusCodes": [ 204 ], @@ -2665,31 +2518,31 @@ } ], "Protocol": { - "$id": "285" + "$id": "268" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" }, { - "$id": "286", + "$id": "269", "Name": "ProtocolAndConvenient", "Description": "", "Operations": [ { - "$id": "287", + "$id": "270", "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": "288", + "$id": "271", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "55" + "$ref": "46" }, "Location": "Body", "IsRequired": true, @@ -2702,11 +2555,11 @@ "Kind": "Method" }, { - "$id": "289", + "$id": "272", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "290", + "$id": "273", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2721,19 +2574,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "291", + "$id": "274", "Type": { - "$ref": "290" + "$ref": "273" }, "Value": "application/json" } }, { - "$id": "292", + "$id": "275", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "293", + "$id": "276", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2748,9 +2601,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "294", + "$id": "277", "Type": { - "$ref": "293" + "$ref": "276" }, "Value": "application/json" } @@ -2758,12 +2611,12 @@ ], "Responses": [ { - "$id": "295", + "$id": "278", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "55" + "$ref": "46" }, "BodyMediaType": "Json", "Headers": [], @@ -2785,20 +2638,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "296", + "$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": "146" + "$ref": "129" }, { - "$id": "297", + "$id": "280", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "298", + "$id": "281", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2813,9 +2666,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "299", + "$id": "282", "Type": { - "$ref": "298" + "$ref": "281" }, "Value": "application/json" } @@ -2823,7 +2676,7 @@ ], "Responses": [ { - "$id": "300", + "$id": "283", "StatusCodes": [ 204 ], @@ -2842,20 +2695,20 @@ } ], "Protocol": { - "$id": "301" + "$id": "284" }, "Creatable": false, "Parent": "NewProjectTypeSpecClient" } ], "Auth": { - "$id": "302", + "$id": "285", "ApiKey": { - "$id": "303", + "$id": "286", "Name": "x-ms-api-key" }, "OAuth2": { - "$id": "304", + "$id": "287", "Scopes": [ "https://api.example.com/.default" ] diff --git a/test/UnbrandedProjects/Customized-TypeSpec/Customized-TypeSpec.tsp b/test/UnbrandedProjects/Customized-TypeSpec/Customized-TypeSpec.tsp index 819ea1ead8d..851d0327998 100644 --- a/test/UnbrandedProjects/Customized-TypeSpec/Customized-TypeSpec.tsp +++ b/test/UnbrandedProjects/Customized-TypeSpec/Customized-TypeSpec.tsp @@ -3,9 +3,14 @@ import "@typespec/http"; import "@azure-tools/typespec-client-generator-core"; import "@azure-tools/typespec-azure-core"; +using TypeSpec.Http; +using TypeSpec.Versioning; +using Azure.ClientGenerator.Core; +using Azure.Core; + +@versioned(Versions) @service({ - title: "hello world", - version: "0.1.0", + title: "hello world" }) @doc("This is a sample typespec project.") @server( @@ -20,9 +25,10 @@ import "@azure-tools/typespec-azure-core"; ) namespace CustomizedTypeSpec; -using TypeSpec.Http; -using Azure.ClientGenerator.Core; -using Azure.Core; +enum Versions { + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + "2022-05-15-preview" +} @doc("float fixed enum") @fixed @@ -162,12 +168,10 @@ union DaysOfWeekExtensibleEnum { model ModelWithFormat { @doc("url format") - @format("Uri") - sourceUrl: string; + sourceUrl: url; @doc("uuid format") - @format("uuid") - guid: string; + guid: uuid; } @route("/hello") diff --git a/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/SuperClientOptions.cs b/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/SuperClientOptions.cs index a74b49da798..9e8d0767805 100644 --- a/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/SuperClientOptions.cs +++ b/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/SuperClientOptions.cs @@ -2,6 +2,7 @@ #nullable disable +using System; using System.ClientModel.Primitives; namespace CustomizedTypeSpec @@ -9,5 +10,25 @@ namespace CustomizedTypeSpec /// Client options for SuperClient. public partial class SuperClientOptions : ClientPipelineOptions { + private const ServiceVersion LatestVersion = ServiceVersion.V2022_05_15_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2022-05-15-preview". + V2022_05_15_Preview = 1, + } + + internal string Version { get; } + + /// Initializes new instance of SuperClientOptions. + public SuperClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2022_05_15_Preview => "2022-05-15-preview", + _ => throw new NotSupportedException() + }; + } } } diff --git a/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json index c5aab757dd3..b76fd0f2959 100644 --- a/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Customized-TypeSpec/src/Generated/tspCodeModel.json @@ -2,7 +2,9 @@ "$id": "1", "Name": "CustomizedTypeSpec", "Description": "This is a sample typespec project.", - "ApiVersions": [], + "ApiVersions": [ + "2022-05-15-preview" + ], "Enums": [ { "$id": "2", @@ -121,111 +123,16 @@ { "$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", + "Name": "Versions", "EnumValueType": "String", "AllowedValues": [ { - "$id": "19", - "Name": "One", - "Value": "1" - }, - { - "$id": "20", - "Name": "Two", - "Value": "2" - }, - { - "$id": "21", - "Name": "Four", - "Value": "4" - } - ], - "Namespace": "CustomizedTypeSpec", - "Description": "Simple enum", - "IsExtensible": false, - "IsNullable": true, - "Usage": "None" - }, - { - "$id": "22", - "Kind": "Enum", - "Name": "FloatFixedEnum", - "EnumValueType": "Float32", - "AllowedValues": [ - { - "$id": "23", - "Name": "One", - "Value": 1.1 - }, - { - "$id": "24", - "Name": "Two", - "Value": 2.2 - }, - { - "$id": "25", - "Name": "Four", - "Value": 4.4 - } - ], - "Namespace": "CustomizedTypeSpec", - "Description": "float fixed enum", - "IsExtensible": false, - "IsNullable": false, - "Usage": "None" - }, - { - "$id": "26", - "Kind": "Enum", - "Name": "IntFixedEnum", - "EnumValueType": "Float32", - "AllowedValues": [ - { - "$id": "27", - "Name": "One", - "Value": 1 - }, - { - "$id": "28", - "Name": "Two", - "Value": 2 - }, - { - "$id": "29", - "Name": "Four", - "Value": 4 + "$id": "15", + "Name": "2022-05-15-preview", + "Value": "2022-05-15-preview" } ], "Namespace": "CustomizedTypeSpec", - "Description": "int fixed enum", "IsExtensible": false, "IsNullable": false, "Usage": "None" @@ -233,7 +140,7 @@ ], "Models": [ { - "$id": "30", + "$id": "16", "Kind": "Model", "Name": "Thing", "Namespace": "CustomizedTypeSpec", @@ -242,12 +149,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "31", + "$id": "17", "Name": "name", "SerializedName": "name", "Description": "name of the Thing", "Type": { - "$id": "32", + "$id": "18", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -256,27 +163,27 @@ "IsReadOnly": false }, { - "$id": "33", + "$id": "19", "Name": "requiredUnion", "SerializedName": "requiredUnion", "Description": "required Union", "Type": { - "$id": "34", + "$id": "20", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "35", + "$id": "21", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "36", + "$id": "22", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "37", + "$id": "23", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -284,7 +191,7 @@ "IsNullable": false }, { - "$id": "38", + "$id": "24", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -296,12 +203,12 @@ "IsReadOnly": false }, { - "$id": "39", + "$id": "25", "Name": "requiredLiteralString", "SerializedName": "requiredLiteralString", "Description": "required literal string", "Type": { - "$id": "40", + "$id": "26", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -314,12 +221,12 @@ "IsReadOnly": false }, { - "$id": "41", + "$id": "27", "Name": "requiredLiteralInt", "SerializedName": "requiredLiteralInt", "Description": "required literal int", "Type": { - "$id": "42", + "$id": "28", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -332,12 +239,12 @@ "IsReadOnly": false }, { - "$id": "43", + "$id": "29", "Name": "requiredLiteralFloat", "SerializedName": "requiredLiteralFloat", "Description": "required literal float", "Type": { - "$id": "44", + "$id": "30", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -350,16 +257,16 @@ "IsReadOnly": false }, { - "$id": "45", + "$id": "31", "Name": "requiredLiteralBool", "SerializedName": "requiredLiteralBool", "Description": "required literal bool", "Type": { - "$id": "46", + "$id": "32", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "47", + "$id": "33", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -371,12 +278,12 @@ "IsReadOnly": false }, { - "$id": "48", + "$id": "34", "Name": "optionalLiteralString", "SerializedName": "optionalLiteralString", "Description": "optional literal string", "Type": { - "$id": "49", + "$id": "35", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -389,12 +296,12 @@ "IsReadOnly": false }, { - "$id": "50", + "$id": "36", "Name": "optionalLiteralInt", "SerializedName": "optionalLiteralInt", "Description": "optional literal int", "Type": { - "$id": "51", + "$id": "37", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -407,12 +314,12 @@ "IsReadOnly": false }, { - "$id": "52", + "$id": "38", "Name": "optionalLiteralFloat", "SerializedName": "optionalLiteralFloat", "Description": "optional literal float", "Type": { - "$id": "53", + "$id": "39", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { @@ -425,16 +332,16 @@ "IsReadOnly": false }, { - "$id": "54", + "$id": "40", "Name": "optionalLiteralBool", "SerializedName": "optionalLiteralBool", "Description": "optional literal bool", "Type": { - "$id": "55", + "$id": "41", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "56", + "$id": "42", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -446,12 +353,12 @@ "IsReadOnly": false }, { - "$id": "57", + "$id": "43", "Name": "requiredBadDescription", "SerializedName": "requiredBadDescription", "Description": "description with xml <|endoftext|>", "Type": { - "$id": "58", + "$id": "44", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -460,16 +367,16 @@ "IsReadOnly": false }, { - "$id": "59", + "$id": "45", "Name": "optionalNullableList", "SerializedName": "optionalNullableList", "Description": "optional nullable collection", "Type": { - "$id": "60", + "$id": "46", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "61", + "$id": "47", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -480,16 +387,16 @@ "IsReadOnly": false }, { - "$id": "62", + "$id": "48", "Name": "requiredNullableList", "SerializedName": "requiredNullableList", "Description": "required nullable collection", "Type": { - "$id": "63", + "$id": "49", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "64", + "$id": "50", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -502,7 +409,7 @@ ] }, { - "$id": "65", + "$id": "51", "Kind": "Model", "Name": "RoundTripModel", "Namespace": "CustomizedTypeSpec", @@ -511,12 +418,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "66", + "$id": "52", "Name": "requiredString", "SerializedName": "requiredString", "Description": "Required string, illustrating a reference type property.", "Type": { - "$id": "67", + "$id": "53", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -525,12 +432,12 @@ "IsReadOnly": false }, { - "$id": "68", + "$id": "54", "Name": "requiredInt", "SerializedName": "requiredInt", "Description": "Required int, illustrating a value type property.", "Type": { - "$id": "69", + "$id": "55", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -541,7 +448,7 @@ ] }, { - "$id": "70", + "$id": "56", "Kind": "Model", "Name": "Friend", "Namespace": "CustomizedTypeSpec", @@ -550,12 +457,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "71", + "$id": "57", "Name": "name", "SerializedName": "name", "Description": "name of the NotFriend", "Type": { - "$id": "72", + "$id": "58", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -566,7 +473,7 @@ ] }, { - "$id": "73", + "$id": "59", "Kind": "Model", "Name": "ModelWithFormat", "Namespace": "CustomizedTypeSpec", @@ -574,12 +481,12 @@ "Usage": "Input", "Properties": [ { - "$id": "74", + "$id": "60", "Name": "sourceUrl", "SerializedName": "sourceUrl", "Description": "url format", "Type": { - "$id": "75", + "$id": "61", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -588,12 +495,12 @@ "IsReadOnly": false }, { - "$id": "76", + "$id": "62", "Name": "guid", "SerializedName": "guid", "Description": "uuid format", "Type": { - "$id": "77", + "$id": "63", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -604,7 +511,7 @@ ] }, { - "$id": "78", + "$id": "64", "Kind": "Model", "Name": "ProjectedModel", "Namespace": "CustomizedTypeSpec", @@ -613,12 +520,12 @@ "Usage": "RoundTrip", "Properties": [ { - "$id": "79", + "$id": "65", "Name": "name", "SerializedName": "name", "Description": "name of the ModelWithProjectedName", "Type": { - "$id": "80", + "$id": "66", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -629,80 +536,33 @@ ] }, { - "$id": "81", + "$id": "67", "Kind": "Model", "Name": "ReturnsAnonymousModelResponse", "Namespace": "CustomizedTypeSpec", "IsNullable": false, "Usage": "Output", "Properties": [] - }, - { - "$id": "82", - "Kind": "Model", - "Name": "ModelWithRequiredNullableProperties", - "Namespace": "CustomizedTypeSpec", - "Description": "A model with a few required nullable properties", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "83", - "Name": "requiredNullablePrimitive", - "SerializedName": "requiredNullablePrimitive", - "Description": "required nullable primitive type", - "Type": { - "$id": "84", - "Kind": "Primitive", - "Name": "Int32", - "IsNullable": true - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "85", - "Name": "requiredExtensibleEnum", - "SerializedName": "requiredExtensibleEnum", - "Description": "required nullable extensible enum type", - "Type": { - "$ref": "14" - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "86", - "Name": "requiredFixedEnum", - "SerializedName": "requiredFixedEnum", - "Description": "required nullable fixed enum type", - "Type": { - "$ref": "18" - }, - "IsRequired": true, - "IsReadOnly": false - } - ] } ], "Clients": [ { - "$id": "87", + "$id": "68", "Name": "CustomizedTypeSpecClient", "Description": "This is a sample typespec project.", "Operations": [ { - "$id": "88", + "$id": "69", "Name": "sayHi", "ResourceName": "CustomizedTypeSpec", "Description": "Return hi", "Parameters": [ { - "$id": "89", + "$id": "70", "Name": "unbrandedTypeSpecUrl", "NameInRequest": "unbrandedTypeSpecUrl", "Type": { - "$id": "90", + "$id": "71", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -718,11 +578,11 @@ "Kind": "Client" }, { - "$id": "91", + "$id": "72", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "92", + "$id": "73", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -738,11 +598,11 @@ "Kind": "Method" }, { - "$id": "93", + "$id": "74", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "94", + "$id": "75", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -758,11 +618,11 @@ "Kind": "Method" }, { - "$id": "95", + "$id": "76", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "96", + "$id": "77", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -778,11 +638,11 @@ "Kind": "Method" }, { - "$id": "97", + "$id": "78", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "98", + "$id": "79", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -797,9 +657,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "99", + "$id": "80", "Type": { - "$ref": "98" + "$ref": "79" }, "Value": "application/json" } @@ -807,12 +667,12 @@ ], "Responses": [ { - "$id": "100", + "$id": "81", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -831,20 +691,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "101", + "$id": "82", "Name": "helloAgain", "ResourceName": "CustomizedTypeSpec", "Description": "Return hi again", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "102", + "$id": "83", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "103", + "$id": "84", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -860,15 +720,15 @@ "Kind": "Method" }, { - "$id": "104", + "$id": "85", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "105", + "$id": "86", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "106", + "$id": "87", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -878,9 +738,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "107", + "$id": "88", "Type": { - "$ref": "105" + "$ref": "86" }, "Value": "text/plain" }, @@ -894,11 +754,11 @@ "Kind": "Constant" }, { - "$id": "108", + "$id": "89", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "109", + "$id": "90", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -914,11 +774,11 @@ "Kind": "Method" }, { - "$id": "110", + "$id": "91", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "65" + "$ref": "51" }, "Location": "Body", "IsRequired": true, @@ -931,11 +791,11 @@ "Kind": "Method" }, { - "$id": "111", + "$id": "92", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "112", + "$id": "93", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -950,9 +810,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "113", + "$id": "94", "Type": { - "$ref": "112" + "$ref": "93" }, "Value": "application/json" } @@ -960,12 +820,12 @@ ], "Responses": [ { - "$id": "114", + "$id": "95", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -987,20 +847,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "115", + "$id": "96", "Name": "noContentType", "ResourceName": "CustomizedTypeSpec", "Description": "Return hi again", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "116", + "$id": "97", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "117", + "$id": "98", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1016,11 +876,11 @@ "Kind": "Method" }, { - "$id": "118", + "$id": "99", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "119", + "$id": "100", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1036,11 +896,11 @@ "Kind": "Method" }, { - "$id": "120", + "$id": "101", "Name": "action", "NameInRequest": "action", "Type": { - "$ref": "65" + "$ref": "51" }, "Location": "Body", "IsRequired": true, @@ -1053,11 +913,11 @@ "Kind": "Method" }, { - "$id": "121", + "$id": "102", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "122", + "$id": "103", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1072,19 +932,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "123", + "$id": "104", "Type": { - "$ref": "122" + "$ref": "103" }, "Value": "application/json" } }, { - "$id": "124", + "$id": "105", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "125", + "$id": "106", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1099,9 +959,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "126", + "$id": "107", "Type": { - "$ref": "125" + "$ref": "106" }, "Value": "application/json" } @@ -1109,12 +969,12 @@ ], "Responses": [ { - "$id": "127", + "$id": "108", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "65" + "$ref": "51" }, "BodyMediaType": "Json", "Headers": [], @@ -1136,20 +996,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "128", + "$id": "109", "Name": "helloDemo2", "ResourceName": "CustomizedTypeSpec", "Description": "Return hi in demo2", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "129", + "$id": "110", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "130", + "$id": "111", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1164,9 +1024,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "131", + "$id": "112", "Type": { - "$ref": "130" + "$ref": "111" }, "Value": "application/json" } @@ -1174,12 +1034,12 @@ ], "Responses": [ { - "$id": "132", + "$id": "113", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1198,20 +1058,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "133", + "$id": "114", "Name": "createLiteral", "ResourceName": "CustomizedTypeSpec", "Description": "Create with literal value", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "134", + "$id": "115", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "30" + "$ref": "16" }, "Location": "Body", "IsRequired": true, @@ -1224,11 +1084,11 @@ "Kind": "Method" }, { - "$id": "135", + "$id": "116", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "136", + "$id": "117", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1243,19 +1103,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "137", + "$id": "118", "Type": { - "$ref": "136" + "$ref": "117" }, "Value": "application/json" } }, { - "$id": "138", + "$id": "119", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "139", + "$id": "120", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1270,9 +1130,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "140", + "$id": "121", "Type": { - "$ref": "139" + "$ref": "120" }, "Value": "application/json" } @@ -1280,12 +1140,12 @@ ], "Responses": [ { - "$id": "141", + "$id": "122", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1307,24 +1167,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "142", + "$id": "123", "Name": "helloLiteral", "ResourceName": "CustomizedTypeSpec", "Description": "Send literal parameters", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "143", + "$id": "124", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "144", + "$id": "125", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "145", + "$id": "126", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1334,9 +1194,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "146", + "$id": "127", "Type": { - "$ref": "144" + "$ref": "125" }, "Value": "test" }, @@ -1350,15 +1210,15 @@ "Kind": "Constant" }, { - "$id": "147", + "$id": "128", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "148", + "$id": "129", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "149", + "$id": "130", "Kind": "Primitive", "Name": "Int32", "IsNullable": false @@ -1368,9 +1228,9 @@ }, "Location": "Path", "DefaultValue": { - "$id": "150", + "$id": "131", "Type": { - "$ref": "148" + "$ref": "129" }, "Value": 123 }, @@ -1384,15 +1244,15 @@ "Kind": "Constant" }, { - "$id": "151", + "$id": "132", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "152", + "$id": "133", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "153", + "$id": "134", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -1402,9 +1262,9 @@ }, "Location": "Query", "DefaultValue": { - "$id": "154", + "$id": "135", "Type": { - "$ref": "152" + "$ref": "133" }, "Value": true }, @@ -1418,11 +1278,11 @@ "Kind": "Constant" }, { - "$id": "155", + "$id": "136", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "156", + "$id": "137", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1437,9 +1297,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "157", + "$id": "138", "Type": { - "$ref": "156" + "$ref": "137" }, "Value": "application/json" } @@ -1447,12 +1307,12 @@ ], "Responses": [ { - "$id": "158", + "$id": "139", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1471,20 +1331,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "159", + "$id": "140", "Name": "topAction", "ResourceName": "CustomizedTypeSpec", "Description": "top level method", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "160", + "$id": "141", "Name": "action", "NameInRequest": "action", "Type": { - "$id": "161", + "$id": "142", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1500,11 +1360,11 @@ "Kind": "Method" }, { - "$id": "162", + "$id": "143", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "163", + "$id": "144", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1519,9 +1379,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "164", + "$id": "145", "Type": { - "$ref": "163" + "$ref": "144" }, "Value": "application/json" } @@ -1529,12 +1389,12 @@ ], "Responses": [ { - "$id": "165", + "$id": "146", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1553,20 +1413,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "166", + "$id": "147", "Name": "topAction2", "ResourceName": "CustomizedTypeSpec", "Description": "top level method2", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "167", + "$id": "148", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "168", + "$id": "149", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1581,9 +1441,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "169", + "$id": "150", "Type": { - "$ref": "168" + "$ref": "149" }, "Value": "application/json" } @@ -1591,12 +1451,12 @@ ], "Responses": [ { - "$id": "170", + "$id": "151", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1615,20 +1475,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "171", + "$id": "152", "Name": "patchAction", "ResourceName": "CustomizedTypeSpec", "Description": "top level patch", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "172", + "$id": "153", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "30" + "$ref": "16" }, "Location": "Body", "IsRequired": true, @@ -1641,11 +1501,11 @@ "Kind": "Method" }, { - "$id": "173", + "$id": "154", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "174", + "$id": "155", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1660,19 +1520,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "175", + "$id": "156", "Type": { - "$ref": "174" + "$ref": "155" }, "Value": "application/json" } }, { - "$id": "176", + "$id": "157", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "177", + "$id": "158", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1687,9 +1547,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "178", + "$id": "159", "Type": { - "$ref": "177" + "$ref": "158" }, "Value": "application/json" } @@ -1697,12 +1557,12 @@ ], "Responses": [ { - "$id": "179", + "$id": "160", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1724,21 +1584,21 @@ "GenerateConvenienceMethod": false }, { - "$id": "180", + "$id": "161", "Name": "anonymousBody", "ResourceName": "CustomizedTypeSpec", "Description": "body parameter without body decorator", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "181", + "$id": "162", "Name": "Thing", "NameInRequest": "Thing", "Description": "A model with a few properties of literal types", "Type": { - "$ref": "30" + "$ref": "16" }, "Location": "Body", "IsRequired": true, @@ -1751,11 +1611,11 @@ "Kind": "Method" }, { - "$id": "182", + "$id": "163", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "183", + "$id": "164", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1770,19 +1630,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "184", + "$id": "165", "Type": { - "$ref": "183" + "$ref": "164" }, "Value": "application/json" } }, { - "$id": "185", + "$id": "166", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "186", + "$id": "167", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1797,9 +1657,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "187", + "$id": "168", "Type": { - "$ref": "186" + "$ref": "167" }, "Value": "application/json" } @@ -1807,12 +1667,12 @@ ], "Responses": [ { - "$id": "188", + "$id": "169", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -1834,21 +1694,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "189", + "$id": "170", "Name": "friendlyModel", "ResourceName": "CustomizedTypeSpec", "Description": "Model can have its friendly name", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "190", + "$id": "171", "Name": "Friend", "NameInRequest": "NotFriend", "Description": "this is not a friendly model but with a friendly name", "Type": { - "$ref": "70" + "$ref": "56" }, "Location": "Body", "IsRequired": true, @@ -1861,11 +1721,11 @@ "Kind": "Method" }, { - "$id": "191", + "$id": "172", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "192", + "$id": "173", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1880,19 +1740,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "193", + "$id": "174", "Type": { - "$ref": "192" + "$ref": "173" }, "Value": "application/json" } }, { - "$id": "194", + "$id": "175", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "195", + "$id": "176", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1907,9 +1767,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "196", + "$id": "177", "Type": { - "$ref": "195" + "$ref": "176" }, "Value": "application/json" } @@ -1917,12 +1777,12 @@ ], "Responses": [ { - "$id": "197", + "$id": "178", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "70" + "$ref": "56" }, "BodyMediaType": "Json", "Headers": [], @@ -1944,19 +1804,19 @@ "GenerateConvenienceMethod": true }, { - "$id": "198", + "$id": "179", "Name": "addTimeHeader", "ResourceName": "CustomizedTypeSpec", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "199", + "$id": "180", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "200", + "$id": "181", "Kind": "Primitive", "Name": "DateTime", "IsNullable": false @@ -1972,11 +1832,11 @@ "Kind": "Method" }, { - "$id": "201", + "$id": "182", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "202", + "$id": "183", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1991,9 +1851,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "203", + "$id": "184", "Type": { - "$ref": "202" + "$ref": "183" }, "Value": "application/json" } @@ -2001,7 +1861,7 @@ ], "Responses": [ { - "$id": "204", + "$id": "185", "StatusCodes": [ 204 ], @@ -2019,20 +1879,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "205", + "$id": "186", "Name": "stringFormat", "ResourceName": "CustomizedTypeSpec", "Description": "parameter has string format.", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "206", + "$id": "187", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "207", + "$id": "188", "Kind": "Primitive", "Name": "Guid", "IsNullable": false @@ -2048,11 +1908,11 @@ "Kind": "Method" }, { - "$id": "208", + "$id": "189", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "73" + "$ref": "59" }, "Location": "Body", "IsRequired": true, @@ -2065,11 +1925,11 @@ "Kind": "Method" }, { - "$id": "209", + "$id": "190", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "210", + "$id": "191", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2084,19 +1944,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "211", + "$id": "192", "Type": { - "$ref": "210" + "$ref": "191" }, "Value": "application/json" } }, { - "$id": "212", + "$id": "193", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "213", + "$id": "194", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2111,9 +1971,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "214", + "$id": "195", "Type": { - "$ref": "213" + "$ref": "194" }, "Value": "application/json" } @@ -2121,7 +1981,7 @@ ], "Responses": [ { - "$id": "215", + "$id": "196", "StatusCodes": [ 204 ], @@ -2142,21 +2002,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "216", + "$id": "197", "Name": "projectedNameModel", "ResourceName": "CustomizedTypeSpec", "Description": "Model can have its projected name", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "217", + "$id": "198", "Name": "ProjectedModel", "NameInRequest": "ModelWithProjectedName", "Description": "this is a model with a projected name", "Type": { - "$ref": "78" + "$ref": "64" }, "Location": "Body", "IsRequired": true, @@ -2169,11 +2029,11 @@ "Kind": "Method" }, { - "$id": "218", + "$id": "199", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "219", + "$id": "200", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2188,19 +2048,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "220", + "$id": "201", "Type": { - "$ref": "219" + "$ref": "200" }, "Value": "application/json" } }, { - "$id": "221", + "$id": "202", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "222", + "$id": "203", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2215,9 +2075,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "223", + "$id": "204", "Type": { - "$ref": "222" + "$ref": "203" }, "Value": "application/json" } @@ -2225,12 +2085,12 @@ ], "Responses": [ { - "$id": "224", + "$id": "205", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "78" + "$ref": "64" }, "BodyMediaType": "Json", "Headers": [], @@ -2252,20 +2112,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "225", + "$id": "206", "Name": "returnsAnonymousModel", "ResourceName": "CustomizedTypeSpec", "Description": "return anonymous model", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "226", + "$id": "207", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "227", + "$id": "208", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2280,9 +2140,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "228", + "$id": "209", "Type": { - "$ref": "227" + "$ref": "208" }, "Value": "application/json" } @@ -2290,12 +2150,12 @@ ], "Responses": [ { - "$id": "229", + "$id": "210", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "81" + "$ref": "67" }, "BodyMediaType": "Json", "Headers": [], @@ -2314,20 +2174,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "230", + "$id": "211", "Name": "getUnknownValue", "ResourceName": "CustomizedTypeSpec", "Description": "get extensible enum", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "231", + "$id": "212", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "232", + "$id": "213", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2342,9 +2202,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "233", + "$id": "214", "Type": { - "$ref": "232" + "$ref": "213" }, "Value": "application/json" } @@ -2352,12 +2212,12 @@ ], "Responses": [ { - "$id": "234", + "$id": "215", "StatusCodes": [ 200 ], "BodyType": { - "$id": "235", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2379,20 +2239,20 @@ "GenerateConvenienceMethod": false }, { - "$id": "236", + "$id": "217", "Name": "internalProtocol", "ResourceName": "CustomizedTypeSpec", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "237", + "$id": "218", "Name": "body", "NameInRequest": "body", "Type": { - "$ref": "30" + "$ref": "16" }, "Location": "Body", "IsRequired": true, @@ -2405,11 +2265,11 @@ "Kind": "Method" }, { - "$id": "238", + "$id": "219", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "239", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2424,19 +2284,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "240", + "$id": "221", "Type": { - "$ref": "239" + "$ref": "220" }, "Value": "application/json" } }, { - "$id": "241", + "$id": "222", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "242", + "$id": "223", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2451,9 +2311,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "243", + "$id": "224", "Type": { - "$ref": "242" + "$ref": "223" }, "Value": "application/json" } @@ -2461,12 +2321,12 @@ ], "Responses": [ { - "$id": "244", + "$id": "225", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "30" + "$ref": "16" }, "BodyMediaType": "Json", "Headers": [], @@ -2488,20 +2348,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "245", + "$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": "89" + "$ref": "70" }, { - "$id": "246", + "$id": "227", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "247", + "$id": "228", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2516,9 +2376,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "248", + "$id": "229", "Type": { - "$ref": "247" + "$ref": "228" }, "Value": "application/json" } @@ -2526,7 +2386,7 @@ ], "Responses": [ { - "$id": "249", + "$id": "230", "StatusCodes": [ 204 ], @@ -2544,20 +2404,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "250", + "$id": "231", "Name": "headAsBoolean", "ResourceName": "CustomizedTypeSpec", "Description": "head as boolean.", "Parameters": [ { - "$ref": "89" + "$ref": "70" }, { - "$id": "251", + "$id": "232", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "252", + "$id": "233", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2573,11 +2433,11 @@ "Kind": "Method" }, { - "$id": "253", + "$id": "234", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "254", + "$id": "235", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2592,9 +2452,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "255", + "$id": "236", "Type": { - "$ref": "254" + "$ref": "235" }, "Value": "application/json" } @@ -2602,7 +2462,7 @@ ], "Responses": [ { - "$id": "256", + "$id": "237", "StatusCodes": [ 204 ], @@ -2621,15 +2481,15 @@ } ], "Protocol": { - "$id": "257" + "$id": "238" }, "Creatable": true } ], "Auth": { - "$id": "258", + "$id": "239", "ApiKey": { - "$id": "259", + "$id": "240", "Name": "my-api-key" } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessage.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessage.Serialization.cs index e3b18c01551..ee1f138e8d0 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessage.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessage.Serialization.cs @@ -22,7 +22,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteStartObject(); writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); + writer.WriteStringValue(Role.ToSerialString()); if (Content != null) { writer.WritePropertyName("content"u8); @@ -90,7 +90,7 @@ internal static ChatCompletionRequestMessage DeserializeChatCompletionRequestMes { if (property.NameEquals("role"u8)) { - role = new ChatCompletionRequestMessageRole(property.Value.GetString()); + role = property.Value.GetString().ToChatCompletionRequestMessageRole(); continue; } if (property.NameEquals("content"u8)) diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessageRole.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessageRole.Serialization.cs new file mode 100644 index 00000000000..32aa1299c06 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessageRole.Serialization.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class ChatCompletionRequestMessageRoleExtensions + { + public static string ToSerialString(this ChatCompletionRequestMessageRole value) => value switch + { + ChatCompletionRequestMessageRole.System => "system", + ChatCompletionRequestMessageRole.User => "user", + ChatCompletionRequestMessageRole.Assistant => "assistant", + ChatCompletionRequestMessageRole.Function => "function", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatCompletionRequestMessageRole value.") + }; + + public static ChatCompletionRequestMessageRole ToChatCompletionRequestMessageRole(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "system")) return ChatCompletionRequestMessageRole.System; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "user")) return ChatCompletionRequestMessageRole.User; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistant")) return ChatCompletionRequestMessageRole.Assistant; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "function")) return ChatCompletionRequestMessageRole.Function; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatCompletionRequestMessageRole value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessageRole.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessageRole.cs index 695c51a8318..219ef218d1e 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessageRole.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionRequestMessageRole.cs @@ -2,53 +2,18 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for role in ChatCompletionRequestMessage. - public readonly partial struct ChatCompletionRequestMessageRole : IEquatable + /// The ChatCompletionRequestMessageRole. + public enum ChatCompletionRequestMessageRole { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ChatCompletionRequestMessageRole(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SystemValue = "system"; - private const string UserValue = "user"; - private const string AssistantValue = "assistant"; - private const string FunctionValue = "function"; - /// system. - public static ChatCompletionRequestMessageRole System { get; } = new ChatCompletionRequestMessageRole(SystemValue); + System, /// user. - public static ChatCompletionRequestMessageRole User { get; } = new ChatCompletionRequestMessageRole(UserValue); + User, /// assistant. - public static ChatCompletionRequestMessageRole Assistant { get; } = new ChatCompletionRequestMessageRole(AssistantValue); + Assistant, /// function. - public static ChatCompletionRequestMessageRole Function { get; } = new ChatCompletionRequestMessageRole(FunctionValue); - /// Determines if two values are the same. - public static bool operator ==(ChatCompletionRequestMessageRole left, ChatCompletionRequestMessageRole right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ChatCompletionRequestMessageRole left, ChatCompletionRequestMessageRole right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ChatCompletionRequestMessageRole(string value) => new ChatCompletionRequestMessageRole(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ChatCompletionRequestMessageRole other && Equals(other); - /// - public bool Equals(ChatCompletionRequestMessageRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Function } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessage.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessage.Serialization.cs index 00a49c2d12d..311faf8cbde 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessage.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessage.Serialization.cs @@ -22,7 +22,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteStartObject(); writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); + writer.WriteStringValue(Role.ToSerialString()); if (Content != null) { writer.WritePropertyName("content"u8); @@ -84,7 +84,7 @@ internal static ChatCompletionResponseMessage DeserializeChatCompletionResponseM { if (property.NameEquals("role"u8)) { - role = new ChatCompletionResponseMessageRole(property.Value.GetString()); + role = property.Value.GetString().ToChatCompletionResponseMessageRole(); continue; } if (property.NameEquals("content"u8)) diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessageRole.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessageRole.Serialization.cs new file mode 100644 index 00000000000..ec612b2e867 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessageRole.Serialization.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class ChatCompletionResponseMessageRoleExtensions + { + public static string ToSerialString(this ChatCompletionResponseMessageRole value) => value switch + { + ChatCompletionResponseMessageRole.System => "system", + ChatCompletionResponseMessageRole.User => "user", + ChatCompletionResponseMessageRole.Assistant => "assistant", + ChatCompletionResponseMessageRole.Function => "function", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatCompletionResponseMessageRole value.") + }; + + public static ChatCompletionResponseMessageRole ToChatCompletionResponseMessageRole(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "system")) return ChatCompletionResponseMessageRole.System; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "user")) return ChatCompletionResponseMessageRole.User; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "assistant")) return ChatCompletionResponseMessageRole.Assistant; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "function")) return ChatCompletionResponseMessageRole.Function; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ChatCompletionResponseMessageRole value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessageRole.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessageRole.cs index 09010d3b0f6..f65d6ecfd78 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessageRole.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/ChatCompletionResponseMessageRole.cs @@ -2,53 +2,18 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for role in ChatCompletionResponseMessage. - public readonly partial struct ChatCompletionResponseMessageRole : IEquatable + /// The ChatCompletionResponseMessageRole. + public enum ChatCompletionResponseMessageRole { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ChatCompletionResponseMessageRole(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SystemValue = "system"; - private const string UserValue = "user"; - private const string AssistantValue = "assistant"; - private const string FunctionValue = "function"; - /// system. - public static ChatCompletionResponseMessageRole System { get; } = new ChatCompletionResponseMessageRole(SystemValue); + System, /// user. - public static ChatCompletionResponseMessageRole User { get; } = new ChatCompletionResponseMessageRole(UserValue); + User, /// assistant. - public static ChatCompletionResponseMessageRole Assistant { get; } = new ChatCompletionResponseMessageRole(AssistantValue); + Assistant, /// function. - public static ChatCompletionResponseMessageRole Function { get; } = new ChatCompletionResponseMessageRole(FunctionValue); - /// Determines if two values are the same. - public static bool operator ==(ChatCompletionResponseMessageRole left, ChatCompletionResponseMessageRole right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ChatCompletionResponseMessageRole left, ChatCompletionResponseMessageRole right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ChatCompletionResponseMessageRole(string value) => new ChatCompletionResponseMessageRole(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ChatCompletionResponseMessageRole other && Equals(other); - /// - public bool Equals(ChatCompletionResponseMessageRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Function } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoice.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoice.Serialization.cs index fbeaef72904..361bb6673cb 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoice.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoice.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("message"u8); writer.WriteObjectValue(Message, options); writer.WritePropertyName("finish_reason"u8); - writer.WriteStringValue(FinishReason.ToString()); + writer.WriteStringValue(FinishReason.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -84,7 +84,7 @@ internal static CreateChatCompletionResponseChoice DeserializeCreateChatCompleti } if (property.NameEquals("finish_reason"u8)) { - finishReason = new CreateChatCompletionResponseChoiceFinishReason(property.Value.GetString()); + finishReason = property.Value.GetString().ToCreateChatCompletionResponseChoiceFinishReason(); continue; } if (options.Format != "W") diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoiceFinishReason.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoiceFinishReason.Serialization.cs new file mode 100644 index 00000000000..55c2a293d3e --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoiceFinishReason.Serialization.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class CreateChatCompletionResponseChoiceFinishReasonExtensions + { + public static string ToSerialString(this CreateChatCompletionResponseChoiceFinishReason value) => value switch + { + CreateChatCompletionResponseChoiceFinishReason.Stop => "stop", + CreateChatCompletionResponseChoiceFinishReason.Length => "length", + CreateChatCompletionResponseChoiceFinishReason.FunctionCall => "function_call", + CreateChatCompletionResponseChoiceFinishReason.ContentFilter => "content_filter", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateChatCompletionResponseChoiceFinishReason value.") + }; + + public static CreateChatCompletionResponseChoiceFinishReason ToCreateChatCompletionResponseChoiceFinishReason(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "stop")) return CreateChatCompletionResponseChoiceFinishReason.Stop; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "length")) return CreateChatCompletionResponseChoiceFinishReason.Length; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "function_call")) return CreateChatCompletionResponseChoiceFinishReason.FunctionCall; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "content_filter")) return CreateChatCompletionResponseChoiceFinishReason.ContentFilter; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateChatCompletionResponseChoiceFinishReason value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoiceFinishReason.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoiceFinishReason.cs index 5c19adfb247..71b511f1c28 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoiceFinishReason.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateChatCompletionResponseChoiceFinishReason.cs @@ -2,53 +2,18 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for finish_reason in CreateChatCompletionResponseChoice. - public readonly partial struct CreateChatCompletionResponseChoiceFinishReason : IEquatable + /// The CreateChatCompletionResponseChoiceFinishReason. + public enum CreateChatCompletionResponseChoiceFinishReason { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateChatCompletionResponseChoiceFinishReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StopValue = "stop"; - private const string LengthValue = "length"; - private const string FunctionCallValue = "function_call"; - private const string ContentFilterValue = "content_filter"; - /// stop. - public static CreateChatCompletionResponseChoiceFinishReason Stop { get; } = new CreateChatCompletionResponseChoiceFinishReason(StopValue); + Stop, /// length. - public static CreateChatCompletionResponseChoiceFinishReason Length { get; } = new CreateChatCompletionResponseChoiceFinishReason(LengthValue); + Length, /// function_call. - public static CreateChatCompletionResponseChoiceFinishReason FunctionCall { get; } = new CreateChatCompletionResponseChoiceFinishReason(FunctionCallValue); + FunctionCall, /// content_filter. - public static CreateChatCompletionResponseChoiceFinishReason ContentFilter { get; } = new CreateChatCompletionResponseChoiceFinishReason(ContentFilterValue); - /// Determines if two values are the same. - public static bool operator ==(CreateChatCompletionResponseChoiceFinishReason left, CreateChatCompletionResponseChoiceFinishReason right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateChatCompletionResponseChoiceFinishReason left, CreateChatCompletionResponseChoiceFinishReason right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateChatCompletionResponseChoiceFinishReason(string value) => new CreateChatCompletionResponseChoiceFinishReason(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateChatCompletionResponseChoiceFinishReason other && Equals(other); - /// - public bool Equals(CreateChatCompletionResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + ContentFilter } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoice.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoice.Serialization.cs index f2c0d4aa225..3c6e55ba00f 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoice.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoice.Serialization.cs @@ -35,7 +35,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteNull("logprobs"); } writer.WritePropertyName("finish_reason"u8); - writer.WriteStringValue(FinishReason.ToString()); + writer.WriteStringValue(FinishReason.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -104,7 +104,7 @@ internal static CreateCompletionResponseChoice DeserializeCreateCompletionRespon } if (property.NameEquals("finish_reason"u8)) { - finishReason = new CreateCompletionResponseChoiceFinishReason(property.Value.GetString()); + finishReason = property.Value.GetString().ToCreateCompletionResponseChoiceFinishReason(); continue; } if (options.Format != "W") diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoiceFinishReason.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoiceFinishReason.Serialization.cs new file mode 100644 index 00000000000..6989f75197e --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoiceFinishReason.Serialization.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class CreateCompletionResponseChoiceFinishReasonExtensions + { + public static string ToSerialString(this CreateCompletionResponseChoiceFinishReason value) => value switch + { + CreateCompletionResponseChoiceFinishReason.Stop => "stop", + CreateCompletionResponseChoiceFinishReason.Length => "length", + CreateCompletionResponseChoiceFinishReason.ContentFilter => "content_filter", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateCompletionResponseChoiceFinishReason value.") + }; + + public static CreateCompletionResponseChoiceFinishReason ToCreateCompletionResponseChoiceFinishReason(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "stop")) return CreateCompletionResponseChoiceFinishReason.Stop; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "length")) return CreateCompletionResponseChoiceFinishReason.Length; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "content_filter")) return CreateCompletionResponseChoiceFinishReason.ContentFilter; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateCompletionResponseChoiceFinishReason value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoiceFinishReason.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoiceFinishReason.cs index 5071c4a7abf..d4032c2bdc0 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoiceFinishReason.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateCompletionResponseChoiceFinishReason.cs @@ -2,50 +2,16 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for finish_reason in CreateCompletionResponseChoice. - public readonly partial struct CreateCompletionResponseChoiceFinishReason : IEquatable + /// The CreateCompletionResponseChoiceFinishReason. + public enum CreateCompletionResponseChoiceFinishReason { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateCompletionResponseChoiceFinishReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StopValue = "stop"; - private const string LengthValue = "length"; - private const string ContentFilterValue = "content_filter"; - /// stop. - public static CreateCompletionResponseChoiceFinishReason Stop { get; } = new CreateCompletionResponseChoiceFinishReason(StopValue); + Stop, /// length. - public static CreateCompletionResponseChoiceFinishReason Length { get; } = new CreateCompletionResponseChoiceFinishReason(LengthValue); + Length, /// content_filter. - public static CreateCompletionResponseChoiceFinishReason ContentFilter { get; } = new CreateCompletionResponseChoiceFinishReason(ContentFilterValue); - /// Determines if two values are the same. - public static bool operator ==(CreateCompletionResponseChoiceFinishReason left, CreateCompletionResponseChoiceFinishReason right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateCompletionResponseChoiceFinishReason left, CreateCompletionResponseChoiceFinishReason right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateCompletionResponseChoiceFinishReason(string value) => new CreateCompletionResponseChoiceFinishReason(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateCompletionResponseChoiceFinishReason other && Equals(other); - /// - public bool Equals(CreateCompletionResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + ContentFilter } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoice.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoice.Serialization.cs index 0f8bdf1cb4a..2dc33d0f4bf 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoice.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoice.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("index"u8); writer.WriteNumberValue(Index); writer.WritePropertyName("finish_reason"u8); - writer.WriteStringValue(FinishReason.ToString()); + writer.WriteStringValue(FinishReason.ToSerialString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -84,7 +84,7 @@ internal static CreateEditResponseChoice DeserializeCreateEditResponseChoice(Jso } if (property.NameEquals("finish_reason"u8)) { - finishReason = new CreateEditResponseChoiceFinishReason(property.Value.GetString()); + finishReason = property.Value.GetString().ToCreateEditResponseChoiceFinishReason(); continue; } if (options.Format != "W") diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoiceFinishReason.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoiceFinishReason.Serialization.cs new file mode 100644 index 00000000000..7b72af33cff --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoiceFinishReason.Serialization.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class CreateEditResponseChoiceFinishReasonExtensions + { + public static string ToSerialString(this CreateEditResponseChoiceFinishReason value) => value switch + { + CreateEditResponseChoiceFinishReason.Stop => "stop", + CreateEditResponseChoiceFinishReason.Length => "length", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateEditResponseChoiceFinishReason value.") + }; + + public static CreateEditResponseChoiceFinishReason ToCreateEditResponseChoiceFinishReason(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "stop")) return CreateEditResponseChoiceFinishReason.Stop; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "length")) return CreateEditResponseChoiceFinishReason.Length; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateEditResponseChoiceFinishReason value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoiceFinishReason.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoiceFinishReason.cs index 6e6fc2439ad..b2ff51e3215 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoiceFinishReason.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateEditResponseChoiceFinishReason.cs @@ -2,47 +2,14 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for finish_reason in CreateEditResponseChoice. - public readonly partial struct CreateEditResponseChoiceFinishReason : IEquatable + /// The CreateEditResponseChoiceFinishReason. + public enum CreateEditResponseChoiceFinishReason { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateEditResponseChoiceFinishReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StopValue = "stop"; - private const string LengthValue = "length"; - /// stop. - public static CreateEditResponseChoiceFinishReason Stop { get; } = new CreateEditResponseChoiceFinishReason(StopValue); + Stop, /// length. - public static CreateEditResponseChoiceFinishReason Length { get; } = new CreateEditResponseChoiceFinishReason(LengthValue); - /// Determines if two values are the same. - public static bool operator ==(CreateEditResponseChoiceFinishReason left, CreateEditResponseChoiceFinishReason right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateEditResponseChoiceFinishReason left, CreateEditResponseChoiceFinishReason right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateEditResponseChoiceFinishReason(string value) => new CreateEditResponseChoiceFinishReason(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateEditResponseChoiceFinishReason other && Equals(other); - /// - public bool Equals(CreateEditResponseChoiceFinishReason other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Length } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequest.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequest.Serialization.cs index f2fbf76a316..7d5c1cc1eb3 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequest.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequest.Serialization.cs @@ -59,13 +59,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } if (Optional.IsDefined(Size)) { - writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size.Value.ToString()); + if (Size != null) + { + writer.WritePropertyName("size"u8); + writer.WriteStringValue(Size.Value.ToSerialString()); + } + else + { + writer.WriteNull("size"); + } } if (Optional.IsDefined(ResponseFormat)) { - writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); + } + else + { + writer.WriteNull("response_format"); + } } if (Optional.IsDefined(User)) { @@ -114,8 +128,8 @@ internal static CreateImageEditRequest DeserializeCreateImageEditRequest(JsonEle Stream image = default; Stream mask = default; long? n = default; - CreateImageEditRequestSize? size = default; - CreateImageEditRequestResponseFormat? responseFormat = default; + CreateImageRequestSize? size = default; + CreateImageRequestResponseFormat? responseFormat = default; string user = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -154,18 +168,20 @@ internal static CreateImageEditRequest DeserializeCreateImageEditRequest(JsonEle { if (property.Value.ValueKind == JsonValueKind.Null) { + size = null; continue; } - size = new CreateImageEditRequestSize(property.Value.GetString()); + size = property.Value.GetString().ToCreateImageRequestSize(); continue; } if (property.NameEquals("response_format"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = new CreateImageEditRequestResponseFormat(property.Value.GetString()); + responseFormat = property.Value.GetString().ToCreateImageRequestResponseFormat(); continue; } if (property.NameEquals("user"u8)) @@ -223,11 +239,17 @@ internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() } if (Optional.IsDefined(Size)) { - content.Add(Size.Value.ToString(), "size"); + if (Size != null) + { + content.Add(Size.Value.ToSerialString(), "size"); + } } if (Optional.IsDefined(ResponseFormat)) { - content.Add(ResponseFormat.Value.ToString(), "response_format"); + if (ResponseFormat != null) + { + content.Add(ResponseFormat.Value.ToSerialString(), "response_format"); + } } if (Optional.IsDefined(User)) { diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequest.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequest.cs index 7547ab2fd83..f09fb76f134 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequest.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequest.cs @@ -75,7 +75,7 @@ public CreateImageEditRequest(string prompt, Stream image) /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. /// /// Keeps track of any properties unknown to the library. - internal CreateImageEditRequest(string prompt, Stream image, Stream mask, long? n, CreateImageEditRequestSize? size, CreateImageEditRequestResponseFormat? responseFormat, string user, IDictionary serializedAdditionalRawData) + internal CreateImageEditRequest(string prompt, Stream image, Stream mask, long? n, CreateImageRequestSize? size, CreateImageRequestResponseFormat? responseFormat, string user, IDictionary serializedAdditionalRawData) { Prompt = prompt; Image = image; @@ -108,9 +108,9 @@ internal CreateImageEditRequest() /// The number of images to generate. Must be between 1 and 10. public long? N { get; set; } /// The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. - public CreateImageEditRequestSize? Size { get; set; } + public CreateImageRequestSize? Size { get; set; } /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. - public CreateImageEditRequestResponseFormat? ResponseFormat { get; set; } + public CreateImageRequestResponseFormat? ResponseFormat { get; set; } /// Gets or sets the user. public string User { get; set; } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequestResponseFormat.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequestResponseFormat.cs deleted file mode 100644 index 2dfc966443e..00000000000 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequestResponseFormat.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.Models -{ - /// Enum for response_format in CreateImageEditRequest. - public readonly partial struct CreateImageEditRequestResponseFormat : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateImageEditRequestResponseFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UrlValue = "url"; - private const string B64JsonValue = "b64_json"; - - /// url. - public static CreateImageEditRequestResponseFormat Url { get; } = new CreateImageEditRequestResponseFormat(UrlValue); - /// b64_json. - public static CreateImageEditRequestResponseFormat B64Json { get; } = new CreateImageEditRequestResponseFormat(B64JsonValue); - /// Determines if two values are the same. - public static bool operator ==(CreateImageEditRequestResponseFormat left, CreateImageEditRequestResponseFormat right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateImageEditRequestResponseFormat left, CreateImageEditRequestResponseFormat right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateImageEditRequestResponseFormat(string value) => new CreateImageEditRequestResponseFormat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateImageEditRequestResponseFormat other && Equals(other); - /// - public bool Equals(CreateImageEditRequestResponseFormat 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/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequestSize.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequestSize.cs deleted file mode 100644 index 01c9a4c453b..00000000000 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageEditRequestSize.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.Models -{ - /// Enum for size in CreateImageEditRequest. - public readonly partial struct CreateImageEditRequestSize : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateImageEditRequestSize(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string _256x256Value = "256x256"; - private const string _512x512Value = "512x512"; - private const string _1024x1024Value = "1024x1024"; - - /// 256x256. - public static CreateImageEditRequestSize _256x256 { get; } = new CreateImageEditRequestSize(_256x256Value); - /// 512x512. - public static CreateImageEditRequestSize _512x512 { get; } = new CreateImageEditRequestSize(_512x512Value); - /// 1024x1024. - public static CreateImageEditRequestSize _1024x1024 { get; } = new CreateImageEditRequestSize(_1024x1024Value); - /// Determines if two values are the same. - public static bool operator ==(CreateImageEditRequestSize left, CreateImageEditRequestSize right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateImageEditRequestSize left, CreateImageEditRequestSize right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateImageEditRequestSize(string value) => new CreateImageEditRequestSize(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateImageEditRequestSize other && Equals(other); - /// - public bool Equals(CreateImageEditRequestSize 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/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequest.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequest.Serialization.cs index 8ea35b2e6c6..5e00135e0b5 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequest.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequest.Serialization.cs @@ -37,13 +37,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } if (Optional.IsDefined(Size)) { - writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size.Value.ToString()); + if (Size != null) + { + writer.WritePropertyName("size"u8); + writer.WriteStringValue(Size.Value.ToSerialString()); + } + else + { + writer.WriteNull("size"); + } } if (Optional.IsDefined(ResponseFormat)) { - writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); + } + else + { + writer.WriteNull("response_format"); + } } if (Optional.IsDefined(User)) { @@ -116,18 +130,20 @@ internal static CreateImageRequest DeserializeCreateImageRequest(JsonElement ele { if (property.Value.ValueKind == JsonValueKind.Null) { + size = null; continue; } - size = new CreateImageRequestSize(property.Value.GetString()); + size = property.Value.GetString().ToCreateImageRequestSize(); continue; } if (property.NameEquals("response_format"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = new CreateImageRequestResponseFormat(property.Value.GetString()); + responseFormat = property.Value.GetString().ToCreateImageRequestResponseFormat(); continue; } if (property.NameEquals("user"u8)) diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestResponseFormat.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestResponseFormat.Serialization.cs new file mode 100644 index 00000000000..e7a74c58fa0 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestResponseFormat.Serialization.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class CreateImageRequestResponseFormatExtensions + { + public static string ToSerialString(this CreateImageRequestResponseFormat value) => value switch + { + CreateImageRequestResponseFormat.Url => "url", + CreateImageRequestResponseFormat.B64Json => "b64_json", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateImageRequestResponseFormat value.") + }; + + public static CreateImageRequestResponseFormat ToCreateImageRequestResponseFormat(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "url")) return CreateImageRequestResponseFormat.Url; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "b64_json")) return CreateImageRequestResponseFormat.B64Json; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateImageRequestResponseFormat value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestResponseFormat.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestResponseFormat.cs index 5990ab31583..a63c40e296a 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestResponseFormat.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestResponseFormat.cs @@ -2,47 +2,14 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for response_format in CreateImageRequest. - public readonly partial struct CreateImageRequestResponseFormat : IEquatable + /// The CreateImageRequestResponseFormat. + public enum CreateImageRequestResponseFormat { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateImageRequestResponseFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UrlValue = "url"; - private const string B64JsonValue = "b64_json"; - /// url. - public static CreateImageRequestResponseFormat Url { get; } = new CreateImageRequestResponseFormat(UrlValue); + Url, /// b64_json. - public static CreateImageRequestResponseFormat B64Json { get; } = new CreateImageRequestResponseFormat(B64JsonValue); - /// Determines if two values are the same. - public static bool operator ==(CreateImageRequestResponseFormat left, CreateImageRequestResponseFormat right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateImageRequestResponseFormat left, CreateImageRequestResponseFormat right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateImageRequestResponseFormat(string value) => new CreateImageRequestResponseFormat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateImageRequestResponseFormat other && Equals(other); - /// - public bool Equals(CreateImageRequestResponseFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + B64Json } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestSize.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestSize.Serialization.cs new file mode 100644 index 00000000000..c03de471fa8 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestSize.Serialization.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class CreateImageRequestSizeExtensions + { + public static string ToSerialString(this CreateImageRequestSize value) => value switch + { + CreateImageRequestSize._256x256 => "256x256", + CreateImageRequestSize._512x512 => "512x512", + CreateImageRequestSize._1024x1024 => "1024x1024", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateImageRequestSize value.") + }; + + public static CreateImageRequestSize ToCreateImageRequestSize(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "256x256")) return CreateImageRequestSize._256x256; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "512x512")) return CreateImageRequestSize._512x512; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "1024x1024")) return CreateImageRequestSize._1024x1024; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateImageRequestSize value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestSize.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestSize.cs index 0cbcf89479d..18851287bff 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestSize.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageRequestSize.cs @@ -2,50 +2,16 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for size in CreateImageRequest. - public readonly partial struct CreateImageRequestSize : IEquatable + /// The CreateImageRequestSize. + public enum CreateImageRequestSize { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateImageRequestSize(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string _256x256Value = "256x256"; - private const string _512x512Value = "512x512"; - private const string _1024x1024Value = "1024x1024"; - /// 256x256. - public static CreateImageRequestSize _256x256 { get; } = new CreateImageRequestSize(_256x256Value); + _256x256, /// 512x512. - public static CreateImageRequestSize _512x512 { get; } = new CreateImageRequestSize(_512x512Value); + _512x512, /// 1024x1024. - public static CreateImageRequestSize _1024x1024 { get; } = new CreateImageRequestSize(_1024x1024Value); - /// Determines if two values are the same. - public static bool operator ==(CreateImageRequestSize left, CreateImageRequestSize right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateImageRequestSize left, CreateImageRequestSize right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateImageRequestSize(string value) => new CreateImageRequestSize(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateImageRequestSize other && Equals(other); - /// - public bool Equals(CreateImageRequestSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + _1024x1024 } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequest.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequest.Serialization.cs index fcd8e88422d..67ec49d031d 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequest.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequest.Serialization.cs @@ -45,13 +45,27 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } if (Optional.IsDefined(Size)) { - writer.WritePropertyName("size"u8); - writer.WriteStringValue(Size.Value.ToString()); + if (Size != null) + { + writer.WritePropertyName("size"u8); + writer.WriteStringValue(Size.Value.ToSerialString()); + } + else + { + writer.WriteNull("size"); + } } if (Optional.IsDefined(ResponseFormat)) { - writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); + if (ResponseFormat != null) + { + writer.WritePropertyName("response_format"u8); + writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); + } + else + { + writer.WriteNull("response_format"); + } } if (Optional.IsDefined(User)) { @@ -98,8 +112,8 @@ internal static CreateImageVariationRequest DeserializeCreateImageVariationReque } Stream image = default; long? n = default; - CreateImageVariationRequestSize? size = default; - CreateImageVariationRequestResponseFormat? responseFormat = default; + CreateImageRequestSize? size = default; + CreateImageRequestResponseFormat? responseFormat = default; string user = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -124,18 +138,20 @@ internal static CreateImageVariationRequest DeserializeCreateImageVariationReque { if (property.Value.ValueKind == JsonValueKind.Null) { + size = null; continue; } - size = new CreateImageVariationRequestSize(property.Value.GetString()); + size = property.Value.GetString().ToCreateImageRequestSize(); continue; } if (property.NameEquals("response_format"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + responseFormat = null; continue; } - responseFormat = new CreateImageVariationRequestResponseFormat(property.Value.GetString()); + responseFormat = property.Value.GetString().ToCreateImageRequestResponseFormat(); continue; } if (property.NameEquals("user"u8)) @@ -186,11 +202,17 @@ internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() } if (Optional.IsDefined(Size)) { - content.Add(Size.Value.ToString(), "size"); + if (Size != null) + { + content.Add(Size.Value.ToSerialString(), "size"); + } } if (Optional.IsDefined(ResponseFormat)) { - content.Add(ResponseFormat.Value.ToString(), "response_format"); + if (ResponseFormat != null) + { + content.Add(ResponseFormat.Value.ToSerialString(), "response_format"); + } } if (Optional.IsDefined(User)) { diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequest.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequest.cs index 5cc25055b7f..f0879ad9733 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequest.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequest.cs @@ -66,7 +66,7 @@ public CreateImageVariationRequest(Stream image) /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. /// /// Keeps track of any properties unknown to the library. - internal CreateImageVariationRequest(Stream image, long? n, CreateImageVariationRequestSize? size, CreateImageVariationRequestResponseFormat? responseFormat, string user, IDictionary serializedAdditionalRawData) + internal CreateImageVariationRequest(Stream image, long? n, CreateImageRequestSize? size, CreateImageRequestResponseFormat? responseFormat, string user, IDictionary serializedAdditionalRawData) { Image = image; N = n; @@ -89,9 +89,9 @@ internal CreateImageVariationRequest() /// The number of images to generate. Must be between 1 and 10. public long? N { get; set; } /// The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. - public CreateImageVariationRequestSize? Size { get; set; } + public CreateImageRequestSize? Size { get; set; } /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. - public CreateImageVariationRequestResponseFormat? ResponseFormat { get; set; } + public CreateImageRequestResponseFormat? ResponseFormat { get; set; } /// Gets or sets the user. public string User { get; set; } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequestResponseFormat.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequestResponseFormat.cs deleted file mode 100644 index 2c384bb1f04..00000000000 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequestResponseFormat.cs +++ /dev/null @@ -1,48 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.Models -{ - /// Enum for response_format in CreateImageVariationRequest. - public readonly partial struct CreateImageVariationRequestResponseFormat : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateImageVariationRequestResponseFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UrlValue = "url"; - private const string B64JsonValue = "b64_json"; - - /// url. - public static CreateImageVariationRequestResponseFormat Url { get; } = new CreateImageVariationRequestResponseFormat(UrlValue); - /// b64_json. - public static CreateImageVariationRequestResponseFormat B64Json { get; } = new CreateImageVariationRequestResponseFormat(B64JsonValue); - /// Determines if two values are the same. - public static bool operator ==(CreateImageVariationRequestResponseFormat left, CreateImageVariationRequestResponseFormat right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateImageVariationRequestResponseFormat left, CreateImageVariationRequestResponseFormat right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateImageVariationRequestResponseFormat(string value) => new CreateImageVariationRequestResponseFormat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateImageVariationRequestResponseFormat other && Equals(other); - /// - public bool Equals(CreateImageVariationRequestResponseFormat 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/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequestSize.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequestSize.cs deleted file mode 100644 index 50f61d60c21..00000000000 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateImageVariationRequestSize.cs +++ /dev/null @@ -1,51 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace OpenAI.Models -{ - /// Enum for size in CreateImageVariationRequest. - public readonly partial struct CreateImageVariationRequestSize : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateImageVariationRequestSize(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string _256x256Value = "256x256"; - private const string _512x512Value = "512x512"; - private const string _1024x1024Value = "1024x1024"; - - /// 256x256. - public static CreateImageVariationRequestSize _256x256 { get; } = new CreateImageVariationRequestSize(_256x256Value); - /// 512x512. - public static CreateImageVariationRequestSize _512x512 { get; } = new CreateImageVariationRequestSize(_512x512Value); - /// 1024x1024. - public static CreateImageVariationRequestSize _1024x1024 { get; } = new CreateImageVariationRequestSize(_1024x1024Value); - /// Determines if two values are the same. - public static bool operator ==(CreateImageVariationRequestSize left, CreateImageVariationRequestSize right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateImageVariationRequestSize left, CreateImageVariationRequestSize right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateImageVariationRequestSize(string value) => new CreateImageVariationRequestSize(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateImageVariationRequestSize other && Equals(other); - /// - public bool Equals(CreateImageVariationRequestSize 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/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequest.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequest.Serialization.cs index 9787ca06fb0..8c452148e4b 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequest.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequest.Serialization.cs @@ -41,7 +41,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); + writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); } if (Optional.IsDefined(Temperature)) { @@ -122,7 +122,7 @@ internal static CreateTranscriptionRequest DeserializeCreateTranscriptionRequest { continue; } - responseFormat = new CreateTranscriptionRequestResponseFormat(property.Value.GetString()); + responseFormat = property.Value.GetString().ToCreateTranscriptionRequestResponseFormat(); continue; } if (property.NameEquals("temperature"u8)) @@ -181,7 +181,7 @@ internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() } if (Optional.IsDefined(ResponseFormat)) { - content.Add(ResponseFormat.Value.ToString(), "response_format"); + content.Add(ResponseFormat.Value.ToSerialString(), "response_format"); } if (Optional.IsDefined(Temperature)) { diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequestResponseFormat.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequestResponseFormat.Serialization.cs new file mode 100644 index 00000000000..311f9aaa07f --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequestResponseFormat.Serialization.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class CreateTranscriptionRequestResponseFormatExtensions + { + public static string ToSerialString(this CreateTranscriptionRequestResponseFormat value) => value switch + { + CreateTranscriptionRequestResponseFormat.Json => "json", + CreateTranscriptionRequestResponseFormat.Text => "text", + CreateTranscriptionRequestResponseFormat.Srt => "srt", + CreateTranscriptionRequestResponseFormat.VerboseJson => "verbose_json", + CreateTranscriptionRequestResponseFormat.Vtt => "vtt", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateTranscriptionRequestResponseFormat value.") + }; + + public static CreateTranscriptionRequestResponseFormat ToCreateTranscriptionRequestResponseFormat(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "json")) return CreateTranscriptionRequestResponseFormat.Json; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "text")) return CreateTranscriptionRequestResponseFormat.Text; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "srt")) return CreateTranscriptionRequestResponseFormat.Srt; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "verbose_json")) return CreateTranscriptionRequestResponseFormat.VerboseJson; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "vtt")) return CreateTranscriptionRequestResponseFormat.Vtt; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateTranscriptionRequestResponseFormat value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequestResponseFormat.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequestResponseFormat.cs index 354321879c8..b87f345eaf7 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequestResponseFormat.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranscriptionRequestResponseFormat.cs @@ -2,56 +2,20 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for response_format in CreateTranscriptionRequest. - public readonly partial struct CreateTranscriptionRequestResponseFormat : IEquatable + /// The CreateTranscriptionRequestResponseFormat. + public enum CreateTranscriptionRequestResponseFormat { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateTranscriptionRequestResponseFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string JsonValue = "json"; - private const string TextValue = "text"; - private const string SrtValue = "srt"; - private const string VerboseJsonValue = "verbose_json"; - private const string VttValue = "vtt"; - /// json. - public static CreateTranscriptionRequestResponseFormat Json { get; } = new CreateTranscriptionRequestResponseFormat(JsonValue); + Json, /// text. - public static CreateTranscriptionRequestResponseFormat Text { get; } = new CreateTranscriptionRequestResponseFormat(TextValue); + Text, /// srt. - public static CreateTranscriptionRequestResponseFormat Srt { get; } = new CreateTranscriptionRequestResponseFormat(SrtValue); + Srt, /// verbose_json. - public static CreateTranscriptionRequestResponseFormat VerboseJson { get; } = new CreateTranscriptionRequestResponseFormat(VerboseJsonValue); + VerboseJson, /// vtt. - public static CreateTranscriptionRequestResponseFormat Vtt { get; } = new CreateTranscriptionRequestResponseFormat(VttValue); - /// Determines if two values are the same. - public static bool operator ==(CreateTranscriptionRequestResponseFormat left, CreateTranscriptionRequestResponseFormat right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateTranscriptionRequestResponseFormat left, CreateTranscriptionRequestResponseFormat right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateTranscriptionRequestResponseFormat(string value) => new CreateTranscriptionRequestResponseFormat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateTranscriptionRequestResponseFormat other && Equals(other); - /// - public bool Equals(CreateTranscriptionRequestResponseFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Vtt } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequest.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequest.Serialization.cs index 5c52f98d49a..8ae2e7be2a9 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequest.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequest.Serialization.cs @@ -41,7 +41,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead if (Optional.IsDefined(ResponseFormat)) { writer.WritePropertyName("response_format"u8); - writer.WriteStringValue(ResponseFormat.Value.ToString()); + writer.WriteStringValue(ResponseFormat.Value.ToSerialString()); } if (Optional.IsDefined(Temperature)) { @@ -116,7 +116,7 @@ internal static CreateTranslationRequest DeserializeCreateTranslationRequest(Jso { continue; } - responseFormat = new CreateTranslationRequestResponseFormat(property.Value.GetString()); + responseFormat = property.Value.GetString().ToCreateTranslationRequestResponseFormat(); continue; } if (property.NameEquals("temperature"u8)) @@ -169,7 +169,7 @@ internal virtual MultipartFormDataBinaryContent ToMultipartBinaryBody() } if (Optional.IsDefined(ResponseFormat)) { - content.Add(ResponseFormat.Value.ToString(), "response_format"); + content.Add(ResponseFormat.Value.ToSerialString(), "response_format"); } if (Optional.IsDefined(Temperature)) { diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequestResponseFormat.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequestResponseFormat.Serialization.cs new file mode 100644 index 00000000000..49ffa7688b2 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequestResponseFormat.Serialization.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class CreateTranslationRequestResponseFormatExtensions + { + public static string ToSerialString(this CreateTranslationRequestResponseFormat value) => value switch + { + CreateTranslationRequestResponseFormat.Json => "json", + CreateTranslationRequestResponseFormat.Text => "text", + CreateTranslationRequestResponseFormat.Srt => "srt", + CreateTranslationRequestResponseFormat.VerboseJson => "verbose_json", + CreateTranslationRequestResponseFormat.Vtt => "vtt", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateTranslationRequestResponseFormat value.") + }; + + public static CreateTranslationRequestResponseFormat ToCreateTranslationRequestResponseFormat(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "json")) return CreateTranslationRequestResponseFormat.Json; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "text")) return CreateTranslationRequestResponseFormat.Text; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "srt")) return CreateTranslationRequestResponseFormat.Srt; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "verbose_json")) return CreateTranslationRequestResponseFormat.VerboseJson; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "vtt")) return CreateTranslationRequestResponseFormat.Vtt; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CreateTranslationRequestResponseFormat value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequestResponseFormat.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequestResponseFormat.cs index b24279e3cdf..8af38dc41e1 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequestResponseFormat.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/CreateTranslationRequestResponseFormat.cs @@ -2,56 +2,20 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for response_format in CreateTranslationRequest. - public readonly partial struct CreateTranslationRequestResponseFormat : IEquatable + /// The CreateTranslationRequestResponseFormat. + public enum CreateTranslationRequestResponseFormat { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public CreateTranslationRequestResponseFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string JsonValue = "json"; - private const string TextValue = "text"; - private const string SrtValue = "srt"; - private const string VerboseJsonValue = "verbose_json"; - private const string VttValue = "vtt"; - /// json. - public static CreateTranslationRequestResponseFormat Json { get; } = new CreateTranslationRequestResponseFormat(JsonValue); + Json, /// text. - public static CreateTranslationRequestResponseFormat Text { get; } = new CreateTranslationRequestResponseFormat(TextValue); + Text, /// srt. - public static CreateTranslationRequestResponseFormat Srt { get; } = new CreateTranslationRequestResponseFormat(SrtValue); + Srt, /// verbose_json. - public static CreateTranslationRequestResponseFormat VerboseJson { get; } = new CreateTranslationRequestResponseFormat(VerboseJsonValue); + VerboseJson, /// vtt. - public static CreateTranslationRequestResponseFormat Vtt { get; } = new CreateTranslationRequestResponseFormat(VttValue); - /// Determines if two values are the same. - public static bool operator ==(CreateTranslationRequestResponseFormat left, CreateTranslationRequestResponseFormat right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(CreateTranslationRequestResponseFormat left, CreateTranslationRequestResponseFormat right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator CreateTranslationRequestResponseFormat(string value) => new CreateTranslationRequestResponseFormat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is CreateTranslationRequestResponseFormat other && Equals(other); - /// - public bool Equals(CreateTranslationRequestResponseFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Vtt } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTune.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTune.Serialization.cs index 9b53f4dd24a..cfa4c5d14a8 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTune.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTune.Serialization.cs @@ -43,7 +43,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("organization_id"u8); writer.WriteStringValue(OrganizationId); writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WriteStringValue(Status.ToSerialString()); writer.WritePropertyName("hyperparams"u8); writer.WriteObjectValue(Hyperparams, options); writer.WritePropertyName("training_files"u8); @@ -174,7 +174,7 @@ internal static FineTune DeserializeFineTune(JsonElement element, ModelReaderWri } if (property.NameEquals("status"u8)) { - status = new FineTuneStatus(property.Value.GetString()); + status = property.Value.GetString().ToFineTuneStatus(); continue; } if (property.NameEquals("hyperparams"u8)) diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuneStatus.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuneStatus.Serialization.cs new file mode 100644 index 00000000000..40d2893c9e1 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuneStatus.Serialization.cs @@ -0,0 +1,31 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class FineTuneStatusExtensions + { + public static string ToSerialString(this FineTuneStatus value) => value switch + { + FineTuneStatus.Created => "created", + FineTuneStatus.Running => "running", + FineTuneStatus.Succeeded => "succeeded", + FineTuneStatus.Failed => "failed", + FineTuneStatus.Cancelled => "cancelled", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FineTuneStatus value.") + }; + + public static FineTuneStatus ToFineTuneStatus(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "created")) return FineTuneStatus.Created; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "running")) return FineTuneStatus.Running; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "succeeded")) return FineTuneStatus.Succeeded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "failed")) return FineTuneStatus.Failed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "cancelled")) return FineTuneStatus.Cancelled; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FineTuneStatus value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuneStatus.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuneStatus.cs index 00121f09104..5484d8bc399 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuneStatus.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuneStatus.cs @@ -2,56 +2,20 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for status in FineTune. - public readonly partial struct FineTuneStatus : IEquatable + /// The FineTuneStatus. + public enum FineTuneStatus { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FineTuneStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatedValue = "created"; - private const string RunningValue = "running"; - private const string SucceededValue = "succeeded"; - private const string FailedValue = "failed"; - private const string CancelledValue = "cancelled"; - /// created. - public static FineTuneStatus Created { get; } = new FineTuneStatus(CreatedValue); + Created, /// running. - public static FineTuneStatus Running { get; } = new FineTuneStatus(RunningValue); + Running, /// succeeded. - public static FineTuneStatus Succeeded { get; } = new FineTuneStatus(SucceededValue); + Succeeded, /// failed. - public static FineTuneStatus Failed { get; } = new FineTuneStatus(FailedValue); + Failed, /// cancelled. - public static FineTuneStatus Cancelled { get; } = new FineTuneStatus(CancelledValue); - /// Determines if two values are the same. - public static bool operator ==(FineTuneStatus left, FineTuneStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FineTuneStatus left, FineTuneStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FineTuneStatus(string value) => new FineTuneStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FineTuneStatus other && Equals(other); - /// - public bool Equals(FineTuneStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Cancelled } } 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 dfd8af5fc2c..724b13ceb2a 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,7 +30,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt if (FinishedAt != null) { writer.WritePropertyName("finished_at"u8); - writer.WriteStringValue(FinishedAt.Value, "O"); + writer.WriteNumberValue(FinishedAt.Value, "U"); } else { @@ -50,7 +50,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WritePropertyName("organization_id"u8); writer.WriteStringValue(OrganizationId); writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WriteStringValue(Status.ToSerialString()); writer.WritePropertyName("hyperparameters"u8); writer.WriteObjectValue(Hyperparameters, options); writer.WritePropertyName("training_file"u8); @@ -167,7 +167,7 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode finishedAt = null; continue; } - finishedAt = property.Value.GetDateTimeOffset("O"); + finishedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("model"u8)) @@ -192,7 +192,7 @@ internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, Mode } if (property.NameEquals("status"u8)) { - status = new FineTuningJobStatus(property.Value.GetString()); + status = property.Value.GetString().ToFineTuningJobStatus(); continue; } if (property.NameEquals("hyperparameters"u8)) diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEvent.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEvent.Serialization.cs index 29c9790a5af..b96cd6d5906 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEvent.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEvent.Serialization.cs @@ -28,7 +28,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("level"u8); - writer.WriteStringValue(Level.ToString()); + writer.WriteStringValue(Level.ToSerialString()); writer.WritePropertyName("message"u8); writer.WriteStringValue(Message); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -95,7 +95,7 @@ internal static FineTuningJobEvent DeserializeFineTuningJobEvent(JsonElement ele } if (property.NameEquals("level"u8)) { - level = new FineTuningJobEventLevel(property.Value.GetString()); + level = property.Value.GetString().ToFineTuningJobEventLevel(); continue; } if (property.NameEquals("message"u8)) diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEventLevel.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEventLevel.Serialization.cs new file mode 100644 index 00000000000..a70effb992c --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEventLevel.Serialization.cs @@ -0,0 +1,27 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class FineTuningJobEventLevelExtensions + { + public static string ToSerialString(this FineTuningJobEventLevel value) => value switch + { + FineTuningJobEventLevel.Info => "info", + FineTuningJobEventLevel.Warn => "warn", + FineTuningJobEventLevel.Error => "error", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FineTuningJobEventLevel value.") + }; + + public static FineTuningJobEventLevel ToFineTuningJobEventLevel(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "info")) return FineTuningJobEventLevel.Info; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "warn")) return FineTuningJobEventLevel.Warn; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) return FineTuningJobEventLevel.Error; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FineTuningJobEventLevel value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEventLevel.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEventLevel.cs index 7ac7da4c55d..49b0270e0dc 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEventLevel.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobEventLevel.cs @@ -2,50 +2,16 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for level in FineTuningJobEvent. - public readonly partial struct FineTuningJobEventLevel : IEquatable + /// The FineTuningJobEventLevel. + public enum FineTuningJobEventLevel { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FineTuningJobEventLevel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InfoValue = "info"; - private const string WarnValue = "warn"; - private const string ErrorValue = "error"; - /// info. - public static FineTuningJobEventLevel Info { get; } = new FineTuningJobEventLevel(InfoValue); + Info, /// warn. - public static FineTuningJobEventLevel Warn { get; } = new FineTuningJobEventLevel(WarnValue); + Warn, /// error. - public static FineTuningJobEventLevel Error { get; } = new FineTuningJobEventLevel(ErrorValue); - /// Determines if two values are the same. - public static bool operator ==(FineTuningJobEventLevel left, FineTuningJobEventLevel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FineTuningJobEventLevel left, FineTuningJobEventLevel right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FineTuningJobEventLevel(string value) => new FineTuningJobEventLevel(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FineTuningJobEventLevel other && Equals(other); - /// - public bool Equals(FineTuningJobEventLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Error } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobStatus.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobStatus.Serialization.cs new file mode 100644 index 00000000000..00afbc7d2cb --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobStatus.Serialization.cs @@ -0,0 +1,33 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class FineTuningJobStatusExtensions + { + public static string ToSerialString(this FineTuningJobStatus value) => value switch + { + FineTuningJobStatus.Created => "created", + FineTuningJobStatus.Pending => "pending", + FineTuningJobStatus.Running => "running", + FineTuningJobStatus.Succeeded => "succeeded", + FineTuningJobStatus.Failed => "failed", + FineTuningJobStatus.Cancelled => "cancelled", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FineTuningJobStatus value.") + }; + + public static FineTuningJobStatus ToFineTuningJobStatus(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "created")) return FineTuningJobStatus.Created; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "pending")) return FineTuningJobStatus.Pending; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "running")) return FineTuningJobStatus.Running; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "succeeded")) return FineTuningJobStatus.Succeeded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "failed")) return FineTuningJobStatus.Failed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "cancelled")) return FineTuningJobStatus.Cancelled; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FineTuningJobStatus value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobStatus.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobStatus.cs index 23924df4f58..f5c44162b76 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobStatus.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/FineTuningJobStatus.cs @@ -2,59 +2,22 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for status in FineTuningJob. - public readonly partial struct FineTuningJobStatus : IEquatable + /// The FineTuningJobStatus. + public enum FineTuningJobStatus { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FineTuningJobStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatedValue = "created"; - private const string PendingValue = "pending"; - private const string RunningValue = "running"; - private const string SucceededValue = "succeeded"; - private const string FailedValue = "failed"; - private const string CancelledValue = "cancelled"; - /// created. - public static FineTuningJobStatus Created { get; } = new FineTuningJobStatus(CreatedValue); + Created, /// pending. - public static FineTuningJobStatus Pending { get; } = new FineTuningJobStatus(PendingValue); + Pending, /// running. - public static FineTuningJobStatus Running { get; } = new FineTuningJobStatus(RunningValue); + Running, /// succeeded. - public static FineTuningJobStatus Succeeded { get; } = new FineTuningJobStatus(SucceededValue); + Succeeded, /// failed. - public static FineTuningJobStatus Failed { get; } = new FineTuningJobStatus(FailedValue); + Failed, /// cancelled. - public static FineTuningJobStatus Cancelled { get; } = new FineTuningJobStatus(CancelledValue); - /// Determines if two values are the same. - public static bool operator ==(FineTuningJobStatus left, FineTuningJobStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FineTuningJobStatus left, FineTuningJobStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FineTuningJobStatus(string value) => new FineTuningJobStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FineTuningJobStatus other && Equals(other); - /// - public bool Equals(FineTuningJobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Cancelled } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFile.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFile.Serialization.cs index e9064d0cf82..92ccb07dc5f 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFile.Serialization.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFile.Serialization.cs @@ -34,7 +34,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption writer.WritePropertyName("purpose"u8); writer.WriteStringValue(Purpose); writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); + writer.WriteStringValue(Status.ToSerialString()); if (Optional.IsDefined(StatusDetails)) { if (StatusDetails != null) @@ -129,7 +129,7 @@ internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReade } if (property.NameEquals("status"u8)) { - status = new OpenAIFileStatus(property.Value.GetString()); + status = property.Value.GetString().ToOpenAIFileStatus(); continue; } if (property.NameEquals("status_details"u8)) diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFileStatus.Serialization.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFileStatus.Serialization.cs new file mode 100644 index 00000000000..0a269927ab5 --- /dev/null +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFileStatus.Serialization.cs @@ -0,0 +1,33 @@ +// + +#nullable disable + +using System; + +namespace OpenAI.Models +{ + internal static partial class OpenAIFileStatusExtensions + { + public static string ToSerialString(this OpenAIFileStatus value) => value switch + { + OpenAIFileStatus.Uploaded => "uploaded", + OpenAIFileStatus.Processed => "processed", + OpenAIFileStatus.Pending => "pending", + OpenAIFileStatus.Error => "error", + OpenAIFileStatus.Deleting => "deleting", + OpenAIFileStatus.Deleted => "deleted", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OpenAIFileStatus value.") + }; + + public static OpenAIFileStatus ToOpenAIFileStatus(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "uploaded")) return OpenAIFileStatus.Uploaded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "processed")) return OpenAIFileStatus.Processed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "pending")) return OpenAIFileStatus.Pending; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "error")) return OpenAIFileStatus.Error; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "deleting")) return OpenAIFileStatus.Deleting; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "deleted")) return OpenAIFileStatus.Deleted; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OpenAIFileStatus value."); + } + } +} diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFileStatus.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFileStatus.cs index 66c9b9f2173..2680607db39 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFileStatus.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/Models/OpenAIFileStatus.cs @@ -2,59 +2,22 @@ #nullable disable -using System; -using System.ComponentModel; - namespace OpenAI.Models { - /// Enum for status in OpenAIFile. - public readonly partial struct OpenAIFileStatus : IEquatable + /// The OpenAIFileStatus. + public enum OpenAIFileStatus { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OpenAIFileStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UploadedValue = "uploaded"; - private const string ProcessedValue = "processed"; - private const string PendingValue = "pending"; - private const string ErrorValue = "error"; - private const string DeletingValue = "deleting"; - private const string DeletedValue = "deleted"; - /// uploaded. - public static OpenAIFileStatus Uploaded { get; } = new OpenAIFileStatus(UploadedValue); + Uploaded, /// processed. - public static OpenAIFileStatus Processed { get; } = new OpenAIFileStatus(ProcessedValue); + Processed, /// pending. - public static OpenAIFileStatus Pending { get; } = new OpenAIFileStatus(PendingValue); + Pending, /// error. - public static OpenAIFileStatus Error { get; } = new OpenAIFileStatus(ErrorValue); + Error, /// deleting. - public static OpenAIFileStatus Deleting { get; } = new OpenAIFileStatus(DeletingValue); + Deleting, /// deleted. - public static OpenAIFileStatus Deleted { get; } = new OpenAIFileStatus(DeletedValue); - /// Determines if two values are the same. - public static bool operator ==(OpenAIFileStatus left, OpenAIFileStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OpenAIFileStatus left, OpenAIFileStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OpenAIFileStatus(string value) => new OpenAIFileStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OpenAIFileStatus other && Equals(other); - /// - public bool Equals(OpenAIFileStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; + Deleted } } diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/OpenAIModelFactory.cs b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/OpenAIModelFactory.cs index 9eb39b194ef..5d0894100b3 100644 --- a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/OpenAIModelFactory.cs +++ b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/OpenAIModelFactory.cs @@ -1130,7 +1130,7 @@ public static Image Image(Uri url = null, BinaryData b64Json = null) /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. /// /// A new instance for mocking. - public static CreateImageEditRequest CreateImageEditRequest(string prompt = null, Stream image = null, Stream mask = null, long? n = null, CreateImageEditRequestSize? size = null, CreateImageEditRequestResponseFormat? responseFormat = null, string user = null) + public static CreateImageEditRequest CreateImageEditRequest(string prompt = null, Stream image = null, Stream mask = null, long? n = null, CreateImageRequestSize? size = null, CreateImageRequestResponseFormat? responseFormat = null, string user = null) { return new CreateImageEditRequest( prompt, @@ -1153,7 +1153,7 @@ public static CreateImageEditRequest CreateImageEditRequest(string prompt = null /// The format in which the generated images are returned. Must be one of `url` or `b64_json`. /// /// A new instance for mocking. - public static CreateImageVariationRequest CreateImageVariationRequest(Stream image = null, long? n = null, CreateImageVariationRequestSize? size = null, CreateImageVariationRequestResponseFormat? responseFormat = null, string user = null) + public static CreateImageVariationRequest CreateImageVariationRequest(Stream image = null, long? n = null, CreateImageRequestSize? size = null, CreateImageRequestResponseFormat? responseFormat = null, string user = null) { return new CreateImageVariationRequest( image, diff --git a/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Platform-OpenAI-TypeSpec/src/Generated/tspCodeModel.json index e1d1d99b349..7d2890bddb5 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", @@ -24,11 +24,48 @@ { "$id": "4", "Kind": "Enum", - "Name": "CreateTranslationRequestModel", - "EnumValueType": "string", + "Name": "CreateTranscriptionRequestResponseFormat", + "EnumValueType": "String", "AllowedValues": [ { "$id": "5", + "Name": "json", + "Value": "json" + }, + { + "$id": "6", + "Name": "text", + "Value": "text" + }, + { + "$id": "7", + "Name": "srt", + "Value": "srt" + }, + { + "$id": "8", + "Name": "verbose_json", + "Value": "verbose_json" + }, + { + "$id": "9", + "Name": "vtt", + "Value": "vtt" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Input" + }, + { + "$id": "10", + "Kind": "Enum", + "Name": "CreateTranslationRequestModel", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "11", "Name": "whisper-1", "Value": "whisper-1" } @@ -39,63 +76,100 @@ "Usage": "Input" }, { - "$id": "6", + "$id": "12", + "Kind": "Enum", + "Name": "CreateTranslationRequestResponseFormat", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "13", + "Name": "json", + "Value": "json" + }, + { + "$id": "14", + "Name": "text", + "Value": "text" + }, + { + "$id": "15", + "Name": "srt", + "Value": "srt" + }, + { + "$id": "16", + "Name": "verbose_json", + "Value": "verbose_json" + }, + { + "$id": "17", + "Name": "vtt", + "Value": "vtt" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Input" + }, + { + "$id": "18", "Kind": "Enum", "Name": "CreateChatCompletionRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "7", + "$id": "19", "Name": "gpt4", "Value": "gpt4" }, { - "$id": "8", + "$id": "20", "Name": "gpt-4-0314", "Value": "gpt-4-0314" }, { - "$id": "9", + "$id": "21", "Name": "gpt-4-0613", "Value": "gpt-4-0613" }, { - "$id": "10", + "$id": "22", "Name": "gpt-4-32k", "Value": "gpt-4-32k" }, { - "$id": "11", + "$id": "23", "Name": "gpt-4-32k-0314", "Value": "gpt-4-32k-0314" }, { - "$id": "12", + "$id": "24", "Name": "gpt-4-32k-0613", "Value": "gpt-4-32k-0613" }, { - "$id": "13", + "$id": "25", "Name": "gpt-3.5-turbo", "Value": "gpt-3.5-turbo" }, { - "$id": "14", + "$id": "26", "Name": "gpt-3.5-turbo-16k", "Value": "gpt-3.5-turbo-16k" }, { - "$id": "15", + "$id": "27", "Name": "gpt-3.5-turbo-0301", "Value": "gpt-3.5-turbo-0301" }, { - "$id": "16", + "$id": "28", "Name": "gpt-3.5-turbo-0613", "Value": "gpt-3.5-turbo-0613" }, { - "$id": "17", + "$id": "29", "Name": "gpt-3.5-turbo-16k-0613", "Value": "gpt-3.5-turbo-16k-0613" } @@ -106,23 +180,119 @@ "Usage": "Input" }, { - "$id": "18", + "$id": "30", + "Kind": "Enum", + "Name": "ChatCompletionRequestMessageRole", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "31", + "Name": "system", + "Value": "system" + }, + { + "$id": "32", + "Name": "user", + "Value": "user" + }, + { + "$id": "33", + "Name": "assistant", + "Value": "assistant" + }, + { + "$id": "34", + "Name": "function", + "Value": "function" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Input" + }, + { + "$id": "35", + "Kind": "Enum", + "Name": "ChatCompletionResponseMessageRole", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "36", + "Name": "system", + "Value": "system" + }, + { + "$id": "37", + "Name": "user", + "Value": "user" + }, + { + "$id": "38", + "Name": "assistant", + "Value": "assistant" + }, + { + "$id": "39", + "Name": "function", + "Value": "function" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "40", + "Kind": "Enum", + "Name": "CreateChatCompletionResponseChoiceFinishReason", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "41", + "Name": "stop", + "Value": "stop" + }, + { + "$id": "42", + "Name": "length", + "Value": "length" + }, + { + "$id": "43", + "Name": "function_call", + "Value": "function_call" + }, + { + "$id": "44", + "Name": "content_filter", + "Value": "content_filter" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "45", "Kind": "Enum", "Name": "CreateFineTuningJobRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "19", + "$id": "46", "Name": "babbage-002", "Value": "babbage-002" }, { - "$id": "20", + "$id": "47", "Name": "davinci-002", "Value": "davinci-002" }, { - "$id": "21", + "$id": "48", "Name": "gpt-3.5-turbo", "Value": "gpt-3.5-turbo" } @@ -133,13 +303,13 @@ "Usage": "Input" }, { - "$id": "22", + "$id": "49", "Kind": "Enum", "Name": "FineTuningJob_object", "EnumValueType": "String", "AllowedValues": [ { - "$id": "23", + "$id": "50", "Name": "fine_tuning.job", "Value": "fine_tuning.job", "Description": "fine_tuning.job" @@ -152,53 +322,122 @@ "Usage": "Output" }, { - "$id": "24", + "$id": "51", + "Kind": "Enum", + "Name": "FineTuningJobStatus", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "52", + "Name": "created", + "Value": "created" + }, + { + "$id": "53", + "Name": "pending", + "Value": "pending" + }, + { + "$id": "54", + "Name": "running", + "Value": "running" + }, + { + "$id": "55", + "Name": "succeeded", + "Value": "succeeded" + }, + { + "$id": "56", + "Name": "failed", + "Value": "failed" + }, + { + "$id": "57", + "Name": "cancelled", + "Value": "cancelled" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "58", + "Kind": "Enum", + "Name": "FineTuningJobEventLevel", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "59", + "Name": "info", + "Value": "info" + }, + { + "$id": "60", + "Name": "warn", + "Value": "warn" + }, + { + "$id": "61", + "Name": "error", + "Value": "error" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "62", "Kind": "Enum", "Name": "CreateCompletionRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "25", + "$id": "63", "Name": "babbage-002", "Value": "babbage-002" }, { - "$id": "26", + "$id": "64", "Name": "davinci-002", "Value": "davinci-002" }, { - "$id": "27", + "$id": "65", "Name": "text-davinci-003", "Value": "text-davinci-003" }, { - "$id": "28", + "$id": "66", "Name": "text-davinci-002", "Value": "text-davinci-002" }, { - "$id": "29", + "$id": "67", "Name": "text-davinci-001", "Value": "text-davinci-001" }, { - "$id": "30", + "$id": "68", "Name": "code-davinci-002", "Value": "code-davinci-002" }, { - "$id": "31", + "$id": "69", "Name": "text-curie-001", "Value": "text-curie-001" }, { - "$id": "32", + "$id": "70", "Name": "text-babbage-001", "Value": "text-babbage-001" }, { - "$id": "33", + "$id": "71", "Name": "text-ada-001", "Value": "text-ada-001" } @@ -209,18 +448,45 @@ "Usage": "Input" }, { - "$id": "34", + "$id": "72", + "Kind": "Enum", + "Name": "CreateCompletionResponseChoiceFinishReason", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "73", + "Name": "stop", + "Value": "stop" + }, + { + "$id": "74", + "Name": "length", + "Value": "length" + }, + { + "$id": "75", + "Name": "content_filter", + "Value": "content_filter" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "76", "Kind": "Enum", "Name": "CreateEditRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "35", + "$id": "77", "Name": "text-davinci-edit-001", "Value": "text-davinci-edit-001" }, { - "$id": "36", + "$id": "78", "Name": "code-davinci-edit-001", "Value": "code-davinci-edit-001" } @@ -231,13 +497,13 @@ "Usage": "Input" }, { - "$id": "37", + "$id": "79", "Kind": "Enum", "Name": "CreateEditResponse_object", "EnumValueType": "String", "AllowedValues": [ { - "$id": "38", + "$id": "80", "Name": "edit", "Value": "edit", "Description": "edit" @@ -250,13 +516,35 @@ "Usage": "Output" }, { - "$id": "39", + "$id": "81", + "Kind": "Enum", + "Name": "CreateEditResponseChoiceFinishReason", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "82", + "Name": "stop", + "Value": "stop" + }, + { + "$id": "83", + "Name": "length", + "Value": "length" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "84", "Kind": "Enum", "Name": "CreateEmbeddingRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "40", + "$id": "85", "Name": "text-embedding-ada-002", "Value": "text-embedding-ada-002" } @@ -267,13 +555,13 @@ "Usage": "Input" }, { - "$id": "41", + "$id": "86", "Kind": "Enum", "Name": "CreateEmbeddingResponse_object", "EnumValueType": "String", "AllowedValues": [ { - "$id": "42", + "$id": "87", "Name": "embedding", "Value": "embedding", "Description": "embedding" @@ -286,13 +574,13 @@ "Usage": "Output" }, { - "$id": "43", + "$id": "88", "Kind": "Enum", "Name": "Embedding_object", "EnumValueType": "String", "AllowedValues": [ { - "$id": "44", + "$id": "89", "Name": "embedding", "Value": "embedding", "Description": "embedding" @@ -305,13 +593,13 @@ "Usage": "Output" }, { - "$id": "45", + "$id": "90", "Kind": "Enum", "Name": "OpenAIFile_object", "EnumValueType": "String", "AllowedValues": [ { - "$id": "46", + "$id": "91", "Name": "file", "Value": "file", "Description": "file" @@ -324,28 +612,70 @@ "Usage": "Output" }, { - "$id": "47", + "$id": "92", + "Kind": "Enum", + "Name": "OpenAIFileStatus", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "93", + "Name": "uploaded", + "Value": "uploaded" + }, + { + "$id": "94", + "Name": "processed", + "Value": "processed" + }, + { + "$id": "95", + "Name": "pending", + "Value": "pending" + }, + { + "$id": "96", + "Name": "error", + "Value": "error" + }, + { + "$id": "97", + "Name": "deleting", + "Value": "deleting" + }, + { + "$id": "98", + "Name": "deleted", + "Value": "deleted" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "99", "Kind": "Enum", "Name": "CreateFineTuneRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "48", + "$id": "100", "Name": "ada", "Value": "ada" }, { - "$id": "49", + "$id": "101", "Name": "babbage", "Value": "babbage" }, { - "$id": "50", + "$id": "102", "Name": "curie", "Value": "curie" }, { - "$id": "51", + "$id": "103", "Name": "davinci", "Value": "davinci" } @@ -356,13 +686,13 @@ "Usage": "Input" }, { - "$id": "52", + "$id": "104", "Kind": "Enum", "Name": "FineTune_object", "EnumValueType": "String", "AllowedValues": [ { - "$id": "53", + "$id": "105", "Name": "fine-tune", "Value": "fine-tune", "Description": "fine-tune" @@ -375,13 +705,50 @@ "Usage": "Output" }, { - "$id": "54", + "$id": "106", + "Kind": "Enum", + "Name": "FineTuneStatus", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "107", + "Name": "created", + "Value": "created" + }, + { + "$id": "108", + "Name": "running", + "Value": "running" + }, + { + "$id": "109", + "Name": "succeeded", + "Value": "succeeded" + }, + { + "$id": "110", + "Name": "failed", + "Value": "failed" + }, + { + "$id": "111", + "Name": "cancelled", + "Value": "cancelled" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "112", "Kind": "Enum", "Name": "Model_object", "EnumValueType": "String", "AllowedValues": [ { - "$id": "55", + "$id": "113", "Name": "model", "Value": "model", "Description": "model" @@ -394,18 +761,67 @@ "Usage": "Output" }, { - "$id": "56", + "$id": "114", + "Kind": "Enum", + "Name": "CreateImageRequestSize", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "115", + "Name": "256x256", + "Value": "256x256" + }, + { + "$id": "116", + "Name": "512x512", + "Value": "512x512" + }, + { + "$id": "117", + "Name": "1024x1024", + "Value": "1024x1024" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": true, + "Usage": "Input" + }, + { + "$id": "118", + "Kind": "Enum", + "Name": "CreateImageRequestResponseFormat", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "119", + "Name": "url", + "Value": "url" + }, + { + "$id": "120", + "Name": "b64_json", + "Value": "b64_json" + } + ], + "Namespace": "", + "IsExtensible": false, + "IsNullable": true, + "Usage": "Input" + }, + { + "$id": "121", "Kind": "Enum", "Name": "CreateModerationRequestModel", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { - "$id": "57", + "$id": "122", "Name": "text-moderation-latest", "Value": "text-moderation-latest" }, { - "$id": "58", + "$id": "123", "Name": "text-moderation-stable", "Value": "text-moderation-stable" } @@ -418,7 +834,7 @@ ], "Models": [ { - "$id": "59", + "$id": "124", "Kind": "Model", "Name": "CreateTranscriptionRequest", "Namespace": "OpenAI", @@ -426,12 +842,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "60", + "$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": "61", + "$id": "126", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -440,7 +856,7 @@ "IsReadOnly": false }, { - "$id": "62", + "$id": "127", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. Only `whisper-1` is currently available.", @@ -451,12 +867,12 @@ "IsReadOnly": false }, { - "$id": "63", + "$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": "64", + "$id": "129", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -465,93 +881,23 @@ "IsReadOnly": false }, { - "$id": "65", + "$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.", "Type": { - "$id": "66", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "67", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "68", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "json", - "IsNullable": false - }, - { - "$id": "69", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "70", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "text", - "IsNullable": false - }, - { - "$id": "71", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "72", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "srt", - "IsNullable": false - }, - { - "$id": "73", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "74", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "verbose_json", - "IsNullable": false - }, - { - "$id": "75", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "76", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "vtt", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "4" }, "IsRequired": false, "IsReadOnly": false }, { - "$id": "77", + "$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": "78", + "$id": "132", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -560,12 +906,12 @@ "IsReadOnly": false }, { - "$id": "79", + "$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": "80", + "$id": "134", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -576,7 +922,7 @@ ] }, { - "$id": "81", + "$id": "135", "Kind": "Model", "Name": "CreateTranscriptionResponse", "Namespace": "OpenAI", @@ -584,12 +930,12 @@ "Usage": "Output", "Properties": [ { - "$id": "82", + "$id": "136", "Name": "text", "SerializedName": "text", "Description": "", "Type": { - "$id": "83", + "$id": "137", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -600,7 +946,7 @@ ] }, { - "$id": "84", + "$id": "138", "Kind": "Model", "Name": "CreateTranslationRequest", "Namespace": "OpenAI", @@ -608,12 +954,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "85", + "$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": "86", + "$id": "140", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -622,118 +968,48 @@ "IsReadOnly": false }, { - "$id": "87", + "$id": "141", "Name": "model", "SerializedName": "model", "Description": "ID of the model to use. Only `whisper-1` is currently available.", "Type": { - "$ref": "4" + "$ref": "10" }, "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "88", - "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": "89", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": false, - "IsReadOnly": false - }, - { - "$id": "90", - "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.", - "Type": { - "$id": "91", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "92", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "93", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "json", - "IsNullable": false - }, - { - "$id": "94", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "95", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "text", - "IsNullable": false - }, - { - "$id": "96", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "97", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "srt", - "IsNullable": false - }, - { - "$id": "98", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "99", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "verbose_json", - "IsNullable": false - }, - { - "$id": "100", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "101", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "vtt", - "IsNullable": false - } - ], + "IsReadOnly": false + }, + { + "$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": "143", + "Kind": "Primitive", + "Name": "String", "IsNullable": false }, "IsRequired": false, "IsReadOnly": false }, { - "$id": "102", + "$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.", + "Type": { + "$ref": "12" + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$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": "103", + "$id": "146", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -744,7 +1020,7 @@ ] }, { - "$id": "104", + "$id": "147", "Kind": "Model", "Name": "CreateTranslationResponse", "Namespace": "OpenAI", @@ -752,12 +1028,12 @@ "Usage": "Output", "Properties": [ { - "$id": "105", + "$id": "148", "Name": "text", "SerializedName": "text", "Description": "", "Type": { - "$id": "106", + "$id": "149", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -768,7 +1044,7 @@ ] }, { - "$id": "107", + "$id": "150", "Kind": "Model", "Name": "CreateChatCompletionRequest", "Namespace": "OpenAI", @@ -776,27 +1052,27 @@ "Usage": "Input", "Properties": [ { - "$id": "108", + "$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.", "Type": { - "$ref": "6" + "$ref": "18" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "109", + "$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": "110", + "$id": "153", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "111", + "$id": "154", "Kind": "Model", "Name": "ChatCompletionRequestMessage", "Namespace": "OpenAI", @@ -804,80 +1080,23 @@ "Usage": "Input", "Properties": [ { - "$id": "112", + "$id": "155", "Name": "role", "SerializedName": "role", "Description": "The role of the messages author. One of `system`, `user`, `assistant`, or `function`.", "Type": { - "$id": "113", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "114", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "115", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "system", - "IsNullable": false - }, - { - "$id": "116", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "117", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "user", - "IsNullable": false - }, - { - "$id": "118", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "119", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "assistant", - "IsNullable": false - }, - { - "$id": "120", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "121", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "function", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "30" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "122", + "$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": "123", + "$id": "157", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -886,12 +1105,12 @@ "IsReadOnly": false }, { - "$id": "124", + "$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": "125", + "$id": "159", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -900,12 +1119,12 @@ "IsReadOnly": false }, { - "$id": "126", + "$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": "127", + "$id": "161", "Kind": "Model", "Name": "ChatCompletionRequestMessageFunctionCall", "Namespace": "OpenAI", @@ -913,12 +1132,12 @@ "Usage": "Input", "Properties": [ { - "$id": "128", + "$id": "162", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "129", + "$id": "163", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -927,12 +1146,12 @@ "IsReadOnly": false }, { - "$id": "130", + "$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": "131", + "$id": "165", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -953,16 +1172,16 @@ "IsReadOnly": false }, { - "$id": "132", + "$id": "166", "Name": "functions", "SerializedName": "functions", "Description": "A list of functions the model may generate JSON inputs for.", "Type": { - "$id": "133", + "$id": "167", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "134", + "$id": "168", "Kind": "Model", "Name": "ChatCompletionFunctions", "Namespace": "OpenAI", @@ -970,12 +1189,12 @@ "Usage": "Input", "Properties": [ { - "$id": "135", + "$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": "136", + "$id": "170", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -984,12 +1203,12 @@ "IsReadOnly": false }, { - "$id": "137", + "$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": "138", + "$id": "172", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -998,29 +1217,29 @@ "IsReadOnly": false }, { - "$id": "139", + "$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": "140", + "$id": "174", "Kind": "Model", "Name": "ChatCompletionFunctionParameters", "Namespace": "OpenAI", "IsNullable": false, "Usage": "Input", "InheritedDictionaryType": { - "$id": "141", + "$id": "175", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "142", + "$id": "176", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "143", + "$id": "177", "Kind": "Intrinsic", "Name": "unknown", "IsNullable": false @@ -1040,21 +1259,21 @@ "IsReadOnly": false }, { - "$id": "144", + "$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": "145", + "$id": "179", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "146", + "$id": "180", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "147", + "$id": "181", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1063,11 +1282,11 @@ "IsNullable": false }, { - "$id": "148", + "$id": "182", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "149", + "$id": "183", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1076,7 +1295,7 @@ "IsNullable": false }, { - "$id": "150", + "$id": "184", "Kind": "Model", "Name": "ChatCompletionFunctionCallOption", "Namespace": "OpenAI", @@ -1084,12 +1303,12 @@ "Usage": "Input", "Properties": [ { - "$id": "151", + "$id": "185", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "152", + "$id": "186", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1106,12 +1325,12 @@ "IsReadOnly": false }, { - "$id": "153", + "$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": "154", + "$id": "188", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1120,12 +1339,12 @@ "IsReadOnly": false }, { - "$id": "155", + "$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": "156", + "$id": "190", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1134,12 +1353,12 @@ "IsReadOnly": false }, { - "$id": "157", + "$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": "158", + "$id": "192", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -1148,12 +1367,12 @@ "IsReadOnly": false }, { - "$id": "159", + "$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": "160", + "$id": "194", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -1162,32 +1381,32 @@ "IsReadOnly": false }, { - "$id": "161", + "$id": "195", "Name": "stop", "SerializedName": "stop", "Description": "Up to 4 sequences where the API will stop generating further tokens.", "Type": { - "$id": "162", + "$id": "196", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "163", + "$id": "197", "Kind": "Primitive", "Name": "String", - "IsNullable": true + "IsNullable": false }, { - "$id": "164", + "$id": "198", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "165", + "$id": "199", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsNullable": true + "IsNullable": false } ], "IsNullable": false @@ -1196,12 +1415,12 @@ "IsReadOnly": false }, { - "$id": "166", + "$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": "167", + "$id": "201", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1210,12 +1429,12 @@ "IsReadOnly": false }, { - "$id": "168", + "$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": "169", + "$id": "203", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -1224,22 +1443,22 @@ "IsReadOnly": false }, { - "$id": "170", + "$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": "171", + "$id": "205", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "172", + "$id": "206", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "173", + "$id": "207", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1250,12 +1469,12 @@ "IsReadOnly": false }, { - "$id": "174", + "$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": "175", + "$id": "209", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1264,12 +1483,12 @@ "IsReadOnly": false }, { - "$id": "176", + "$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": "177", + "$id": "211", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -1280,22 +1499,22 @@ ] }, { - "$ref": "111" + "$ref": "154" }, { - "$ref": "127" + "$ref": "161" }, { - "$ref": "134" + "$ref": "168" }, { - "$ref": "140" + "$ref": "174" }, { - "$ref": "150" + "$ref": "184" }, { - "$id": "178", + "$id": "212", "Kind": "Model", "Name": "CreateChatCompletionResponse", "Namespace": "OpenAI", @@ -1304,12 +1523,12 @@ "Usage": "Output", "Properties": [ { - "$id": "179", + "$id": "213", "Name": "id", "SerializedName": "id", "Description": "A unique identifier for the chat completion.", "Type": { - "$id": "180", + "$id": "214", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1318,12 +1537,12 @@ "IsReadOnly": false }, { - "$id": "181", + "$id": "215", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `chat.completion`.", "Type": { - "$id": "182", + "$id": "216", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1332,12 +1551,12 @@ "IsReadOnly": false }, { - "$id": "183", + "$id": "217", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the chat completion was created.", "Type": { - "$id": "184", + "$id": "218", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1346,12 +1565,12 @@ "IsReadOnly": false }, { - "$id": "185", + "$id": "219", "Name": "model", "SerializedName": "model", "Description": "The model used for the chat completion.", "Type": { - "$id": "186", + "$id": "220", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1360,16 +1579,16 @@ "IsReadOnly": false }, { - "$id": "187", + "$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": "188", + "$id": "222", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "189", + "$id": "223", "Kind": "Model", "Name": "CreateChatCompletionResponseChoice", "Namespace": "OpenAI", @@ -1377,12 +1596,12 @@ "Usage": "Output", "Properties": [ { - "$id": "190", + "$id": "224", "Name": "index", "SerializedName": "index", "Description": "The index of the choice in the list of choices.", "Type": { - "$id": "191", + "$id": "225", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1391,12 +1610,12 @@ "IsReadOnly": false }, { - "$id": "192", + "$id": "226", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "193", + "$id": "227", "Kind": "Model", "Name": "ChatCompletionResponseMessage", "Namespace": "OpenAI", @@ -1404,80 +1623,23 @@ "Usage": "Output", "Properties": [ { - "$id": "194", + "$id": "228", "Name": "role", "SerializedName": "role", "Description": "The role of the author of this message.", "Type": { - "$id": "195", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "196", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "197", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "system", - "IsNullable": false - }, - { - "$id": "198", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "199", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "user", - "IsNullable": false - }, - { - "$id": "200", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "201", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "assistant", - "IsNullable": false - }, - { - "$id": "202", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "203", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "function", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "35" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "204", + "$id": "229", "Name": "content", "SerializedName": "content", "Description": "The contents of the message.", "Type": { - "$id": "205", + "$id": "230", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1486,12 +1648,12 @@ "IsReadOnly": false }, { - "$id": "206", + "$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": "207", + "$id": "232", "Kind": "Model", "Name": "ChatCompletionResponseMessageFunctionCall", "Namespace": "OpenAI", @@ -1499,12 +1661,12 @@ "Usage": "Output", "Properties": [ { - "$id": "208", + "$id": "233", "Name": "name", "SerializedName": "name", "Description": "The name of the function to call.", "Type": { - "$id": "209", + "$id": "234", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1513,12 +1675,12 @@ "IsReadOnly": false }, { - "$id": "210", + "$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": "211", + "$id": "236", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1537,69 +1699,12 @@ "IsReadOnly": false }, { - "$id": "212", + "$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.", "Type": { - "$id": "213", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "214", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "215", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "stop", - "IsNullable": false - }, - { - "$id": "216", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "217", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "length", - "IsNullable": false - }, - { - "$id": "218", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "219", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "function_call", - "IsNullable": false - }, - { - "$id": "220", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "221", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "content_filter", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "40" }, "IsRequired": true, "IsReadOnly": false @@ -1612,12 +1717,12 @@ "IsReadOnly": false }, { - "$id": "222", + "$id": "238", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$id": "223", + "$id": "239", "Kind": "Model", "Name": "CompletionUsage", "Namespace": "OpenAI", @@ -1626,12 +1731,12 @@ "Usage": "Output", "Properties": [ { - "$id": "224", + "$id": "240", "Name": "prompt_tokens", "SerializedName": "prompt_tokens", "Description": "Number of tokens in the prompt.", "Type": { - "$id": "225", + "$id": "241", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1640,12 +1745,12 @@ "IsReadOnly": false }, { - "$id": "226", + "$id": "242", "Name": "completion_tokens", "SerializedName": "completion_tokens", "Description": "Number of tokens in the generated completion", "Type": { - "$id": "227", + "$id": "243", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1654,12 +1759,12 @@ "IsReadOnly": false }, { - "$id": "228", + "$id": "244", "Name": "total_tokens", "SerializedName": "total_tokens", "Description": "Total number of tokens used in the request (prompt + completion).", "Type": { - "$id": "229", + "$id": "245", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1675,19 +1780,19 @@ ] }, { - "$ref": "189" + "$ref": "223" }, { - "$ref": "193" + "$ref": "227" }, { - "$ref": "207" + "$ref": "232" }, { - "$ref": "223" + "$ref": "239" }, { - "$id": "230", + "$id": "246", "Kind": "Model", "Name": "CreateFineTuningJobRequest", "Namespace": "OpenAI", @@ -1695,12 +1800,12 @@ "Usage": "Input", "Properties": [ { - "$id": "231", + "$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": "232", + "$id": "248", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1709,12 +1814,12 @@ "IsReadOnly": false }, { - "$id": "233", + "$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": "234", + "$id": "250", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1723,23 +1828,23 @@ "IsReadOnly": false }, { - "$id": "235", + "$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).", "Type": { - "$ref": "18" + "$ref": "45" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "236", + "$id": "252", "Name": "hyperparameters", "SerializedName": "hyperparameters", "Description": "The hyperparameters used for the fine-tuning job.", "Type": { - "$id": "237", + "$id": "253", "Kind": "Model", "Name": "CreateFineTuningJobRequestHyperparameters", "Namespace": "OpenAI", @@ -1747,21 +1852,21 @@ "Usage": "Input", "Properties": [ { - "$id": "238", + "$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": "239", + "$id": "255", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "240", + "$id": "256", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "241", + "$id": "257", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1770,7 +1875,7 @@ "IsNullable": false }, { - "$id": "242", + "$id": "258", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -1787,12 +1892,12 @@ "IsReadOnly": false }, { - "$id": "243", + "$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": "244", + "$id": "260", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1803,10 +1908,10 @@ ] }, { - "$ref": "237" + "$ref": "253" }, { - "$id": "245", + "$id": "261", "Kind": "Model", "Name": "FineTuningJob", "Namespace": "OpenAI", @@ -1814,12 +1919,12 @@ "Usage": "Output", "Properties": [ { - "$id": "246", + "$id": "262", "Name": "id", "SerializedName": "id", "Description": "The object identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "247", + "$id": "263", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1828,16 +1933,16 @@ "IsReadOnly": false }, { - "$id": "248", + "$id": "264", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"fine_tuning.job\".", "Type": { - "$id": "249", + "$id": "265", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$ref": "22" + "$ref": "49" }, "Value": "fine_tuning.job", "IsNullable": false @@ -1846,12 +1951,12 @@ "IsReadOnly": false }, { - "$id": "250", + "$id": "266", "Name": "created_at", "SerializedName": "created_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "Type": { - "$id": "251", + "$id": "267", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -1860,26 +1965,26 @@ "IsReadOnly": false }, { - "$id": "252", + "$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": "253", + "$id": "269", "Kind": "Primitive", - "Name": "DateTime", + "Name": "DateTimeUnix", "IsNullable": true }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "254", + "$id": "270", "Name": "model", "SerializedName": "model", "Description": "The base model that is being fine-tuned.", "Type": { - "$id": "255", + "$id": "271", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1888,12 +1993,12 @@ "IsReadOnly": false }, { - "$id": "256", + "$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": "257", + "$id": "273", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -1902,12 +2007,12 @@ "IsReadOnly": false }, { - "$id": "258", + "$id": "274", "Name": "organization_id", "SerializedName": "organization_id", "Description": "The organization that owns the fine-tuning job.", "Type": { - "$id": "259", + "$id": "275", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -1916,106 +2021,23 @@ "IsReadOnly": false }, { - "$id": "260", + "$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`.", "Type": { - "$id": "261", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "262", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "263", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "created", - "IsNullable": false - }, - { - "$id": "264", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "265", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "pending", - "IsNullable": false - }, - { - "$id": "266", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "267", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "running", - "IsNullable": false - }, - { - "$id": "268", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "269", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "succeeded", - "IsNullable": false - }, - { - "$id": "270", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "271", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "failed", - "IsNullable": false - }, - { - "$id": "272", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "273", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "cancelled", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "51" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "274", + "$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": "275", + "$id": "278", "Kind": "Model", "Name": "FineTuningJobHyperparameters", "Namespace": "OpenAI", @@ -2023,21 +2045,21 @@ "Usage": "Output", "Properties": [ { - "$id": "276", + "$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": "277", + "$id": "280", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "278", + "$id": "281", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "279", + "$id": "282", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2046,7 +2068,7 @@ "IsNullable": false }, { - "$id": "280", + "$id": "283", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2063,12 +2085,12 @@ "IsReadOnly": false }, { - "$id": "281", + "$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": "282", + "$id": "285", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2077,12 +2099,12 @@ "IsReadOnly": false }, { - "$id": "283", + "$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": "284", + "$id": "287", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2091,16 +2113,16 @@ "IsReadOnly": false }, { - "$id": "285", + "$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": "286", + "$id": "289", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "287", + "$id": "290", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2111,12 +2133,12 @@ "IsReadOnly": false }, { - "$id": "288", + "$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": "289", + "$id": "292", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2125,25 +2147,25 @@ "IsReadOnly": false }, { - "$id": "290", + "$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": "291", + "$id": "294", "Kind": "Model", "Name": "FineTuningJobError", - "Namespace": "OpenAI", + "Namespace": "", "IsNullable": true, "Usage": "Output", "Properties": [ { - "$id": "292", + "$id": "295", "Name": "message", "SerializedName": "message", "Description": "A human-readable error message.", "Type": { - "$id": "293", + "$id": "296", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2152,12 +2174,12 @@ "IsReadOnly": false }, { - "$id": "294", + "$id": "297", "Name": "code", "SerializedName": "code", "Description": "A machine-readable error code.", "Type": { - "$id": "295", + "$id": "298", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2166,12 +2188,12 @@ "IsReadOnly": false }, { - "$id": "296", + "$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": "297", + "$id": "300", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2187,13 +2209,13 @@ ] }, { - "$ref": "275" + "$ref": "278" }, { - "$ref": "291" + "$ref": "294" }, { - "$id": "298", + "$id": "301", "Kind": "Model", "Name": "ListPaginatedFineTuningJobsResponse", "Namespace": "OpenAI", @@ -2201,12 +2223,12 @@ "Usage": "Output", "Properties": [ { - "$id": "299", + "$id": "302", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "300", + "$id": "303", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2215,16 +2237,16 @@ "IsReadOnly": false }, { - "$id": "301", + "$id": "304", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "302", + "$id": "305", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "245" + "$ref": "261" }, "IsNullable": false }, @@ -2232,12 +2254,12 @@ "IsReadOnly": false }, { - "$id": "303", + "$id": "306", "Name": "has_more", "SerializedName": "has_more", "Description": "", "Type": { - "$id": "304", + "$id": "307", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -2248,7 +2270,7 @@ ] }, { - "$id": "305", + "$id": "308", "Kind": "Model", "Name": "ListFineTuningJobEventsResponse", "Namespace": "OpenAI", @@ -2256,12 +2278,12 @@ "Usage": "Output", "Properties": [ { - "$id": "306", + "$id": "309", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "307", + "$id": "310", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2270,16 +2292,16 @@ "IsReadOnly": false }, { - "$id": "308", + "$id": "311", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "309", + "$id": "312", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "310", + "$id": "313", "Kind": "Model", "Name": "FineTuningJobEvent", "Namespace": "OpenAI", @@ -2287,12 +2309,12 @@ "Usage": "Output", "Properties": [ { - "$id": "311", + "$id": "314", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "312", + "$id": "315", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2301,12 +2323,12 @@ "IsReadOnly": false }, { - "$id": "313", + "$id": "316", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "314", + "$id": "317", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2315,12 +2337,12 @@ "IsReadOnly": false }, { - "$id": "315", + "$id": "318", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "316", + "$id": "319", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2329,67 +2351,23 @@ "IsReadOnly": false }, { - "$id": "317", + "$id": "320", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "318", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "319", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "320", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "info", - "IsNullable": false - }, - { - "$id": "321", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "322", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "warn", - "IsNullable": false - }, - { - "$id": "323", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "324", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "error", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "58" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "325", + "$id": "321", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "326", + "$id": "322", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2407,10 +2385,10 @@ ] }, { - "$ref": "310" + "$ref": "313" }, { - "$id": "327", + "$id": "323", "Kind": "Model", "Name": "CreateCompletionRequest", "Namespace": "OpenAI", @@ -2418,73 +2396,73 @@ "Usage": "Input", "Properties": [ { - "$id": "328", + "$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.", "Type": { - "$ref": "24" + "$ref": "62" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "329", + "$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": "330", + "$id": "326", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "331", + "$id": "327", "Kind": "Primitive", "Name": "String", - "IsNullable": true + "IsNullable": false }, { - "$id": "332", + "$id": "328", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "333", + "$id": "329", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsNullable": true + "IsNullable": false }, { - "$id": "334", + "$id": "330", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "335", + "$id": "331", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false }, - "IsNullable": true + "IsNullable": false }, { - "$id": "336", + "$id": "332", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "337", + "$id": "333", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "338", + "$id": "334", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false }, "IsNullable": false }, - "IsNullable": true + "IsNullable": false } ], "IsNullable": false @@ -2493,12 +2471,12 @@ "IsReadOnly": false }, { - "$id": "339", + "$id": "335", "Name": "suffix", "SerializedName": "suffix", "Description": "The suffix that comes after a completion of inserted text.", "Type": { - "$id": "340", + "$id": "336", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -2507,12 +2485,12 @@ "IsReadOnly": false }, { - "$id": "341", + "$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": "342", + "$id": "338", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2521,12 +2499,12 @@ "IsReadOnly": false }, { - "$id": "343", + "$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": "344", + "$id": "340", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2535,12 +2513,12 @@ "IsReadOnly": false }, { - "$id": "345", + "$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": "346", + "$id": "342", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2549,12 +2527,12 @@ "IsReadOnly": false }, { - "$id": "347", + "$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": "348", + "$id": "344", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2563,32 +2541,32 @@ "IsReadOnly": false }, { - "$id": "349", + "$id": "345", "Name": "stop", "SerializedName": "stop", "Description": "Up to 4 sequences where the API will stop generating further tokens.", "Type": { - "$id": "350", + "$id": "346", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "351", + "$id": "347", "Kind": "Primitive", "Name": "String", - "IsNullable": true + "IsNullable": false }, { - "$id": "352", + "$id": "348", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "353", + "$id": "349", "Kind": "Primitive", "Name": "String", "IsNullable": false }, - "IsNullable": true + "IsNullable": false } ], "IsNullable": false @@ -2597,12 +2575,12 @@ "IsReadOnly": false }, { - "$id": "354", + "$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": "355", + "$id": "351", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2611,12 +2589,12 @@ "IsReadOnly": false }, { - "$id": "356", + "$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": "357", + "$id": "353", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -2625,22 +2603,22 @@ "IsReadOnly": false }, { - "$id": "358", + "$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": "359", + "$id": "355", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "360", + "$id": "356", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "361", + "$id": "357", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2651,12 +2629,12 @@ "IsReadOnly": false }, { - "$id": "362", + "$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": "363", + "$id": "359", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2665,12 +2643,12 @@ "IsReadOnly": false }, { - "$id": "364", + "$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": "365", + "$id": "361", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -2679,12 +2657,12 @@ "IsReadOnly": false }, { - "$id": "366", + "$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": "367", + "$id": "363", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2693,12 +2671,12 @@ "IsReadOnly": false }, { - "$id": "368", + "$id": "364", "Name": "echo", "SerializedName": "echo", "Description": "Echo back the prompt in addition to the completion", "Type": { - "$id": "369", + "$id": "365", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -2707,12 +2685,12 @@ "IsReadOnly": false }, { - "$id": "370", + "$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": "371", + "$id": "367", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -2723,7 +2701,7 @@ ] }, { - "$id": "372", + "$id": "368", "Kind": "Model", "Name": "CreateCompletionResponse", "Namespace": "OpenAI", @@ -2732,12 +2710,12 @@ "Usage": "Output", "Properties": [ { - "$id": "373", + "$id": "369", "Name": "id", "SerializedName": "id", "Description": "A unique identifier for the completion.", "Type": { - "$id": "374", + "$id": "370", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2746,12 +2724,12 @@ "IsReadOnly": false }, { - "$id": "375", + "$id": "371", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `text_completion`.", "Type": { - "$id": "376", + "$id": "372", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2760,12 +2738,12 @@ "IsReadOnly": false }, { - "$id": "377", + "$id": "373", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the completion was created.", "Type": { - "$id": "378", + "$id": "374", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -2774,12 +2752,12 @@ "IsReadOnly": false }, { - "$id": "379", + "$id": "375", "Name": "model", "SerializedName": "model", "Description": "The model used for the completion.", "Type": { - "$id": "380", + "$id": "376", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2788,16 +2766,16 @@ "IsReadOnly": false }, { - "$id": "381", + "$id": "377", "Name": "choices", "SerializedName": "choices", "Description": "The list of completion choices the model generated for the input.", "Type": { - "$id": "382", + "$id": "378", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "383", + "$id": "379", "Kind": "Model", "Name": "CreateCompletionResponseChoice", "Namespace": "OpenAI", @@ -2805,12 +2783,12 @@ "Usage": "Output", "Properties": [ { - "$id": "384", + "$id": "380", "Name": "index", "SerializedName": "index", "Description": "", "Type": { - "$id": "385", + "$id": "381", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2819,12 +2797,12 @@ "IsReadOnly": false }, { - "$id": "386", + "$id": "382", "Name": "text", "SerializedName": "text", "Description": "", "Type": { - "$id": "387", + "$id": "383", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2833,29 +2811,29 @@ "IsReadOnly": false }, { - "$id": "388", + "$id": "384", "Name": "logprobs", "SerializedName": "logprobs", "Description": "", "Type": { - "$id": "389", + "$id": "385", "Kind": "Model", "Name": "CreateCompletionResponseChoiceLogprobs", - "Namespace": "OpenAI", + "Namespace": "", "IsNullable": true, "Usage": "Output", "Properties": [ { - "$id": "390", + "$id": "386", "Name": "tokens", "SerializedName": "tokens", "Description": "", "Type": { - "$id": "391", + "$id": "387", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "392", + "$id": "388", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -2866,16 +2844,16 @@ "IsReadOnly": false }, { - "$id": "393", + "$id": "389", "Name": "token_logprobs", "SerializedName": "token_logprobs", "Description": "", "Type": { - "$id": "394", + "$id": "390", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "395", + "$id": "391", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -2886,26 +2864,26 @@ "IsReadOnly": false }, { - "$id": "396", + "$id": "392", "Name": "top_logprobs", "SerializedName": "top_logprobs", "Description": "", "Type": { - "$id": "397", + "$id": "393", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "398", + "$id": "394", "Kind": "Dictionary", "Name": "Dictionary", "KeyType": { - "$id": "399", + "$id": "395", "Kind": "Primitive", "Name": "String", "IsNullable": false }, "ValueType": { - "$id": "400", + "$id": "396", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2918,16 +2896,16 @@ "IsReadOnly": false }, { - "$id": "401", + "$id": "397", "Name": "text_offset", "SerializedName": "text_offset", "Description": "", "Type": { - "$id": "402", + "$id": "398", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "403", + "$id": "399", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -2943,56 +2921,12 @@ "IsReadOnly": false }, { - "$id": "404", + "$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.", "Type": { - "$id": "405", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "406", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "407", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "stop", - "IsNullable": false - }, - { - "$id": "408", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "409", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "length", - "IsNullable": false - }, - { - "$id": "410", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "411", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "content_filter", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "72" }, "IsRequired": true, "IsReadOnly": false @@ -3005,12 +2939,12 @@ "IsReadOnly": false }, { - "$id": "412", + "$id": "401", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$ref": "223" + "$ref": "239" }, "IsRequired": false, "IsReadOnly": false @@ -3018,13 +2952,13 @@ ] }, { - "$ref": "383" + "$ref": "379" }, { - "$ref": "389" + "$ref": "385" }, { - "$id": "413", + "$id": "402", "Kind": "Model", "Name": "CreateEditRequest", "Namespace": "OpenAI", @@ -3032,23 +2966,23 @@ "Usage": "Input", "Properties": [ { - "$id": "414", + "$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.", "Type": { - "$ref": "34" + "$ref": "76" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "415", + "$id": "404", "Name": "input", "SerializedName": "input", "Description": "The input text to use as a starting point for the edit.", "Type": { - "$id": "416", + "$id": "405", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3057,12 +2991,12 @@ "IsReadOnly": false }, { - "$id": "417", + "$id": "406", "Name": "instruction", "SerializedName": "instruction", "Description": "The instruction that tells the model how to edit the prompt.", "Type": { - "$id": "418", + "$id": "407", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3071,12 +3005,12 @@ "IsReadOnly": false }, { - "$id": "419", + "$id": "408", "Name": "n", "SerializedName": "n", "Description": "How many edits to generate for the input and instruction.", "Type": { - "$id": "420", + "$id": "409", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3085,12 +3019,12 @@ "IsReadOnly": false }, { - "$id": "421", + "$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": "422", + "$id": "411", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3099,12 +3033,12 @@ "IsReadOnly": false }, { - "$id": "423", + "$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": "424", + "$id": "413", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3115,7 +3049,7 @@ ] }, { - "$id": "425", + "$id": "414", "Kind": "Model", "Name": "CreateEditResponse", "Namespace": "OpenAI", @@ -3124,16 +3058,16 @@ "Usage": "Output", "Properties": [ { - "$id": "426", + "$id": "415", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always `edit`.", "Type": { - "$id": "427", + "$id": "416", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$ref": "37" + "$ref": "79" }, "Value": "edit", "IsNullable": false @@ -3142,12 +3076,12 @@ "IsReadOnly": false }, { - "$id": "428", + "$id": "417", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) of when the edit was created.", "Type": { - "$id": "429", + "$id": "418", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3156,16 +3090,16 @@ "IsReadOnly": false }, { - "$id": "430", + "$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": "431", + "$id": "420", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "432", + "$id": "421", "Kind": "Model", "Name": "CreateEditResponseChoice", "Namespace": "OpenAI", @@ -3173,12 +3107,12 @@ "Usage": "Output", "Properties": [ { - "$id": "433", + "$id": "422", "Name": "text", "SerializedName": "text", "Description": "The edited result.", "Type": { - "$id": "434", + "$id": "423", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3187,12 +3121,12 @@ "IsReadOnly": false }, { - "$id": "435", + "$id": "424", "Name": "index", "SerializedName": "index", "Description": "The index of the choice in the list of choices.", "Type": { - "$id": "436", + "$id": "425", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3201,43 +3135,12 @@ "IsReadOnly": false }, { - "$id": "437", + "$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.", "Type": { - "$id": "438", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "439", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "440", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "stop", - "IsNullable": false - }, - { - "$id": "441", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "442", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "length", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "81" }, "IsRequired": true, "IsReadOnly": false @@ -3250,12 +3153,12 @@ "IsReadOnly": false }, { - "$id": "443", + "$id": "427", "Name": "usage", "SerializedName": "usage", "Description": "", "Type": { - "$ref": "223" + "$ref": "239" }, "IsRequired": true, "IsReadOnly": false @@ -3263,10 +3166,10 @@ ] }, { - "$ref": "432" + "$ref": "421" }, { - "$id": "444", + "$id": "428", "Kind": "Model", "Name": "CreateEmbeddingRequest", "Namespace": "OpenAI", @@ -3274,38 +3177,38 @@ "Usage": "Input", "Properties": [ { - "$id": "445", + "$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.", "Type": { - "$ref": "39" + "$ref": "84" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "446", + "$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": "447", + "$id": "431", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "448", + "$id": "432", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "449", + "$id": "433", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "450", + "$id": "434", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3313,11 +3216,11 @@ "IsNullable": false }, { - "$id": "451", + "$id": "435", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "452", + "$id": "436", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3325,15 +3228,15 @@ "IsNullable": false }, { - "$id": "453", + "$id": "437", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "454", + "$id": "438", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "455", + "$id": "439", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3349,12 +3252,12 @@ "IsReadOnly": false }, { - "$id": "456", + "$id": "440", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "457", + "$id": "441", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3365,7 +3268,7 @@ ] }, { - "$id": "458", + "$id": "442", "Kind": "Model", "Name": "CreateEmbeddingResponse", "Namespace": "OpenAI", @@ -3373,16 +3276,16 @@ "Usage": "Output", "Properties": [ { - "$id": "459", + "$id": "443", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"embedding\".", "Type": { - "$id": "460", + "$id": "444", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$ref": "41" + "$ref": "86" }, "Value": "embedding", "IsNullable": false @@ -3391,12 +3294,12 @@ "IsReadOnly": false }, { - "$id": "461", + "$id": "445", "Name": "model", "SerializedName": "model", "Description": "The name of the model used to generate the embedding.", "Type": { - "$id": "462", + "$id": "446", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3405,16 +3308,16 @@ "IsReadOnly": false }, { - "$id": "463", + "$id": "447", "Name": "data", "SerializedName": "data", "Description": "The list of embeddings generated by the model.", "Type": { - "$id": "464", + "$id": "448", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "465", + "$id": "449", "Kind": "Model", "Name": "Embedding", "Namespace": "OpenAI", @@ -3423,12 +3326,12 @@ "Usage": "Output", "Properties": [ { - "$id": "466", + "$id": "450", "Name": "index", "SerializedName": "index", "Description": "The index of the embedding in the list of embeddings.", "Type": { - "$id": "467", + "$id": "451", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3437,16 +3340,16 @@ "IsReadOnly": false }, { - "$id": "468", + "$id": "452", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"embedding\".", "Type": { - "$id": "469", + "$id": "453", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$ref": "43" + "$ref": "88" }, "Value": "embedding", "IsNullable": false @@ -3455,16 +3358,16 @@ "IsReadOnly": false }, { - "$id": "470", + "$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": "471", + "$id": "455", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "472", + "$id": "456", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -3482,12 +3385,12 @@ "IsReadOnly": false }, { - "$id": "473", + "$id": "457", "Name": "usage", "SerializedName": "usage", "Description": "The usage information for the request.", "Type": { - "$id": "474", + "$id": "458", "Kind": "Model", "Name": "CreateEmbeddingResponseUsage", "Namespace": "OpenAI", @@ -3495,12 +3398,12 @@ "Usage": "Output", "Properties": [ { - "$id": "475", + "$id": "459", "Name": "prompt_tokens", "SerializedName": "prompt_tokens", "Description": "The number of tokens used by the prompt.", "Type": { - "$id": "476", + "$id": "460", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3509,12 +3412,12 @@ "IsReadOnly": false }, { - "$id": "477", + "$id": "461", "Name": "total_tokens", "SerializedName": "total_tokens", "Description": "The total number of tokens used by the request.", "Type": { - "$id": "478", + "$id": "462", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3530,13 +3433,13 @@ ] }, { - "$ref": "465" + "$ref": "449" }, { - "$ref": "474" + "$ref": "458" }, { - "$id": "479", + "$id": "463", "Kind": "Model", "Name": "ListFilesResponse", "Namespace": "OpenAI", @@ -3544,12 +3447,12 @@ "Usage": "Output", "Properties": [ { - "$id": "480", + "$id": "464", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "481", + "$id": "465", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3558,16 +3461,16 @@ "IsReadOnly": false }, { - "$id": "482", + "$id": "466", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "483", + "$id": "467", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "484", + "$id": "468", "Kind": "Model", "Name": "OpenAIFile", "Namespace": "OpenAI", @@ -3576,12 +3479,12 @@ "Usage": "Output", "Properties": [ { - "$id": "485", + "$id": "469", "Name": "id", "SerializedName": "id", "Description": "The file identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "486", + "$id": "470", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3590,16 +3493,16 @@ "IsReadOnly": false }, { - "$id": "487", + "$id": "471", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"file\".", "Type": { - "$id": "488", + "$id": "472", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$ref": "45" + "$ref": "90" }, "Value": "file", "IsNullable": false @@ -3608,12 +3511,12 @@ "IsReadOnly": false }, { - "$id": "489", + "$id": "473", "Name": "bytes", "SerializedName": "bytes", "Description": "The size of the file in bytes.", "Type": { - "$id": "490", + "$id": "474", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -3622,12 +3525,12 @@ "IsReadOnly": false }, { - "$id": "491", + "$id": "475", "Name": "createdAt", "SerializedName": "createdAt", "Description": "The Unix timestamp (in seconds) for when the file was created.", "Type": { - "$id": "492", + "$id": "476", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -3636,12 +3539,12 @@ "IsReadOnly": false }, { - "$id": "493", + "$id": "477", "Name": "filename", "SerializedName": "filename", "Description": "The name of the file.", "Type": { - "$id": "494", + "$id": "478", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3650,12 +3553,12 @@ "IsReadOnly": false }, { - "$id": "495", + "$id": "479", "Name": "purpose", "SerializedName": "purpose", "Description": "The intended purpose of the file. Currently, only \"fine-tune\" is supported.", "Type": { - "$id": "496", + "$id": "480", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3664,106 +3567,23 @@ "IsReadOnly": false }, { - "$id": "497", + "$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`.", "Type": { - "$id": "498", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "499", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "500", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "uploaded", - "IsNullable": false - }, - { - "$id": "501", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "502", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "processed", - "IsNullable": false - }, - { - "$id": "503", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "504", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "pending", - "IsNullable": false - }, - { - "$id": "505", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "506", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "error", - "IsNullable": false - }, - { - "$id": "507", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "508", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "deleting", - "IsNullable": false - }, - { - "$id": "509", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "510", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "deleted", - "IsNullable": false - } - ], - "IsNullable": false + "$ref": "92" }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "511", + "$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": "512", + "$id": "483", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3781,10 +3601,10 @@ ] }, { - "$ref": "484" + "$ref": "468" }, { - "$id": "513", + "$id": "484", "Kind": "Model", "Name": "CreateFileRequest", "Namespace": "OpenAI", @@ -3792,12 +3612,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "514", + "$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": "515", + "$id": "486", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -3806,12 +3626,12 @@ "IsReadOnly": false }, { - "$id": "516", + "$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": "517", + "$id": "488", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3822,7 +3642,7 @@ ] }, { - "$id": "518", + "$id": "489", "Kind": "Model", "Name": "DeleteFileResponse", "Namespace": "OpenAI", @@ -3830,12 +3650,12 @@ "Usage": "Output", "Properties": [ { - "$id": "519", + "$id": "490", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "520", + "$id": "491", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3844,12 +3664,12 @@ "IsReadOnly": false }, { - "$id": "521", + "$id": "492", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "522", + "$id": "493", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3858,12 +3678,12 @@ "IsReadOnly": false }, { - "$id": "523", + "$id": "494", "Name": "deleted", "SerializedName": "deleted", "Description": "", "Type": { - "$id": "524", + "$id": "495", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -3874,7 +3694,7 @@ ] }, { - "$id": "525", + "$id": "496", "Kind": "Model", "Name": "CreateFineTuneRequest", "Namespace": "OpenAI", @@ -3882,12 +3702,12 @@ "Usage": "Input", "Properties": [ { - "$id": "526", + "$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": "527", + "$id": "498", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -3896,12 +3716,12 @@ "IsReadOnly": false }, { - "$id": "528", + "$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": "529", + "$id": "500", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -3910,23 +3730,23 @@ "IsReadOnly": false }, { - "$id": "530", + "$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.", "Type": { - "$ref": "47" + "$ref": "99" }, "IsRequired": false, "IsReadOnly": false }, { - "$id": "531", + "$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": "532", + "$id": "503", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3935,12 +3755,12 @@ "IsReadOnly": false }, { - "$id": "533", + "$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": "534", + "$id": "505", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -3949,12 +3769,12 @@ "IsReadOnly": false }, { - "$id": "535", + "$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": "536", + "$id": "507", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3963,12 +3783,12 @@ "IsReadOnly": false }, { - "$id": "537", + "$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": "538", + "$id": "509", "Kind": "Primitive", "Name": "Float64", "IsNullable": true @@ -3977,12 +3797,12 @@ "IsReadOnly": false }, { - "$id": "539", + "$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": "540", + "$id": "511", "Kind": "Primitive", "Name": "Boolean", "IsNullable": true @@ -3991,12 +3811,12 @@ "IsReadOnly": false }, { - "$id": "541", + "$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": "542", + "$id": "513", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4005,12 +3825,12 @@ "IsReadOnly": false }, { - "$id": "543", + "$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": "544", + "$id": "515", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -4019,16 +3839,16 @@ "IsReadOnly": false }, { - "$id": "545", + "$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": "546", + "$id": "517", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "547", + "$id": "518", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4039,12 +3859,12 @@ "IsReadOnly": false }, { - "$id": "548", + "$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": "549", + "$id": "520", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -4055,7 +3875,7 @@ ] }, { - "$id": "550", + "$id": "521", "Kind": "Model", "Name": "FineTune", "Namespace": "OpenAI", @@ -4065,12 +3885,12 @@ "Usage": "Output", "Properties": [ { - "$id": "551", + "$id": "522", "Name": "id", "SerializedName": "id", "Description": "The object identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "552", + "$id": "523", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4079,16 +3899,16 @@ "IsReadOnly": false }, { - "$id": "553", + "$id": "524", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"fine-tune\".", "Type": { - "$id": "554", + "$id": "525", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$ref": "52" + "$ref": "104" }, "Value": "fine-tune", "IsNullable": false @@ -4097,12 +3917,12 @@ "IsReadOnly": false }, { - "$id": "555", + "$id": "526", "Name": "created_at", "SerializedName": "created_at", "Description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", "Type": { - "$id": "556", + "$id": "527", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4111,12 +3931,12 @@ "IsReadOnly": false }, { - "$id": "557", + "$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": "558", + "$id": "529", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4125,12 +3945,12 @@ "IsReadOnly": false }, { - "$id": "559", + "$id": "530", "Name": "model", "SerializedName": "model", "Description": "The base model that is being fine-tuned.", "Type": { - "$id": "560", + "$id": "531", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4139,121 +3959,51 @@ "IsReadOnly": false }, { - "$id": "561", + "$id": "532", "Name": "fine_tuned_model", "SerializedName": "fine_tuned_model", "Description": "The name of the fine-tuned model that is being created.", "Type": { - "$id": "562", + "$id": "533", "Kind": "Primitive", "Name": "String", "IsNullable": true - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "563", - "Name": "organization_id", - "SerializedName": "organization_id", - "Description": "The organization that owns the fine-tuning job.", - "Type": { - "$id": "564", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "565", - "Name": "status", - "SerializedName": "status", - "Description": "The current status of the fine-tuning job, which can be either `created`, `running`,\n`succeeded`, `failed`, or `cancelled`.", - "Type": { - "$id": "566", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "567", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "568", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "created", - "IsNullable": false - }, - { - "$id": "569", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "570", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "running", - "IsNullable": false - }, - { - "$id": "571", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "572", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "succeeded", - "IsNullable": false - }, - { - "$id": "573", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "574", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "failed", - "IsNullable": false - }, - { - "$id": "575", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "576", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "cancelled", - "IsNullable": false - } - ], + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "534", + "Name": "organization_id", + "SerializedName": "organization_id", + "Description": "The organization that owns the fine-tuning job.", + "Type": { + "$id": "535", + "Kind": "Primitive", + "Name": "String", "IsNullable": false }, "IsRequired": true, "IsReadOnly": false }, { - "$id": "577", + "$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`.", + "Type": { + "$ref": "106" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$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": "578", + "$id": "538", "Kind": "Model", "Name": "FineTuneHyperparams", "Namespace": "OpenAI", @@ -4261,12 +4011,12 @@ "Usage": "Output", "Properties": [ { - "$id": "579", + "$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": "580", + "$id": "540", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4275,12 +4025,12 @@ "IsReadOnly": false }, { - "$id": "581", + "$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": "582", + "$id": "542", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4289,12 +4039,12 @@ "IsReadOnly": false }, { - "$id": "583", + "$id": "543", "Name": "prompt_loss_weight", "SerializedName": "prompt_loss_weight", "Description": "The weight to use for loss on the prompt tokens.", "Type": { - "$id": "584", + "$id": "544", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4303,12 +4053,12 @@ "IsReadOnly": false }, { - "$id": "585", + "$id": "545", "Name": "learning_rate_multiplier", "SerializedName": "learning_rate_multiplier", "Description": "The learning rate multiplier to use for training.", "Type": { - "$id": "586", + "$id": "546", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -4317,12 +4067,12 @@ "IsReadOnly": false }, { - "$id": "587", + "$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": "588", + "$id": "548", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4331,12 +4081,12 @@ "IsReadOnly": false }, { - "$id": "589", + "$id": "549", "Name": "classification_positive_class", "SerializedName": "classification_positive_class", "Description": "The positive class to use for computing classification metrics.", "Type": { - "$id": "590", + "$id": "550", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4345,12 +4095,12 @@ "IsReadOnly": false }, { - "$id": "591", + "$id": "551", "Name": "classification_n_classes", "SerializedName": "classification_n_classes", "Description": "The number of classes to use for computing classification metrics.", "Type": { - "$id": "592", + "$id": "552", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -4364,16 +4114,16 @@ "IsReadOnly": false }, { - "$id": "593", + "$id": "553", "Name": "training_files", "SerializedName": "training_files", "Description": "The list of files used for training.", "Type": { - "$id": "594", + "$id": "554", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "484" + "$ref": "468" }, "IsNullable": false }, @@ -4381,16 +4131,16 @@ "IsReadOnly": false }, { - "$id": "595", + "$id": "555", "Name": "validation_files", "SerializedName": "validation_files", "Description": "The list of files used for validation.", "Type": { - "$id": "596", + "$id": "556", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "484" + "$ref": "468" }, "IsNullable": false }, @@ -4398,16 +4148,16 @@ "IsReadOnly": false }, { - "$id": "597", + "$id": "557", "Name": "result_files", "SerializedName": "result_files", "Description": "The compiled results files for the fine-tuning job.", "Type": { - "$id": "598", + "$id": "558", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "484" + "$ref": "468" }, "IsNullable": false }, @@ -4415,16 +4165,16 @@ "IsReadOnly": false }, { - "$id": "599", + "$id": "559", "Name": "events", "SerializedName": "events", "Description": "The list of events that have been observed in the lifecycle of the FineTune job.", "Type": { - "$id": "600", + "$id": "560", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "601", + "$id": "561", "Kind": "Model", "Name": "FineTuneEvent", "Namespace": "OpenAI", @@ -4432,12 +4182,12 @@ "Usage": "Output", "Properties": [ { - "$id": "602", + "$id": "562", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "603", + "$id": "563", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4446,12 +4196,12 @@ "IsReadOnly": false }, { - "$id": "604", + "$id": "564", "Name": "created_at", "SerializedName": "created_at", "Description": "", "Type": { - "$id": "605", + "$id": "565", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4460,12 +4210,12 @@ "IsReadOnly": false }, { - "$id": "606", + "$id": "566", "Name": "level", "SerializedName": "level", "Description": "", "Type": { - "$id": "607", + "$id": "567", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4474,12 +4224,12 @@ "IsReadOnly": false }, { - "$id": "608", + "$id": "568", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "609", + "$id": "569", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4497,13 +4247,13 @@ ] }, { - "$ref": "578" + "$ref": "538" }, { - "$ref": "601" + "$ref": "561" }, { - "$id": "610", + "$id": "570", "Kind": "Model", "Name": "ListFineTunesResponse", "Namespace": "OpenAI", @@ -4511,12 +4261,12 @@ "Usage": "Output", "Properties": [ { - "$id": "611", + "$id": "571", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "612", + "$id": "572", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4525,16 +4275,16 @@ "IsReadOnly": false }, { - "$id": "613", + "$id": "573", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "614", + "$id": "574", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "550" + "$ref": "521" }, "IsNullable": false }, @@ -4544,7 +4294,7 @@ ] }, { - "$id": "615", + "$id": "575", "Kind": "Model", "Name": "ListFineTuneEventsResponse", "Namespace": "OpenAI", @@ -4552,12 +4302,12 @@ "Usage": "Output", "Properties": [ { - "$id": "616", + "$id": "576", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "617", + "$id": "577", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4566,16 +4316,16 @@ "IsReadOnly": false }, { - "$id": "618", + "$id": "578", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "619", + "$id": "579", "Kind": "Array", "Name": "Array", "ElementType": { - "$ref": "601" + "$ref": "561" }, "IsNullable": false }, @@ -4585,7 +4335,7 @@ ] }, { - "$id": "620", + "$id": "580", "Kind": "Model", "Name": "ListModelsResponse", "Namespace": "OpenAI", @@ -4593,12 +4343,12 @@ "Usage": "Output", "Properties": [ { - "$id": "621", + "$id": "581", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "622", + "$id": "582", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4607,16 +4357,16 @@ "IsReadOnly": false }, { - "$id": "623", + "$id": "583", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "624", + "$id": "584", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "625", + "$id": "585", "Kind": "Model", "Name": "Model", "Namespace": "OpenAI", @@ -4625,12 +4375,12 @@ "Usage": "Output", "Properties": [ { - "$id": "626", + "$id": "586", "Name": "id", "SerializedName": "id", "Description": "The model identifier, which can be referenced in the API endpoints.", "Type": { - "$id": "627", + "$id": "587", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4639,16 +4389,16 @@ "IsReadOnly": false }, { - "$id": "628", + "$id": "588", "Name": "object", "SerializedName": "object", "Description": "The object type, which is always \"model\".", "Type": { - "$id": "629", + "$id": "589", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$ref": "54" + "$ref": "112" }, "Value": "model", "IsNullable": false @@ -4657,12 +4407,12 @@ "IsReadOnly": false }, { - "$id": "630", + "$id": "590", "Name": "created", "SerializedName": "created", "Description": "The Unix timestamp (in seconds) when the model was created.", "Type": { - "$id": "631", + "$id": "591", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4671,12 +4421,12 @@ "IsReadOnly": false }, { - "$id": "632", + "$id": "592", "Name": "owned_by", "SerializedName": "owned_by", "Description": "The organization that owns the model.", "Type": { - "$id": "633", + "$id": "593", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4694,10 +4444,10 @@ ] }, { - "$ref": "625" + "$ref": "585" }, { - "$id": "634", + "$id": "594", "Kind": "Model", "Name": "DeleteModelResponse", "Namespace": "OpenAI", @@ -4705,12 +4455,12 @@ "Usage": "Output", "Properties": [ { - "$id": "635", + "$id": "595", "Name": "id", "SerializedName": "id", "Description": "", "Type": { - "$id": "636", + "$id": "596", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4719,12 +4469,12 @@ "IsReadOnly": false }, { - "$id": "637", + "$id": "597", "Name": "object", "SerializedName": "object", "Description": "", "Type": { - "$id": "638", + "$id": "598", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4733,12 +4483,12 @@ "IsReadOnly": false }, { - "$id": "639", + "$id": "599", "Name": "deleted", "SerializedName": "deleted", "Description": "", "Type": { - "$id": "640", + "$id": "600", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -4749,7 +4499,7 @@ ] }, { - "$id": "641", + "$id": "601", "Kind": "Model", "Name": "CreateImageRequest", "Namespace": "OpenAI", @@ -4757,12 +4507,12 @@ "Usage": "Input", "Properties": [ { - "$id": "642", + "$id": "602", "Name": "prompt", "SerializedName": "prompt", "Description": "A text description of the desired image(s). The maximum length is 1000 characters.", "Type": { - "$id": "643", + "$id": "603", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4771,12 +4521,12 @@ "IsReadOnly": false }, { - "$id": "644", + "$id": "604", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "645", + "$id": "605", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -4785,109 +4535,34 @@ "IsReadOnly": false }, { - "$id": "646", + "$id": "606", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", "Type": { - "$id": "647", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "648", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "649", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "256x256", - "IsNullable": true - }, - { - "$id": "650", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "651", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "512x512", - "IsNullable": true - }, - { - "$id": "652", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "653", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "1024x1024", - "IsNullable": true - } - ], - "IsNullable": false + "$ref": "114" }, "IsRequired": false, "IsReadOnly": false }, { - "$id": "654", + "$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`.", "Type": { - "$id": "655", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "656", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "657", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "url", - "IsNullable": true - }, - { - "$id": "658", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "659", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "b64_json", - "IsNullable": true - } - ], - "IsNullable": false + "$ref": "118" }, "IsRequired": false, "IsReadOnly": false }, { - "$id": "660", + "$id": "608", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "661", + "$id": "609", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -4898,7 +4573,7 @@ ] }, { - "$id": "662", + "$id": "610", "Kind": "Model", "Name": "ImagesResponse", "Namespace": "OpenAI", @@ -4906,12 +4581,12 @@ "Usage": "Output", "Properties": [ { - "$id": "663", + "$id": "611", "Name": "created", "SerializedName": "created", "Description": "", "Type": { - "$id": "664", + "$id": "612", "Kind": "Primitive", "Name": "DateTimeUnix", "IsNullable": false @@ -4920,16 +4595,16 @@ "IsReadOnly": false }, { - "$id": "665", + "$id": "613", "Name": "data", "SerializedName": "data", "Description": "", "Type": { - "$id": "666", + "$id": "614", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "667", + "$id": "615", "Kind": "Model", "Name": "Image", "Namespace": "OpenAI", @@ -4938,12 +4613,12 @@ "Usage": "Output", "Properties": [ { - "$id": "668", + "$id": "616", "Name": "url", "SerializedName": "url", "Description": "The URL of the generated image, if `response_format` is `url` (default).", "Type": { - "$id": "669", + "$id": "617", "Kind": "Primitive", "Name": "Uri", "IsNullable": false @@ -4952,12 +4627,12 @@ "IsReadOnly": false }, { - "$id": "670", + "$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": "671", + "$id": "619", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -4975,10 +4650,10 @@ ] }, { - "$ref": "667" + "$ref": "615" }, { - "$id": "672", + "$id": "620", "Kind": "Model", "Name": "CreateImageEditRequest", "Namespace": "OpenAI", @@ -4986,12 +4661,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "673", + "$id": "621", "Name": "prompt", "SerializedName": "prompt", "Description": "A text description of the desired image(s). The maximum length is 1000 characters.", "Type": { - "$id": "674", + "$id": "622", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5000,12 +4675,12 @@ "IsReadOnly": false }, { - "$id": "675", + "$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": "676", + "$id": "624", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -5014,12 +4689,12 @@ "IsReadOnly": false }, { - "$id": "677", + "$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": "678", + "$id": "626", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -5028,12 +4703,12 @@ "IsReadOnly": false }, { - "$id": "679", + "$id": "627", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "680", + "$id": "628", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -5042,109 +4717,34 @@ "IsReadOnly": false }, { - "$id": "681", + "$id": "629", "Name": "size", "SerializedName": "size", "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", "Type": { - "$id": "682", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "683", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "684", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "256x256", - "IsNullable": true - }, - { - "$id": "685", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "686", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "512x512", - "IsNullable": true - }, - { - "$id": "687", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "688", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "1024x1024", - "IsNullable": true - } - ], - "IsNullable": false + "$ref": "114" }, "IsRequired": false, "IsReadOnly": false }, { - "$id": "689", + "$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`.", "Type": { - "$id": "690", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "691", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "692", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "url", - "IsNullable": true - }, - { - "$id": "693", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "694", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "b64_json", - "IsNullable": true - } - ], - "IsNullable": false + "$ref": "118" }, "IsRequired": false, "IsReadOnly": false }, { - "$id": "695", + "$id": "631", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "696", + "$id": "632", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5155,7 +4755,7 @@ ] }, { - "$id": "697", + "$id": "633", "Kind": "Model", "Name": "CreateImageVariationRequest", "Namespace": "OpenAI", @@ -5163,12 +4763,12 @@ "Usage": "Input,Multipart", "Properties": [ { - "$id": "698", + "$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": "699", + "$id": "635", "Kind": "Primitive", "Name": "Bytes", "IsNullable": false @@ -5177,12 +4777,12 @@ "IsReadOnly": false }, { - "$id": "700", + "$id": "636", "Name": "n", "SerializedName": "n", "Description": "The number of images to generate. Must be between 1 and 10.", "Type": { - "$id": "701", + "$id": "637", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": true @@ -5191,109 +4791,34 @@ "IsReadOnly": false }, { - "$id": "702", + "$id": "638", "Name": "size", "SerializedName": "size", - "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", - "Type": { - "$id": "703", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "704", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "705", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "256x256", - "IsNullable": true - }, - { - "$id": "706", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "707", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "512x512", - "IsNullable": true - }, - { - "$id": "708", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "709", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "1024x1024", - "IsNullable": true - } - ], - "IsNullable": false - }, - "IsRequired": false, - "IsReadOnly": false - }, - { - "$id": "710", - "Name": "response_format", - "SerializedName": "response_format", - "Description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", - "Type": { - "$id": "711", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "712", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "713", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "url", - "IsNullable": true - }, - { - "$id": "714", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "715", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "b64_json", - "IsNullable": true - } - ], - "IsNullable": false + "Description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "Type": { + "$ref": "114" + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$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`.", + "Type": { + "$ref": "118" }, "IsRequired": false, "IsReadOnly": false }, { - "$id": "716", + "$id": "640", "Name": "user", "SerializedName": "user", "Description": "", "Type": { - "$id": "717", + "$id": "641", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5304,7 +4829,7 @@ ] }, { - "$id": "718", + "$id": "642", "Kind": "Model", "Name": "CreateModerationRequest", "Namespace": "OpenAI", @@ -5312,27 +4837,27 @@ "Usage": "Input", "Properties": [ { - "$id": "719", + "$id": "643", "Name": "input", "SerializedName": "input", "Description": "The input text to classify", "Type": { - "$id": "720", + "$id": "644", "Kind": "Union", "Name": "Union", "UnionItemTypes": [ { - "$id": "721", + "$id": "645", "Kind": "Primitive", "Name": "String", "IsNullable": false }, { - "$id": "722", + "$id": "646", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "723", + "$id": "647", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5346,12 +4871,12 @@ "IsReadOnly": false }, { - "$id": "724", + "$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`.", "Type": { - "$ref": "56" + "$ref": "121" }, "IsRequired": false, "IsReadOnly": false @@ -5359,7 +4884,7 @@ ] }, { - "$id": "725", + "$id": "649", "Kind": "Model", "Name": "CreateModerationResponse", "Namespace": "OpenAI", @@ -5367,12 +4892,12 @@ "Usage": "Output", "Properties": [ { - "$id": "726", + "$id": "650", "Name": "id", "SerializedName": "id", "Description": "The unique identifier for the moderation request.", "Type": { - "$id": "727", + "$id": "651", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5381,12 +4906,12 @@ "IsReadOnly": false }, { - "$id": "728", + "$id": "652", "Name": "model", "SerializedName": "model", "Description": "The model used to generate the moderation results.", "Type": { - "$id": "729", + "$id": "653", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5395,16 +4920,16 @@ "IsReadOnly": false }, { - "$id": "730", + "$id": "654", "Name": "results", "SerializedName": "results", "Description": "A list of moderation objects.", "Type": { - "$id": "731", + "$id": "655", "Kind": "Array", "Name": "Array", "ElementType": { - "$id": "732", + "$id": "656", "Kind": "Model", "Name": "CreateModerationResponseResult", "Namespace": "OpenAI", @@ -5412,12 +4937,12 @@ "Usage": "Output", "Properties": [ { - "$id": "733", + "$id": "657", "Name": "flagged", "SerializedName": "flagged", "Description": "Whether the content violates [OpenAI's usage policies](/policies/usage-policies).", "Type": { - "$id": "734", + "$id": "658", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5426,12 +4951,12 @@ "IsReadOnly": false }, { - "$id": "735", + "$id": "659", "Name": "categories", "SerializedName": "categories", "Description": "A list of the categories, and whether they are flagged or not.", "Type": { - "$id": "736", + "$id": "660", "Kind": "Model", "Name": "CreateModerationResponseResultCategories", "Namespace": "OpenAI", @@ -5439,12 +4964,12 @@ "Usage": "Output", "Properties": [ { - "$id": "737", + "$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": "738", + "$id": "662", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5453,12 +4978,12 @@ "IsReadOnly": false }, { - "$id": "739", + "$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": "740", + "$id": "664", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5467,12 +4992,12 @@ "IsReadOnly": false }, { - "$id": "741", + "$id": "665", "Name": "harassment", "SerializedName": "harassment", "Description": "Content that expresses, incites, or promotes harassing language towards any target.", "Type": { - "$id": "742", + "$id": "666", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5481,12 +5006,12 @@ "IsReadOnly": false }, { - "$id": "743", + "$id": "667", "Name": "harassment/threatening", "SerializedName": "harassment/threatening", "Description": "Harassment content that also includes violence or serious harm towards any target.", "Type": { - "$id": "744", + "$id": "668", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5495,12 +5020,12 @@ "IsReadOnly": false }, { - "$id": "745", + "$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": "746", + "$id": "670", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5509,12 +5034,12 @@ "IsReadOnly": false }, { - "$id": "747", + "$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": "748", + "$id": "672", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5523,12 +5048,12 @@ "IsReadOnly": false }, { - "$id": "749", + "$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": "750", + "$id": "674", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5537,12 +5062,12 @@ "IsReadOnly": false }, { - "$id": "751", + "$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": "752", + "$id": "676", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5551,12 +5076,12 @@ "IsReadOnly": false }, { - "$id": "753", + "$id": "677", "Name": "sexual/minors", "SerializedName": "sexual/minors", "Description": "Sexual content that includes an individual who is under 18 years old.", "Type": { - "$id": "754", + "$id": "678", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5565,12 +5090,12 @@ "IsReadOnly": false }, { - "$id": "755", + "$id": "679", "Name": "violence", "SerializedName": "violence", "Description": "Content that depicts death, violence, or physical injury.", "Type": { - "$id": "756", + "$id": "680", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5579,12 +5104,12 @@ "IsReadOnly": false }, { - "$id": "757", + "$id": "681", "Name": "violence/graphic", "SerializedName": "violence/graphic", "Description": "Content that depicts death, violence, or physical injury in graphic detail.", "Type": { - "$id": "758", + "$id": "682", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -5598,12 +5123,12 @@ "IsReadOnly": false }, { - "$id": "759", + "$id": "683", "Name": "category_scores", "SerializedName": "category_scores", "Description": "A list of the categories along with their scores as predicted by model.", "Type": { - "$id": "760", + "$id": "684", "Kind": "Model", "Name": "CreateModerationResponseResultCategoryScores", "Namespace": "OpenAI", @@ -5611,12 +5136,12 @@ "Usage": "Output", "Properties": [ { - "$id": "761", + "$id": "685", "Name": "hate", "SerializedName": "hate", "Description": "The score for the category 'hate'.", "Type": { - "$id": "762", + "$id": "686", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5625,12 +5150,12 @@ "IsReadOnly": false }, { - "$id": "763", + "$id": "687", "Name": "hate/threatening", "SerializedName": "hate/threatening", "Description": "The score for the category 'hate/threatening'.", "Type": { - "$id": "764", + "$id": "688", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5639,12 +5164,12 @@ "IsReadOnly": false }, { - "$id": "765", + "$id": "689", "Name": "harassment", "SerializedName": "harassment", "Description": "The score for the category 'harassment'.", "Type": { - "$id": "766", + "$id": "690", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5653,12 +5178,12 @@ "IsReadOnly": false }, { - "$id": "767", + "$id": "691", "Name": "harassment/threatening", "SerializedName": "harassment/threatening", "Description": "The score for the category 'harassment/threatening'.", "Type": { - "$id": "768", + "$id": "692", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5667,12 +5192,12 @@ "IsReadOnly": false }, { - "$id": "769", + "$id": "693", "Name": "self-harm", "SerializedName": "self-harm", "Description": "The score for the category 'self-harm'.", "Type": { - "$id": "770", + "$id": "694", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5681,12 +5206,12 @@ "IsReadOnly": false }, { - "$id": "771", + "$id": "695", "Name": "self-harm/intent", "SerializedName": "self-harm/intent", "Description": "The score for the category 'self-harm/intent'.", "Type": { - "$id": "772", + "$id": "696", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5695,12 +5220,12 @@ "IsReadOnly": false }, { - "$id": "773", + "$id": "697", "Name": "self-harm/instructive", "SerializedName": "self-harm/instructive", "Description": "The score for the category 'self-harm/instructive'.", "Type": { - "$id": "774", + "$id": "698", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5709,12 +5234,12 @@ "IsReadOnly": false }, { - "$id": "775", + "$id": "699", "Name": "sexual", "SerializedName": "sexual", "Description": "The score for the category 'sexual'.", "Type": { - "$id": "776", + "$id": "700", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5723,12 +5248,12 @@ "IsReadOnly": false }, { - "$id": "777", + "$id": "701", "Name": "sexual/minors", "SerializedName": "sexual/minors", "Description": "The score for the category 'sexual/minors'.", "Type": { - "$id": "778", + "$id": "702", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5737,12 +5262,12 @@ "IsReadOnly": false }, { - "$id": "779", + "$id": "703", "Name": "violence", "SerializedName": "violence", "Description": "The score for the category 'violence'.", "Type": { - "$id": "780", + "$id": "704", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5751,12 +5276,12 @@ "IsReadOnly": false }, { - "$id": "781", + "$id": "705", "Name": "violence/graphic", "SerializedName": "violence/graphic", "Description": "The score for the category 'violence/graphic'.", "Type": { - "$id": "782", + "$id": "706", "Kind": "Primitive", "Name": "Float64", "IsNullable": false @@ -5779,16 +5304,16 @@ ] }, { - "$ref": "732" + "$ref": "656" }, { - "$ref": "736" + "$ref": "660" }, { - "$ref": "760" + "$ref": "684" }, { - "$id": "783", + "$id": "707", "Kind": "Model", "Name": "ErrorResponse", "Namespace": "OpenAI", @@ -5796,12 +5321,12 @@ "Usage": "Output", "Properties": [ { - "$id": "784", + "$id": "708", "Name": "error", "SerializedName": "error", "Description": "", "Type": { - "$id": "785", + "$id": "709", "Kind": "Model", "Name": "Error", "Namespace": "OpenAI", @@ -5809,12 +5334,12 @@ "Usage": "Output", "Properties": [ { - "$id": "786", + "$id": "710", "Name": "type", "SerializedName": "type", "Description": "", "Type": { - "$id": "787", + "$id": "711", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5823,12 +5348,12 @@ "IsReadOnly": false }, { - "$id": "788", + "$id": "712", "Name": "message", "SerializedName": "message", "Description": "", "Type": { - "$id": "789", + "$id": "713", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -5837,12 +5362,12 @@ "IsReadOnly": false }, { - "$id": "790", + "$id": "714", "Name": "param", "SerializedName": "param", "Description": "", "Type": { - "$id": "791", + "$id": "715", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -5851,12 +5376,12 @@ "IsReadOnly": false }, { - "$id": "792", + "$id": "716", "Name": "code", "SerializedName": "code", "Description": "", "Type": { - "$id": "793", + "$id": "717", "Kind": "Primitive", "Name": "String", "IsNullable": true @@ -5872,183 +5397,49 @@ ] }, { - "$ref": "785" - }, - { - "$id": "794", - "Kind": "Model", - "Name": "FineTuningEvent", - "Namespace": "OpenAI", - "IsNullable": false, - "Usage": "None", - "Properties": [ - { - "$id": "795", - "Name": "object", - "SerializedName": "object", - "Description": "", - "Type": { - "$id": "796", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "797", - "Name": "created_at", - "SerializedName": "created_at", - "Description": "", - "Type": { - "$id": "798", - "Kind": "Primitive", - "Name": "DateTimeUnix", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "799", - "Name": "level", - "SerializedName": "level", - "Description": "", - "Type": { - "$id": "800", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "801", - "Name": "message", - "SerializedName": "message", - "Description": "", - "Type": { - "$id": "802", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "IsRequired": true, - "IsReadOnly": false - }, - { - "$id": "803", - "Name": "data", - "SerializedName": "data", - "Description": "", - "Type": { - "$id": "804", - "Kind": "Dictionary", - "Name": "Dictionary", - "KeyType": { - "$id": "805", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "ValueType": { - "$id": "806", - "Kind": "Intrinsic", - "Name": "unknown", - "IsNullable": false - }, - "IsNullable": true - }, - "IsRequired": false, - "IsReadOnly": false - }, - { - "$id": "807", - "Name": "type", - "SerializedName": "type", - "Description": "", - "Type": { - "$id": "808", - "Kind": "Union", - "Name": "Union", - "UnionItemTypes": [ - { - "$id": "809", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "810", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "message", - "IsNullable": false - }, - { - "$id": "811", - "Kind": "Literal", - "Name": "Literal", - "LiteralValueType": { - "$id": "812", - "Kind": "Primitive", - "Name": "String", - "IsNullable": false - }, - "Value": "metrics", - "IsNullable": false - } - ], - "IsNullable": false - }, - "IsRequired": false, - "IsReadOnly": false - } - ] + "$ref": "709" } ], "Clients": [ { - "$id": "813", + "$id": "718", "Name": "OpenAIClient", "Description": "", "Operations": [], "Protocol": { - "$id": "814" + "$id": "719" }, "Creatable": true }, { - "$id": "815", + "$id": "720", "Name": "Audio", "Description": "", "Operations": [], "Protocol": { - "$id": "816" + "$id": "721" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "817", + "$id": "722", "Name": "AudioTranscriptions", "Description": "", "Operations": [ { - "$id": "818", + "$id": "723", "Name": "create", "ResourceName": "Transcriptions", "Summary": "Transcribes audio into the input language.", "Parameters": [ { - "$id": "819", + "$id": "724", "Name": "host", "NameInRequest": "host", "Description": "OpenAI Endpoint", "Type": { - "$id": "820", + "$id": "725", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6063,9 +5454,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "821", + "$id": "726", "Type": { - "$id": "822", + "$id": "727", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6074,15 +5465,15 @@ } }, { - "$id": "823", + "$id": "728", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "824", + "$id": "729", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "825", + "$id": "730", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6092,9 +5483,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "826", + "$id": "731", "Type": { - "$ref": "824" + "$ref": "729" }, "Value": "multipart/form-data" }, @@ -6108,11 +5499,11 @@ "Kind": "Constant" }, { - "$id": "827", + "$id": "732", "Name": "audio", "NameInRequest": "audio", "Type": { - "$ref": "59" + "$ref": "124" }, "Location": "Body", "IsRequired": true, @@ -6125,11 +5516,11 @@ "Kind": "Method" }, { - "$id": "828", + "$id": "733", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "829", + "$id": "734", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6144,9 +5535,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "830", + "$id": "735", "Type": { - "$ref": "829" + "$ref": "734" }, "Value": "application/json" } @@ -6154,12 +5545,12 @@ ], "Responses": [ { - "$id": "831", + "$id": "736", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "81" + "$ref": "135" }, "BodyMediaType": "Json", "Headers": [], @@ -6182,35 +5573,35 @@ } ], "Protocol": { - "$id": "832" + "$id": "737" }, "Creatable": false, "Parent": "Audio" }, { - "$id": "833", + "$id": "738", "Name": "AudioTranslations", "Description": "", "Operations": [ { - "$id": "834", + "$id": "739", "Name": "create", "ResourceName": "Translations", "Summary": "Transcribes audio into the input language.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "835", + "$id": "740", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "836", + "$id": "741", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "837", + "$id": "742", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6220,9 +5611,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "838", + "$id": "743", "Type": { - "$ref": "836" + "$ref": "741" }, "Value": "multipart/form-data" }, @@ -6236,11 +5627,11 @@ "Kind": "Constant" }, { - "$id": "839", + "$id": "744", "Name": "audio", "NameInRequest": "audio", "Type": { - "$ref": "84" + "$ref": "138" }, "Location": "Body", "IsRequired": true, @@ -6253,11 +5644,11 @@ "Kind": "Method" }, { - "$id": "840", + "$id": "745", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "841", + "$id": "746", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6272,9 +5663,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "842", + "$id": "747", "Type": { - "$ref": "841" + "$ref": "746" }, "Value": "application/json" } @@ -6282,12 +5673,12 @@ ], "Responses": [ { - "$id": "843", + "$id": "748", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "104" + "$ref": "147" }, "BodyMediaType": "Json", "Headers": [], @@ -6310,41 +5701,41 @@ } ], "Protocol": { - "$id": "844" + "$id": "749" }, "Creatable": false, "Parent": "Audio" }, { - "$id": "845", + "$id": "750", "Name": "Chat", "Description": "", "Operations": [], "Protocol": { - "$id": "846" + "$id": "751" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "847", + "$id": "752", "Name": "ChatCompletions", "Description": "", "Operations": [ { - "$id": "848", + "$id": "753", "Name": "create", "ResourceName": "Completions", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "849", + "$id": "754", "Name": "CreateChatCompletionRequest", "NameInRequest": "CreateChatCompletionRequest", "Type": { - "$ref": "107" + "$ref": "150" }, "Location": "Body", "IsRequired": true, @@ -6357,11 +5748,11 @@ "Kind": "Method" }, { - "$id": "850", + "$id": "755", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "851", + "$id": "756", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6376,19 +5767,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "852", + "$id": "757", "Type": { - "$ref": "851" + "$ref": "756" }, "Value": "application/json" } }, { - "$id": "853", + "$id": "758", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "854", + "$id": "759", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6403,9 +5794,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "855", + "$id": "760", "Type": { - "$ref": "854" + "$ref": "759" }, "Value": "application/json" } @@ -6413,12 +5804,12 @@ ], "Responses": [ { - "$id": "856", + "$id": "761", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "178" + "$ref": "212" }, "BodyMediaType": "Json", "Headers": [], @@ -6441,42 +5832,42 @@ } ], "Protocol": { - "$id": "857" + "$id": "762" }, "Creatable": false, "Parent": "Chat" }, { - "$id": "858", + "$id": "763", "Name": "FineTuning", "Description": "", "Operations": [], "Protocol": { - "$id": "859" + "$id": "764" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "860", + "$id": "765", "Name": "FineTuningJobs", "Description": "", "Operations": [ { - "$id": "861", + "$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": "819" + "$ref": "724" }, { - "$id": "862", + "$id": "767", "Name": "job", "NameInRequest": "job", "Type": { - "$ref": "230" + "$ref": "246" }, "Location": "Body", "IsRequired": true, @@ -6489,11 +5880,11 @@ "Kind": "Method" }, { - "$id": "863", + "$id": "768", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "864", + "$id": "769", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6508,19 +5899,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "865", + "$id": "770", "Type": { - "$ref": "864" + "$ref": "769" }, "Value": "application/json" } }, { - "$id": "866", + "$id": "771", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "867", + "$id": "772", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6535,9 +5926,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "868", + "$id": "773", "Type": { - "$ref": "867" + "$ref": "772" }, "Value": "application/json" } @@ -6545,12 +5936,12 @@ ], "Responses": [ { - "$id": "869", + "$id": "774", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "245" + "$ref": "261" }, "BodyMediaType": "Json", "Headers": [], @@ -6572,20 +5963,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "870", + "$id": "775", "Name": "listPaginated", "ResourceName": "Jobs", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "871", + "$id": "776", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last job from the previous pagination request.", "Type": { - "$id": "872", + "$id": "777", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6601,12 +5992,12 @@ "Kind": "Method" }, { - "$id": "873", + "$id": "778", "Name": "limit", "NameInRequest": "limit", "Description": "Number of fine-tuning jobs to retrieve.", "Type": { - "$id": "874", + "$id": "779", "Kind": "Primitive", "Name": "SafeInt", "IsNullable": false @@ -6622,11 +6013,11 @@ "Kind": "Method" }, { - "$id": "875", + "$id": "780", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "876", + "$id": "781", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6641,9 +6032,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "877", + "$id": "782", "Type": { - "$ref": "876" + "$ref": "781" }, "Value": "application/json" } @@ -6651,12 +6042,12 @@ ], "Responses": [ { - "$id": "878", + "$id": "783", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "298" + "$ref": "301" }, "BodyMediaType": "Json", "Headers": [], @@ -6675,20 +6066,20 @@ "GenerateConvenienceMethod": true }, { - "$id": "879", + "$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": "819" + "$ref": "724" }, { - "$id": "880", + "$id": "785", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Type": { - "$id": "881", + "$id": "786", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6704,11 +6095,11 @@ "Kind": "Method" }, { - "$id": "882", + "$id": "787", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "883", + "$id": "788", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6723,9 +6114,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "884", + "$id": "789", "Type": { - "$ref": "883" + "$ref": "788" }, "Value": "application/json" } @@ -6733,12 +6124,12 @@ ], "Responses": [ { - "$id": "885", + "$id": "790", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "245" + "$ref": "261" }, "BodyMediaType": "Json", "Headers": [], @@ -6757,21 +6148,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "886", + "$id": "791", "Name": "listEvents", "ResourceName": "Jobs", "Summary": "Get status updates for a fine-tuning job.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "887", + "$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": "888", + "$id": "793", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6787,12 +6178,12 @@ "Kind": "Method" }, { - "$id": "889", + "$id": "794", "Name": "after", "NameInRequest": "after", "Description": "Identifier for the last event from the previous pagination request.", "Type": { - "$id": "890", + "$id": "795", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6808,12 +6199,12 @@ "Kind": "Method" }, { - "$id": "891", + "$id": "796", "Name": "limit", "NameInRequest": "limit", "Description": "Number of events to retrieve.", "Type": { - "$id": "892", + "$id": "797", "Kind": "Primitive", "Name": "Int64", "IsNullable": false @@ -6829,11 +6220,11 @@ "Kind": "Method" }, { - "$id": "893", + "$id": "798", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "894", + "$id": "799", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6848,9 +6239,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "895", + "$id": "800", "Type": { - "$ref": "894" + "$ref": "799" }, "Value": "application/json" } @@ -6858,12 +6249,12 @@ ], "Responses": [ { - "$id": "896", + "$id": "801", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "305" + "$ref": "308" }, "BodyMediaType": "Json", "Headers": [], @@ -6882,21 +6273,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "897", + "$id": "802", "Name": "cancel", "ResourceName": "Jobs", "Summary": "Immediately cancel a fine-tune job.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "898", + "$id": "803", "Name": "fine_tuning_job_id", "NameInRequest": "fine_tuning_job_id", "Description": "The ID of the fine-tuning job to cancel.", "Type": { - "$id": "899", + "$id": "804", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6912,11 +6303,11 @@ "Kind": "Method" }, { - "$id": "900", + "$id": "805", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "901", + "$id": "806", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -6931,9 +6322,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "902", + "$id": "807", "Type": { - "$ref": "901" + "$ref": "806" }, "Value": "application/json" } @@ -6941,12 +6332,12 @@ ], "Responses": [ { - "$id": "903", + "$id": "808", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "245" + "$ref": "261" }, "BodyMediaType": "Json", "Headers": [], @@ -6966,30 +6357,30 @@ } ], "Protocol": { - "$id": "904" + "$id": "809" }, "Creatable": false, "Parent": "FineTuning" }, { - "$id": "905", + "$id": "810", "Name": "Completions", "Description": "", "Operations": [ { - "$id": "906", + "$id": "811", "Name": "create", "ResourceName": "Completions", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "907", + "$id": "812", "Name": "CreateCompletionRequest", "NameInRequest": "CreateCompletionRequest", "Type": { - "$ref": "327" + "$ref": "323" }, "Location": "Body", "IsRequired": true, @@ -7002,11 +6393,11 @@ "Kind": "Method" }, { - "$id": "908", + "$id": "813", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "909", + "$id": "814", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7021,19 +6412,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "910", + "$id": "815", "Type": { - "$ref": "909" + "$ref": "814" }, "Value": "application/json" } }, { - "$id": "911", + "$id": "816", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "912", + "$id": "817", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7048,9 +6439,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "913", + "$id": "818", "Type": { - "$ref": "912" + "$ref": "817" }, "Value": "application/json" } @@ -7058,12 +6449,12 @@ ], "Responses": [ { - "$id": "914", + "$id": "819", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "372" + "$ref": "368" }, "BodyMediaType": "Json", "Headers": [], @@ -7086,31 +6477,31 @@ } ], "Protocol": { - "$id": "915" + "$id": "820" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "916", + "$id": "821", "Name": "Edits", "Description": "", "Operations": [ { - "$id": "917", + "$id": "822", "Name": "create", "ResourceName": "Edits", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "918", + "$id": "823", "Name": "edit", "NameInRequest": "edit", "Type": { - "$ref": "413" + "$ref": "402" }, "Location": "Body", "IsRequired": true, @@ -7123,11 +6514,11 @@ "Kind": "Method" }, { - "$id": "919", + "$id": "824", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "920", + "$id": "825", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7142,19 +6533,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "921", + "$id": "826", "Type": { - "$ref": "920" + "$ref": "825" }, "Value": "application/json" } }, { - "$id": "922", + "$id": "827", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "923", + "$id": "828", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7169,9 +6560,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "924", + "$id": "829", "Type": { - "$ref": "923" + "$ref": "828" }, "Value": "application/json" } @@ -7179,12 +6570,12 @@ ], "Responses": [ { - "$id": "925", + "$id": "830", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "425" + "$ref": "414" }, "BodyMediaType": "Json", "Headers": [], @@ -7207,31 +6598,31 @@ } ], "Protocol": { - "$id": "926" + "$id": "831" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "927", + "$id": "832", "Name": "Embeddings", "Description": "", "Operations": [ { - "$id": "928", + "$id": "833", "Name": "create", "ResourceName": "Embeddings", "Summary": "Creates an embedding vector representing the input text.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "929", + "$id": "834", "Name": "embedding", "NameInRequest": "embedding", "Type": { - "$ref": "444" + "$ref": "428" }, "Location": "Body", "IsRequired": true, @@ -7244,11 +6635,11 @@ "Kind": "Method" }, { - "$id": "930", + "$id": "835", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "931", + "$id": "836", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7263,19 +6654,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "932", + "$id": "837", "Type": { - "$ref": "931" + "$ref": "836" }, "Value": "application/json" } }, { - "$id": "933", + "$id": "838", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "934", + "$id": "839", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7290,9 +6681,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "935", + "$id": "840", "Type": { - "$ref": "934" + "$ref": "839" }, "Value": "application/json" } @@ -7300,12 +6691,12 @@ ], "Responses": [ { - "$id": "936", + "$id": "841", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "458" + "$ref": "442" }, "BodyMediaType": "Json", "Headers": [], @@ -7328,31 +6719,31 @@ } ], "Protocol": { - "$id": "937" + "$id": "842" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "938", + "$id": "843", "Name": "Files", "Description": "", "Operations": [ { - "$id": "939", + "$id": "844", "Name": "list", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "940", + "$id": "845", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "941", + "$id": "846", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7367,9 +6758,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "942", + "$id": "847", "Type": { - "$ref": "941" + "$ref": "846" }, "Value": "application/json" } @@ -7377,12 +6768,12 @@ ], "Responses": [ { - "$id": "943", + "$id": "848", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "479" + "$ref": "463" }, "BodyMediaType": "Json", "Headers": [], @@ -7401,24 +6792,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "944", + "$id": "849", "Name": "create", "ResourceName": "Files", "Summary": "Returns a list of files that belong to the user's organization.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "945", + "$id": "850", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "946", + "$id": "851", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "947", + "$id": "852", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7428,9 +6819,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "948", + "$id": "853", "Type": { - "$ref": "946" + "$ref": "851" }, "Value": "multipart/form-data" }, @@ -7444,11 +6835,11 @@ "Kind": "Constant" }, { - "$id": "949", + "$id": "854", "Name": "file", "NameInRequest": "file", "Type": { - "$ref": "513" + "$ref": "484" }, "Location": "Body", "IsRequired": true, @@ -7461,11 +6852,11 @@ "Kind": "Method" }, { - "$id": "950", + "$id": "855", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "951", + "$id": "856", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7480,9 +6871,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "952", + "$id": "857", "Type": { - "$ref": "951" + "$ref": "856" }, "Value": "application/json" } @@ -7490,12 +6881,12 @@ ], "Responses": [ { - "$id": "953", + "$id": "858", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "484" + "$ref": "468" }, "BodyMediaType": "Json", "Headers": [], @@ -7517,21 +6908,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "954", + "$id": "859", "Name": "retrieve", "ResourceName": "Files", "Summary": "Returns information about a specific file.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "955", + "$id": "860", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "956", + "$id": "861", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7547,11 +6938,11 @@ "Kind": "Method" }, { - "$id": "957", + "$id": "862", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "958", + "$id": "863", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7566,9 +6957,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "959", + "$id": "864", "Type": { - "$ref": "958" + "$ref": "863" }, "Value": "application/json" } @@ -7576,12 +6967,12 @@ ], "Responses": [ { - "$id": "960", + "$id": "865", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "484" + "$ref": "468" }, "BodyMediaType": "Json", "Headers": [], @@ -7600,21 +6991,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "961", + "$id": "866", "Name": "delete", "ResourceName": "Files", "Summary": "Delete a file", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "962", + "$id": "867", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "963", + "$id": "868", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7630,11 +7021,11 @@ "Kind": "Method" }, { - "$id": "964", + "$id": "869", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "965", + "$id": "870", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7649,9 +7040,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "966", + "$id": "871", "Type": { - "$ref": "965" + "$ref": "870" }, "Value": "application/json" } @@ -7659,12 +7050,12 @@ ], "Responses": [ { - "$id": "967", + "$id": "872", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "518" + "$ref": "489" }, "BodyMediaType": "Json", "Headers": [], @@ -7683,21 +7074,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "968", + "$id": "873", "Name": "download", "ResourceName": "Files", "Summary": "Returns the contents of the specified file.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "969", + "$id": "874", "Name": "file_id", "NameInRequest": "file_id", "Description": "The ID of the file to use for this request.", "Type": { - "$id": "970", + "$id": "875", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7713,11 +7104,11 @@ "Kind": "Method" }, { - "$id": "971", + "$id": "876", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "972", + "$id": "877", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7732,9 +7123,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "973", + "$id": "878", "Type": { - "$ref": "972" + "$ref": "877" }, "Value": "application/json" } @@ -7742,12 +7133,12 @@ ], "Responses": [ { - "$id": "974", + "$id": "879", "StatusCodes": [ 200 ], "BodyType": { - "$id": "975", + "$id": "880", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7770,32 +7161,32 @@ } ], "Protocol": { - "$id": "976" + "$id": "881" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "977", + "$id": "882", "Name": "FineTunes", "Description": "", "Operations": [ { - "$id": "978", + "$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": "819" + "$ref": "724" }, { - "$id": "979", + "$id": "884", "Name": "fine_tune", "NameInRequest": "fine_tune", "Type": { - "$ref": "525" + "$ref": "496" }, "Location": "Body", "IsRequired": true, @@ -7808,11 +7199,11 @@ "Kind": "Method" }, { - "$id": "980", + "$id": "885", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "981", + "$id": "886", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7827,19 +7218,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "982", + "$id": "887", "Type": { - "$ref": "981" + "$ref": "886" }, "Value": "application/json" } }, { - "$id": "983", + "$id": "888", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "984", + "$id": "889", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7854,9 +7245,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "985", + "$id": "890", "Type": { - "$ref": "984" + "$ref": "889" }, "Value": "application/json" } @@ -7864,12 +7255,12 @@ ], "Responses": [ { - "$id": "986", + "$id": "891", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "550" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -7891,21 +7282,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "987", + "$id": "892", "Name": "list", "ResourceName": "FineTunes", "Summary": "List your organization's fine-tuning jobs", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "988", + "$id": "893", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "989", + "$id": "894", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7920,9 +7311,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "990", + "$id": "895", "Type": { - "$ref": "989" + "$ref": "894" }, "Value": "application/json" } @@ -7930,12 +7321,12 @@ ], "Responses": [ { - "$id": "991", + "$id": "896", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "610" + "$ref": "570" }, "BodyMediaType": "Json", "Headers": [], @@ -7954,22 +7345,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "992", + "$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": "819" + "$ref": "724" }, { - "$id": "993", + "$id": "898", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job", "Type": { - "$id": "994", + "$id": "899", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -7985,11 +7376,11 @@ "Kind": "Method" }, { - "$id": "995", + "$id": "900", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "996", + "$id": "901", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8004,9 +7395,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "997", + "$id": "902", "Type": { - "$ref": "996" + "$ref": "901" }, "Value": "application/json" } @@ -8014,12 +7405,12 @@ ], "Responses": [ { - "$id": "998", + "$id": "903", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "550" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -8038,22 +7429,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "999", + "$id": "904", "Name": "listEvents", "ResourceName": "FineTunes", "Summary": "Get fine-grained status updates for a fine-tune job.", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "1000", + "$id": "905", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job to get events for.", "Type": { - "$id": "1001", + "$id": "906", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8069,12 +7460,12 @@ "Kind": "Method" }, { - "$id": "1002", + "$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": "1003", + "$id": "908", "Kind": "Primitive", "Name": "Boolean", "IsNullable": false @@ -8090,11 +7481,11 @@ "Kind": "Method" }, { - "$id": "1004", + "$id": "909", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1005", + "$id": "910", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8109,9 +7500,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1006", + "$id": "911", "Type": { - "$ref": "1005" + "$ref": "910" }, "Value": "application/json" } @@ -8119,12 +7510,12 @@ ], "Responses": [ { - "$id": "1007", + "$id": "912", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "615" + "$ref": "575" }, "BodyMediaType": "Json", "Headers": [], @@ -8143,22 +7534,22 @@ "GenerateConvenienceMethod": true }, { - "$id": "1008", + "$id": "913", "Name": "cancel", "ResourceName": "FineTunes", "Summary": "Immediately cancel a fine-tune job.", "Deprecated": "deprecated", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "1009", + "$id": "914", "Name": "fine_tune_id", "NameInRequest": "fine_tune_id", "Description": "The ID of the fine-tune job to cancel", "Type": { - "$id": "1010", + "$id": "915", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8174,11 +7565,11 @@ "Kind": "Method" }, { - "$id": "1011", + "$id": "916", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1012", + "$id": "917", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8193,9 +7584,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1013", + "$id": "918", "Type": { - "$ref": "1012" + "$ref": "917" }, "Value": "application/json" } @@ -8203,12 +7594,12 @@ ], "Responses": [ { - "$id": "1014", + "$id": "919", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "550" + "$ref": "521" }, "BodyMediaType": "Json", "Headers": [], @@ -8228,31 +7619,31 @@ } ], "Protocol": { - "$id": "1015" + "$id": "920" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "1016", + "$id": "921", "Name": "ModelsOps", "Description": "", "Operations": [ { - "$id": "1017", + "$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": "819" + "$ref": "724" }, { - "$id": "1018", + "$id": "923", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1019", + "$id": "924", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8267,9 +7658,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1020", + "$id": "925", "Type": { - "$ref": "1019" + "$ref": "924" }, "Value": "application/json" } @@ -8277,12 +7668,12 @@ ], "Responses": [ { - "$id": "1021", + "$id": "926", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "620" + "$ref": "580" }, "BodyMediaType": "Json", "Headers": [], @@ -8301,21 +7692,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "1022", + "$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": "819" + "$ref": "724" }, { - "$id": "1023", + "$id": "928", "Name": "model", "NameInRequest": "model", "Description": "The ID of the model to use for this request.", "Type": { - "$id": "1024", + "$id": "929", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8331,11 +7722,11 @@ "Kind": "Method" }, { - "$id": "1025", + "$id": "930", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1026", + "$id": "931", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8350,9 +7741,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1027", + "$id": "932", "Type": { - "$ref": "1026" + "$ref": "931" }, "Value": "application/json" } @@ -8360,12 +7751,12 @@ ], "Responses": [ { - "$id": "1028", + "$id": "933", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "625" + "$ref": "585" }, "BodyMediaType": "Json", "Headers": [], @@ -8384,21 +7775,21 @@ "GenerateConvenienceMethod": true }, { - "$id": "1029", + "$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": "819" + "$ref": "724" }, { - "$id": "1030", + "$id": "935", "Name": "model", "NameInRequest": "model", "Description": "The model to delete", "Type": { - "$id": "1031", + "$id": "936", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8414,11 +7805,11 @@ "Kind": "Method" }, { - "$id": "1032", + "$id": "937", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1033", + "$id": "938", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8433,9 +7824,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1034", + "$id": "939", "Type": { - "$ref": "1033" + "$ref": "938" }, "Value": "application/json" } @@ -8443,12 +7834,12 @@ ], "Responses": [ { - "$id": "1035", + "$id": "940", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "634" + "$ref": "594" }, "BodyMediaType": "Json", "Headers": [], @@ -8468,31 +7859,31 @@ } ], "Protocol": { - "$id": "1036" + "$id": "941" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "1037", + "$id": "942", "Name": "Images", "Description": "", "Operations": [ { - "$id": "1038", + "$id": "943", "Name": "create", "ResourceName": "Images", "Summary": "Creates an image given a prompt", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "1039", + "$id": "944", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "641" + "$ref": "601" }, "Location": "Body", "IsRequired": true, @@ -8505,11 +7896,11 @@ "Kind": "Method" }, { - "$id": "1040", + "$id": "945", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1041", + "$id": "946", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8524,19 +7915,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1042", + "$id": "947", "Type": { - "$ref": "1041" + "$ref": "946" }, "Value": "application/json" } }, { - "$id": "1043", + "$id": "948", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "1044", + "$id": "949", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8551,9 +7942,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1045", + "$id": "950", "Type": { - "$ref": "1044" + "$ref": "949" }, "Value": "application/json" } @@ -8561,12 +7952,12 @@ ], "Responses": [ { - "$id": "1046", + "$id": "951", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "662" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8588,24 +7979,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "1047", + "$id": "952", "Name": "createEdit", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "1048", + "$id": "953", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "1049", + "$id": "954", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "1050", + "$id": "955", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8615,9 +8006,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "1051", + "$id": "956", "Type": { - "$ref": "1049" + "$ref": "954" }, "Value": "multipart/form-data" }, @@ -8631,11 +8022,11 @@ "Kind": "Constant" }, { - "$id": "1052", + "$id": "957", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "672" + "$ref": "620" }, "Location": "Body", "IsRequired": true, @@ -8648,11 +8039,11 @@ "Kind": "Method" }, { - "$id": "1053", + "$id": "958", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1054", + "$id": "959", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8667,9 +8058,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1055", + "$id": "960", "Type": { - "$ref": "1054" + "$ref": "959" }, "Value": "application/json" } @@ -8677,12 +8068,12 @@ ], "Responses": [ { - "$id": "1056", + "$id": "961", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "662" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8704,24 +8095,24 @@ "GenerateConvenienceMethod": true }, { - "$id": "1057", + "$id": "962", "Name": "createVariation", "ResourceName": "Images", "Summary": "Creates an edited or extended image given an original image and a prompt.", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "1058", + "$id": "963", "Name": "contentType", "NameInRequest": "content-type", "Type": { - "$id": "1059", + "$id": "964", "Kind": "Literal", "Name": "Literal", "LiteralValueType": { - "$id": "1060", + "$id": "965", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8731,9 +8122,9 @@ }, "Location": "Header", "DefaultValue": { - "$id": "1061", + "$id": "966", "Type": { - "$ref": "1059" + "$ref": "964" }, "Value": "multipart/form-data" }, @@ -8747,11 +8138,11 @@ "Kind": "Constant" }, { - "$id": "1062", + "$id": "967", "Name": "image", "NameInRequest": "image", "Type": { - "$ref": "697" + "$ref": "633" }, "Location": "Body", "IsRequired": true, @@ -8764,11 +8155,11 @@ "Kind": "Method" }, { - "$id": "1063", + "$id": "968", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1064", + "$id": "969", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8783,9 +8174,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1065", + "$id": "970", "Type": { - "$ref": "1064" + "$ref": "969" }, "Value": "application/json" } @@ -8793,12 +8184,12 @@ ], "Responses": [ { - "$id": "1066", + "$id": "971", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "662" + "$ref": "610" }, "BodyMediaType": "Json", "Headers": [], @@ -8821,31 +8212,31 @@ } ], "Protocol": { - "$id": "1067" + "$id": "972" }, "Creatable": false, "Parent": "OpenAIClient" }, { - "$id": "1068", + "$id": "973", "Name": "Moderations", "Description": "", "Operations": [ { - "$id": "1069", + "$id": "974", "Name": "create", "ResourceName": "Moderations", "Summary": "Classifies if text violates OpenAI's Content Policy", "Parameters": [ { - "$ref": "819" + "$ref": "724" }, { - "$id": "1070", + "$id": "975", "Name": "content", "NameInRequest": "content", "Type": { - "$ref": "718" + "$ref": "642" }, "Location": "Body", "IsRequired": true, @@ -8858,11 +8249,11 @@ "Kind": "Method" }, { - "$id": "1071", + "$id": "976", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "1072", + "$id": "977", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8877,19 +8268,19 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1073", + "$id": "978", "Type": { - "$ref": "1072" + "$ref": "977" }, "Value": "application/json" } }, { - "$id": "1074", + "$id": "979", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "1075", + "$id": "980", "Kind": "Primitive", "Name": "String", "IsNullable": false @@ -8904,9 +8295,9 @@ "Explode": false, "Kind": "Constant", "DefaultValue": { - "$id": "1076", + "$id": "981", "Type": { - "$ref": "1075" + "$ref": "980" }, "Value": "application/json" } @@ -8914,12 +8305,12 @@ ], "Responses": [ { - "$id": "1077", + "$id": "982", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "725" + "$ref": "649" }, "BodyMediaType": "Json", "Headers": [], @@ -8942,16 +8333,16 @@ } ], "Protocol": { - "$id": "1078" + "$id": "983" }, "Creatable": false, "Parent": "OpenAIClient" } ], "Auth": { - "$id": "1079", + "$id": "984", "ApiKey": { - "$id": "1080", + "$id": "985", "Name": "Authorization", "Prefix": "Bearer" } diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/Unbranded-TypeSpec.tsp b/test/UnbrandedProjects/Unbranded-TypeSpec/Unbranded-TypeSpec.tsp index 8a736e4af6c..48709476beb 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/Unbranded-TypeSpec.tsp +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/Unbranded-TypeSpec.tsp @@ -218,7 +218,7 @@ union DaysOfWeekExtensibleEnum { model ModelWithFormat { @doc("url format") - @format("Uri") + @format("uri") sourceUrl: string; @doc("uuid format") diff --git a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json index e505ebb9e96..2afc352eecc 100644 --- a/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json +++ b/test/UnbrandedProjects/Unbranded-TypeSpec/src/Generated/tspCodeModel.json @@ -140,7 +140,7 @@ "Value": "4" } ], - "Namespace": "UnbrandedTypeSpec", + "Namespace": "", "Description": "Simple enum", "IsExtensible": false, "IsNullable": true, @@ -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", @@ -262,7 +262,7 @@ "$id": "34", "Kind": "Enum", "Name": "IntFixedEnum", - "EnumValueType": "Float32", + "EnumValueType": "Int32", "AllowedValues": [ { "$id": "35", @@ -290,7 +290,7 @@ "$id": "38", "Kind": "Enum", "Name": "DaysOfWeekExtensibleEnum", - "EnumValueType": "string", + "EnumValueType": "String", "AllowedValues": [ { "$id": "39",