Skip to content

Commit

Permalink
[Azure Search][Preview] Stabilize state of feature/search/preview bra…
Browse files Browse the repository at this point in the history
…nch (#8450)

* Generate Microsoft.Azure.Search.Data

* Generate from preview swagger for Microsoft.Azure.Search.Service

* Add back encryption tests

* Fix the test to pass

* Add session records for encryption tests

* Update build props and release notes

* Regenerate the Data directory

* Regenerate the service directory from master

* Update release notes and csproj with correct package version for preview

* Update version in ContinuationTokenConverter

* Update session records to the new api version

* Add one missed out session record
  • Loading branch information
arv100kri authored Oct 29, 2019
1 parent 9193164 commit fba6f4c
Show file tree
Hide file tree
Showing 343 changed files with 67,813 additions and 58,017 deletions.
2 changes: 2 additions & 0 deletions eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
<PackageReference Update="Microsoft.Azure.Amqp" Version="[2.4.2, 3.0.0)" />
<PackageReference Update="Microsoft.Azure.Batch" Version="11.0.0" />
<PackageReference Update="Microsoft.Azure.Graph.RBAC" Version="2.2.2-preview" />
<PackageReference Update="Microsoft.Azure.KeyVault" Version="2.3.2" />
<PackageReference Update="Microsoft.Azure.KeyVault.Core" Version="3.0.3" />
<PackageReference Update="Microsoft.Azure.Management.Batch" Version="4.2.0" />
<PackageReference Update="Microsoft.Azure.Management.ContainerRegistry" Version="2.0.0" />
<PackageReference Update="Microsoft.Azure.Management.EventHub" Version="2.5.0" />
<PackageReference Update="Microsoft.Azure.Management.EventGrid" Version="4.0.1-preview" />
<PackageReference Update="Microsoft.Azure.Management.HDInsight" Version="4.1.0-preview" />
<PackageReference Update="Microsoft.Azure.Management.KeyVault" Version="2.4.3" />
<PackageReference Update="Microsoft.Azure.Management.ResourceManager" Version="[1.6.0-preview, 2.0.0)" />
<PackageReference Update="Microsoft.Azure.Management.Sql" Version="1.22.0-preview" />
<PackageReference Update="Microsoft.Azure.Management.Storage" Version="13.0.0" />
Expand Down
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.Data/readme.md --csharp --version=2.0.4302 --reflect-api-versions --tag=track1-package-2019-05 --csharp-sdks-folder=C:\Projects\azure-sdk-for-net\sdk
2019-10-24 23:10:52 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/search/data-plane/Microsoft.Azure.Search.Data/readme.md --csharp --version=2.0.4302 --reflect-api-versions --tag=track1-package-2019-05-preview --csharp-sdks-folder=D:\src\azure-sdk-for-net\sdk
2019-10-25 19:47:40 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: dca4e0c59c9c453267ef31a2417203ee35fc324d
Commit: 864e09fad28d69f624950e2b9d0c9f8fa7fb5ec8
AutoRest information
Requested version: 2.0.4302
Bootstrapper version: autorest@2.0.4302
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 --tag=track1-package-2019-05 --csharp-sdks-folder=C:\Projects\azure-sdk-for-net\sdk
2019-10-22 17:07:06 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 --tag=track1-package-2019-05-preview --csharp-sdks-folder=D:\src\azure-sdk-for-net\sdk
2019-10-25 19:48:44 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 282efa7dd8301ba615d8741f740f1ed7f500fed1
Commit: 864e09fad28d69f624950e2b9d0c9f8fa7fb5ec8
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public class SearchServiceFixture : ResourceGroupFixture

public MockContext MockContext { get; private set; }

protected virtual SkuName SearchServiceSkuName => SkuName.Free;

protected virtual string SearchServiceLocation => this.Location;

protected virtual Identity SearchServiceIdentity => null;

public override void Initialize(MockContext context)
{
base.Initialize(context);
Expand Down Expand Up @@ -80,8 +86,9 @@ private string EnsureSearchService(SearchManagementClient client)
var service =
new SearchService()
{
Location = Location,
Sku = new Sku() { Name = SkuName.Free }
Location = SearchServiceLocation,
Sku = new Sku() { Name = SearchServiceSkuName },
Identity = SearchServiceIdentity
};

client.Services.CreateOrUpdate(ResourceGroupName, searchServiceName, service);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<AssemblyTitle>Microsoft Azure Cognitive Search Common Library</AssemblyTitle>
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
<PackageReleaseNotes>See the Microsoft.Azure.Search package for detailed release notes on the entire Azure Cognitive Search .NET SDK.</PackageReleaseNotes>
<Version>10.1.0</Version>
<Version>11.0.0-preview.1</Version>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.Azure.Search.Serialization
internal class SearchContinuationTokenConverter : JsonConverter
{
// MAINTENANCE NOTE: Remember to change this when the REST API version changes.
private const string TargetApiVersion = "2019-05-06";
private const string TargetApiVersion = "2019-05-06-Preview";

public override bool CanConvert(Type objectType) => objectType == typeof(SearchContinuationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_SearchIndexClie
{
return new Tuple<string, string, string>[]
{
new Tuple<string, string, string>("SearchIndexClient", "Documents", "2019-05-06"),
new Tuple<string, string, string>("SearchIndexClient", "Documents", "2019-05-06-Preview"),
}.AsEnumerable();
}
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "2.0.4302";
public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4302";
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.Data/readme.md --csharp --version=2.0.4302 --reflect-api-versions --tag=track1-package-2019-05 --csharp-sdks-folder=C:\\Projects\\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.Data/readme.md --csharp --version=2.0.4302 --reflect-api-versions --tag=track1-package-2019-05-preview --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 = "dca4e0c59c9c453267ef31a2417203ee35fc324d";
public static readonly String GithubCommidId = "864e09fad28d69f624950e2b9d0c9f8fa7fb5ec8";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private void Initialize()
{
DocumentsProxy = new DocumentsProxyOperations(this);
BaseUri = "https://{searchServiceName}.{searchDnsSuffix}/indexes('{indexName}')";
ApiVersion = "2019-05-06";
ApiVersion = "2019-05-06-Preview";
SearchDnsSuffix = "search.windows.net";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<!-- Disable warning for missing xml doc comments until we can add all the missing ones -->
<NoWarn>$(NoWarn);1573;1591</NoWarn>
<Version>10.1.0</Version>
<Version>11.0.0-preview.1</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Spatial" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,11 @@ internal DataSourcesOperations(SearchServiceClient client)
/// Lists all datasources available for a search service.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/List-Data-Sources" />
/// </summary>
/// <param name='select'>
/// Selects which top-level properties of the data sources to retrieve.
/// Specified as a comma-separated list of JSON property names, or '*' for all
/// properties. The default is all properties.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
Expand All @@ -795,7 +800,7 @@ internal DataSourcesOperations(SearchServiceClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<DataSourceListResult>> ListWithHttpMessagesAsync(SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<DataSourceListResult>> ListWithHttpMessagesAsync(string select = default(string), SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SearchServiceName == null)
{
Expand All @@ -821,6 +826,7 @@ internal DataSourcesOperations(SearchServiceClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("select", select);
tracingParameters.Add("clientRequestId", clientRequestId);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
Expand All @@ -831,6 +837,10 @@ internal DataSourcesOperations(SearchServiceClient client)
_url = _url.Replace("{searchServiceName}", Client.SearchServiceName);
_url = _url.Replace("{searchDnsSuffix}", Client.SearchDnsSuffix);
List<string> _queryParameters = new List<string>();
if (select != null)
{
_queryParameters.Add(string.Format("$select={0}", System.Uri.EscapeDataString(select)));
}
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,17 @@ public static partial class DataSourcesOperationsExtensions
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='select'>
/// Selects which top-level properties of the data sources to retrieve.
/// Specified as a comma-separated list of JSON property names, or '*' for all
/// properties. The default is all properties.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
public static DataSourceListResult List(this IDataSourcesOperations operations, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
public static DataSourceListResult List(this IDataSourcesOperations operations, string select = default(string), SearchRequestOptions searchRequestOptions = default(SearchRequestOptions))
{
return operations.ListAsync(searchRequestOptions).GetAwaiter().GetResult();
return operations.ListAsync(select, searchRequestOptions).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -184,15 +189,20 @@ public static partial class DataSourcesOperationsExtensions
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='select'>
/// Selects which top-level properties of the data sources to retrieve.
/// Specified as a comma-separated list of JSON property names, or '*' for all
/// properties. The default is all properties.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<DataSourceListResult> ListAsync(this IDataSourcesOperations operations, SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
public static async Task<DataSourceListResult> ListAsync(this IDataSourcesOperations operations, string select = default(string), SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(searchRequestOptions, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.ListWithHttpMessagesAsync(select, searchRequestOptions, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public partial interface IDataSourcesOperations
/// Lists all datasources available for a search service.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/List-Data-Sources" />
/// </summary>
/// <param name='select'>
/// Selects which top-level properties of the data sources to retrieve.
/// Specified as a comma-separated list of JSON property names, or '*'
/// for all properties. The default is all properties.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
Expand All @@ -130,7 +135,7 @@ public partial interface IDataSourcesOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<DataSourceListResult>> ListWithHttpMessagesAsync(SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<DataSourceListResult>> ListWithHttpMessagesAsync(string select = default(string), SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Creates a new datasource.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/Create-Data-Source" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ public partial interface IIndexersOperations
/// Lists all indexers available for a search service.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/List-Indexers" />
/// </summary>
/// <param name='select'>
/// Selects which top-level properties of the indexers to retrieve.
/// Specified as a comma-separated list of JSON property names, or '*'
/// for all properties. The default is all properties.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
Expand All @@ -175,7 +180,7 @@ public partial interface IIndexersOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IndexerListResult>> ListWithHttpMessagesAsync(SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<IndexerListResult>> ListWithHttpMessagesAsync(string select = default(string), SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Creates a new indexer.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/Create-Indexer" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public partial interface IIndexesOperations
/// <see href="https://docs.microsoft.com/rest/api/searchservice/List-Indexes" />
/// </summary>
/// <param name='select'>
/// Selects which properties of the index definitions to retrieve.
/// Specified as a comma-separated list of JSON property names, or '*'
/// for all properties. The default is all properties.
/// Selects which top-level properties of the index definitions to
/// retrieve. Specified as a comma-separated list of JSON property
/// names, or '*' for all properties. The default is all properties.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ public partial interface ISkillsetsOperations
/// List all skillsets in a search service.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/list-skillset" />
/// </summary>
/// <param name='select'>
/// Selects which top-level properties of the skillsets to retrieve.
/// Specified as a comma-separated list of JSON property names, or '*'
/// for all properties. The default is all properties.
/// </param>
/// <param name='searchRequestOptions'>
/// Additional parameters for the operation
/// </param>
Expand All @@ -125,7 +130,7 @@ public partial interface ISkillsetsOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<SkillsetListResult>> ListWithHttpMessagesAsync(SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<SkillsetListResult>> ListWithHttpMessagesAsync(string select = default(string), SearchRequestOptions searchRequestOptions = default(SearchRequestOptions), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Creates a new skillset in a search service.
/// <see href="https://docs.microsoft.com/rest/api/searchservice/create-skillset" />
Expand Down
Loading

0 comments on commit fba6f4c

Please sign in to comment.