From fbcaeebf10e5c9f8ba54009fa34f67bb59c70b41 Mon Sep 17 00:00:00 2001 From: Mohit Chakraborty <8271806+Mohit-Chakraborty@users.noreply.github.com> Date: Fri, 10 Dec 2021 10:40:44 -0800 Subject: [PATCH] [Search] Update REST commit to latest from main - b8d48bca (#25812) * Update REST commit to latest from main Remove outdated comments from autorest.md * Update code generation comments in autorest.md Update the contributing.md doc * Add a missing article in a doc line * Use permalink for doc link, since it is in autorest.md --- .../api/Azure.Search.Documents.netstandard2.0.cs | 1 + .../src/Generated/Models/OcrSkillLanguage.cs | 3 +++ .../src/Generated/Models/QueryLanguage.cs | 4 ++-- sdk/search/Azure.Search.Documents/src/autorest.md | 12 +++++------- sdk/search/CONTRIBUTING.md | 4 ++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs index 4f856f0a6bb9..473b0827e6d9 100644 --- a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs +++ b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs @@ -1572,6 +1572,7 @@ public OcrSkill(System.Collections.Generic.IEnumerable Chinese-Simplified. public static OcrSkillLanguage ZhHans { get; } = new OcrSkillLanguage(ZhHansValue); @@ -101,6 +102,8 @@ public OcrSkillLanguage(string value) public static OcrSkillLanguage SrLatn { get; } = new OcrSkillLanguage(SrLatnValue); /// Slovak. public static OcrSkillLanguage Sk { get; } = new OcrSkillLanguage(SkValue); + /// Unknown. If the language is explicitly set to "unk", the language will be auto-detected. + public static OcrSkillLanguage Unk { get; } = new OcrSkillLanguage(UnkValue); /// Determines if two values are the same. public static bool operator ==(OcrSkillLanguage left, OcrSkillLanguage right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs index bf96e26f4ab9..e65fc310e0b0 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs @@ -161,9 +161,9 @@ public QueryLanguage(string value) public static QueryLanguage ArJo { get; } = new QueryLanguage(ArJoValue); /// Query language value for Danish (Denmark). public static QueryLanguage DaDk { get; } = new QueryLanguage(DaDkValue); - /// Query language value for Norwegian (Normway). + /// Query language value for Norwegian (Norway). public static QueryLanguage NoNo { get; } = new QueryLanguage(NoNoValue); - /// Query language value for Bulgarian (Bulgary). + /// Query language value for Bulgarian (Bulgaria). public static QueryLanguage BgBg { get; } = new QueryLanguage(BgBgValue); /// Query language value for Croatian (Croatia). public static QueryLanguage HrHr { get; } = new QueryLanguage(HrHrValue); diff --git a/sdk/search/Azure.Search.Documents/src/autorest.md b/sdk/search/Azure.Search.Documents/src/autorest.md index 1dff381ab1c4..706a90ec6a5a 100644 --- a/sdk/search/Azure.Search.Documents/src/autorest.md +++ b/sdk/search/Azure.Search.Documents/src/autorest.md @@ -1,20 +1,18 @@ # Azure.Search.Documents Code Generation -Run `/sdk/search/generate.ps1` to generate code. +Run `dotnet build /t:GenerateCode` in the `src` directory to generate SDK code. + +See the [Contributing guidelines](https://github.com/Azure/azure-sdk-for-net/blob/fe0bf0e7e84a406ec2102c194ea05ccd5011a141/sdk/search/CONTRIBUTING.md) for more details. ## AutoRest Configuration > see https://aka.ms/autorest ## Swagger Source(s) -AutoRest doesn't play nicely with multiple remote swagger files. It will -however merge two local swagger files together automagically. At some point, -we should merge the Service and Index swagger files together but for now we -copy them locally in `/sdk/search/generate.ps1` and reference them here. ```yaml title: SearchServiceClient input-file: - - https://github.com/shmed/azure-rest-api-specs/blob/7a003b0aa0def1a454ff0844fa4c6a276bc1ee53/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json - - https://github.com/shmed/azure-rest-api-specs/blob/7a003b0aa0def1a454ff0844fa4c6a276bc1ee53/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json + - https://github.com/Azure/azure-rest-api-specs/blob/b8d48bca1298614fdf7734c26e21a88adf5375d9/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json + - https://github.com/Azure/azure-rest-api-specs/blob/b8d48bca1298614fdf7734c26e21a88adf5375d9/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json modelerfour: seal-single-value-enum-by-default: true ``` diff --git a/sdk/search/CONTRIBUTING.md b/sdk/search/CONTRIBUTING.md index 0861997b2ee7..f2fd0dc93d3a 100644 --- a/sdk/search/CONTRIBUTING.md +++ b/sdk/search/CONTRIBUTING.md @@ -20,8 +20,8 @@ client libraries. You can learn about these shared features in the ## Code Generation Please do not edit any of the code in the `/Generated` folders directly. If -you need to update a swagger file or change the generator, you can regenerate -by running the `\sdk\search\generate.ps1` script. +you need to update code in response to a swagger file change or a code generator update, +you can regenerate the code by running `dotnet build /t:GenerateCode` in the `src` directory. ## Testing Please ensure all tests pass with any changes and additional tests are added to