Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Azure Search] Fix the definition of WebApiSkill #7080

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// <see
/// href="https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-interface"
/// href="https://docs.microsoft.com/azure/search/cognitive-search-custom-skill-web-api"
/// />
/// </summary>
[Newtonsoft.Json.JsonObject("#Microsoft.Skills.Custom.WebApiSkill")]
Expand All @@ -43,19 +43,19 @@ public WebApiSkill()
/// Azure Search index, or a value that can be consumed as an input by
/// another skill.</param>
/// <param name="uri">The url for the Web API.</param>
/// <param name="httpHeaders">The headers required to make the http
/// request.</param>
/// <param name="httpMethod">The method for the http request.</param>
/// <param name="description">The description of the skill which
/// describes the inputs, outputs, and usage of the skill.</param>
/// <param name="context">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.</param>
/// <param name="httpHeaders">The headers required to make the http
/// request.</param>
/// <param name="httpMethod">The method for the http request.</param>
/// <param name="timeout">The desired timeout for the request. Default
/// is 30 seconds.</param>
/// <param name="batchSize">The desired batch size which indicates
/// number of documents.</param>
public WebApiSkill(IList<InputFieldMappingEntry> inputs, IList<OutputFieldMappingEntry> 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<InputFieldMappingEntry> inputs, IList<OutputFieldMappingEntry> outputs, string uri, string description = default(string), string context = default(string), IDictionary<string, string> httpHeaders = default(IDictionary<string, string>), string httpMethod = default(string), System.TimeSpan? timeout = default(System.TimeSpan?), int? batchSize = default(int?))
: base(inputs, outputs, description, context)
{
Uri = uri;
Expand All @@ -81,7 +81,7 @@ public WebApiSkill()
/// Gets or sets the headers required to make the http request.
/// </summary>
[JsonProperty(PropertyName = "httpHeaders")]
public WebApiHttpHeaders HttpHeaders { get; set; }
public IDictionary<string, string> HttpHeaders { get; set; }

/// <summary>
/// Gets or sets the method for the http request.
Expand Down Expand Up @@ -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");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public static IEnumerable<Tuple<string, string, string>> 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
Expand Down
Loading