From ca264ffe8ac62ff6909e3a0657926077fc11927d Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Wed, 3 May 2023 14:31:36 +1200 Subject: [PATCH 1/2] Move tasks API requests into the `.Specification.TasksApi` namespace Signed-off-by: Thomas Farr --- src/OpenSearch.Client/Descriptors.Tasks.cs | 2 +- src/OpenSearch.Client/Requests.Tasks.cs | 2 +- .../TaskManagement => Tasks}/CancelTasks/CancelTasksRequest.cs | 2 +- .../TaskManagement => Tasks}/CancelTasks/CancelTasksResponse.cs | 2 +- .../{Cluster/TaskManagement => Tasks}/GetTask/GetTaskRequest.cs | 2 +- .../TaskManagement => Tasks}/GetTask/GetTaskResponse.cs | 2 +- .../{Cluster/TaskManagement => Tasks}/GetTask/TaskInfo.cs | 2 +- .../TaskManagement => Tasks}/ListTasks/ListTasksRequest.cs | 2 +- .../TaskManagement => Tasks}/ListTasks/ListTasksResponse.cs | 2 +- tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs | 1 + tests/Tests/Cluster/TaskManagement/GetTask/GetTaskUrlTests.cs | 1 + .../Cluster/TaskManagement/TasksCancel/TasksCancelApiTests.cs | 1 + .../Cluster/TaskManagement/TasksCancel/TasksCancelUrlTests.cs | 1 + .../Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs | 1 + .../Tests/Cluster/TaskManagement/TasksList/TasksListUrlTests.cs | 1 + .../DeleteByQueryRethrottle/DeleteByQueryRethrottleApiTests.cs | 1 + .../UpdateByQueryRethrottle/UpdateByQueryRethrottleApiTests.cs | 1 + tests/Tests/Search/Search/SearchApiTests.cs | 1 + 18 files changed, 18 insertions(+), 9 deletions(-) rename src/OpenSearch.Client/{Cluster/TaskManagement => Tasks}/CancelTasks/CancelTasksRequest.cs (96%) rename src/OpenSearch.Client/{Cluster/TaskManagement => Tasks}/CancelTasks/CancelTasksResponse.cs (96%) rename src/OpenSearch.Client/{Cluster/TaskManagement => Tasks}/GetTask/GetTaskRequest.cs (96%) rename src/OpenSearch.Client/{Cluster/TaskManagement => Tasks}/GetTask/GetTaskResponse.cs (97%) rename src/OpenSearch.Client/{Cluster/TaskManagement => Tasks}/GetTask/TaskInfo.cs (97%) rename src/OpenSearch.Client/{Cluster/TaskManagement => Tasks}/ListTasks/ListTasksRequest.cs (96%) rename src/OpenSearch.Client/{Cluster/TaskManagement => Tasks}/ListTasks/ListTasksResponse.cs (98%) diff --git a/src/OpenSearch.Client/Descriptors.Tasks.cs b/src/OpenSearch.Client/Descriptors.Tasks.cs index 0ede70d6da..e2081faba8 100644 --- a/src/OpenSearch.Client/Descriptors.Tasks.cs +++ b/src/OpenSearch.Client/Descriptors.Tasks.cs @@ -40,7 +40,7 @@ // ReSharper disable UnusedTypeParameter // ReSharper disable PartialMethodWithSinglePart // ReSharper disable RedundantNameQualifier -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { ///Descriptor for Cancel https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-tasks/ public partial class CancelTasksDescriptor : RequestDescriptorBase, ICancelTasksRequest diff --git a/src/OpenSearch.Client/Requests.Tasks.cs b/src/OpenSearch.Client/Requests.Tasks.cs index c8b5bb1f21..cd926bb1fd 100644 --- a/src/OpenSearch.Client/Requests.Tasks.cs +++ b/src/OpenSearch.Client/Requests.Tasks.cs @@ -41,7 +41,7 @@ // ReSharper disable UnusedTypeParameter // ReSharper disable PartialMethodWithSinglePart // ReSharper disable RedundantNameQualifier -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { [InterfaceDataContract] public partial interface ICancelTasksRequest : IRequest diff --git a/src/OpenSearch.Client/Cluster/TaskManagement/CancelTasks/CancelTasksRequest.cs b/src/OpenSearch.Client/Tasks/CancelTasks/CancelTasksRequest.cs similarity index 96% rename from src/OpenSearch.Client/Cluster/TaskManagement/CancelTasks/CancelTasksRequest.cs rename to src/OpenSearch.Client/Tasks/CancelTasks/CancelTasksRequest.cs index a4fa1c4f50..f37bb42689 100644 --- a/src/OpenSearch.Client/Cluster/TaskManagement/CancelTasks/CancelTasksRequest.cs +++ b/src/OpenSearch.Client/Tasks/CancelTasks/CancelTasksRequest.cs @@ -26,7 +26,7 @@ * under the License. */ -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { [MapsApi("tasks.cancel.json")] public partial interface ICancelTasksRequest { } diff --git a/src/OpenSearch.Client/Cluster/TaskManagement/CancelTasks/CancelTasksResponse.cs b/src/OpenSearch.Client/Tasks/CancelTasks/CancelTasksResponse.cs similarity index 96% rename from src/OpenSearch.Client/Cluster/TaskManagement/CancelTasks/CancelTasksResponse.cs rename to src/OpenSearch.Client/Tasks/CancelTasks/CancelTasksResponse.cs index f6489291d0..69579308d3 100644 --- a/src/OpenSearch.Client/Cluster/TaskManagement/CancelTasks/CancelTasksResponse.cs +++ b/src/OpenSearch.Client/Tasks/CancelTasks/CancelTasksResponse.cs @@ -30,7 +30,7 @@ using System.Runtime.Serialization; using OpenSearch.Net; -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { public class CancelTasksResponse : ResponseBase { diff --git a/src/OpenSearch.Client/Cluster/TaskManagement/GetTask/GetTaskRequest.cs b/src/OpenSearch.Client/Tasks/GetTask/GetTaskRequest.cs similarity index 96% rename from src/OpenSearch.Client/Cluster/TaskManagement/GetTask/GetTaskRequest.cs rename to src/OpenSearch.Client/Tasks/GetTask/GetTaskRequest.cs index 3796c1a3fa..5f70edff19 100644 --- a/src/OpenSearch.Client/Cluster/TaskManagement/GetTask/GetTaskRequest.cs +++ b/src/OpenSearch.Client/Tasks/GetTask/GetTaskRequest.cs @@ -26,7 +26,7 @@ * under the License. */ -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { [MapsApi("tasks.get.json")] public partial interface IGetTaskRequest { } diff --git a/src/OpenSearch.Client/Cluster/TaskManagement/GetTask/GetTaskResponse.cs b/src/OpenSearch.Client/Tasks/GetTask/GetTaskResponse.cs similarity index 97% rename from src/OpenSearch.Client/Cluster/TaskManagement/GetTask/GetTaskResponse.cs rename to src/OpenSearch.Client/Tasks/GetTask/GetTaskResponse.cs index 32500c55d7..6d38aed444 100644 --- a/src/OpenSearch.Client/Cluster/TaskManagement/GetTask/GetTaskResponse.cs +++ b/src/OpenSearch.Client/Tasks/GetTask/GetTaskResponse.cs @@ -29,7 +29,7 @@ using System.Runtime.Serialization; using OpenSearch.Net; -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { public class GetTaskResponse : ResponseBase { diff --git a/src/OpenSearch.Client/Cluster/TaskManagement/GetTask/TaskInfo.cs b/src/OpenSearch.Client/Tasks/GetTask/TaskInfo.cs similarity index 97% rename from src/OpenSearch.Client/Cluster/TaskManagement/GetTask/TaskInfo.cs rename to src/OpenSearch.Client/Tasks/GetTask/TaskInfo.cs index fd541ca607..43624edcd4 100644 --- a/src/OpenSearch.Client/Cluster/TaskManagement/GetTask/TaskInfo.cs +++ b/src/OpenSearch.Client/Tasks/GetTask/TaskInfo.cs @@ -30,7 +30,7 @@ using System.Runtime.Serialization; using OpenSearch.Net; -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { [DataContract] public class TaskInfo diff --git a/src/OpenSearch.Client/Cluster/TaskManagement/ListTasks/ListTasksRequest.cs b/src/OpenSearch.Client/Tasks/ListTasks/ListTasksRequest.cs similarity index 96% rename from src/OpenSearch.Client/Cluster/TaskManagement/ListTasks/ListTasksRequest.cs rename to src/OpenSearch.Client/Tasks/ListTasks/ListTasksRequest.cs index 867892b012..d9638cfa1b 100644 --- a/src/OpenSearch.Client/Cluster/TaskManagement/ListTasks/ListTasksRequest.cs +++ b/src/OpenSearch.Client/Tasks/ListTasks/ListTasksRequest.cs @@ -26,7 +26,7 @@ * under the License. */ -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { [MapsApi("tasks.list.json")] public partial interface IListTasksRequest { } diff --git a/src/OpenSearch.Client/Cluster/TaskManagement/ListTasks/ListTasksResponse.cs b/src/OpenSearch.Client/Tasks/ListTasks/ListTasksResponse.cs similarity index 98% rename from src/OpenSearch.Client/Cluster/TaskManagement/ListTasks/ListTasksResponse.cs rename to src/OpenSearch.Client/Tasks/ListTasks/ListTasksResponse.cs index 8ca8651b41..b4d62e1c7b 100644 --- a/src/OpenSearch.Client/Cluster/TaskManagement/ListTasks/ListTasksResponse.cs +++ b/src/OpenSearch.Client/Tasks/ListTasks/ListTasksResponse.cs @@ -31,7 +31,7 @@ using OpenSearch.Net; using OpenSearch.Net.Utf8Json; -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.TasksApi { [DataContract] public class ListTasksResponse : ResponseBase diff --git a/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs b/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs index f016434645..4c55060803 100644 --- a/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs +++ b/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskApiTests.cs @@ -31,6 +31,7 @@ using OpenSearch.Net; using FluentAssertions; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Core.Extensions; using Tests.Core.ManagedOpenSearch.Clusters; using Tests.Core.ManagedOpenSearch.NodeSeeders; diff --git a/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskUrlTests.cs b/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskUrlTests.cs index 0889195dc3..8b8572ccb1 100644 --- a/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskUrlTests.cs +++ b/tests/Tests/Cluster/TaskManagement/GetTask/GetTaskUrlTests.cs @@ -29,6 +29,7 @@ using System.Threading.Tasks; using OpenSearch.OpenSearch.Xunit.XunitPlumbing; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Framework.EndpointTests; namespace Tests.Cluster.TaskManagement.GetTask diff --git a/tests/Tests/Cluster/TaskManagement/TasksCancel/TasksCancelApiTests.cs b/tests/Tests/Cluster/TaskManagement/TasksCancel/TasksCancelApiTests.cs index b9dd978e80..10e65e6699 100644 --- a/tests/Tests/Cluster/TaskManagement/TasksCancel/TasksCancelApiTests.cs +++ b/tests/Tests/Cluster/TaskManagement/TasksCancel/TasksCancelApiTests.cs @@ -32,6 +32,7 @@ using OpenSearch.Net; using FluentAssertions; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Core.Extensions; using Tests.Core.ManagedOpenSearch.Clusters; using Tests.Framework.EndpointTests; diff --git a/tests/Tests/Cluster/TaskManagement/TasksCancel/TasksCancelUrlTests.cs b/tests/Tests/Cluster/TaskManagement/TasksCancel/TasksCancelUrlTests.cs index 57e30cdd52..55bac55b21 100644 --- a/tests/Tests/Cluster/TaskManagement/TasksCancel/TasksCancelUrlTests.cs +++ b/tests/Tests/Cluster/TaskManagement/TasksCancel/TasksCancelUrlTests.cs @@ -29,6 +29,7 @@ using System.Threading.Tasks; using OpenSearch.OpenSearch.Xunit.XunitPlumbing; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Framework.EndpointTests; using static Tests.Framework.EndpointTests.UrlTester; diff --git a/tests/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs b/tests/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs index 1129f90ba6..988985b4cc 100644 --- a/tests/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs +++ b/tests/Tests/Cluster/TaskManagement/TasksList/TasksListApiTests.cs @@ -32,6 +32,7 @@ using OpenSearch.Net; using FluentAssertions; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Core.Extensions; using Tests.Core.ManagedOpenSearch.Clusters; using Tests.Core.ManagedOpenSearch.NodeSeeders; diff --git a/tests/Tests/Cluster/TaskManagement/TasksList/TasksListUrlTests.cs b/tests/Tests/Cluster/TaskManagement/TasksList/TasksListUrlTests.cs index d96eeb1f38..8cd9383b32 100644 --- a/tests/Tests/Cluster/TaskManagement/TasksList/TasksListUrlTests.cs +++ b/tests/Tests/Cluster/TaskManagement/TasksList/TasksListUrlTests.cs @@ -29,6 +29,7 @@ using System.Threading.Tasks; using OpenSearch.OpenSearch.Xunit.XunitPlumbing; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Framework.EndpointTests; namespace Tests.Cluster.TaskManagement.TasksList diff --git a/tests/Tests/Document/Multiple/DeleteByQueryRethrottle/DeleteByQueryRethrottleApiTests.cs b/tests/Tests/Document/Multiple/DeleteByQueryRethrottle/DeleteByQueryRethrottleApiTests.cs index fc2adde44c..48713cbaff 100644 --- a/tests/Tests/Document/Multiple/DeleteByQueryRethrottle/DeleteByQueryRethrottleApiTests.cs +++ b/tests/Tests/Document/Multiple/DeleteByQueryRethrottle/DeleteByQueryRethrottleApiTests.cs @@ -31,6 +31,7 @@ using OpenSearch.Net; using FluentAssertions; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Core.Extensions; using Tests.Document.Multiple.Reindex; using Tests.Domain; diff --git a/tests/Tests/Document/Multiple/UpdateByQueryRethrottle/UpdateByQueryRethrottleApiTests.cs b/tests/Tests/Document/Multiple/UpdateByQueryRethrottle/UpdateByQueryRethrottleApiTests.cs index c4ecadc955..c0b1f87189 100644 --- a/tests/Tests/Document/Multiple/UpdateByQueryRethrottle/UpdateByQueryRethrottleApiTests.cs +++ b/tests/Tests/Document/Multiple/UpdateByQueryRethrottle/UpdateByQueryRethrottleApiTests.cs @@ -31,6 +31,7 @@ using OpenSearch.Net; using FluentAssertions; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Document.Multiple.Reindex; using Tests.Domain; using Tests.Core.Extensions; diff --git a/tests/Tests/Search/Search/SearchApiTests.cs b/tests/Tests/Search/Search/SearchApiTests.cs index 7b41f011b8..d1485004ce 100644 --- a/tests/Tests/Search/Search/SearchApiTests.cs +++ b/tests/Tests/Search/Search/SearchApiTests.cs @@ -33,6 +33,7 @@ using OpenSearch.Net; using FluentAssertions; using OpenSearch.Client; +using OpenSearch.Client.Specification.TasksApi; using Tests.Core.Extensions; using Tests.Core.ManagedOpenSearch.Clusters; using Tests.Domain; From c5f012a7c6c196c564a2124d901677b892cf3221 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Wed, 3 May 2023 14:36:25 +1200 Subject: [PATCH 2/2] Add to changelog Signed-off-by: Thomas Farr --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78df8f4058..9a6b380c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### ⚠️ Breaking Changes ⚠️ -- Moved `OpenSearch.Client` request classes into their respective namespaces to match those in `OpenSearch.Net` ([#200](https://github.com/opensearch-project/opensearch-net/pull/200), [#202](https://github.com/opensearch-project/opensearch-net/pull/202), [#203](https://github.com/opensearch-project/opensearch-net/pull/203), [#205](https://github.com/opensearch-project/opensearch-net/pull/205), [#206](https://github.com/opensearch-project/opensearch-net/pull/206), [#207](https://github.com/opensearch-project/opensearch-net/pull/207), [#208](https://github.com/opensearch-project/opensearch-net/pull/208)) +- Moved `OpenSearch.Client` request classes into their respective namespaces to match those in `OpenSearch.Net` ([#200](https://github.com/opensearch-project/opensearch-net/pull/200), [#202](https://github.com/opensearch-project/opensearch-net/pull/202), [#203](https://github.com/opensearch-project/opensearch-net/pull/203), [#205](https://github.com/opensearch-project/opensearch-net/pull/205), [#206](https://github.com/opensearch-project/opensearch-net/pull/206), [#207](https://github.com/opensearch-project/opensearch-net/pull/207), [#208](https://github.com/opensearch-project/opensearch-net/pull/208), [#209](https://github.com/opensearch-project/opensearch-net/pull/209)) ### Dependencies - Bumps `System.Reflection.Emit` from 4.3.0 to 4.7.0