diff --git a/package-lock.json b/package-lock.json index f770832e..ab23146b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "dev": true }, "@microsoft.azure/autorest.testserver": { - "version": "2.10.33", - "resolved": "https://registry.npmjs.org/@microsoft.azure/autorest.testserver/-/autorest.testserver-2.10.33.tgz", - "integrity": "sha512-jKdH0DM5fhbl0VqG5+cPKuAeUnPlSjyXgSLlFOcPo8vyxNrQCVA3hCzlYZ33pklkvzuAF4cbVJpY79cHC2Qyhw==", + "version": "2.10.36", + "resolved": "https://registry.npmjs.org/@microsoft.azure/autorest.testserver/-/autorest.testserver-2.10.36.tgz", + "integrity": "sha512-PznHUcpSnbnZ7lLzw6AhZ1wvOpqMNfipz3OTencgjCb9lWxuCLCFhIr/6TAkhAp8MPUMuVC5s4uWji927MjOgw==", "dev": true, "requires": { "azure-storage": "^2.4.0", @@ -1739,9 +1739,9 @@ } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "safer-buffer": { @@ -2252,9 +2252,9 @@ "dev": true }, "ws": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.5.tgz", - "integrity": "sha512-C34cIU4+DB2vMyAbmEKossWq2ZQDr6QEyuuCzWrM9zfw1sGc0mYiJ0UnG9zzNykt49C2Fi34hvr2vssFQRS6EA==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", + "integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w==", "dev": true }, "xml2js": { diff --git a/package.json b/package.json index 3a2c290d..23e0551c 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.V3/package.json", "devDependencies": { "@autorest/autorest": "https://github.com/Azure/autorest/releases/download/autorest-3.0.6222/autorest-autorest-3.0.6222.tgz", - "@microsoft.azure/autorest.testserver": "^2.10.33" + "@microsoft.azure/autorest.testserver": "2.10.36" }, "dependencies": {} } diff --git a/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeLayoutAsyncOperation.cs b/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeLayoutAsyncOperation.cs index fa824bb1..830f41a5 100644 --- a/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeLayoutAsyncOperation.cs +++ b/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeLayoutAsyncOperation.cs @@ -56,7 +56,7 @@ namespace Azure.AI.FormRecognizer async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeReceiptAsyncOperation.cs b/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeReceiptAsyncOperation.cs index 43fb3271..a6adbfe3 100644 --- a/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeReceiptAsyncOperation.cs +++ b/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeReceiptAsyncOperation.cs @@ -56,7 +56,7 @@ namespace Azure.AI.FormRecognizer async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeWithCustomModelOperation.cs b/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeWithCustomModelOperation.cs index dda5173b..db1931da 100644 --- a/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeWithCustomModelOperation.cs +++ b/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceAnalyzeWithCustomModelOperation.cs @@ -56,7 +56,7 @@ namespace Azure.AI.FormRecognizer async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceCopyCustomModelOperation.cs b/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceCopyCustomModelOperation.cs index 671aa8b5..853a27a9 100644 --- a/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceCopyCustomModelOperation.cs +++ b/samples/Azure.AI.FormRecognizer/Azure.AI.FormRecognizer/Generated/ServiceCopyCustomModelOperation.cs @@ -56,7 +56,7 @@ namespace Azure.AI.FormRecognizer async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/samples/Azure.Management.Storage/Azure.Management.Storage/Generated/StorageAccountsFailoverOperation.cs b/samples/Azure.Management.Storage/Azure.Management.Storage/Generated/StorageAccountsFailoverOperation.cs index 42c53cf6..db9e86b6 100644 --- a/samples/Azure.Management.Storage/Azure.Management.Storage/Generated/StorageAccountsFailoverOperation.cs +++ b/samples/Azure.Management.Storage/Azure.Management.Storage/Generated/StorageAccountsFailoverOperation.cs @@ -56,7 +56,7 @@ namespace Azure.Management.Storage async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/samples/Azure.Network.Management.Interface/Azure.Network.Management.Interface/Generated/NetworkInterfaceTapConfigurationsDeleteOperation.cs b/samples/Azure.Network.Management.Interface/Azure.Network.Management.Interface/Generated/NetworkInterfaceTapConfigurationsDeleteOperation.cs index adaf0e0b..4d4c2e9f 100644 --- a/samples/Azure.Network.Management.Interface/Azure.Network.Management.Interface/Generated/NetworkInterfaceTapConfigurationsDeleteOperation.cs +++ b/samples/Azure.Network.Management.Interface/Azure.Network.Management.Interface/Generated/NetworkInterfaceTapConfigurationsDeleteOperation.cs @@ -56,7 +56,7 @@ namespace Azure.Network.Management.Interface async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/samples/Azure.Network.Management.Interface/Azure.Network.Management.Interface/Generated/NetworkInterfacesDeleteOperation.cs b/samples/Azure.Network.Management.Interface/Azure.Network.Management.Interface/Generated/NetworkInterfacesDeleteOperation.cs index 2c388337..68835959 100644 --- a/samples/Azure.Network.Management.Interface/Azure.Network.Management.Interface/Generated/NetworkInterfacesDeleteOperation.cs +++ b/samples/Azure.Network.Management.Interface/Azure.Network.Management.Interface/Generated/NetworkInterfacesDeleteOperation.cs @@ -56,7 +56,7 @@ namespace Azure.Network.Management.Interface async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/src/AutoRest.CSharp.V3/Generation/Writers/LongRunningOperationWriter.cs b/src/AutoRest.CSharp.V3/Generation/Writers/LongRunningOperationWriter.cs index c18231f2..1dba3c13 100644 --- a/src/AutoRest.CSharp.V3/Generation/Writers/LongRunningOperationWriter.cs +++ b/src/AutoRest.CSharp.V3/Generation/Writers/LongRunningOperationWriter.cs @@ -34,7 +34,7 @@ namespace AutoRest.CSharp.V3.Generation.Writers { if (async) { - writer.Line($"return await new {typeof(ValueTask)}({responseVariable});"); + writer.Line($"return await new {typeof(ValueTask)}({responseVariable}).ConfigureAwait(false);"); } else { diff --git a/src/AutoRest.CSharp.V3/Output/Models/Requests/LongRunningOperation.cs b/src/AutoRest.CSharp.V3/Output/Models/Requests/LongRunningOperation.cs index 62e8d506..192a3708 100644 --- a/src/AutoRest.CSharp.V3/Output/Models/Requests/LongRunningOperation.cs +++ b/src/AutoRest.CSharp.V3/Output/Models/Requests/LongRunningOperation.cs @@ -36,7 +36,7 @@ namespace AutoRest.CSharp.V3.Output.Models.Requests if (finalResponseSchema != null) { - ResultType = context.TypeFactory.CreateType(finalResponseSchema, false); + ResultType = TypeFactory.GetOutputType(context.TypeFactory.CreateType(finalResponseSchema, false)); ResultSerialization = new SerializationBuilder().Build(finalResponse.HttpResponse.KnownMediaType, finalResponseSchema, ResultType); } else diff --git a/src/assets/Generator.Shared/TypeFormatters.cs b/src/assets/Generator.Shared/TypeFormatters.cs index 24f5cc85..4cbf9126 100644 --- a/src/assets/Generator.Shared/TypeFormatters.cs +++ b/src/assets/Generator.Shared/TypeFormatters.cs @@ -108,7 +108,7 @@ namespace Azure.Core } public static DateTimeOffset ParseDateTimeOffset(string value) => - DateTimeOffset.Parse(value, CultureInfo.InvariantCulture); + DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal); public static TimeSpan ParseTimeSpan(string value, string format) => format switch { diff --git a/test/AutoRest.TestServer.Tests/body-datetime.cs b/test/AutoRest.TestServer.Tests/body-datetime.cs index 5d82512f..eec57a2d 100644 --- a/test/AutoRest.TestServer.Tests/body-datetime.cs +++ b/test/AutoRest.TestServer.Tests/body-datetime.cs @@ -124,6 +124,14 @@ namespace AutoRest.TestServer.Tests return await new DatetimeClient(ClientDiagnostics, pipeline, host).PutUtcMinDateTimeAsync( value); }); + [Test] + [IgnoreOnTestServer(TestServerVersion.V2, "V1 and V2 tests are out of sync")] + public Task GetDateTimeMinLocalNoOffset() => Test(async (host, pipeline) => + { + var response = await new DatetimeClient(ClientDiagnostics, pipeline, host).GetLocalNoOffsetMinDateTimeAsync(); + Assert.AreEqual(DateTimeOffset.Parse("0001-01-01 00:00:00+00:00"), response.Value); + }); + [Test] public Task GetDateTimeMaxLocalNegativeOffsetLowercase() => Test((host, pipeline) => { diff --git a/test/AutoRest.TestServer.Tests/lro.cs b/test/AutoRest.TestServer.Tests/lro.cs index a8b2e68b..52741337 100644 --- a/test/AutoRest.TestServer.Tests/lro.cs +++ b/test/AutoRest.TestServer.Tests/lro.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -716,6 +717,16 @@ namespace AutoRest.TestServer.Tests Assert.AreEqual("Succeeded", result.Value.ProvisioningState); }); + [Test] + public Task LROPostAndGetList() => Test(async (host, pipeline) => + { + var operation = await new LROsClient(ClientDiagnostics, pipeline, host).StartPost202ListAsync(); + var result = await operation.WaitForCompletionAsync().ConfigureAwait(false); + Assert.AreEqual(1, result.Value.Count); + Assert.AreEqual("100", result.Value[0].Id); + Assert.AreEqual("foo", result.Value[0].Name); + }); + [Test] public Task LROPostAsyncNoRetrySucceeded_Sync() => Test((host, pipeline) => { @@ -1361,6 +1372,12 @@ namespace AutoRest.TestServer.Tests Assert.AreEqual("Succeeded", result.Value.ProvisioningState); }); + [Test] + public void LROValueTypeIsReadOnlyList() + { + Assert.AreEqual(typeof(Operation>), typeof(LROsPost202ListOperation).BaseType); + } + private static Response WaitForCompletion(Operation operation, CancellationToken cancellationToken = default) where TResult : notnull { return WaitForCompletion(operation, OperationHelpers.DefaultPollingInterval, cancellationToken); diff --git a/test/AutoRest.TestServer.Tests/media_types.cs b/test/AutoRest.TestServer.Tests/media_types.cs index a8cd5dfd..ef16b815 100644 --- a/test/AutoRest.TestServer.Tests/media_types.cs +++ b/test/AutoRest.TestServer.Tests/media_types.cs @@ -36,5 +36,13 @@ namespace AutoRest.TestServer.Tests var response = await new ServiceClient(ClientDiagnostics, pipeline, host).AnalyzeBodyAsync(ContentType.ApplicationPdf, value); Assert.AreEqual("Nice job with PDF", response.Value); }); + + [Test] + [Ignore("https://github.com/Azure/autorest.csharp/issues/751")] + public Task MediaTypeWithEncoding() => Test(async (host, pipeline) => + { + var response = await new ServiceClient(ClientDiagnostics, pipeline, host).ContentTypeWithEncodingAsync("input"); + Assert.AreEqual("Nice job sending content type with encoding", response.Value); + }); } } diff --git a/test/TestProjects/NameConflicts/Generated/ServiceAnalyzeBodyOperation.cs b/test/TestProjects/NameConflicts/Generated/ServiceAnalyzeBodyOperation.cs index 504879e0..b45d9e52 100644 --- a/test/TestProjects/NameConflicts/Generated/ServiceAnalyzeBodyOperation.cs +++ b/test/TestProjects/NameConflicts/Generated/ServiceAnalyzeBodyOperation.cs @@ -56,7 +56,7 @@ namespace NameConflicts async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/body-datetime/CodeModel.yaml b/test/TestServerProjects/body-datetime/CodeModel.yaml index 2ced6111..860d7518 100644 --- a/test/TestServerProjects/body-datetime/CodeModel.yaml +++ b/test/TestServerProjects/body-datetime/CodeModel.yaml @@ -1408,6 +1408,57 @@ operationGroups: name: GetLocalNegativeOffsetMinDateTime description: 'Get min datetime value 0001-01-01T00:00:00-14:00' protocol: ! {} + - ! + apiVersions: + - ! + version: 1.0.0 + parameters: + - *ref_4 + requests: + - ! + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + path: /datetime/min/localnooffset + method: get + uri: '{$host}' + signatureParameters: [] + responses: + - ! + schema: *ref_1 + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + exceptions: + - ! + schema: *ref_5 + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - default + language: ! + default: + name: GetLocalNoOffsetMinDateTime + description: 'Get min datetime value 0001-01-01T00:00:00' + protocol: ! {} language: ! default: name: Datetime diff --git a/test/TestServerProjects/body-datetime/Generated/DatetimeClient.cs b/test/TestServerProjects/body-datetime/Generated/DatetimeClient.cs index 415a9b6a..77b78938 100644 --- a/test/TestServerProjects/body-datetime/Generated/DatetimeClient.cs +++ b/test/TestServerProjects/body-datetime/Generated/DatetimeClient.cs @@ -758,5 +758,39 @@ namespace body_datetime throw; } } + + /// Get min datetime value 0001-01-01T00:00:00. + /// The cancellation token to use. + public virtual async Task> GetLocalNoOffsetMinDateTimeAsync(CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatetimeClient.GetLocalNoOffsetMinDateTime"); + scope.Start(); + try + { + return await RestClient.GetLocalNoOffsetMinDateTimeAsync(cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get min datetime value 0001-01-01T00:00:00. + /// The cancellation token to use. + public virtual Response GetLocalNoOffsetMinDateTime(CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("DatetimeClient.GetLocalNoOffsetMinDateTime"); + scope.Start(); + try + { + return RestClient.GetLocalNoOffsetMinDateTime(cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/test/TestServerProjects/body-datetime/Generated/DatetimeRestClient.cs b/test/TestServerProjects/body-datetime/Generated/DatetimeRestClient.cs index e81dcef1..e2da370c 100644 --- a/test/TestServerProjects/body-datetime/Generated/DatetimeRestClient.cs +++ b/test/TestServerProjects/body-datetime/Generated/DatetimeRestClient.cs @@ -1097,5 +1097,57 @@ namespace body_datetime throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } + + internal HttpMessage CreateGetLocalNoOffsetMinDateTimeRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(host, false); + uri.AppendPath("/datetime/min/localnooffset", false); + request.Uri = uri; + return message; + } + + /// Get min datetime value 0001-01-01T00:00:00. + /// The cancellation token to use. + public async ValueTask> GetLocalNoOffsetMinDateTimeAsync(CancellationToken cancellationToken = default) + { + using var message = CreateGetLocalNoOffsetMinDateTimeRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DateTimeOffset value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = document.RootElement.GetDateTimeOffset("O"); + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Get min datetime value 0001-01-01T00:00:00. + /// The cancellation token to use. + public Response GetLocalNoOffsetMinDateTime(CancellationToken cancellationToken = default) + { + using var message = CreateGetLocalNoOffsetMinDateTimeRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DateTimeOffset value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = document.RootElement.GetDateTimeOffset("O"); + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } } } diff --git a/test/TestServerProjects/lro/CodeModel.yaml b/test/TestServerProjects/lro/CodeModel.yaml index a6815687..04210d0a 100644 --- a/test/TestServerProjects/lro/CodeModel.yaml +++ b/test/TestServerProjects/lro/CodeModel.yaml @@ -12,7 +12,7 @@ schemas: ! name: Integer description: '' protocol: ! {} - - ! &ref_38 + - ! &ref_41 type: integer apiVersions: - ! @@ -24,7 +24,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_45 + - ! &ref_48 type: integer apiVersions: - ! @@ -36,7 +36,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_57 + - ! &ref_60 type: integer apiVersions: - ! @@ -48,7 +48,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_59 + - ! &ref_62 type: integer apiVersions: - ! @@ -60,7 +60,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_61 + - ! &ref_64 type: integer apiVersions: - ! @@ -72,7 +72,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_63 + - ! &ref_66 type: integer apiVersions: - ! @@ -84,19 +84,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_65 - type: integer - apiVersions: - - ! - version: 1.0.0 - precision: 32 - language: ! - default: - name: Integer - description: '' - header: Retry-After - protocol: ! {} - - ! &ref_70 + - ! &ref_68 type: integer apiVersions: - ! @@ -168,7 +156,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_89 + - ! &ref_88 type: integer apiVersions: - ! @@ -180,7 +168,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_93 + - ! &ref_92 type: integer apiVersions: - ! @@ -192,7 +180,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_97 + - ! &ref_96 type: integer apiVersions: - ! @@ -204,7 +192,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_101 + - ! &ref_100 type: integer apiVersions: - ! @@ -216,7 +204,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_106 + - ! &ref_104 type: integer apiVersions: - ! @@ -228,7 +216,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_108 + - ! &ref_109 type: integer apiVersions: - ! @@ -240,7 +228,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_110 + - ! &ref_111 type: integer apiVersions: - ! @@ -276,7 +264,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_120 + - ! &ref_119 type: integer apiVersions: - ! @@ -288,7 +276,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_127 + - ! &ref_123 type: integer apiVersions: - ! @@ -300,7 +288,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_129 + - ! &ref_130 type: integer apiVersions: - ! @@ -312,7 +300,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_131 + - ! &ref_132 type: integer apiVersions: - ! @@ -360,7 +348,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_144 + - ! &ref_143 type: integer apiVersions: - ! @@ -372,7 +360,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_149 + - ! &ref_147 type: integer apiVersions: - ! @@ -384,7 +372,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_153 + - ! &ref_152 type: integer apiVersions: - ! @@ -420,7 +408,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_163 + - ! &ref_162 type: integer apiVersions: - ! @@ -432,7 +420,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_168 + - ! &ref_166 type: integer apiVersions: - ! @@ -444,7 +432,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_172 + - ! &ref_171 type: integer apiVersions: - ! @@ -456,7 +444,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_174 + - ! &ref_175 type: integer apiVersions: - ! @@ -504,7 +492,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_187 + - ! &ref_186 type: integer apiVersions: - ! @@ -516,7 +504,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_191 + - ! &ref_190 type: integer apiVersions: - ! @@ -528,7 +516,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_195 + - ! &ref_194 type: integer apiVersions: - ! @@ -540,7 +528,7 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_199 + - ! &ref_198 type: integer apiVersions: - ! @@ -552,7 +540,19 @@ schemas: ! description: '' header: Retry-After protocol: ! {} - - ! &ref_203 + - ! &ref_202 + type: integer + apiVersions: + - ! + version: 1.0.0 + precision: 32 + language: ! + default: + name: Integer + description: '' + header: Retry-After + protocol: ! {} + - ! &ref_206 type: integer apiVersions: - ! @@ -609,7 +609,7 @@ schemas: ! default: name: String description: '' - header: location + header: Azure-AsyncOperation protocol: ! {} - ! &ref_9 type: string @@ -651,18 +651,7 @@ schemas: ! name: CloudErrorMessage description: '' protocol: ! {} - - ! &ref_36 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Azure-AsyncOperation - protocol: ! {} - - ! &ref_37 + - ! &ref_29 type: string apiVersions: - ! @@ -673,7 +662,18 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_40 + - ! &ref_37 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: location + protocol: ! {} + - ! &ref_39 type: string apiVersions: - ! @@ -684,7 +684,7 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} - - ! &ref_41 + - ! &ref_40 type: string apiVersions: - ! @@ -717,7 +717,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_47 + - ! &ref_46 type: string apiVersions: - ! @@ -728,7 +728,7 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} - - ! &ref_48 + - ! &ref_47 type: string apiVersions: - ! @@ -750,6 +750,28 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} + - ! &ref_51 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Location + protocol: ! {} + - ! &ref_53 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Azure-AsyncOperation + protocol: ! {} - ! &ref_13 type: string apiVersions: @@ -790,7 +812,7 @@ schemas: ! name: SubProductPropertiesProvisioningState description: '' protocol: ! {} - - ! &ref_56 + - ! &ref_59 type: string apiVersions: - ! @@ -801,7 +823,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_58 + - ! &ref_61 type: string apiVersions: - ! @@ -812,7 +834,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_60 + - ! &ref_63 type: string apiVersions: - ! @@ -823,29 +845,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_62 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Location - protocol: ! {} - - ! &ref_64 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Location - protocol: ! {} - - ! &ref_66 + - ! &ref_65 type: string apiVersions: - ! @@ -867,7 +867,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_68 + - ! &ref_69 type: string apiVersions: - ! @@ -876,9 +876,9 @@ schemas: ! default: name: String description: '' - header: Azure-AsyncOperation + header: Location protocol: ! {} - - ! &ref_69 + - ! &ref_70 type: string apiVersions: - ! @@ -955,6 +955,17 @@ schemas: ! description: '' header: Location protocol: ! {} + - ! &ref_80 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Azure-AsyncOperation + protocol: ! {} - ! &ref_81 type: string apiVersions: @@ -986,9 +997,9 @@ schemas: ! default: name: String description: '' - header: Azure-AsyncOperation + header: Location protocol: ! {} - - ! &ref_88 + - ! &ref_90 type: string apiVersions: - ! @@ -997,7 +1008,7 @@ schemas: ! default: name: String description: '' - header: Location + header: Azure-AsyncOperation protocol: ! {} - ! &ref_91 type: string @@ -1008,9 +1019,9 @@ schemas: ! default: name: String description: '' - header: Azure-AsyncOperation + header: Location protocol: ! {} - - ! &ref_92 + - ! &ref_94 type: string apiVersions: - ! @@ -1019,7 +1030,7 @@ schemas: ! default: name: String description: '' - header: Location + header: Azure-AsyncOperation protocol: ! {} - ! &ref_95 type: string @@ -1030,9 +1041,9 @@ schemas: ! default: name: String description: '' - header: Azure-AsyncOperation + header: Location protocol: ! {} - - ! &ref_96 + - ! &ref_98 type: string apiVersions: - ! @@ -1041,20 +1052,9 @@ schemas: ! default: name: String description: '' - header: Location + header: Azure-AsyncOperation protocol: ! {} - ! &ref_99 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Azure-AsyncOperation - protocol: ! {} - - ! &ref_100 type: string apiVersions: - ! @@ -1065,7 +1065,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_104 + - ! &ref_102 type: string apiVersions: - ! @@ -1076,7 +1076,7 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} - - ! &ref_105 + - ! &ref_103 type: string apiVersions: - ! @@ -1088,28 +1088,6 @@ schemas: ! header: Location protocol: ! {} - ! &ref_107 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Location - protocol: ! {} - - ! &ref_109 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Location - protocol: ! {} - - ! &ref_111 type: string apiVersions: - ! @@ -1120,6 +1098,28 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} + - ! &ref_108 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Location + protocol: ! {} + - ! &ref_110 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Location + protocol: ! {} - ! &ref_112 type: string apiVersions: @@ -1131,6 +1131,17 @@ schemas: ! description: '' header: Location protocol: ! {} + - ! &ref_114 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Azure-AsyncOperation + protocol: ! {} - ! &ref_115 type: string apiVersions: @@ -1143,17 +1154,6 @@ schemas: ! header: Location protocol: ! {} - ! &ref_118 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Azure-AsyncOperation - protocol: ! {} - - ! &ref_119 type: string apiVersions: - ! @@ -1164,7 +1164,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_125 + - ! &ref_121 type: string apiVersions: - ! @@ -1175,7 +1175,7 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} - - ! &ref_126 + - ! &ref_122 type: string apiVersions: - ! @@ -1187,28 +1187,6 @@ schemas: ! header: Location protocol: ! {} - ! &ref_128 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Location - protocol: ! {} - - ! &ref_130 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Location - protocol: ! {} - - ! &ref_132 type: string apiVersions: - ! @@ -1219,6 +1197,28 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} + - ! &ref_129 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Location + protocol: ! {} + - ! &ref_131 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Location + protocol: ! {} - ! &ref_133 type: string apiVersions: @@ -1230,6 +1230,17 @@ schemas: ! description: '' header: Location protocol: ! {} + - ! &ref_135 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Azure-AsyncOperation + protocol: ! {} - ! &ref_136 type: string apiVersions: @@ -1253,17 +1264,6 @@ schemas: ! header: Location protocol: ! {} - ! &ref_142 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Azure-AsyncOperation - protocol: ! {} - - ! &ref_143 type: string apiVersions: - ! @@ -1274,7 +1274,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_147 + - ! &ref_145 type: string apiVersions: - ! @@ -1285,7 +1285,7 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} - - ! &ref_148 + - ! &ref_146 type: string apiVersions: - ! @@ -1296,18 +1296,18 @@ schemas: ! description: '' header: Location protocol: ! {} + - ! &ref_150 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Azure-AsyncOperation + protocol: ! {} - ! &ref_151 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Azure-AsyncOperation - protocol: ! {} - - ! &ref_152 type: string apiVersions: - ! @@ -1340,6 +1340,17 @@ schemas: ! description: '' header: Location protocol: ! {} + - ! &ref_157 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Azure-AsyncOperation + protocol: ! {} - ! &ref_158 type: string apiVersions: @@ -1352,17 +1363,6 @@ schemas: ! header: Location protocol: ! {} - ! &ref_161 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Azure-AsyncOperation - protocol: ! {} - - ! &ref_162 type: string apiVersions: - ! @@ -1373,7 +1373,7 @@ schemas: ! description: '' header: Location protocol: ! {} - - ! &ref_166 + - ! &ref_164 type: string apiVersions: - ! @@ -1384,7 +1384,7 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} - - ! &ref_167 + - ! &ref_165 type: string apiVersions: - ! @@ -1395,18 +1395,18 @@ schemas: ! description: '' header: Location protocol: ! {} + - ! &ref_169 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Azure-AsyncOperation + protocol: ! {} - ! &ref_170 - type: string - apiVersions: - - ! - version: 1.0.0 - language: ! - default: - name: String - description: '' - header: Azure-AsyncOperation - protocol: ! {} - - ! &ref_171 type: string apiVersions: - ! @@ -1426,9 +1426,9 @@ schemas: ! default: name: String description: '' - header: Location + header: Azure-AsyncOperation protocol: ! {} - - ! &ref_175 + - ! &ref_174 type: string apiVersions: - ! @@ -1437,7 +1437,7 @@ schemas: ! default: name: String description: '' - header: Azure-AsyncOperation + header: Location protocol: ! {} - ! &ref_176 type: string @@ -1472,6 +1472,17 @@ schemas: ! description: '' header: Location protocol: ! {} + - ! &ref_181 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Azure-AsyncOperation + protocol: ! {} - ! &ref_182 type: string apiVersions: @@ -1492,9 +1503,9 @@ schemas: ! default: name: String description: '' - header: Azure-AsyncOperation + header: Location protocol: ! {} - - ! &ref_186 + - ! &ref_188 type: string apiVersions: - ! @@ -1503,7 +1514,7 @@ schemas: ! default: name: String description: '' - header: Location + header: Azure-AsyncOperation protocol: ! {} - ! &ref_189 type: string @@ -1514,9 +1525,9 @@ schemas: ! default: name: String description: '' - header: Azure-AsyncOperation + header: Location protocol: ! {} - - ! &ref_190 + - ! &ref_192 type: string apiVersions: - ! @@ -1525,7 +1536,7 @@ schemas: ! default: name: String description: '' - header: Location + header: Azure-AsyncOperation protocol: ! {} - ! &ref_193 type: string @@ -1536,9 +1547,9 @@ schemas: ! default: name: String description: '' - header: Azure-AsyncOperation + header: Location protocol: ! {} - - ! &ref_194 + - ! &ref_196 type: string apiVersions: - ! @@ -1547,9 +1558,9 @@ schemas: ! default: name: String description: '' - header: Location + header: Azure-AsyncOperation protocol: ! {} - - ! &ref_198 + - ! &ref_197 type: string apiVersions: - ! @@ -1561,6 +1572,17 @@ schemas: ! header: Location protocol: ! {} - ! &ref_201 + type: string + apiVersions: + - ! + version: 1.0.0 + language: ! + default: + name: String + description: '' + header: Location + protocol: ! {} + - ! &ref_204 type: string apiVersions: - ! @@ -1571,7 +1593,7 @@ schemas: ! description: '' header: Azure-AsyncOperation protocol: ! {} - - ! &ref_202 + - ! &ref_205 type: string apiVersions: - ! @@ -1994,7 +2016,7 @@ schemas: ! description: '' namespace: '' protocol: ! {} - - ! &ref_51 + - ! &ref_54 type: object apiVersions: - ! @@ -2164,6 +2186,18 @@ schemas: ! namespace: '' protocol: ! {} - *ref_23 + arrays: + - ! &ref_28 + type: array + apiVersions: + - ! + version: 1.0.0 + elementType: *ref_5 + language: ! + default: + name: ArrayOfProduct + description: Array of Product + protocol: ! {} globalParameters: - ! &ref_24 schema: *ref_0 @@ -2278,6 +2312,75 @@ operationGroups: name: Put200Succeeded description: 'Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Succeeded’.' protocol: ! {} + - ! + apiVersions: + - ! + version: 1.0.0 + parameters: + - *ref_24 + requests: + - ! + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + path: /lro/list + method: post + uri: '{$host}' + signatureParameters: [] + responses: + - ! + schema: *ref_28 + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + - ! + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + headers: + - ! + schema: *ref_1 + header: Azure-AsyncOperation + - ! + schema: *ref_29 + header: Location + statusCodes: + - '202' + exceptions: + - ! + schema: *ref_27 + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - default + extensions: + x-ms-long-running-operation: true + language: ! + default: + name: Post202List + description: 'Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ ''id'': ''100'', ''name'': ''foo'' }].' + protocol: ! {} - ! apiVersions: - ! @@ -2300,7 +2403,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_28 + - ! &ref_30 schema: *ref_5 implementation: Method required: false @@ -2313,7 +2416,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_28 + - *ref_30 language: ! default: name: '' @@ -2384,7 +2487,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_29 + - ! &ref_31 schema: *ref_5 implementation: Method required: false @@ -2397,7 +2500,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_29 + - *ref_31 language: ! default: name: '' @@ -2468,7 +2571,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_30 + - ! &ref_32 schema: *ref_5 implementation: Method required: false @@ -2481,7 +2584,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_30 + - *ref_32 language: ! default: name: '' @@ -2565,7 +2668,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_31 + - ! &ref_33 schema: *ref_5 implementation: Method required: false @@ -2578,7 +2681,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_31 + - *ref_33 language: ! default: name: '' @@ -2649,7 +2752,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_32 + - ! &ref_34 schema: *ref_5 implementation: Method required: false @@ -2662,7 +2765,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_32 + - *ref_34 language: ! default: name: '' @@ -2746,7 +2849,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_33 + - ! &ref_35 schema: *ref_5 implementation: Method required: false @@ -2759,7 +2862,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_33 + - *ref_35 language: ! default: name: '' @@ -2830,7 +2933,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_34 + - ! &ref_36 schema: *ref_5 implementation: Method required: false @@ -2843,7 +2946,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_34 + - *ref_36 language: ! default: name: '' @@ -2868,7 +2971,7 @@ operationGroups: http: ! headers: - ! - schema: *ref_1 + schema: *ref_37 header: location knownMediaType: json mediaTypes: @@ -2918,7 +3021,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_35 + - ! &ref_38 schema: *ref_5 implementation: Method required: false @@ -2931,7 +3034,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_35 + - *ref_38 language: ! default: name: '' @@ -2956,13 +3059,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_36 + schema: *ref_39 header: Azure-AsyncOperation - ! - schema: *ref_37 + schema: *ref_40 header: Location - ! - schema: *ref_38 + schema: *ref_41 header: Retry-After knownMediaType: json mediaTypes: @@ -3012,7 +3115,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_39 + - ! &ref_42 schema: *ref_5 implementation: Method required: false @@ -3025,7 +3128,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_39 + - *ref_42 language: ! default: name: '' @@ -3050,10 +3153,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_40 + schema: *ref_43 header: Azure-AsyncOperation - ! - schema: *ref_41 + schema: *ref_44 header: Location knownMediaType: json mediaTypes: @@ -3103,7 +3206,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_42 + - ! &ref_45 schema: *ref_5 implementation: Method required: false @@ -3116,7 +3219,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_42 + - *ref_45 language: ! default: name: '' @@ -3141,13 +3244,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_43 + schema: *ref_46 header: Azure-AsyncOperation - ! - schema: *ref_44 + schema: *ref_47 header: Location - ! - schema: *ref_45 + schema: *ref_48 header: Retry-After knownMediaType: json mediaTypes: @@ -3197,7 +3300,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_46 + - ! &ref_49 schema: *ref_5 implementation: Method required: false @@ -3210,7 +3313,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_46 + - *ref_49 language: ! default: name: '' @@ -3235,10 +3338,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_47 + schema: *ref_50 header: Azure-AsyncOperation - ! - schema: *ref_48 + schema: *ref_51 header: Location knownMediaType: json mediaTypes: @@ -3288,7 +3391,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_49 + - ! &ref_52 schema: *ref_5 implementation: Method required: false @@ -3301,7 +3404,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_49 + - *ref_52 language: ! default: name: '' @@ -3326,7 +3429,7 @@ operationGroups: http: ! headers: - ! - schema: *ref_50 + schema: *ref_53 header: Azure-AsyncOperation knownMediaType: json mediaTypes: @@ -3376,8 +3479,8 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_52 - schema: *ref_51 + - ! &ref_55 + schema: *ref_54 implementation: Method required: false language: ! @@ -3389,7 +3492,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_52 + - *ref_55 language: ! default: name: '' @@ -3405,7 +3508,7 @@ operationGroups: signatureParameters: [] responses: - ! - schema: *ref_51 + schema: *ref_54 language: ! default: name: '' @@ -3460,8 +3563,8 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_53 - schema: *ref_51 + - ! &ref_56 + schema: *ref_54 implementation: Method required: false language: ! @@ -3473,7 +3576,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_53 + - *ref_56 language: ! default: name: '' @@ -3489,7 +3592,7 @@ operationGroups: signatureParameters: [] responses: - ! - schema: *ref_51 + schema: *ref_54 language: ! default: name: '' @@ -3544,7 +3647,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_54 + - ! &ref_57 schema: *ref_18 implementation: Method required: false @@ -3557,7 +3660,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_54 + - *ref_57 language: ! default: name: '' @@ -3628,7 +3731,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_55 + - ! &ref_58 schema: *ref_18 implementation: Method required: false @@ -3641,7 +3744,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_55 + - *ref_58 language: ! default: name: '' @@ -3732,10 +3835,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_56 + schema: *ref_59 header: Location - ! - schema: *ref_57 + schema: *ref_60 header: Retry-After knownMediaType: json mediaTypes: @@ -3807,10 +3910,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_58 + schema: *ref_61 header: Location - ! - schema: *ref_59 + schema: *ref_62 header: Retry-After knownMediaType: json mediaTypes: @@ -3880,10 +3983,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_60 + schema: *ref_63 header: Location - ! - schema: *ref_61 + schema: *ref_64 header: Retry-After knownMediaType: json mediaTypes: @@ -4003,10 +4106,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_62 + schema: *ref_65 header: Location - ! - schema: *ref_63 + schema: *ref_66 header: Retry-After statusCodes: - '202' @@ -4072,10 +4175,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_64 + schema: *ref_67 header: Location - ! - schema: *ref_65 + schema: *ref_68 header: Retry-After statusCodes: - '202' @@ -4128,7 +4231,7 @@ operationGroups: http: ! headers: - ! - schema: *ref_66 + schema: *ref_69 header: Location statusCodes: - '202' @@ -4190,7 +4293,7 @@ operationGroups: http: ! headers: - ! - schema: *ref_67 + schema: *ref_70 header: Location statusCodes: - '202' @@ -4252,13 +4355,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_68 + schema: *ref_71 header: Azure-AsyncOperation - ! - schema: *ref_69 + schema: *ref_72 header: Location - ! - schema: *ref_70 + schema: *ref_73 header: Retry-After statusCodes: - '202' @@ -4311,13 +4414,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_71 + schema: *ref_74 header: Azure-AsyncOperation - ! - schema: *ref_72 + schema: *ref_75 header: Location - ! - schema: *ref_73 + schema: *ref_76 header: Retry-After statusCodes: - '202' @@ -4370,13 +4473,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_74 + schema: *ref_77 header: Azure-AsyncOperation - ! - schema: *ref_75 + schema: *ref_78 header: Location - ! - schema: *ref_76 + schema: *ref_79 header: Retry-After statusCodes: - '202' @@ -4429,13 +4532,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_77 + schema: *ref_80 header: Azure-AsyncOperation - ! - schema: *ref_78 + schema: *ref_81 header: Location - ! - schema: *ref_79 + schema: *ref_82 header: Retry-After statusCodes: - '202' @@ -4480,7 +4583,7 @@ operationGroups: signatureParameters: [] responses: - ! - schema: *ref_51 + schema: *ref_54 language: ! default: name: '' @@ -4493,7 +4596,7 @@ operationGroups: statusCodes: - '200' - ! - schema: *ref_51 + schema: *ref_54 language: ! default: name: '' @@ -4548,7 +4651,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_80 + - ! &ref_83 schema: *ref_5 implementation: Method required: false @@ -4561,7 +4664,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_80 + - *ref_83 language: ! default: name: '' @@ -4585,10 +4688,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_81 + schema: *ref_84 header: Location - ! - schema: *ref_82 + schema: *ref_85 header: Retry-After statusCodes: - '202' @@ -4635,7 +4738,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_83 + - ! &ref_86 schema: *ref_5 implementation: Method required: false @@ -4648,7 +4751,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_83 + - *ref_86 language: ! default: name: '' @@ -4673,10 +4776,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_84 + schema: *ref_87 header: Location - ! - schema: *ref_85 + schema: *ref_88 header: Retry-After knownMediaType: json mediaTypes: @@ -4891,7 +4994,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_86 + - ! &ref_89 schema: *ref_5 implementation: Method required: false @@ -4904,7 +5007,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_86 + - *ref_89 language: ! default: name: '' @@ -4941,13 +5044,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_87 + schema: *ref_90 header: Azure-AsyncOperation - ! - schema: *ref_88 + schema: *ref_91 header: Location - ! - schema: *ref_89 + schema: *ref_92 header: Retry-After statusCodes: - '202' @@ -4994,7 +5097,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_90 + - ! &ref_93 schema: *ref_5 implementation: Method required: false @@ -5007,7 +5110,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_90 + - *ref_93 language: ! default: name: '' @@ -5044,13 +5147,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_91 + schema: *ref_94 header: Azure-AsyncOperation - ! - schema: *ref_92 + schema: *ref_95 header: Location - ! - schema: *ref_93 + schema: *ref_96 header: Retry-After statusCodes: - '202' @@ -5097,7 +5200,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_94 + - ! &ref_97 schema: *ref_5 implementation: Method required: false @@ -5110,7 +5213,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_94 + - *ref_97 language: ! default: name: '' @@ -5134,13 +5237,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_95 + schema: *ref_98 header: Azure-AsyncOperation - ! - schema: *ref_96 + schema: *ref_99 header: Location - ! - schema: *ref_97 + schema: *ref_100 header: Retry-After statusCodes: - '202' @@ -5187,7 +5290,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_98 + - ! &ref_101 schema: *ref_5 implementation: Method required: false @@ -5200,7 +5303,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_98 + - *ref_101 language: ! default: name: '' @@ -5224,13 +5327,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_99 + schema: *ref_102 header: Azure-AsyncOperation - ! - schema: *ref_100 + schema: *ref_103 header: Location - ! - schema: *ref_101 + schema: *ref_104 header: Retry-After statusCodes: - '202' @@ -5285,7 +5388,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_102 + - ! &ref_105 schema: *ref_5 implementation: Method required: false @@ -5298,7 +5401,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_102 + - *ref_105 language: ! default: name: '' @@ -5384,7 +5487,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_103 + - ! &ref_106 schema: *ref_5 implementation: Method required: false @@ -5397,7 +5500,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_103 + - *ref_106 language: ! default: name: '' @@ -5422,13 +5525,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_104 + schema: *ref_107 header: Azure-AsyncOperation - ! - schema: *ref_105 + schema: *ref_108 header: Location - ! - schema: *ref_106 + schema: *ref_109 header: Retry-After knownMediaType: json mediaTypes: @@ -5498,10 +5601,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_107 + schema: *ref_110 header: Location - ! - schema: *ref_108 + schema: *ref_111 header: Retry-After knownMediaType: json mediaTypes: @@ -5559,10 +5662,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_109 + schema: *ref_112 header: Location - ! - schema: *ref_110 + schema: *ref_113 header: Retry-After statusCodes: - '202' @@ -5615,13 +5718,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_111 + schema: *ref_114 header: Azure-AsyncOperation - ! - schema: *ref_112 + schema: *ref_115 header: Location - ! - schema: *ref_113 + schema: *ref_116 header: Retry-After statusCodes: - '202' @@ -5668,7 +5771,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_114 + - ! &ref_117 schema: *ref_5 implementation: Method required: false @@ -5681,7 +5784,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_114 + - *ref_117 language: ! default: name: '' @@ -5705,10 +5808,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_115 + schema: *ref_118 header: Location - ! - schema: *ref_116 + schema: *ref_119 header: Retry-After statusCodes: - '202' @@ -5755,7 +5858,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_117 + - ! &ref_120 schema: *ref_5 implementation: Method required: false @@ -5768,7 +5871,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_117 + - *ref_120 language: ! default: name: '' @@ -5792,13 +5895,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_118 + schema: *ref_121 header: Azure-AsyncOperation - ! - schema: *ref_119 + schema: *ref_122 header: Location - ! - schema: *ref_120 + schema: *ref_123 header: Retry-After statusCodes: - '202' @@ -5855,7 +5958,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_121 + - ! &ref_124 schema: *ref_5 implementation: Method required: false @@ -5868,7 +5971,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_121 + - *ref_124 language: ! default: name: '' @@ -5952,7 +6055,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_122 + - ! &ref_125 schema: *ref_5 implementation: Method required: false @@ -5965,7 +6068,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_122 + - *ref_125 language: ! default: name: '' @@ -6049,7 +6152,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_123 + - ! &ref_126 schema: *ref_5 implementation: Method required: false @@ -6062,7 +6165,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_123 + - *ref_126 language: ! default: name: '' @@ -6146,7 +6249,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_124 + - ! &ref_127 schema: *ref_5 implementation: Method required: false @@ -6159,7 +6262,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_124 + - *ref_127 language: ! default: name: '' @@ -6184,13 +6287,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_125 + schema: *ref_128 header: Azure-AsyncOperation - ! - schema: *ref_126 + schema: *ref_129 header: Location - ! - schema: *ref_127 + schema: *ref_130 header: Retry-After knownMediaType: json mediaTypes: @@ -6246,10 +6349,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_128 + schema: *ref_131 header: Location - ! - schema: *ref_129 + schema: *ref_132 header: Retry-After statusCodes: - '202' @@ -6302,10 +6405,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_130 + schema: *ref_133 header: Location - ! - schema: *ref_131 + schema: *ref_134 header: Retry-After statusCodes: - '202' @@ -6358,13 +6461,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_132 + schema: *ref_135 header: Azure-AsyncOperation - ! - schema: *ref_133 + schema: *ref_136 header: Location - ! - schema: *ref_134 + schema: *ref_137 header: Retry-After statusCodes: - '202' @@ -6411,7 +6514,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_135 + - ! &ref_138 schema: *ref_5 implementation: Method required: false @@ -6424,7 +6527,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_135 + - *ref_138 language: ! default: name: '' @@ -6448,10 +6551,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_136 + schema: *ref_139 header: Location - ! - schema: *ref_137 + schema: *ref_140 header: Retry-After statusCodes: - '202' @@ -6498,7 +6601,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_138 + - ! &ref_141 schema: *ref_5 implementation: Method required: false @@ -6511,7 +6614,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_138 + - *ref_141 language: ! default: name: '' @@ -6535,10 +6638,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_139 + schema: *ref_142 header: Location - ! - schema: *ref_140 + schema: *ref_143 header: Retry-After statusCodes: - '202' @@ -6585,7 +6688,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_141 + - ! &ref_144 schema: *ref_5 implementation: Method required: false @@ -6598,7 +6701,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_141 + - *ref_144 language: ! default: name: '' @@ -6622,13 +6725,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_142 + schema: *ref_145 header: Azure-AsyncOperation - ! - schema: *ref_143 + schema: *ref_146 header: Location - ! - schema: *ref_144 + schema: *ref_147 header: Retry-After statusCodes: - '202' @@ -6675,7 +6778,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_145 + - ! &ref_148 schema: *ref_5 implementation: Method required: false @@ -6688,7 +6791,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_145 + - *ref_148 language: ! default: name: '' @@ -6772,7 +6875,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_146 + - ! &ref_149 schema: *ref_5 implementation: Method required: false @@ -6785,7 +6888,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_146 + - *ref_149 language: ! default: name: '' @@ -6810,13 +6913,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_147 + schema: *ref_150 header: Azure-AsyncOperation - ! - schema: *ref_148 + schema: *ref_151 header: Location - ! - schema: *ref_149 + schema: *ref_152 header: Retry-After knownMediaType: json mediaTypes: @@ -6866,7 +6969,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_150 + - ! &ref_153 schema: *ref_5 implementation: Method required: false @@ -6879,7 +6982,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_150 + - *ref_153 language: ! default: name: '' @@ -6904,13 +7007,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_151 + schema: *ref_154 header: Azure-AsyncOperation - ! - schema: *ref_152 + schema: *ref_155 header: Location - ! - schema: *ref_153 + schema: *ref_156 header: Retry-After knownMediaType: json mediaTypes: @@ -7015,13 +7118,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_154 + schema: *ref_157 header: Azure-AsyncOperation - ! - schema: *ref_155 + schema: *ref_158 header: Location - ! - schema: *ref_156 + schema: *ref_159 header: Retry-After statusCodes: - '202' @@ -7068,7 +7171,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_157 + - ! &ref_160 schema: *ref_5 implementation: Method required: false @@ -7081,7 +7184,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_157 + - *ref_160 language: ! default: name: '' @@ -7105,10 +7208,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_158 + schema: *ref_161 header: Location - ! - schema: *ref_159 + schema: *ref_162 header: Retry-After statusCodes: - '202' @@ -7155,7 +7258,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_160 + - ! &ref_163 schema: *ref_5 implementation: Method required: false @@ -7168,7 +7271,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_160 + - *ref_163 language: ! default: name: '' @@ -7192,13 +7295,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_161 + schema: *ref_164 header: Azure-AsyncOperation - ! - schema: *ref_162 + schema: *ref_165 header: Location - ! - schema: *ref_163 + schema: *ref_166 header: Retry-After statusCodes: - '202' @@ -7245,7 +7348,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_164 + - ! &ref_167 schema: *ref_5 implementation: Method required: false @@ -7258,7 +7361,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_164 + - *ref_167 language: ! default: name: '' @@ -7338,7 +7441,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_165 + - ! &ref_168 schema: *ref_5 implementation: Method required: false @@ -7351,7 +7454,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_165 + - *ref_168 language: ! default: name: '' @@ -7376,13 +7479,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_166 + schema: *ref_169 header: Azure-AsyncOperation - ! - schema: *ref_167 + schema: *ref_170 header: Location - ! - schema: *ref_168 + schema: *ref_171 header: Retry-After knownMediaType: json mediaTypes: @@ -7432,7 +7535,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_169 + - ! &ref_172 schema: *ref_5 implementation: Method required: false @@ -7445,7 +7548,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_169 + - *ref_172 language: ! default: name: '' @@ -7470,13 +7573,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_170 + schema: *ref_173 header: Azure-AsyncOperation - ! - schema: *ref_171 + schema: *ref_174 header: Location - ! - schema: *ref_172 + schema: *ref_175 header: Retry-After knownMediaType: json mediaTypes: @@ -7532,10 +7635,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_173 + schema: *ref_176 header: Location - ! - schema: *ref_174 + schema: *ref_177 header: Retry-After statusCodes: - '202' @@ -7588,13 +7691,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_175 + schema: *ref_178 header: Azure-AsyncOperation - ! - schema: *ref_176 + schema: *ref_179 header: Location - ! - schema: *ref_177 + schema: *ref_180 header: Retry-After statusCodes: - '202' @@ -7647,13 +7750,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_178 + schema: *ref_181 header: Azure-AsyncOperation - ! - schema: *ref_179 + schema: *ref_182 header: Location - ! - schema: *ref_180 + schema: *ref_183 header: Retry-After statusCodes: - '202' @@ -7700,7 +7803,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_181 + - ! &ref_184 schema: *ref_5 implementation: Method required: false @@ -7713,7 +7816,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_181 + - *ref_184 language: ! default: name: '' @@ -7737,10 +7840,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_182 + schema: *ref_185 header: Location - ! - schema: *ref_183 + schema: *ref_186 header: Retry-After statusCodes: - '202' @@ -7787,7 +7890,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_184 + - ! &ref_187 schema: *ref_5 implementation: Method required: false @@ -7800,7 +7903,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_184 + - *ref_187 language: ! default: name: '' @@ -7824,13 +7927,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_185 + schema: *ref_188 header: Azure-AsyncOperation - ! - schema: *ref_186 + schema: *ref_189 header: Location - ! - schema: *ref_187 + schema: *ref_190 header: Retry-After statusCodes: - '202' @@ -7877,7 +7980,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_188 + - ! &ref_191 schema: *ref_5 implementation: Method required: false @@ -7890,7 +7993,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_188 + - *ref_191 language: ! default: name: '' @@ -7914,13 +8017,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_189 + schema: *ref_192 header: Azure-AsyncOperation - ! - schema: *ref_190 + schema: *ref_193 header: Location - ! - schema: *ref_191 + schema: *ref_194 header: Retry-After statusCodes: - '202' @@ -7975,7 +8078,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_192 + - ! &ref_195 schema: *ref_5 implementation: Method required: false @@ -7988,7 +8091,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_192 + - *ref_195 language: ! default: name: '' @@ -8013,13 +8116,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_193 + schema: *ref_196 header: Azure-AsyncOperation - ! - schema: *ref_194 + schema: *ref_197 header: Location - ! - schema: *ref_195 + schema: *ref_198 header: Retry-After knownMediaType: json mediaTypes: @@ -8071,7 +8174,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_196 + - ! &ref_199 schema: *ref_5 implementation: Method required: false @@ -8084,7 +8187,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_196 + - *ref_199 language: ! default: name: '' @@ -8170,7 +8273,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_197 + - ! &ref_200 schema: *ref_5 implementation: Method required: false @@ -8183,7 +8286,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_197 + - *ref_200 language: ! default: name: '' @@ -8207,10 +8310,10 @@ operationGroups: http: ! headers: - ! - schema: *ref_198 + schema: *ref_201 header: Location - ! - schema: *ref_199 + schema: *ref_202 header: Retry-After statusCodes: - '202' @@ -8259,7 +8362,7 @@ operationGroups: protocol: ! http: ! in: header - - ! &ref_200 + - ! &ref_203 schema: *ref_5 implementation: Method required: false @@ -8272,7 +8375,7 @@ operationGroups: in: body style: json signatureParameters: - - *ref_200 + - *ref_203 language: ! default: name: '' @@ -8296,13 +8399,13 @@ operationGroups: http: ! headers: - ! - schema: *ref_201 + schema: *ref_204 header: Azure-AsyncOperation - ! - schema: *ref_202 + schema: *ref_205 header: Location - ! - schema: *ref_203 + schema: *ref_206 header: Retry-After statusCodes: - '202' diff --git a/test/TestServerProjects/lro/Generated/LRORetrysDelete202Retry200Operation.cs b/test/TestServerProjects/lro/Generated/LRORetrysDelete202Retry200Operation.cs index 11a930cb..a8dfcfd6 100644 --- a/test/TestServerProjects/lro/Generated/LRORetrysDelete202Retry200Operation.cs +++ b/test/TestServerProjects/lro/Generated/LRORetrysDelete202Retry200Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LRORetrysDeleteAsyncRelativeRetrySucceededOperation.cs b/test/TestServerProjects/lro/Generated/LRORetrysDeleteAsyncRelativeRetrySucceededOperation.cs index 04de2748..9e13add0 100644 --- a/test/TestServerProjects/lro/Generated/LRORetrysDeleteAsyncRelativeRetrySucceededOperation.cs +++ b/test/TestServerProjects/lro/Generated/LRORetrysDeleteAsyncRelativeRetrySucceededOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LRORetrysPost202Retry200Operation.cs b/test/TestServerProjects/lro/Generated/LRORetrysPost202Retry200Operation.cs index 428397b8..5584fb3e 100644 --- a/test/TestServerProjects/lro/Generated/LRORetrysPost202Retry200Operation.cs +++ b/test/TestServerProjects/lro/Generated/LRORetrysPost202Retry200Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LRORetrysPostAsyncRelativeRetrySucceededOperation.cs b/test/TestServerProjects/lro/Generated/LRORetrysPostAsyncRelativeRetrySucceededOperation.cs index 0525d94f..203f2e2b 100644 --- a/test/TestServerProjects/lro/Generated/LRORetrysPostAsyncRelativeRetrySucceededOperation.cs +++ b/test/TestServerProjects/lro/Generated/LRORetrysPostAsyncRelativeRetrySucceededOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsClient.cs b/test/TestServerProjects/lro/Generated/LROsClient.cs index 91177e36..385501ca 100644 --- a/test/TestServerProjects/lro/Generated/LROsClient.cs +++ b/test/TestServerProjects/lro/Generated/LROsClient.cs @@ -69,6 +69,42 @@ namespace lro } } + /// Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ 'id': '100', 'name': 'foo' }]. + /// The cancellation token to use. + public virtual async ValueTask StartPost202ListAsync(CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LROsClient.StartPost202List"); + scope.Start(); + try + { + var originalResponse = await RestClient.Post202ListAsync(cancellationToken).ConfigureAwait(false); + return new LROsPost202ListOperation(_clientDiagnostics, _pipeline, RestClient.CreatePost202ListRequest().Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ 'id': '100', 'name': 'foo' }]. + /// The cancellation token to use. + public virtual LROsPost202ListOperation StartPost202List(CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("LROsClient.StartPost202List"); + scope.Start(); + try + { + var originalResponse = RestClient.Post202List(cancellationToken); + return new LROsPost202ListOperation(_clientDiagnostics, _pipeline, RestClient.CreatePost202ListRequest().Request, originalResponse); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// Long running put request, service returns a 200 to the initial request, with an entity that does not contain ProvisioningState=’Succeeded’. /// Product to put. /// The cancellation token to use. diff --git a/test/TestServerProjects/lro/Generated/LROsCustomHeaderPost202Retry200Operation.cs b/test/TestServerProjects/lro/Generated/LROsCustomHeaderPost202Retry200Operation.cs index d8d7ebd3..2eed4785 100644 --- a/test/TestServerProjects/lro/Generated/LROsCustomHeaderPost202Retry200Operation.cs +++ b/test/TestServerProjects/lro/Generated/LROsCustomHeaderPost202Retry200Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsCustomHeaderPostAsyncRetrySucceededOperation.cs b/test/TestServerProjects/lro/Generated/LROsCustomHeaderPostAsyncRetrySucceededOperation.cs index f3f1ef12..ec20117f 100644 --- a/test/TestServerProjects/lro/Generated/LROsCustomHeaderPostAsyncRetrySucceededOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsCustomHeaderPostAsyncRetrySucceededOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsDelete204SucceededOperation.cs b/test/TestServerProjects/lro/Generated/LROsDelete204SucceededOperation.cs index f6a459af..4d3324a8 100644 --- a/test/TestServerProjects/lro/Generated/LROsDelete204SucceededOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsDelete204SucceededOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncNoHeaderInRetryOperation.cs b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncNoHeaderInRetryOperation.cs index 96bbbdcb..148fe28c 100644 --- a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncNoHeaderInRetryOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncNoHeaderInRetryOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncNoRetrySucceededOperation.cs b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncNoRetrySucceededOperation.cs index 747332c4..2e009f33 100644 --- a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncNoRetrySucceededOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncNoRetrySucceededOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetryFailedOperation.cs b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetryFailedOperation.cs index e604292b..3d8c3fe0 100644 --- a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetryFailedOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetryFailedOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetrySucceededOperation.cs b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetrySucceededOperation.cs index 64e2a5cb..6c2b608f 100644 --- a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetrySucceededOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetrySucceededOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetrycanceledOperation.cs b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetrycanceledOperation.cs index 53c4c37a..9283cb7d 100644 --- a/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetrycanceledOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsDeleteAsyncRetrycanceledOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsDeleteNoHeaderInRetryOperation.cs b/test/TestServerProjects/lro/Generated/LROsDeleteNoHeaderInRetryOperation.cs index 57c48a55..335118c6 100644 --- a/test/TestServerProjects/lro/Generated/LROsDeleteNoHeaderInRetryOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsDeleteNoHeaderInRetryOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsPost202ListOperation.cs b/test/TestServerProjects/lro/Generated/LROsPost202ListOperation.cs new file mode 100644 index 00000000..647fe55f --- /dev/null +++ b/test/TestServerProjects/lro/Generated/LROsPost202ListOperation.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using lro.Models; + +namespace lro +{ + /// Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ 'id': '100', 'name': 'foo' }]. + public partial class LROsPost202ListOperation : Operation>, IOperationSource> + { + private readonly ArmOperationHelpers> _operation; + internal LROsPost202ListOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new ArmOperationHelpers>(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "LROsPost202ListOperation"); + } + /// + public override string Id => _operation.Id; + + /// + public override IReadOnlyList Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask>> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask>> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + IReadOnlyList IOperationSource>.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(Product.DeserializeProduct(item)); + } + } + return array; + } + } + + async ValueTask> IOperationSource>.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + return null; + } + else + { + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(Product.DeserializeProduct(item)); + } + } + return array; + } + } + } +} diff --git a/test/TestServerProjects/lro/Generated/LROsPost202Retry200Operation.cs b/test/TestServerProjects/lro/Generated/LROsPost202Retry200Operation.cs index f431f164..0d8fae54 100644 --- a/test/TestServerProjects/lro/Generated/LROsPost202Retry200Operation.cs +++ b/test/TestServerProjects/lro/Generated/LROsPost202Retry200Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsPostAsyncRetryFailedOperation.cs b/test/TestServerProjects/lro/Generated/LROsPostAsyncRetryFailedOperation.cs index ca77abf8..a9fe96c1 100644 --- a/test/TestServerProjects/lro/Generated/LROsPostAsyncRetryFailedOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsPostAsyncRetryFailedOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsPostAsyncRetrycanceledOperation.cs b/test/TestServerProjects/lro/Generated/LROsPostAsyncRetrycanceledOperation.cs index 42e5bdab..92ea9829 100644 --- a/test/TestServerProjects/lro/Generated/LROsPostAsyncRetrycanceledOperation.cs +++ b/test/TestServerProjects/lro/Generated/LROsPostAsyncRetrycanceledOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LROsRestClient.cs b/test/TestServerProjects/lro/Generated/LROsRestClient.cs index fe7a553c..81efa950 100644 --- a/test/TestServerProjects/lro/Generated/LROsRestClient.cs +++ b/test/TestServerProjects/lro/Generated/LROsRestClient.cs @@ -85,6 +85,50 @@ namespace lro } } + internal HttpMessage CreatePost202ListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(host, false); + uri.AppendPath("/lro/list", false); + request.Uri = uri; + return message; + } + + /// Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ 'id': '100', 'name': 'foo' }]. + /// The cancellation token to use. + public async ValueTask Post202ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreatePost202ListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ 'id': '100', 'name': 'foo' }]. + /// The cancellation token to use. + public Response Post202List(CancellationToken cancellationToken = default) + { + using var message = CreatePost202ListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } + internal HttpMessage CreatePut200SucceededNoStateRequest(Product product) { var message = _pipeline.CreateMessage(); diff --git a/test/TestServerProjects/lro/Generated/LrosaDsDelete202NonRetry400Operation.cs b/test/TestServerProjects/lro/Generated/LrosaDsDelete202NonRetry400Operation.cs index 088cfca5..2fbd9821 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsDelete202NonRetry400Operation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsDelete202NonRetry400Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsDelete202RetryInvalidHeaderOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsDelete202RetryInvalidHeaderOperation.cs index 530998a1..bc218dfb 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsDelete202RetryInvalidHeaderOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsDelete202RetryInvalidHeaderOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsDelete204SucceededOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsDelete204SucceededOperation.cs index 823e28e0..546e6667 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsDelete204SucceededOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsDelete204SucceededOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetry400Operation.cs b/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetry400Operation.cs index a9b5c1fd..f33aa69d 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetry400Operation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetry400Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryInvalidHeaderOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryInvalidHeaderOperation.cs index b18f4510..4459b52e 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryInvalidHeaderOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryInvalidHeaderOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryInvalidJsonPollingOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryInvalidJsonPollingOperation.cs index 10c80242..c437d9ec 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryInvalidJsonPollingOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryInvalidJsonPollingOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryNoStatusOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryNoStatusOperation.cs index 4f0b707e..68906e44 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryNoStatusOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsDeleteAsyncRelativeRetryNoStatusOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsDeleteNonRetry400Operation.cs b/test/TestServerProjects/lro/Generated/LrosaDsDeleteNonRetry400Operation.cs index 91c222b0..461ff402 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsDeleteNonRetry400Operation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsDeleteNonRetry400Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsPost202NoLocationOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsPost202NoLocationOperation.cs index 1c30b62c..06fe3502 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsPost202NoLocationOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsPost202NoLocationOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsPost202NonRetry400Operation.cs b/test/TestServerProjects/lro/Generated/LrosaDsPost202NonRetry400Operation.cs index a9e21063..17d74c97 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsPost202NonRetry400Operation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsPost202NonRetry400Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsPost202RetryInvalidHeaderOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsPost202RetryInvalidHeaderOperation.cs index 69261291..87a21e07 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsPost202RetryInvalidHeaderOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsPost202RetryInvalidHeaderOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetry400Operation.cs b/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetry400Operation.cs index 7d1bf727..f94f2f70 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetry400Operation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetry400Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryInvalidHeaderOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryInvalidHeaderOperation.cs index 4e72d7a4..57cdc229 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryInvalidHeaderOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryInvalidHeaderOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryInvalidJsonPollingOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryInvalidJsonPollingOperation.cs index 2ea0f2a9..a930fb4d 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryInvalidJsonPollingOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryInvalidJsonPollingOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryNoPayloadOperation.cs b/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryNoPayloadOperation.cs index e2ba92e1..4c1a49c1 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryNoPayloadOperation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsPostAsyncRelativeRetryNoPayloadOperation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/lro/Generated/LrosaDsPostNonRetry400Operation.cs b/test/TestServerProjects/lro/Generated/LrosaDsPostNonRetry400Operation.cs index 246669a6..78e482e2 100644 --- a/test/TestServerProjects/lro/Generated/LrosaDsPostNonRetry400Operation.cs +++ b/test/TestServerProjects/lro/Generated/LrosaDsPostNonRetry400Operation.cs @@ -56,7 +56,7 @@ namespace lro async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - return await new ValueTask(response); + return await new ValueTask(response).ConfigureAwait(false); } } } diff --git a/test/TestServerProjects/media_types/CodeModel.yaml b/test/TestServerProjects/media_types/CodeModel.yaml index 6f41d899..e5009cb0 100644 --- a/test/TestServerProjects/media_types/CodeModel.yaml +++ b/test/TestServerProjects/media_types/CodeModel.yaml @@ -77,6 +77,16 @@ schemas: ! name: ApplicationJson description: Content Type 'application/json' protocol: ! {} + - ! &ref_11 + type: constant + value: ! + value: text/plain + valueType: *ref_0 + language: ! + default: + name: TextPlain + description: Content Type 'text/plain' + protocol: ! {} binaries: - ! &ref_4 type: binary @@ -248,6 +258,75 @@ operationGroups: name: AnalyzeBody description: 'Analyze body, that could be different media types.' protocol: ! {} + - ! + apiVersions: + - ! + version: 2.0-preview + parameters: + - *ref_2 + requests: + - ! + parameters: + - ! + schema: *ref_11 + implementation: Method + origin: 'modelerfour:synthesized/content-type' + required: true + language: ! + default: + name: contentType + description: Upload file type + serializedName: Content-Type + protocol: ! + http: ! + in: header + - ! &ref_12 + schema: *ref_0 + implementation: Method + required: true + language: ! + default: + name: input + description: Input parameter. + protocol: ! + http: ! + in: body + style: binary + signatureParameters: + - *ref_12 + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + path: /mediatypes/contentTypeWithEncoding + method: post + binary: true + knownMediaType: text + mediaTypes: + - text/plain + uri: '{$host}' + signatureParameters: [] + responses: + - ! + schema: *ref_10 + language: ! + default: + name: '' + description: '' + protocol: ! + http: ! + knownMediaType: json + mediaTypes: + - application/json + statusCodes: + - '200' + language: ! + default: + name: ContentTypeWithEncoding + description: Pass in contentType 'text/plain; encoding=UTF-8' to pass test. Value for input does not matter + protocol: ! {} language: ! default: name: '' diff --git a/test/TestServerProjects/media_types/Generated/ServiceClient.cs b/test/TestServerProjects/media_types/Generated/ServiceClient.cs index 36f76240..f687aeff 100644 --- a/test/TestServerProjects/media_types/Generated/ServiceClient.cs +++ b/test/TestServerProjects/media_types/Generated/ServiceClient.cs @@ -106,5 +106,41 @@ namespace media_types throw; } } + + /// Pass in contentType 'text/plain; encoding=UTF-8' to pass test. Value for input does not matter. + /// Input parameter. + /// The cancellation token to use. + public virtual async Task> ContentTypeWithEncodingAsync(string input, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ServiceClient.ContentTypeWithEncoding"); + scope.Start(); + try + { + return await RestClient.ContentTypeWithEncodingAsync(input, cancellationToken).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Pass in contentType 'text/plain; encoding=UTF-8' to pass test. Value for input does not matter. + /// Input parameter. + /// The cancellation token to use. + public virtual Response ContentTypeWithEncoding(string input, CancellationToken cancellationToken = default) + { + using var scope = _clientDiagnostics.CreateScope("ServiceClient.ContentTypeWithEncoding"); + scope.Start(); + try + { + return RestClient.ContentTypeWithEncoding(input, cancellationToken); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/test/TestServerProjects/media_types/Generated/ServiceRestClient.cs b/test/TestServerProjects/media_types/Generated/ServiceRestClient.cs index 018ea3fa..d60fc2c4 100644 --- a/test/TestServerProjects/media_types/Generated/ServiceRestClient.cs +++ b/test/TestServerProjects/media_types/Generated/ServiceRestClient.cs @@ -192,5 +192,85 @@ namespace media_types throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } + + internal HttpMessage CreateContentTypeWithEncodingRequest(string input) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(host, false); + uri.AppendPath("/mediatypes/contentTypeWithEncoding", false); + request.Uri = uri; + request.Headers.Add("Content-Type", "text/plain"); + request.Content = new StringRequestContent(input); + return message; + } + + /// Pass in contentType 'text/plain; encoding=UTF-8' to pass test. Value for input does not matter. + /// Input parameter. + /// The cancellation token to use. + public async ValueTask> ContentTypeWithEncodingAsync(string input, CancellationToken cancellationToken = default) + { + if (input == null) + { + throw new ArgumentNullException(nameof(input)); + } + + using var message = CreateContentTypeWithEncodingRequest(input); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + string value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = document.RootElement.GetString(); + } + return Response.FromValue(value, message.Response); + } + default: + throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); + } + } + + /// Pass in contentType 'text/plain; encoding=UTF-8' to pass test. Value for input does not matter. + /// Input parameter. + /// The cancellation token to use. + public Response ContentTypeWithEncoding(string input, CancellationToken cancellationToken = default) + { + if (input == null) + { + throw new ArgumentNullException(nameof(input)); + } + + using var message = CreateContentTypeWithEncodingRequest(input); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + string value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + if (document.RootElement.ValueKind == JsonValueKind.Null) + { + value = null; + } + else + { + value = document.RootElement.GetString(); + } + return Response.FromValue(value, message.Response); + } + default: + throw _clientDiagnostics.CreateRequestFailedException(message.Response); + } + } } }