From 054fe16df66f9f3acecbeea5b97045ae173c1d2f Mon Sep 17 00:00:00 2001 From: Arvind Krishnaa Jagannathan Date: Mon, 29 Jul 2019 17:50:25 -0700 Subject: [PATCH 1/7] Fix the definition of WebApiSkill + tests --- ...a-plane_Microsoft.Azure.Search.Service.txt | 10 ++-- .../src/Generated/Models/WebApiHttpHeaders.cs | 50 ------------------- .../src/Generated/Models/WebApiSkill.cs | 20 +++----- .../Generated/SdkInfo_SearchServiceClient.cs | 8 +-- .../tests/Tests/SkillsetsTests.cs | 50 +++++++++++++++++++ 5 files changed, 65 insertions(+), 73 deletions(-) delete mode 100644 sdk/search/Microsoft.Azure.Search.Service/src/Generated/Models/WebApiHttpHeaders.cs diff --git a/eng/mgmt/mgmtmetadata/search_data-plane_Microsoft.Azure.Search.Service.txt b/eng/mgmt/mgmtmetadata/search_data-plane_Microsoft.Azure.Search.Service.txt index e84e664eb864b..0f5d9cb86a9d1 100644 --- a/eng/mgmt/mgmtmetadata/search_data-plane_Microsoft.Azure.Search.Service.txt +++ b/eng/mgmt/mgmtmetadata/search_data-plane_Microsoft.Azure.Search.Service.txt @@ -3,12 +3,12 @@ AutoRest installed successfully. Commencing code generation Generating CSharp code Executing AutoRest command -cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\repos\azure-sdk-for-net\sdk -2019-07-25 22:29:05 UTC +cmd.exe /c autorest.cmd https://github.com/arv100kri/azure-rest-api-specs/blob/arv100kri/webapi-skill-definition/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\src\azure-sdk-for-net\sdk +2019-07-30 00:46:37 UTC Azure-rest-api-specs repository information -GitHub fork: Azure -Branch: master -Commit: a28a3fca492d332b0e515f0017551cb692772b29 +GitHub fork: arv100kri +Branch: arv100kri/webapi-skill-definition +Commit: 37523600973b39de08a8b321e06f8931b89227d3 AutoRest information Requested version: latest Bootstrapper version: autorest@2.0.4283 diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Generated/Models/WebApiHttpHeaders.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Generated/Models/WebApiHttpHeaders.cs deleted file mode 100644 index 96d54d97a0b8a..0000000000000 --- a/sdk/search/Microsoft.Azure.Search.Service/src/Generated/Models/WebApiHttpHeaders.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Search.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - public partial class WebApiHttpHeaders - { - /// - /// Initializes a new instance of the WebApiHttpHeaders class. - /// - public WebApiHttpHeaders() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WebApiHttpHeaders class. - /// - /// A dictionary of http request headers. - public WebApiHttpHeaders(IDictionary headers = default(IDictionary)) - { - Headers = headers; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a dictionary of http request headers. - /// - [JsonProperty(PropertyName = "headers")] - public IDictionary Headers { get; set; } - - } -} diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Generated/Models/WebApiSkill.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Generated/Models/WebApiSkill.cs index 2c6ee1c193bf0..2488243b4bce2 100644 --- a/sdk/search/Microsoft.Azure.Search.Service/src/Generated/Models/WebApiSkill.cs +++ b/sdk/search/Microsoft.Azure.Search.Service/src/Generated/Models/WebApiSkill.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.Search.Models /// A skill that can call a Web API endpoint, allowing you to extend a /// skillset by having it call your custom code. /// /// [Newtonsoft.Json.JsonObject("#Microsoft.Skills.Custom.WebApiSkill")] @@ -43,19 +43,19 @@ public WebApiSkill() /// Azure Search index, or a value that can be consumed as an input by /// another skill. /// The url for the Web API. - /// The headers required to make the http - /// request. - /// The method for the http request. /// The description of the skill which /// describes the inputs, outputs, and usage of the skill. /// Represents the level at which operations take /// place, such as the document root or document content (for example, /// /document or /document/content). The default is /document. + /// The headers required to make the http + /// request. + /// The method for the http request. /// The desired timeout for the request. Default /// is 30 seconds. /// The desired batch size which indicates /// number of documents. - public WebApiSkill(IList inputs, IList outputs, string uri, WebApiHttpHeaders httpHeaders, string httpMethod, string description = default(string), string context = default(string), System.TimeSpan? timeout = default(System.TimeSpan?), int? batchSize = default(int?)) + public WebApiSkill(IList inputs, IList outputs, string uri, string description = default(string), string context = default(string), IDictionary httpHeaders = default(IDictionary), string httpMethod = default(string), System.TimeSpan? timeout = default(System.TimeSpan?), int? batchSize = default(int?)) : base(inputs, outputs, description, context) { Uri = uri; @@ -81,7 +81,7 @@ public WebApiSkill() /// Gets or sets the headers required to make the http request. /// [JsonProperty(PropertyName = "httpHeaders")] - public WebApiHttpHeaders HttpHeaders { get; set; } + public IDictionary HttpHeaders { get; set; } /// /// Gets or sets the method for the http request. @@ -116,14 +116,6 @@ public override void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Uri"); } - if (HttpHeaders == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "HttpHeaders"); - } - if (HttpMethod == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "HttpMethod"); - } } } } diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Generated/SdkInfo_SearchServiceClient.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Generated/SdkInfo_SearchServiceClient.cs index d5e93f38faddd..44030ec6019f6 100644 --- a/sdk/search/Microsoft.Azure.Search.Service/src/Generated/SdkInfo_SearchServiceClient.cs +++ b/sdk/search/Microsoft.Azure.Search.Service/src/Generated/SdkInfo_SearchServiceClient.cs @@ -31,10 +31,10 @@ public static IEnumerable> ApiInfo_SearchServiceCl // BEGIN: Code Generation Metadata Section public static readonly String AutoRestVersion = "latest"; public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\repos\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "a28a3fca492d332b0e515f0017551cb692772b29"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/arv100kri/azure-rest-api-specs/blob/arv100kri/webapi-skill-definition/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\src\\azure-sdk-for-net\\sdk"; + public static readonly String GithubForkName = "arv100kri"; + public static readonly String GithubBranchName = "arv100kri/webapi-skill-definition"; + public static readonly String GithubCommidId = "37523600973b39de08a8b321e06f8931b89227d3"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs index a86f0aa917466..808daeadb8cf3 100644 --- a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs +++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Net; +using System.Net.Http.Headers; using Microsoft.Azure.Search.Models; using Microsoft.Azure.Search.Tests.Utilities; using Microsoft.Rest.Azure; @@ -23,6 +24,16 @@ public sealed class SkillsetsTests : SearchTestBase public const string RootPathString = "/document"; + [Fact] + public void CreateSkillsetReturnsCorrectDefinitionWebApiSkill() + { + Run(() => + { + SearchServiceClient searchClient = Data.GetSearchServiceClient(); + CreateAndValidateSkillset(searchClient, CreateTestSkillsetWebApiSkill()); + }); + } + [Fact] public void CreateSkillsetReturnsCorrectDefinitionOcrKeyPhrase() { @@ -906,5 +917,44 @@ private static Skillset CreateTestSkillsetOcrSplitText(OcrSkillLanguage ocrLangu return new Skillset("testskillset", "Skillset for testing", skills); } + + private static Skillset CreateTestSkillsetWebApiSkill() + { + var skills = new List(); + + var inputs = new List() + { + new InputFieldMappingEntry + { + Name = "text", + Source = "/document/text" + } + }; + + var outputs = new List() + { + new OutputFieldMappingEntry + { + Name = "coolResult", + TargetName = "myCoolResult" + } + }; + + skills.Add(new WebApiSkill( + inputs, + outputs, + uri: "https://contoso.example.org", + description: "A simple web api skill", + context: RootPathString) + { + HttpHeaders = new Dictionary + { + ["x-ms-example"] = "example" + }, + HttpMethod = "POST" + }); + + return new Skillset("webapiskillset", "Skillset for testing", skills); + } } } From d78cbd8d7c6c5036b5c7f3424f34838dd23722c0 Mon Sep 17 00:00:00 2001 From: Arvind Krishnaa Jagannathan Date: Mon, 29 Jul 2019 17:54:35 -0700 Subject: [PATCH 2/7] Add SessionRecord for the new test --- ...etReturnsCorrectDefinitionWebApiSkill.json | 537 ++++++++++++++++++ 1 file changed, 537 insertions(+) create mode 100644 sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkill.json diff --git a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkill.json b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkill.json new file mode 100644 index 0000000000000..39237f5fd1c1f --- /dev/null +++ b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkill.json @@ -0,0 +1,537 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/providers/Microsoft.Search/register?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3JlZ2lzdGVyP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f04b4021-4009-4889-8ec5-1daa7a65f1a6" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "9f34c90f-068f-4d00-a239-ce24228b20cc" + ], + "x-ms-correlation-request-id": [ + "9f34c90f-068f-4d00-a239-ce24228b20cc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190730T005018Z:9f34c90f-068f-4d00-a239-ce24228b20cc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 30 Jul 2019 00:50:17 GMT" + ], + "Content-Length": [ + "2230" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"authorization\": {\r\n \"applicationId\": \"804f4a7a-7d6e-4df7-bf8c-e7f0106e16c2\",\r\n \"roleDefinitionId\": \"20FA3191-87CF-4C3D-9510-74CCB594A310\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesInt\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesPpe\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityInt\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityPpe\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityCit\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityInt\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityPpe\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourcegroups/azsmnet5204?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQ1MjA0P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3719e9ff-7f7c-49cc-8d1c-a092e244e8a2" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "7836d1a8-0abc-47fe-89e8-c61ad36603cc" + ], + "x-ms-correlation-request-id": [ + "7836d1a8-0abc-47fe-89e8-c61ad36603cc" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190730T005019Z:7836d1a8-0abc-47fe-89e8-c61ad36603cc" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 30 Jul 2019 00:50:18 GMT" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204\",\r\n \"name\": \"azsmnet5204\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1MjA0L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy04MjEwP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"free\"\r\n },\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "ac392fd8-b1dd-423b-87dc-ed443fb4da66" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "67" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"datetime'2019-07-30T00%3A50%3A24.8842012Z'\"" + ], + "x-ms-request-id": [ + "ac392fd8-b1dd-423b-87dc-ed443fb4da66" + ], + "request-id": [ + "ac392fd8-b1dd-423b-87dc-ed443fb4da66" + ], + "elapsed-time": [ + "2802" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "95b0334d-37fe-496b-ac3a-8d6fba214d0f" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190730T005025Z:95b0334d-37fe-496b-ac3a-8d6fba214d0f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 30 Jul 2019 00:50:25 GMT" + ], + "Content-Length": [ + "385" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210\",\r\n \"name\": \"azs-8210\",\r\n \"type\": \"Microsoft.Search/searchServices\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"replicaCount\": 1,\r\n \"partitionCount\": 1,\r\n \"status\": \"running\",\r\n \"statusDetails\": \"\",\r\n \"provisioningState\": \"succeeded\",\r\n \"hostingMode\": \"Default\"\r\n },\r\n \"sku\": {\r\n \"name\": \"free\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210/listAdminKeys?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1MjA0L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy04MjEwL2xpc3RBZG1pbktleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "355ab362-7361-4172-a8a6-e12ecab153f8" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "355ab362-7361-4172-a8a6-e12ecab153f8" + ], + "request-id": [ + "355ab362-7361-4172-a8a6-e12ecab153f8" + ], + "elapsed-time": [ + "171" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "96f2e807-edf7-4fd4-8982-d57968ad4073" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190730T005028Z:96f2e807-edf7-4fd4-8982-d57968ad4073" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 30 Jul 2019 00:50:27 GMT" + ], + "Content-Length": [ + "99" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"DC6252E8C6DA9CE2B290666D637C9625\",\r\n \"secondaryKey\": \"DB6046FBB6A2A4A494A9C49A37DF5BD4\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210/listQueryKeys?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1MjA0L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy04MjEwL2xpc3RRdWVyeUtleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "852a790a-0e7a-4f81-a99c-9e9a20742e34" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "852a790a-0e7a-4f81-a99c-9e9a20742e34" + ], + "request-id": [ + "852a790a-0e7a-4f81-a99c-9e9a20742e34" + ], + "elapsed-time": [ + "143" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "fdaeb0c7-2229-4413-9a7c-972a8a68f19a" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190730T005029Z:fdaeb0c7-2229-4413-9a7c-972a8a68f19a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 30 Jul 2019 00:50:29 GMT" + ], + "Content-Length": [ + "82" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": null,\r\n \"key\": \"43BB133584E6DFA6D5325D4B81404825\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/skillsets?api-version=2019-05-06", + "EncodedRequestUri": "L3NraWxsc2V0cz9hcGktdmVyc2lvbj0yMDE5LTA1LTA2", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"webapiskillset\",\r\n \"description\": \"Skillset for testing\",\r\n \"skills\": [\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Custom.WebApiSkill\",\r\n \"uri\": \"https://contoso.example.org\",\r\n \"httpHeaders\": {\r\n \"x-ms-example\": \"example\"\r\n },\r\n \"httpMethod\": \"POST\",\r\n \"description\": \"A simple web api skill\",\r\n \"context\": \"/document\",\r\n \"inputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"source\": \"/document/text\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"coolResult\",\r\n \"targetName\": \"myCoolResult\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "RequestHeaders": { + "client-request-id": [ + "d1527121-a935-4db3-8242-97de214b7077" + ], + "Accept-Language": [ + "en-US" + ], + "api-key": [ + "DC6252E8C6DA9CE2B290666D637C9625" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Search.SearchServiceClient/10.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "633" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"0x8D71487EB7EF60B\"" + ], + "Location": [ + "https://azs-8210.search-dogfood.windows-int.net/skillsets('webapiskillset')?api-version=2019-05-06" + ], + "request-id": [ + "d1527121-a935-4db3-8242-97de214b7077" + ], + "elapsed-time": [ + "115" + ], + "OData-Version": [ + "4.0" + ], + "Preference-Applied": [ + "odata.include-annotations=\"*\"" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains" + ], + "Date": [ + "Tue, 30 Jul 2019 00:50:30 GMT" + ], + "Content-Type": [ + "application/json; odata.metadata=minimal" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "636" + ] + }, + "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-8210.search-dogfood.windows-int.net/$metadata#skillsets/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D71487EB7EF60B\\\"\",\r\n \"name\": \"webapiskillset\",\r\n \"description\": \"Skillset for testing\",\r\n \"skills\": [\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Custom.WebApiSkill\",\r\n \"name\": null,\r\n \"description\": \"A simple web api skill\",\r\n \"context\": \"/document\",\r\n \"uri\": \"https://contoso.example.org\",\r\n \"httpMethod\": \"POST\",\r\n \"timeout\": null,\r\n \"batchSize\": null,\r\n \"inputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"source\": \"/document/text\",\r\n \"sourceContext\": null,\r\n \"inputs\": []\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"coolResult\",\r\n \"targetName\": \"myCoolResult\"\r\n }\r\n ],\r\n \"httpHeaders\": {\r\n \"x-ms-example\": \"example\"\r\n }\r\n }\r\n ],\r\n \"cognitiveServices\": null\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/skillsets('webapiskillset')?api-version=2019-05-06", + "EncodedRequestUri": "L3NraWxsc2V0cygnd2ViYXBpc2tpbGxzZXQnKT9hcGktdmVyc2lvbj0yMDE5LTA1LTA2", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "client-request-id": [ + "e7887599-ff3c-4616-885d-6f36057e4608" + ], + "Accept-Language": [ + "en-US" + ], + "api-key": [ + "DC6252E8C6DA9CE2B290666D637C9625" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Search.SearchServiceClient/10.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "e7887599-ff3c-4616-885d-6f36057e4608" + ], + "elapsed-time": [ + "50" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains" + ], + "Date": [ + "Tue, 30 Jul 2019 00:50:30 GMT" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1MjA0L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy04MjEwP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "63ee12d5-edc9-42d7-8a77-5a49cb3eec66" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "63ee12d5-edc9-42d7-8a77-5a49cb3eec66" + ], + "request-id": [ + "63ee12d5-edc9-42d7-8a77-5a49cb3eec66" + ], + "elapsed-time": [ + "939" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "2f64434c-b87c-4ffb-b492-fbec19c5a0f9" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190730T005033Z:2f64434c-b87c-4ffb-b492-fbec19c5a0f9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Tue, 30 Jul 2019 00:50:32 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "GenerateName": [ + "azsmnet5204" + ], + "GenerateServiceName": [ + "azs-8210" + ] + }, + "Variables": { + "SubscriptionId": "3c729b2a-4f86-4bb2-abe8-4b8647af156c" + } +} \ No newline at end of file From 6b7ccf15d9ac2dc9892fcd17dc6fe523c1d62644 Mon Sep 17 00:00:00 2001 From: Arvind Krishnaa Jagannathan Date: Thu, 1 Aug 2019 10:44:23 -0700 Subject: [PATCH 3/7] Regenerate the SDK from master branch of mainline repo --- ...earch_data-plane_Microsoft.Azure.Search.Service.txt | 10 +++++----- .../src/Generated/SdkInfo_SearchServiceClient.cs | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/mgmt/mgmtmetadata/search_data-plane_Microsoft.Azure.Search.Service.txt b/eng/mgmt/mgmtmetadata/search_data-plane_Microsoft.Azure.Search.Service.txt index 0f5d9cb86a9d1..66accf64b1ae2 100644 --- a/eng/mgmt/mgmtmetadata/search_data-plane_Microsoft.Azure.Search.Service.txt +++ b/eng/mgmt/mgmtmetadata/search_data-plane_Microsoft.Azure.Search.Service.txt @@ -3,12 +3,12 @@ AutoRest installed successfully. Commencing code generation Generating CSharp code Executing AutoRest command -cmd.exe /c autorest.cmd https://github.com/arv100kri/azure-rest-api-specs/blob/arv100kri/webapi-skill-definition/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\src\azure-sdk-for-net\sdk -2019-07-30 00:46:37 UTC +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\src\azure-sdk-for-net\sdk +2019-08-01 17:40:34 UTC Azure-rest-api-specs repository information -GitHub fork: arv100kri -Branch: arv100kri/webapi-skill-definition -Commit: 37523600973b39de08a8b321e06f8931b89227d3 +GitHub fork: Azure +Branch: master +Commit: 39c47bb0623a056d760175c63688d688e0020faa AutoRest information Requested version: latest Bootstrapper version: autorest@2.0.4283 diff --git a/sdk/search/Microsoft.Azure.Search.Service/src/Generated/SdkInfo_SearchServiceClient.cs b/sdk/search/Microsoft.Azure.Search.Service/src/Generated/SdkInfo_SearchServiceClient.cs index 44030ec6019f6..c701347d433ff 100644 --- a/sdk/search/Microsoft.Azure.Search.Service/src/Generated/SdkInfo_SearchServiceClient.cs +++ b/sdk/search/Microsoft.Azure.Search.Service/src/Generated/SdkInfo_SearchServiceClient.cs @@ -31,10 +31,10 @@ public static IEnumerable> ApiInfo_SearchServiceCl // BEGIN: Code Generation Metadata Section public static readonly String AutoRestVersion = "latest"; public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/arv100kri/azure-rest-api-specs/blob/arv100kri/webapi-skill-definition/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\src\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "arv100kri"; - public static readonly String GithubBranchName = "arv100kri/webapi-skill-definition"; - public static readonly String GithubCommidId = "37523600973b39de08a8b321e06f8931b89227d3"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Service/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\src\\azure-sdk-for-net\\sdk"; + public static readonly String GithubForkName = "Azure"; + public static readonly String GithubBranchName = "master"; + public static readonly String GithubCommidId = "39c47bb0623a056d760175c63688d688e0020faa"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section From c1543e90b4f5ef48969e4a5818d84425c51c8487 Mon Sep 17 00:00:00 2001 From: Arvind Krishnaa Jagannathan Date: Thu, 1 Aug 2019 18:09:39 -0700 Subject: [PATCH 4/7] Remove a superfluous, no longer meaningful test case --- ...ExceptionWithInvalidLanguageSelection.json | 486 ------------------ .../tests/Tests/SkillsetsTests.cs | 12 - 2 files changed, 498 deletions(-) delete mode 100644 sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetThrowsExceptionWithInvalidLanguageSelection.json diff --git a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetThrowsExceptionWithInvalidLanguageSelection.json b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetThrowsExceptionWithInvalidLanguageSelection.json deleted file mode 100644 index 985692e98cfa1..0000000000000 --- a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetThrowsExceptionWithInvalidLanguageSelection.json +++ /dev/null @@ -1,486 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/providers/Microsoft.Search/register?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3JlZ2lzdGVyP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7cb1bc7b-29c2-4de1-a671-9a0c9172b724" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Sat, 27 Apr 2019 22:13:08 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1135" - ], - "x-ms-request-id": [ - "9c5b4349-d76c-4070-90a0-fccb8d845bef" - ], - "x-ms-correlation-request-id": [ - "9c5b4349-d76c-4070-90a0-fccb8d845bef" - ], - "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221309Z:9c5b4349-d76c-4070-90a0-fccb8d845bef" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "2230" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"authorization\": {\r\n \"applicationId\": \"804f4a7a-7d6e-4df7-bf8c-e7f0106e16c2\",\r\n \"roleDefinitionId\": \"20FA3191-87CF-4C3D-9510-74CCB594A310\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesInt\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesPpe\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityInt\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityPpe\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityCit\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityInt\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityPpe\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourcegroups/azsmnet9505?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQ5NTA1P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1dd6b340-0fb6-4aef-b7a3-58a05c909b0e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Sat, 27 Apr 2019 22:13:09 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1135" - ], - "x-ms-request-id": [ - "ac293731-9f49-42f8-82c2-32a061fb3496" - ], - "x-ms-correlation-request-id": [ - "ac293731-9f49-42f8-82c2-32a061fb3496" - ], - "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221309Z:ac293731-9f49-42f8-82c2-32a061fb3496" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "175" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet9505\",\r\n \"name\": \"azsmnet9505\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet9505/providers/Microsoft.Search/searchServices/azs-1742?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ5NTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0xNzQyP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"free\"\r\n },\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "95eefb54-81c0-4856-84ea-4777f0db81b7" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "67" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Sat, 27 Apr 2019 22:13:12 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "W/\"datetime'2019-04-27T22%3A13%3A12.8017156Z'\"" - ], - "x-ms-request-id": [ - "95eefb54-81c0-4856-84ea-4777f0db81b7" - ], - "request-id": [ - "95eefb54-81c0-4856-84ea-4777f0db81b7" - ], - "elapsed-time": [ - "1711" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1150" - ], - "x-ms-correlation-request-id": [ - "3df2bae6-31ea-4151-b326-63e93af2fbc9" - ], - "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221313Z:3df2bae6-31ea-4151-b326-63e93af2fbc9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "385" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet9505/providers/Microsoft.Search/searchServices/azs-1742\",\r\n \"name\": \"azs-1742\",\r\n \"type\": \"Microsoft.Search/searchServices\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"replicaCount\": 1,\r\n \"partitionCount\": 1,\r\n \"status\": \"running\",\r\n \"statusDetails\": \"\",\r\n \"provisioningState\": \"succeeded\",\r\n \"hostingMode\": \"Default\"\r\n },\r\n \"sku\": {\r\n \"name\": \"free\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet9505/providers/Microsoft.Search/searchServices/azs-1742/listAdminKeys?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ5NTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0xNzQyL2xpc3RBZG1pbktleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "828b28a8-4afe-434c-a693-14ccc197d04e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Sat, 27 Apr 2019 22:13:16 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-request-id": [ - "828b28a8-4afe-434c-a693-14ccc197d04e" - ], - "request-id": [ - "828b28a8-4afe-434c-a693-14ccc197d04e" - ], - "elapsed-time": [ - "300" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1150" - ], - "x-ms-correlation-request-id": [ - "2fb371c5-35d3-4e8c-bf68-0165eecea53d" - ], - "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221316Z:2fb371c5-35d3-4e8c-bf68-0165eecea53d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "99" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"primaryKey\": \"39E49E444496C863CC73A3CCE51855E5\",\r\n \"secondaryKey\": \"47D4B2FCCC32149C890C9993CD5FA8CB\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet9505/providers/Microsoft.Search/searchServices/azs-1742/listQueryKeys?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ5NTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0xNzQyL2xpc3RRdWVyeUtleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "04a1bd60-9a6b-4fe9-b33a-de8714515281" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Sat, 27 Apr 2019 22:13:16 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-request-id": [ - "04a1bd60-9a6b-4fe9-b33a-de8714515281" - ], - "request-id": [ - "04a1bd60-9a6b-4fe9-b33a-de8714515281" - ], - "elapsed-time": [ - "420" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14976" - ], - "x-ms-correlation-request-id": [ - "5e2484e3-c4dd-4759-bb22-fde8df2c8f15" - ], - "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221317Z:5e2484e3-c4dd-4759-bb22-fde8df2c8f15" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "82" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": null,\r\n \"key\": \"FEEA375B0A13B5D0E6F409131A28D8D2\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/skillsets?api-version=2019-05-06", - "EncodedRequestUri": "L3NraWxsc2V0cz9hcGktdmVyc2lvbj0yMDE5LTA1LTA2", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"testskillset1\",\r\n \"description\": \"Skillset for testing\",\r\n \"skills\": [\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Vision.OcrSkill\",\r\n \"textExtractionAlgorithm\": \"handwritten\",\r\n \"defaultLanguageCode\": \"fi\",\r\n \"description\": \"Tested OCR skill\",\r\n \"context\": \"/document\",\r\n \"inputs\": [\r\n {\r\n \"name\": \"url\",\r\n \"source\": \"/document/url\"\r\n },\r\n {\r\n \"name\": \"queryString\",\r\n \"source\": \"/document/queryString\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"targetName\": \"mytext\"\r\n }\r\n ]\r\n },\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Text.SentimentSkill\",\r\n \"defaultLanguageCode\": \"fi\",\r\n \"description\": \"Tested Sentiment skill\",\r\n \"context\": \"/document\",\r\n \"inputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"source\": \"/document/mytext\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"score\",\r\n \"targetName\": \"mySentiment\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", - "RequestHeaders": { - "client-request-id": [ - "403779a1-f70f-4eb9-8149-c7269e8e0c30" - ], - "accept-language": [ - "en-US" - ], - "api-key": [ - "39E49E444496C863CC73A3CCE51855E5" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Search.SearchServiceClient/9.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "1082" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Sat, 27 Apr 2019 22:13:18 GMT" - ], - "Pragma": [ - "no-cache" - ], - "request-id": [ - "403779a1-f70f-4eb9-8149-c7269e8e0c30" - ], - "elapsed-time": [ - "22" - ], - "OData-Version": [ - "4.0" - ], - "Preference-Applied": [ - "odata.include-annotations=\"*\"" - ], - "Strict-Transport-Security": [ - "max-age=15724800; includeSubDomains" - ], - "Content-Length": [ - "227" - ], - "Content-Type": [ - "application/json; odata.metadata=minimal" - ], - "Content-Language": [ - "en" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"\",\r\n \"message\": \"One or more skills are invalid. Details: Error in skill #1: When 'textExtractionAlgorithm' parameter is set to 'handwritten' the only supported value for 'defaultLanguageCode' parameter is 'en'\"\r\n }\r\n}", - "StatusCode": 400 - }, - { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet9505/providers/Microsoft.Search/searchServices/azs-1742?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ5NTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0xNzQyP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "12c9c1a0-4b65-4677-a520-fad81a0f87d2" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Sat, 27 Apr 2019 22:13:21 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-request-id": [ - "12c9c1a0-4b65-4677-a520-fad81a0f87d2" - ], - "request-id": [ - "12c9c1a0-4b65-4677-a520-fad81a0f87d2" - ], - "elapsed-time": [ - "997" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14944" - ], - "x-ms-correlation-request-id": [ - "1a9b3a42-b4aa-4030-b767-c4aee5bafae6" - ], - "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221321Z:1a9b3a42-b4aa-4030-b767-c4aee5bafae6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "GenerateName": [ - "azsmnet9505" - ], - "GenerateServiceName": [ - "azs-1742" - ] - }, - "Variables": { - "SubscriptionId": "3c729b2a-4f86-4bb2-abe8-4b8647af156c" - } -} \ No newline at end of file diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs index 808daeadb8cf3..a01f925727e39 100644 --- a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs +++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs @@ -74,18 +74,6 @@ public void CreateSkillsetReturnsCorrectDefinitionOcrHandwritingSentiment() }); } - [Fact] - public void CreateSkillsetThrowsExceptionWithInvalidLanguageSelection() - { - Run(() => - { - SearchServiceClient searchClient = Data.GetSearchServiceClient(); - Skillset skillset = CreateTestSkillsetOcrSentiment(OcrSkillLanguage.Fi, SentimentSkillLanguage.Fi, TextExtractionAlgorithm.Handwritten); - CloudException exception = Assert.Throws(() => searchClient.Skillsets.Create(skillset)); - Assert.Contains("When 'textExtractionAlgorithm' parameter is set to 'handwritten' the only supported value for 'defaultLanguageCode' parameter is 'en'", exception.Message); - }); - } - [Fact] public void CreateSkillsetReturnsCorrectDefinitionImageAnalysisKeyPhrase() { From ffaac565765c8e4652fbb42e4908e6f30a6fde9f Mon Sep 17 00:00:00 2001 From: Arvind Krishnaa Jagannathan Date: Thu, 1 Aug 2019 18:13:12 -0700 Subject: [PATCH 5/7] Add 2 permutations for headers in test --- .../tests/Tests/SkillsetsTests.cs | 42 +++++++++++++------ 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs index a01f925727e39..64033fcbadd0b 100644 --- a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs +++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs @@ -25,7 +25,7 @@ public sealed class SkillsetsTests : SearchTestBase public const string RootPathString = "/document"; [Fact] - public void CreateSkillsetReturnsCorrectDefinitionWebApiSkill() + public void CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders() { Run(() => { @@ -34,6 +34,16 @@ public void CreateSkillsetReturnsCorrectDefinitionWebApiSkill() }); } + [Fact] + public void CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders() + { + Run(() => + { + SearchServiceClient searchClient = Data.GetSearchServiceClient(); + CreateAndValidateSkillset(searchClient, CreateTestSkillsetWebApiSkill(false)); + }); + } + [Fact] public void CreateSkillsetReturnsCorrectDefinitionOcrKeyPhrase() { @@ -906,7 +916,7 @@ private static Skillset CreateTestSkillsetOcrSplitText(OcrSkillLanguage ocrLangu return new Skillset("testskillset", "Skillset for testing", skills); } - private static Skillset CreateTestSkillsetWebApiSkill() + private static Skillset CreateTestSkillsetWebApiSkill(bool includeHeader = true) { var skills = new List(); @@ -928,19 +938,25 @@ private static Skillset CreateTestSkillsetWebApiSkill() } }; - skills.Add(new WebApiSkill( - inputs, - outputs, - uri: "https://contoso.example.org", - description: "A simple web api skill", + var skill = new WebApiSkill( + inputs, + outputs, + uri: "https://contoso.example.org", + description: "A simple web api skill", context: RootPathString) + { + HttpMethod = "POST" + }; + + if (includeHeader) + { + skill.HttpHeaders = new Dictionary { - HttpHeaders = new Dictionary - { - ["x-ms-example"] = "example" - }, - HttpMethod = "POST" - }); + ["x-ms-example"] = "example" + }; + } + + skills.Add(skill); return new Skillset("webapiskillset", "Skillset for testing", skills); } From a1b899a93839dfa795f06ff29a3c3a2d08c56a32 Mon Sep 17 00:00:00 2001 From: Arvind Krishnaa Jagannathan Date: Fri, 2 Aug 2019 11:12:18 -0700 Subject: [PATCH 6/7] Fix up session records --- ...rectDefinitionWebApiSkillWithHeaders.json} | 146 ++--- ...ctDefinitionWebApiSkillWithoutHeaders.json | 537 ++++++++++++++++++ 2 files changed, 610 insertions(+), 73 deletions(-) rename sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/{CreateSkillsetReturnsCorrectDefinitionWebApiSkill.json => CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders.json} (76%) create mode 100644 sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders.json diff --git a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkill.json b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders.json similarity index 76% rename from sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkill.json rename to sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders.json index 39237f5fd1c1f..6823149124abe 100644 --- a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkill.json +++ b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders.json @@ -7,7 +7,7 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "f04b4021-4009-4889-8ec5-1daa7a65f1a6" + "9213c2b3-936e-47df-af42-1522bc3182eb" ], "Accept-Language": [ "en-US" @@ -30,13 +30,13 @@ "1199" ], "x-ms-request-id": [ - "9f34c90f-068f-4d00-a239-ce24228b20cc" + "7d45dbc2-7585-4ab3-b288-d4e6a3665e47" ], "x-ms-correlation-request-id": [ - "9f34c90f-068f-4d00-a239-ce24228b20cc" + "7d45dbc2-7585-4ab3-b288-d4e6a3665e47" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190730T005018Z:9f34c90f-068f-4d00-a239-ce24228b20cc" + "NORTHEUROPE:20190802T180947Z:7d45dbc2-7585-4ab3-b288-d4e6a3665e47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -45,7 +45,7 @@ "nosniff" ], "Date": [ - "Tue, 30 Jul 2019 00:50:17 GMT" + "Fri, 02 Aug 2019 18:09:46 GMT" ], "Content-Length": [ "2230" @@ -61,13 +61,13 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourcegroups/azsmnet5204?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQ1MjA0P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourcegroups/azsmnet2527?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQyNTI3P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ - "3719e9ff-7f7c-49cc-8d1c-a092e244e8a2" + "09e9c6b5-7249-4b19-bc2a-299dfc8867c4" ], "Accept-Language": [ "en-US" @@ -96,13 +96,13 @@ "1199" ], "x-ms-request-id": [ - "7836d1a8-0abc-47fe-89e8-c61ad36603cc" + "26eb8bce-b4d2-4558-9687-1fe3ec0d2c41" ], "x-ms-correlation-request-id": [ - "7836d1a8-0abc-47fe-89e8-c61ad36603cc" + "26eb8bce-b4d2-4558-9687-1fe3ec0d2c41" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190730T005019Z:7836d1a8-0abc-47fe-89e8-c61ad36603cc" + "NORTHEUROPE:20190802T180950Z:26eb8bce-b4d2-4558-9687-1fe3ec0d2c41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -111,7 +111,7 @@ "nosniff" ], "Date": [ - "Tue, 30 Jul 2019 00:50:18 GMT" + "Fri, 02 Aug 2019 18:09:50 GMT" ], "Content-Length": [ "175" @@ -123,17 +123,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204\",\r\n \"name\": \"azsmnet5204\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet2527\",\r\n \"name\": \"azsmnet2527\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1MjA0L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy04MjEwP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet2527/providers/Microsoft.Search/searchServices/azs-3959?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQyNTI3L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0zOTU5P2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", "RequestMethod": "PUT", "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"free\"\r\n },\r\n \"location\": \"West US\"\r\n}", "RequestHeaders": { "x-ms-client-request-id": [ - "ac392fd8-b1dd-423b-87dc-ed443fb4da66" + "5fa819bb-565b-4c72-baaf-78117f11e3f4" ], "Accept-Language": [ "en-US" @@ -159,34 +159,34 @@ "no-cache" ], "ETag": [ - "W/\"datetime'2019-07-30T00%3A50%3A24.8842012Z'\"" + "W/\"datetime'2019-08-02T18%3A09%3A56.0192713Z'\"" ], "x-ms-request-id": [ - "ac392fd8-b1dd-423b-87dc-ed443fb4da66" + "5fa819bb-565b-4c72-baaf-78117f11e3f4" ], "request-id": [ - "ac392fd8-b1dd-423b-87dc-ed443fb4da66" + "5fa819bb-565b-4c72-baaf-78117f11e3f4" ], "elapsed-time": [ - "2802" + "3537" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "1194" ], "x-ms-correlation-request-id": [ - "95b0334d-37fe-496b-ac3a-8d6fba214d0f" + "9e3912a4-072e-4027-9980-26b19feafa46" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190730T005025Z:95b0334d-37fe-496b-ac3a-8d6fba214d0f" + "NORTHEUROPE:20190802T180956Z:9e3912a4-072e-4027-9980-26b19feafa46" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ - "Tue, 30 Jul 2019 00:50:25 GMT" + "Fri, 02 Aug 2019 18:09:56 GMT" ], "Content-Length": [ "385" @@ -198,17 +198,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210\",\r\n \"name\": \"azs-8210\",\r\n \"type\": \"Microsoft.Search/searchServices\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"replicaCount\": 1,\r\n \"partitionCount\": 1,\r\n \"status\": \"running\",\r\n \"statusDetails\": \"\",\r\n \"provisioningState\": \"succeeded\",\r\n \"hostingMode\": \"Default\"\r\n },\r\n \"sku\": {\r\n \"name\": \"free\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet2527/providers/Microsoft.Search/searchServices/azs-3959\",\r\n \"name\": \"azs-3959\",\r\n \"type\": \"Microsoft.Search/searchServices\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"replicaCount\": 1,\r\n \"partitionCount\": 1,\r\n \"status\": \"running\",\r\n \"statusDetails\": \"\",\r\n \"provisioningState\": \"succeeded\",\r\n \"hostingMode\": \"Default\"\r\n },\r\n \"sku\": {\r\n \"name\": \"free\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210/listAdminKeys?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1MjA0L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy04MjEwL2xpc3RBZG1pbktleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet2527/providers/Microsoft.Search/searchServices/azs-3959/listAdminKeys?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQyNTI3L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0zOTU5L2xpc3RBZG1pbktleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", "RequestMethod": "POST", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "355ab362-7361-4172-a8a6-e12ecab153f8" + "18d267ad-6002-4353-971a-f0af356cf0e5" ], "Accept-Language": [ "en-US" @@ -231,31 +231,31 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "355ab362-7361-4172-a8a6-e12ecab153f8" + "18d267ad-6002-4353-971a-f0af356cf0e5" ], "request-id": [ - "355ab362-7361-4172-a8a6-e12ecab153f8" + "18d267ad-6002-4353-971a-f0af356cf0e5" ], "elapsed-time": [ - "171" + "163" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "1194" ], "x-ms-correlation-request-id": [ - "96f2e807-edf7-4fd4-8982-d57968ad4073" + "bdc94148-03c7-47af-a1d1-abc2a370ea27" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190730T005028Z:96f2e807-edf7-4fd4-8982-d57968ad4073" + "NORTHEUROPE:20190802T180958Z:bdc94148-03c7-47af-a1d1-abc2a370ea27" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ - "Tue, 30 Jul 2019 00:50:27 GMT" + "Fri, 02 Aug 2019 18:09:57 GMT" ], "Content-Length": [ "99" @@ -267,17 +267,17 @@ "-1" ] }, - "ResponseBody": "{\r\n \"primaryKey\": \"DC6252E8C6DA9CE2B290666D637C9625\",\r\n \"secondaryKey\": \"DB6046FBB6A2A4A494A9C49A37DF5BD4\"\r\n}", + "ResponseBody": "{\r\n \"primaryKey\": \"5D77864ED60F3042A8EACF0DF54C9C22\",\r\n \"secondaryKey\": \"BACF8EB5662F96DE4F5DC42AC03B5E0B\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210/listQueryKeys?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1MjA0L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy04MjEwL2xpc3RRdWVyeUtleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet2527/providers/Microsoft.Search/searchServices/azs-3959/listQueryKeys?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQyNTI3L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0zOTU5L2xpc3RRdWVyeUtleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "852a790a-0e7a-4f81-a99c-9e9a20742e34" + "6d618234-aea1-498c-a08d-2258ebf67a0d" ], "Accept-Language": [ "en-US" @@ -300,31 +300,31 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "852a790a-0e7a-4f81-a99c-9e9a20742e34" + "6d618234-aea1-498c-a08d-2258ebf67a0d" ], "request-id": [ - "852a790a-0e7a-4f81-a99c-9e9a20742e34" + "6d618234-aea1-498c-a08d-2258ebf67a0d" ], "elapsed-time": [ - "143" + "97" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14999" + "14997" ], "x-ms-correlation-request-id": [ - "fdaeb0c7-2229-4413-9a7c-972a8a68f19a" + "948ef8b2-d452-4721-a9f6-41ba748163ed" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190730T005029Z:fdaeb0c7-2229-4413-9a7c-972a8a68f19a" + "NORTHEUROPE:20190802T180959Z:948ef8b2-d452-4721-a9f6-41ba748163ed" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ - "Tue, 30 Jul 2019 00:50:29 GMT" + "Fri, 02 Aug 2019 18:09:58 GMT" ], "Content-Length": [ "82" @@ -336,7 +336,7 @@ "-1" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": null,\r\n \"key\": \"43BB133584E6DFA6D5325D4B81404825\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": null,\r\n \"key\": \"4BC3CC5CEB8C99544010F030826FCB0C\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "StatusCode": 200 }, { @@ -346,13 +346,13 @@ "RequestBody": "{\r\n \"name\": \"webapiskillset\",\r\n \"description\": \"Skillset for testing\",\r\n \"skills\": [\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Custom.WebApiSkill\",\r\n \"uri\": \"https://contoso.example.org\",\r\n \"httpHeaders\": {\r\n \"x-ms-example\": \"example\"\r\n },\r\n \"httpMethod\": \"POST\",\r\n \"description\": \"A simple web api skill\",\r\n \"context\": \"/document\",\r\n \"inputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"source\": \"/document/text\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"coolResult\",\r\n \"targetName\": \"myCoolResult\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", "RequestHeaders": { "client-request-id": [ - "d1527121-a935-4db3-8242-97de214b7077" + "b42e2896-1d2e-4322-90a0-0610ac5915af" ], "Accept-Language": [ "en-US" ], "api-key": [ - "DC6252E8C6DA9CE2B290666D637C9625" + "5D77864ED60F3042A8EACF0DF54C9C22" ], "User-Agent": [ "FxVersion/4.6.27617.04", @@ -375,16 +375,16 @@ "no-cache" ], "ETag": [ - "W/\"0x8D71487EB7EF60B\"" + "W/\"0x8D71774A2493E08\"" ], "Location": [ - "https://azs-8210.search-dogfood.windows-int.net/skillsets('webapiskillset')?api-version=2019-05-06" + "https://azs-3959.search-dogfood.windows-int.net/skillsets('webapiskillset')?api-version=2019-05-06" ], "request-id": [ - "d1527121-a935-4db3-8242-97de214b7077" + "b42e2896-1d2e-4322-90a0-0610ac5915af" ], "elapsed-time": [ - "115" + "117" ], "OData-Version": [ "4.0" @@ -396,7 +396,7 @@ "max-age=15724800; includeSubDomains" ], "Date": [ - "Tue, 30 Jul 2019 00:50:30 GMT" + "Fri, 02 Aug 2019 18:09:59 GMT" ], "Content-Type": [ "application/json; odata.metadata=minimal" @@ -405,10 +405,10 @@ "-1" ], "Content-Length": [ - "636" + "663" ] }, - "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-8210.search-dogfood.windows-int.net/$metadata#skillsets/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D71487EB7EF60B\\\"\",\r\n \"name\": \"webapiskillset\",\r\n \"description\": \"Skillset for testing\",\r\n \"skills\": [\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Custom.WebApiSkill\",\r\n \"name\": null,\r\n \"description\": \"A simple web api skill\",\r\n \"context\": \"/document\",\r\n \"uri\": \"https://contoso.example.org\",\r\n \"httpMethod\": \"POST\",\r\n \"timeout\": null,\r\n \"batchSize\": null,\r\n \"inputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"source\": \"/document/text\",\r\n \"sourceContext\": null,\r\n \"inputs\": []\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"coolResult\",\r\n \"targetName\": \"myCoolResult\"\r\n }\r\n ],\r\n \"httpHeaders\": {\r\n \"x-ms-example\": \"example\"\r\n }\r\n }\r\n ],\r\n \"cognitiveServices\": null\r\n}", + "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-3959.search-dogfood.windows-int.net/$metadata#skillsets/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D71774A2493E08\\\"\",\r\n \"name\": \"webapiskillset\",\r\n \"description\": \"Skillset for testing\",\r\n \"skills\": [\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Custom.WebApiSkill\",\r\n \"name\": null,\r\n \"description\": \"A simple web api skill\",\r\n \"context\": \"/document\",\r\n \"uri\": \"https://contoso.example.org\",\r\n \"httpMethod\": \"POST\",\r\n \"timeout\": null,\r\n \"batchSize\": null,\r\n \"degreeOfParallelism\": null,\r\n \"inputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"source\": \"/document/text\",\r\n \"sourceContext\": null,\r\n \"inputs\": []\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"coolResult\",\r\n \"targetName\": \"myCoolResult\"\r\n }\r\n ],\r\n \"httpHeaders\": {\r\n \"x-ms-example\": \"example\"\r\n }\r\n }\r\n ],\r\n \"cognitiveServices\": null\r\n}", "StatusCode": 201 }, { @@ -418,13 +418,13 @@ "RequestBody": "", "RequestHeaders": { "client-request-id": [ - "e7887599-ff3c-4616-885d-6f36057e4608" + "a94b0dd3-6dcc-42ab-a434-d5323955f655" ], "Accept-Language": [ "en-US" ], "api-key": [ - "DC6252E8C6DA9CE2B290666D637C9625" + "5D77864ED60F3042A8EACF0DF54C9C22" ], "User-Agent": [ "FxVersion/4.6.27617.04", @@ -441,16 +441,16 @@ "no-cache" ], "request-id": [ - "e7887599-ff3c-4616-885d-6f36057e4608" + "a94b0dd3-6dcc-42ab-a434-d5323955f655" ], "elapsed-time": [ - "50" + "75" ], "Strict-Transport-Security": [ "max-age=15724800; includeSubDomains" ], "Date": [ - "Tue, 30 Jul 2019 00:50:30 GMT" + "Fri, 02 Aug 2019 18:09:59 GMT" ], "Expires": [ "-1" @@ -460,13 +460,13 @@ "StatusCode": 204 }, { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet5204/providers/Microsoft.Search/searchServices/azs-8210?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ1MjA0L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy04MjEwP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet2527/providers/Microsoft.Search/searchServices/azs-3959?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQyNTI3L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0zOTU5P2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", "RequestMethod": "DELETE", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "63ee12d5-edc9-42d7-8a77-5a49cb3eec66" + "3da23ab4-03ba-4bc5-9e7e-cbf06fbd1d68" ], "Accept-Language": [ "en-US" @@ -486,31 +486,31 @@ "no-cache" ], "x-ms-request-id": [ - "63ee12d5-edc9-42d7-8a77-5a49cb3eec66" + "3da23ab4-03ba-4bc5-9e7e-cbf06fbd1d68" ], "request-id": [ - "63ee12d5-edc9-42d7-8a77-5a49cb3eec66" + "3da23ab4-03ba-4bc5-9e7e-cbf06fbd1d68" ], "elapsed-time": [ - "939" + "1120" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" + "14997" ], "x-ms-correlation-request-id": [ - "2f64434c-b87c-4ffb-b492-fbec19c5a0f9" + "76a03eb2-908a-47f8-939b-1baed6be9dda" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190730T005033Z:2f64434c-b87c-4ffb-b492-fbec19c5a0f9" + "NORTHEUROPE:20190802T181004Z:76a03eb2-908a-47f8-939b-1baed6be9dda" ], "X-Content-Type-Options": [ "nosniff" ], "Date": [ - "Tue, 30 Jul 2019 00:50:32 GMT" + "Fri, 02 Aug 2019 18:10:03 GMT" ], "Expires": [ "-1" @@ -525,10 +525,10 @@ ], "Names": { "GenerateName": [ - "azsmnet5204" + "azsmnet2527" ], "GenerateServiceName": [ - "azs-8210" + "azs-3959" ] }, "Variables": { diff --git a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders.json b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders.json new file mode 100644 index 0000000000000..63a0171d544ed --- /dev/null +++ b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders.json @@ -0,0 +1,537 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/providers/Microsoft.Search/register?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3JlZ2lzdGVyP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6af5eba5-bc3a-4d45-ab56-f89c1e944051" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "3db3415d-a19a-4cc0-bd92-27c31868da71" + ], + "x-ms-correlation-request-id": [ + "3db3415d-a19a-4cc0-bd92-27c31868da71" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T181108Z:3db3415d-a19a-4cc0-bd92-27c31868da71" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:11:08 GMT" + ], + "Content-Length": [ + "2230" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/providers/Microsoft.Search\",\r\n \"namespace\": \"Microsoft.Search\",\r\n \"authorization\": {\r\n \"applicationId\": \"804f4a7a-7d6e-4df7-bf8c-e7f0106e16c2\",\r\n \"roleDefinitionId\": \"20FA3191-87CF-4C3D-9510-74CCB594A310\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"searchServices\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesCit\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesInt\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"searchServicesPpe\",\r\n \"locations\": [\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityCit\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityInt\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkServiceNameAvailabilityPpe\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-02-28\",\r\n \"2014-07-31-Preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityCit\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityInt\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailabilityPpe\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-19\",\r\n \"2015-02-28\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourcegroups/azsmnet3848?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQzODQ4P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1f3cac2a-a040-48a1-b772-a299b453bff3" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "647bde58-c9af-4172-99d0-e5b0f252b319" + ], + "x-ms-correlation-request-id": [ + "647bde58-c9af-4172-99d0-e5b0f252b319" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T181109Z:647bde58-c9af-4172-99d0-e5b0f252b319" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:11:09 GMT" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet3848\",\r\n \"name\": \"azsmnet3848\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet3848/providers/Microsoft.Search/searchServices/azs-3786?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQzODQ4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0zNzg2P2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"free\"\r\n },\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3fe5d72a-1d94-4ee2-b091-12b15936e878" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "67" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"datetime'2019-08-02T18%3A11%3A13.9211382Z'\"" + ], + "x-ms-request-id": [ + "3fe5d72a-1d94-4ee2-b091-12b15936e878" + ], + "request-id": [ + "3fe5d72a-1d94-4ee2-b091-12b15936e878" + ], + "elapsed-time": [ + "2587" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "7daa1b80-0d4d-4602-96c0-fce931ced549" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T181115Z:7daa1b80-0d4d-4602-96c0-fce931ced549" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:11:15 GMT" + ], + "Content-Length": [ + "385" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet3848/providers/Microsoft.Search/searchServices/azs-3786\",\r\n \"name\": \"azs-3786\",\r\n \"type\": \"Microsoft.Search/searchServices\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"replicaCount\": 1,\r\n \"partitionCount\": 1,\r\n \"status\": \"running\",\r\n \"statusDetails\": \"\",\r\n \"provisioningState\": \"succeeded\",\r\n \"hostingMode\": \"Default\"\r\n },\r\n \"sku\": {\r\n \"name\": \"free\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet3848/providers/Microsoft.Search/searchServices/azs-3786/listAdminKeys?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQzODQ4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0zNzg2L2xpc3RBZG1pbktleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c39f8421-de96-4d86-829e-a78d30e0ca5d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "c39f8421-de96-4d86-829e-a78d30e0ca5d" + ], + "request-id": [ + "c39f8421-de96-4d86-829e-a78d30e0ca5d" + ], + "elapsed-time": [ + "428" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "a78fb19c-d83a-4272-86e0-b5dfff52cdde" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T181122Z:a78fb19c-d83a-4272-86e0-b5dfff52cdde" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:11:22 GMT" + ], + "Content-Length": [ + "99" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"5CA77CE22AB2DBF2053E3695DE4A060C\",\r\n \"secondaryKey\": \"5F1F69710EED0AB5A7B3AF5D4DD16A39\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet3848/providers/Microsoft.Search/searchServices/azs-3786/listQueryKeys?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQzODQ4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0zNzg2L2xpc3RRdWVyeUtleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "975bee14-c441-4078-983d-badd1273ef11" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "975bee14-c441-4078-983d-badd1273ef11" + ], + "request-id": [ + "975bee14-c441-4078-983d-badd1273ef11" + ], + "elapsed-time": [ + "612" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "6377e9fc-dc10-44e8-88ee-15c5b4bc7a45" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T181123Z:6377e9fc-dc10-44e8-88ee-15c5b4bc7a45" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:11:23 GMT" + ], + "Content-Length": [ + "82" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": null,\r\n \"key\": \"7B4A288D2D09176AC71449B034AF9134\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/skillsets?api-version=2019-05-06", + "EncodedRequestUri": "L3NraWxsc2V0cz9hcGktdmVyc2lvbj0yMDE5LTA1LTA2", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"webapiskillset\",\r\n \"description\": \"Skillset for testing\",\r\n \"skills\": [\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Custom.WebApiSkill\",\r\n \"uri\": \"https://contoso.example.org\",\r\n \"httpMethod\": \"POST\",\r\n \"description\": \"A simple web api skill\",\r\n \"context\": \"/document\",\r\n \"inputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"source\": \"/document/text\"\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"coolResult\",\r\n \"targetName\": \"myCoolResult\"\r\n }\r\n ]\r\n }\r\n ]\r\n}", + "RequestHeaders": { + "client-request-id": [ + "68ff7b89-2808-486b-93c7-e08fa8991f6e" + ], + "Accept-Language": [ + "en-US" + ], + "api-key": [ + "5CA77CE22AB2DBF2053E3695DE4A060C" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Search.SearchServiceClient/10.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "564" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"0x8D71774D47FDFF0\"" + ], + "Location": [ + "https://azs-3786.search-dogfood.windows-int.net/skillsets('webapiskillset')?api-version=2019-05-06" + ], + "request-id": [ + "68ff7b89-2808-486b-93c7-e08fa8991f6e" + ], + "elapsed-time": [ + "75" + ], + "OData-Version": [ + "4.0" + ], + "Preference-Applied": [ + "odata.include-annotations=\"*\"" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains" + ], + "Date": [ + "Fri, 02 Aug 2019 18:11:23 GMT" + ], + "Content-Type": [ + "application/json; odata.metadata=minimal" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "641" + ] + }, + "ResponseBody": "{\r\n \"@odata.context\": \"https://azs-3786.search-dogfood.windows-int.net/$metadata#skillsets/$entity\",\r\n \"@odata.etag\": \"\\\"0x8D71774D47FDFF0\\\"\",\r\n \"name\": \"webapiskillset\",\r\n \"description\": \"Skillset for testing\",\r\n \"skills\": [\r\n {\r\n \"@odata.type\": \"#Microsoft.Skills.Custom.WebApiSkill\",\r\n \"name\": null,\r\n \"description\": \"A simple web api skill\",\r\n \"context\": \"/document\",\r\n \"uri\": \"https://contoso.example.org\",\r\n \"httpMethod\": \"POST\",\r\n \"timeout\": null,\r\n \"batchSize\": null,\r\n \"degreeOfParallelism\": null,\r\n \"inputs\": [\r\n {\r\n \"name\": \"text\",\r\n \"source\": \"/document/text\",\r\n \"sourceContext\": null,\r\n \"inputs\": []\r\n }\r\n ],\r\n \"outputs\": [\r\n {\r\n \"name\": \"coolResult\",\r\n \"targetName\": \"myCoolResult\"\r\n }\r\n ],\r\n \"httpHeaders\": null\r\n }\r\n ],\r\n \"cognitiveServices\": null\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/skillsets('webapiskillset')?api-version=2019-05-06", + "EncodedRequestUri": "L3NraWxsc2V0cygnd2ViYXBpc2tpbGxzZXQnKT9hcGktdmVyc2lvbj0yMDE5LTA1LTA2", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "client-request-id": [ + "4e5e4f8a-a1eb-4adc-ad42-2bd3af133243" + ], + "Accept-Language": [ + "en-US" + ], + "api-key": [ + "5CA77CE22AB2DBF2053E3695DE4A060C" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Search.SearchServiceClient/10.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "request-id": [ + "4e5e4f8a-a1eb-4adc-ad42-2bd3af133243" + ], + "elapsed-time": [ + "72" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains" + ], + "Date": [ + "Fri, 02 Aug 2019 18:11:24 GMT" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet3848/providers/Microsoft.Search/searchServices/azs-3786?api-version=2015-08-19", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQzODQ4L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0zNzg2P2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "83f54960-a6e4-4559-ada6-a1f5a37665ac" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.27617.04", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.17763.", + "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "83f54960-a6e4-4559-ada6-a1f5a37665ac" + ], + "request-id": [ + "83f54960-a6e4-4559-ada6-a1f5a37665ac" + ], + "elapsed-time": [ + "946" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "46662848-52a4-44b6-8839-24062789382e" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T181128Z:46662848-52a4-44b6-8839-24062789382e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:11:28 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "GenerateName": [ + "azsmnet3848" + ], + "GenerateServiceName": [ + "azs-3786" + ] + }, + "Variables": { + "SubscriptionId": "3c729b2a-4f86-4bb2-abe8-4b8647af156c" + } +} \ No newline at end of file From 63c4ee47e026bb95d7c998d1a5e15b9ace2756d8 Mon Sep 17 00:00:00 2001 From: Arvind Krishnaa Jagannathan Date: Mon, 5 Aug 2019 14:02:59 -0700 Subject: [PATCH 7/7] Add named parameter --- sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs index 64033fcbadd0b..99bff7b12eeba 100644 --- a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs +++ b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs @@ -40,7 +40,7 @@ public void CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders() Run(() => { SearchServiceClient searchClient = Data.GetSearchServiceClient(); - CreateAndValidateSkillset(searchClient, CreateTestSkillsetWebApiSkill(false)); + CreateAndValidateSkillset(searchClient, CreateTestSkillsetWebApiSkill(includeHeader: false)); }); }