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 e84e664eb864..66accf64b1ae 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/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: Azure Branch: master -Commit: a28a3fca492d332b0e515f0017551cb692772b29 +Commit: 39c47bb0623a056d760175c63688d688e0020faa 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 96d54d97a0b8..000000000000 --- 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 2c6ee1c193bf..2488243b4bce 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 d5e93f38fadd..c701347d433f 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 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 = "a28a3fca492d332b0e515f0017551cb692772b29"; + 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 diff --git a/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders.json b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders.json new file mode 100644 index 000000000000..6823149124ab --- /dev/null +++ b/sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders.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": [ + "9213c2b3-936e-47df-af42-1522bc3182eb" + ], + "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": [ + "7d45dbc2-7585-4ab3-b288-d4e6a3665e47" + ], + "x-ms-correlation-request-id": [ + "7d45dbc2-7585-4ab3-b288-d4e6a3665e47" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T180947Z:7d45dbc2-7585-4ab3-b288-d4e6a3665e47" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:09:46 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/azsmnet2527?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQyNTI3P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "09e9c6b5-7249-4b19-bc2a-299dfc8867c4" + ], + "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": [ + "26eb8bce-b4d2-4558-9687-1fe3ec0d2c41" + ], + "x-ms-correlation-request-id": [ + "26eb8bce-b4d2-4558-9687-1fe3ec0d2c41" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T180950Z:26eb8bce-b4d2-4558-9687-1fe3ec0d2c41" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:09:50 GMT" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "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/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": [ + "5fa819bb-565b-4c72-baaf-78117f11e3f4" + ], + "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%3A09%3A56.0192713Z'\"" + ], + "x-ms-request-id": [ + "5fa819bb-565b-4c72-baaf-78117f11e3f4" + ], + "request-id": [ + "5fa819bb-565b-4c72-baaf-78117f11e3f4" + ], + "elapsed-time": [ + "3537" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "9e3912a4-072e-4027-9980-26b19feafa46" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T180956Z:9e3912a4-072e-4027-9980-26b19feafa46" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:09:56 GMT" + ], + "Content-Length": [ + "385" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "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/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": [ + "18d267ad-6002-4353-971a-f0af356cf0e5" + ], + "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": [ + "18d267ad-6002-4353-971a-f0af356cf0e5" + ], + "request-id": [ + "18d267ad-6002-4353-971a-f0af356cf0e5" + ], + "elapsed-time": [ + "163" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1194" + ], + "x-ms-correlation-request-id": [ + "bdc94148-03c7-47af-a1d1-abc2a370ea27" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T180958Z:bdc94148-03c7-47af-a1d1-abc2a370ea27" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:09:57 GMT" + ], + "Content-Length": [ + "99" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"primaryKey\": \"5D77864ED60F3042A8EACF0DF54C9C22\",\r\n \"secondaryKey\": \"BACF8EB5662F96DE4F5DC42AC03B5E0B\"\r\n}", + "StatusCode": 200 + }, + { + "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": [ + "6d618234-aea1-498c-a08d-2258ebf67a0d" + ], + "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": [ + "6d618234-aea1-498c-a08d-2258ebf67a0d" + ], + "request-id": [ + "6d618234-aea1-498c-a08d-2258ebf67a0d" + ], + "elapsed-time": [ + "97" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "948ef8b2-d452-4721-a9f6-41ba748163ed" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T180959Z:948ef8b2-d452-4721-a9f6-41ba748163ed" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:09:58 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\": \"4BC3CC5CEB8C99544010F030826FCB0C\"\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": [ + "b42e2896-1d2e-4322-90a0-0610ac5915af" + ], + "Accept-Language": [ + "en-US" + ], + "api-key": [ + "5D77864ED60F3042A8EACF0DF54C9C22" + ], + "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/\"0x8D71774A2493E08\"" + ], + "Location": [ + "https://azs-3959.search-dogfood.windows-int.net/skillsets('webapiskillset')?api-version=2019-05-06" + ], + "request-id": [ + "b42e2896-1d2e-4322-90a0-0610ac5915af" + ], + "elapsed-time": [ + "117" + ], + "OData-Version": [ + "4.0" + ], + "Preference-Applied": [ + "odata.include-annotations=\"*\"" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains" + ], + "Date": [ + "Fri, 02 Aug 2019 18:09:59 GMT" + ], + "Content-Type": [ + "application/json; odata.metadata=minimal" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "663" + ] + }, + "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 + }, + { + "RequestUri": "/skillsets('webapiskillset')?api-version=2019-05-06", + "EncodedRequestUri": "L3NraWxsc2V0cygnd2ViYXBpc2tpbGxzZXQnKT9hcGktdmVyc2lvbj0yMDE5LTA1LTA2", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "client-request-id": [ + "a94b0dd3-6dcc-42ab-a434-d5323955f655" + ], + "Accept-Language": [ + "en-US" + ], + "api-key": [ + "5D77864ED60F3042A8EACF0DF54C9C22" + ], + "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": [ + "a94b0dd3-6dcc-42ab-a434-d5323955f655" + ], + "elapsed-time": [ + "75" + ], + "Strict-Transport-Security": [ + "max-age=15724800; includeSubDomains" + ], + "Date": [ + "Fri, 02 Aug 2019 18:09:59 GMT" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "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": [ + "3da23ab4-03ba-4bc5-9e7e-cbf06fbd1d68" + ], + "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": [ + "3da23ab4-03ba-4bc5-9e7e-cbf06fbd1d68" + ], + "request-id": [ + "3da23ab4-03ba-4bc5-9e7e-cbf06fbd1d68" + ], + "elapsed-time": [ + "1120" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-correlation-request-id": [ + "76a03eb2-908a-47f8-939b-1baed6be9dda" + ], + "x-ms-routing-request-id": [ + "NORTHEUROPE:20190802T181004Z:76a03eb2-908a-47f8-939b-1baed6be9dda" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Fri, 02 Aug 2019 18:10:03 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "GenerateName": [ + "azsmnet2527" + ], + "GenerateServiceName": [ + "azs-3959" + ] + }, + "Variables": { + "SubscriptionId": "3c729b2a-4f86-4bb2-abe8-4b8647af156c" + } +} \ No newline at end of file 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/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders.json similarity index 64% rename from sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetThrowsExceptionWithInvalidLanguageSelection.json rename to sdk/search/Microsoft.Azure.Search/tests/SessionRecords/Microsoft.Azure.Search.Tests.SkillsetsTests/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders.json index 985692e98cfa..63a0171d544e 100644 --- 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/CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders.json @@ -7,13 +7,13 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "7cb1bc7b-29c2-4de1-a671-9a0c9172b724" + "6af5eba5-bc3a-4d45-ab56-f89c1e944051" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.27617.04", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0" @@ -23,23 +23,20 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Sat, 27 Apr 2019 22:13:08 GMT" - ], "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1135" + "1198" ], "x-ms-request-id": [ - "9c5b4349-d76c-4070-90a0-fccb8d845bef" + "3db3415d-a19a-4cc0-bd92-27c31868da71" ], "x-ms-correlation-request-id": [ - "9c5b4349-d76c-4070-90a0-fccb8d845bef" + "3db3415d-a19a-4cc0-bd92-27c31868da71" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221309Z:9c5b4349-d76c-4070-90a0-fccb8d845bef" + "NORTHEUROPE:20190802T181108Z:3db3415d-a19a-4cc0-bd92-27c31868da71" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -47,6 +44,9 @@ "X-Content-Type-Options": [ "nosniff" ], + "Date": [ + "Fri, 02 Aug 2019 18:11:08 GMT" + ], "Content-Length": [ "2230" ], @@ -61,19 +61,19 @@ "StatusCode": 200 }, { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourcegroups/azsmnet9505?api-version=2016-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlZ3JvdXBzL2F6c21uZXQ5NTA1P2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "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": [ - "1dd6b340-0fb6-4aef-b7a3-58a05c909b0e" + "1f3cac2a-a040-48a1-b772-a299b453bff3" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.27617.04", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.5.0.0" @@ -89,23 +89,20 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Sat, 27 Apr 2019 22:13:09 GMT" - ], "Pragma": [ "no-cache" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1135" + "1198" ], "x-ms-request-id": [ - "ac293731-9f49-42f8-82c2-32a061fb3496" + "647bde58-c9af-4172-99d0-e5b0f252b319" ], "x-ms-correlation-request-id": [ - "ac293731-9f49-42f8-82c2-32a061fb3496" + "647bde58-c9af-4172-99d0-e5b0f252b319" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221309Z:ac293731-9f49-42f8-82c2-32a061fb3496" + "NORTHEUROPE:20190802T181109Z:647bde58-c9af-4172-99d0-e5b0f252b319" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" @@ -113,6 +110,9 @@ "X-Content-Type-Options": [ "nosniff" ], + "Date": [ + "Fri, 02 Aug 2019 18:11:09 GMT" + ], "Content-Length": [ "175" ], @@ -123,23 +123,23 @@ "-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}", + "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/azsmnet9505/providers/Microsoft.Search/searchServices/azs-1742?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ5NTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0xNzQyP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", + "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": [ - "95eefb54-81c0-4856-84ea-4777f0db81b7" + "3fe5d72a-1d94-4ee2-b091-12b15936e878" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.27617.04", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" @@ -155,39 +155,39 @@ "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'\"" + "W/\"datetime'2019-08-02T18%3A11%3A13.9211382Z'\"" ], "x-ms-request-id": [ - "95eefb54-81c0-4856-84ea-4777f0db81b7" + "3fe5d72a-1d94-4ee2-b091-12b15936e878" ], "request-id": [ - "95eefb54-81c0-4856-84ea-4777f0db81b7" + "3fe5d72a-1d94-4ee2-b091-12b15936e878" ], "elapsed-time": [ - "1711" + "2587" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1150" + "1197" ], "x-ms-correlation-request-id": [ - "3df2bae6-31ea-4151-b326-63e93af2fbc9" + "7daa1b80-0d4d-4602-96c0-fce931ced549" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221313Z:3df2bae6-31ea-4151-b326-63e93af2fbc9" + "NORTHEUROPE:20190802T181115Z:7daa1b80-0d4d-4602-96c0-fce931ced549" ], "X-Content-Type-Options": [ "nosniff" ], + "Date": [ + "Fri, 02 Aug 2019 18:11:15 GMT" + ], "Content-Length": [ "385" ], @@ -198,23 +198,23 @@ "-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}", + "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/azsmnet9505/providers/Microsoft.Search/searchServices/azs-1742/listAdminKeys?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ5NTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0xNzQyL2xpc3RBZG1pbktleXM/YXBpLXZlcnNpb249MjAxNS0wOC0xOQ==", + "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": [ - "828b28a8-4afe-434c-a693-14ccc197d04e" + "c39f8421-de96-4d86-829e-a78d30e0ca5d" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.27617.04", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" @@ -224,9 +224,6 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Sat, 27 Apr 2019 22:13:16 GMT" - ], "Pragma": [ "no-cache" ], @@ -234,29 +231,32 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "828b28a8-4afe-434c-a693-14ccc197d04e" + "c39f8421-de96-4d86-829e-a78d30e0ca5d" ], "request-id": [ - "828b28a8-4afe-434c-a693-14ccc197d04e" + "c39f8421-de96-4d86-829e-a78d30e0ca5d" ], "elapsed-time": [ - "300" + "428" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-writes": [ - "1150" + "1197" ], "x-ms-correlation-request-id": [ - "2fb371c5-35d3-4e8c-bf68-0165eecea53d" + "a78fb19c-d83a-4272-86e0-b5dfff52cdde" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221316Z:2fb371c5-35d3-4e8c-bf68-0165eecea53d" + "NORTHEUROPE:20190802T181122Z:a78fb19c-d83a-4272-86e0-b5dfff52cdde" ], "X-Content-Type-Options": [ "nosniff" ], + "Date": [ + "Fri, 02 Aug 2019 18:11:22 GMT" + ], "Content-Length": [ "99" ], @@ -267,23 +267,23 @@ "-1" ] }, - "ResponseBody": "{\r\n \"primaryKey\": \"39E49E444496C863CC73A3CCE51855E5\",\r\n \"secondaryKey\": \"47D4B2FCCC32149C890C9993CD5FA8CB\"\r\n}", + "ResponseBody": "{\r\n \"primaryKey\": \"5CA77CE22AB2DBF2053E3695DE4A060C\",\r\n \"secondaryKey\": \"5F1F69710EED0AB5A7B3AF5D4DD16A39\"\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==", + "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": [ - "04a1bd60-9a6b-4fe9-b33a-de8714515281" + "975bee14-c441-4078-983d-badd1273ef11" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.27617.04", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" @@ -293,9 +293,6 @@ "Cache-Control": [ "no-cache" ], - "Date": [ - "Sat, 27 Apr 2019 22:13:16 GMT" - ], "Pragma": [ "no-cache" ], @@ -303,29 +300,32 @@ "Accept-Encoding" ], "x-ms-request-id": [ - "04a1bd60-9a6b-4fe9-b33a-de8714515281" + "975bee14-c441-4078-983d-badd1273ef11" ], "request-id": [ - "04a1bd60-9a6b-4fe9-b33a-de8714515281" + "975bee14-c441-4078-983d-badd1273ef11" ], "elapsed-time": [ - "420" + "612" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14976" + "14999" ], "x-ms-correlation-request-id": [ - "5e2484e3-c4dd-4759-bb22-fde8df2c8f15" + "6377e9fc-dc10-44e8-88ee-15c5b4bc7a45" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221317Z:5e2484e3-c4dd-4759-bb22-fde8df2c8f15" + "NORTHEUROPE:20190802T181123Z:6377e9fc-dc10-44e8-88ee-15c5b4bc7a45" ], "X-Content-Type-Options": [ "nosniff" ], + "Date": [ + "Fri, 02 Aug 2019 18:11:23 GMT" + ], "Content-Length": [ "82" ], @@ -336,52 +336,55 @@ "-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}", + "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\": \"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}", + "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": [ - "403779a1-f70f-4eb9-8149-c7269e8e0c30" + "68ff7b89-2808-486b-93c7-e08fa8991f6e" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "api-key": [ - "39E49E444496C863CC73A3CCE51855E5" + "5CA77CE22AB2DBF2053E3695DE4A060C" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.27617.04", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", - "Microsoft.Azure.Search.SearchServiceClient/9.0.0.0" + "Microsoft.Azure.Search.SearchServiceClient/10.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ - "1082" + "564" ] }, "ResponseHeaders": { "Cache-Control": [ "no-cache" ], - "Date": [ - "Sat, 27 Apr 2019 22:13:18 GMT" - ], "Pragma": [ "no-cache" ], + "ETag": [ + "W/\"0x8D71774D47FDFF0\"" + ], + "Location": [ + "https://azs-3786.search-dogfood.windows-int.net/skillsets('webapiskillset')?api-version=2019-05-06" + ], "request-id": [ - "403779a1-f70f-4eb9-8149-c7269e8e0c30" + "68ff7b89-2808-486b-93c7-e08fa8991f6e" ], "elapsed-time": [ - "22" + "75" ], "OData-Version": [ "4.0" @@ -392,36 +395,84 @@ "Strict-Transport-Security": [ "max-age=15724800; includeSubDomains" ], - "Content-Length": [ - "227" + "Date": [ + "Fri, 02 Aug 2019 18:11:23 GMT" ], "Content-Type": [ "application/json; odata.metadata=minimal" ], - "Content-Language": [ - "en" + "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": "{\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 + "ResponseBody": "", + "StatusCode": 204 }, { - "RequestUri": "/subscriptions/3c729b2a-4f86-4bb2-abe8-4b8647af156c/resourceGroups/azsmnet9505/providers/Microsoft.Search/searchServices/azs-1742?api-version=2015-08-19", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvM2M3MjliMmEtNGY4Ni00YmIyLWFiZTgtNGI4NjQ3YWYxNTZjL3Jlc291cmNlR3JvdXBzL2F6c21uZXQ5NTA1L3Byb3ZpZGVycy9NaWNyb3NvZnQuU2VhcmNoL3NlYXJjaFNlcnZpY2VzL2F6cy0xNzQyP2FwaS12ZXJzaW9uPTIwMTUtMDgtMTk=", + "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": [ - "12c9c1a0-4b65-4677-a520-fad81a0f87d2" + "83f54960-a6e4-4559-ada6-a1f5a37665ac" ], - "accept-language": [ + "Accept-Language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26614.01", + "FxVersion/4.6.27617.04", "OSName/Windows", "OSVersion/Microsoft.Windows.10.0.17763.", "Microsoft.Azure.Management.Search.SearchManagementClient/3.0.0.0" @@ -431,41 +482,41 @@ "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" + "83f54960-a6e4-4559-ada6-a1f5a37665ac" ], "request-id": [ - "12c9c1a0-4b65-4677-a520-fad81a0f87d2" + "83f54960-a6e4-4559-ada6-a1f5a37665ac" ], "elapsed-time": [ - "997" + "946" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "x-ms-ratelimit-remaining-subscription-deletes": [ - "14944" + "14995" ], "x-ms-correlation-request-id": [ - "1a9b3a42-b4aa-4030-b767-c4aee5bafae6" + "46662848-52a4-44b6-8839-24062789382e" ], "x-ms-routing-request-id": [ - "NORTHEUROPE:20190427T221321Z:1a9b3a42-b4aa-4030-b767-c4aee5bafae6" + "NORTHEUROPE:20190802T181128Z:46662848-52a4-44b6-8839-24062789382e" ], "X-Content-Type-Options": [ "nosniff" ], - "Content-Length": [ - "0" + "Date": [ + "Fri, 02 Aug 2019 18:11:28 GMT" ], "Expires": [ "-1" + ], + "Content-Length": [ + "0" ] }, "ResponseBody": "", @@ -474,10 +525,10 @@ ], "Names": { "GenerateName": [ - "azsmnet9505" + "azsmnet3848" ], "GenerateServiceName": [ - "azs-1742" + "azs-3786" ] }, "Variables": { diff --git a/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs b/sdk/search/Microsoft.Azure.Search/tests/Tests/SkillsetsTests.cs index a86f0aa91746..99bff7b12eeb 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,26 @@ public sealed class SkillsetsTests : SearchTestBase public const string RootPathString = "/document"; + [Fact] + public void CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithHeaders() + { + Run(() => + { + SearchServiceClient searchClient = Data.GetSearchServiceClient(); + CreateAndValidateSkillset(searchClient, CreateTestSkillsetWebApiSkill()); + }); + } + + [Fact] + public void CreateSkillsetReturnsCorrectDefinitionWebApiSkillWithoutHeaders() + { + Run(() => + { + SearchServiceClient searchClient = Data.GetSearchServiceClient(); + CreateAndValidateSkillset(searchClient, CreateTestSkillsetWebApiSkill(includeHeader: false)); + }); + } + [Fact] public void CreateSkillsetReturnsCorrectDefinitionOcrKeyPhrase() { @@ -63,18 +84,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() { @@ -906,5 +915,50 @@ private static Skillset CreateTestSkillsetOcrSplitText(OcrSkillLanguage ocrLangu return new Skillset("testskillset", "Skillset for testing", skills); } + + private static Skillset CreateTestSkillsetWebApiSkill(bool includeHeader = true) + { + 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" + } + }; + + 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 + { + ["x-ms-example"] = "example" + }; + } + + skills.Add(skill); + + return new Skillset("webapiskillset", "Skillset for testing", skills); + } } }