From 64e33a76b70944a2ed19bc9b46d0135689bdf012 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Mon, 1 May 2023 16:34:06 +1200 Subject: [PATCH 1/2] Move dangling_indices API requests into the `.Specification.DanglingIndicesApi` namespace Signed-off-by: Thomas Farr --- .../DanglingIndices/Delete/DeleteDanglingIndexRequest.cs | 2 +- .../DanglingIndices/Delete/DeleteDanglingIndexResponse.cs | 2 +- .../DanglingIndices/Import/ImportDanglingIndexRequest.cs | 2 +- .../DanglingIndices/Import/ImportDanglingIndexResponse.cs | 2 +- .../DanglingIndices/List/ListDanglingIndicesRequest.cs | 2 +- .../DanglingIndices/List/ListDanglingIndicesResponse.cs | 2 +- src/OpenSearch.Client/Descriptors.DanglingIndices.cs | 2 +- src/OpenSearch.Client/Requests.DanglingIndices.cs | 2 +- .../Tests/DanglingIndices/Delete/DeleteDanglingIndexApiTests.cs | 1 + .../Tests/DanglingIndices/Delete/DeleteDanglingIndexUrlTests.cs | 1 + .../Tests/DanglingIndices/Import/ImportDanglingIndexApiTests.cs | 1 + .../Tests/DanglingIndices/Import/ImportDanglingIndexUrlTests.cs | 1 + tests/Tests/DanglingIndices/List/ListDanglingIndicesApiTests.cs | 1 + tests/Tests/DanglingIndices/List/ListDanglingIndicesUrlTests.cs | 1 + 14 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/OpenSearch.Client/DanglingIndices/Delete/DeleteDanglingIndexRequest.cs b/src/OpenSearch.Client/DanglingIndices/Delete/DeleteDanglingIndexRequest.cs index 7eb35424be..9a4f138d6f 100644 --- a/src/OpenSearch.Client/DanglingIndices/Delete/DeleteDanglingIndexRequest.cs +++ b/src/OpenSearch.Client/DanglingIndices/Delete/DeleteDanglingIndexRequest.cs @@ -26,7 +26,7 @@ * under the License. */ -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.DanglingIndicesApi { [MapsApi("dangling_indices.delete_dangling_index.json")] public partial interface IDeleteDanglingIndexRequest diff --git a/src/OpenSearch.Client/DanglingIndices/Delete/DeleteDanglingIndexResponse.cs b/src/OpenSearch.Client/DanglingIndices/Delete/DeleteDanglingIndexResponse.cs index 213800f621..a11166d61a 100644 --- a/src/OpenSearch.Client/DanglingIndices/Delete/DeleteDanglingIndexResponse.cs +++ b/src/OpenSearch.Client/DanglingIndices/Delete/DeleteDanglingIndexResponse.cs @@ -28,7 +28,7 @@ using System.Runtime.Serialization; -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.DanglingIndicesApi { [DataContract] public class DeleteDanglingIndexResponse : AcknowledgedResponseBase diff --git a/src/OpenSearch.Client/DanglingIndices/Import/ImportDanglingIndexRequest.cs b/src/OpenSearch.Client/DanglingIndices/Import/ImportDanglingIndexRequest.cs index daf6d006da..4616047e01 100644 --- a/src/OpenSearch.Client/DanglingIndices/Import/ImportDanglingIndexRequest.cs +++ b/src/OpenSearch.Client/DanglingIndices/Import/ImportDanglingIndexRequest.cs @@ -26,7 +26,7 @@ * under the License. */ -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.DanglingIndicesApi { [MapsApi("dangling_indices.import_dangling_index.json")] public partial interface IImportDanglingIndexRequest diff --git a/src/OpenSearch.Client/DanglingIndices/Import/ImportDanglingIndexResponse.cs b/src/OpenSearch.Client/DanglingIndices/Import/ImportDanglingIndexResponse.cs index 394fc8af48..ce14258ef8 100644 --- a/src/OpenSearch.Client/DanglingIndices/Import/ImportDanglingIndexResponse.cs +++ b/src/OpenSearch.Client/DanglingIndices/Import/ImportDanglingIndexResponse.cs @@ -28,7 +28,7 @@ using System.Runtime.Serialization; -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.DanglingIndicesApi { [DataContract] public class ImportDanglingIndexResponse : AcknowledgedResponseBase diff --git a/src/OpenSearch.Client/DanglingIndices/List/ListDanglingIndicesRequest.cs b/src/OpenSearch.Client/DanglingIndices/List/ListDanglingIndicesRequest.cs index 70d1e58836..a775ff3f86 100644 --- a/src/OpenSearch.Client/DanglingIndices/List/ListDanglingIndicesRequest.cs +++ b/src/OpenSearch.Client/DanglingIndices/List/ListDanglingIndicesRequest.cs @@ -26,7 +26,7 @@ * under the License. */ -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.DanglingIndicesApi { [MapsApi("dangling_indices.list_dangling_indices.json")] public partial interface IListDanglingIndicesRequest diff --git a/src/OpenSearch.Client/DanglingIndices/List/ListDanglingIndicesResponse.cs b/src/OpenSearch.Client/DanglingIndices/List/ListDanglingIndicesResponse.cs index 6395b031ac..14c23563fb 100644 --- a/src/OpenSearch.Client/DanglingIndices/List/ListDanglingIndicesResponse.cs +++ b/src/OpenSearch.Client/DanglingIndices/List/ListDanglingIndicesResponse.cs @@ -31,7 +31,7 @@ using System.Runtime.Serialization; using OpenSearch.Net; -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.DanglingIndicesApi { [DataContract] public class ListDanglingIndicesResponse : ResponseBase diff --git a/src/OpenSearch.Client/Descriptors.DanglingIndices.cs b/src/OpenSearch.Client/Descriptors.DanglingIndices.cs index 3d70492d67..999379f4ea 100644 --- a/src/OpenSearch.Client/Descriptors.DanglingIndices.cs +++ b/src/OpenSearch.Client/Descriptors.DanglingIndices.cs @@ -40,7 +40,7 @@ // ReSharper disable UnusedTypeParameter // ReSharper disable PartialMethodWithSinglePart // ReSharper disable RedundantNameQualifier -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.DanglingIndicesApi { ///Descriptor for DeleteDanglingIndex public partial class DeleteDanglingIndexDescriptor : RequestDescriptorBase, IDeleteDanglingIndexRequest diff --git a/src/OpenSearch.Client/Requests.DanglingIndices.cs b/src/OpenSearch.Client/Requests.DanglingIndices.cs index 119fabb299..7b1c9ed183 100644 --- a/src/OpenSearch.Client/Requests.DanglingIndices.cs +++ b/src/OpenSearch.Client/Requests.DanglingIndices.cs @@ -41,7 +41,7 @@ // ReSharper disable UnusedTypeParameter // ReSharper disable PartialMethodWithSinglePart // ReSharper disable RedundantNameQualifier -namespace OpenSearch.Client +namespace OpenSearch.Client.Specification.DanglingIndicesApi { [InterfaceDataContract] public partial interface IDeleteDanglingIndexRequest : IRequest diff --git a/tests/Tests/DanglingIndices/Delete/DeleteDanglingIndexApiTests.cs b/tests/Tests/DanglingIndices/Delete/DeleteDanglingIndexApiTests.cs index 5504ec5be4..fce99dded2 100644 --- a/tests/Tests/DanglingIndices/Delete/DeleteDanglingIndexApiTests.cs +++ b/tests/Tests/DanglingIndices/Delete/DeleteDanglingIndexApiTests.cs @@ -29,6 +29,7 @@ using System; using OpenSearch.Net; using OpenSearch.Client; +using OpenSearch.Client.Specification.DanglingIndicesApi; using Tests.Core.ManagedOpenSearch.Clusters; using Tests.Framework.EndpointTests; using Tests.Framework.EndpointTests.TestState; diff --git a/tests/Tests/DanglingIndices/Delete/DeleteDanglingIndexUrlTests.cs b/tests/Tests/DanglingIndices/Delete/DeleteDanglingIndexUrlTests.cs index fa77788471..067a0eb98f 100644 --- a/tests/Tests/DanglingIndices/Delete/DeleteDanglingIndexUrlTests.cs +++ b/tests/Tests/DanglingIndices/Delete/DeleteDanglingIndexUrlTests.cs @@ -29,6 +29,7 @@ using System.Threading.Tasks; using OpenSearch.OpenSearch.Xunit.XunitPlumbing; using OpenSearch.Client; +using OpenSearch.Client.Specification.DanglingIndicesApi; using Tests.Framework.EndpointTests; using static Tests.Framework.EndpointTests.UrlTester; diff --git a/tests/Tests/DanglingIndices/Import/ImportDanglingIndexApiTests.cs b/tests/Tests/DanglingIndices/Import/ImportDanglingIndexApiTests.cs index 5d9859698e..48c3a6e10f 100644 --- a/tests/Tests/DanglingIndices/Import/ImportDanglingIndexApiTests.cs +++ b/tests/Tests/DanglingIndices/Import/ImportDanglingIndexApiTests.cs @@ -29,6 +29,7 @@ using System; using OpenSearch.Net; using OpenSearch.Client; +using OpenSearch.Client.Specification.DanglingIndicesApi; using Tests.Core.ManagedOpenSearch.Clusters; using Tests.Framework.EndpointTests; using Tests.Framework.EndpointTests.TestState; diff --git a/tests/Tests/DanglingIndices/Import/ImportDanglingIndexUrlTests.cs b/tests/Tests/DanglingIndices/Import/ImportDanglingIndexUrlTests.cs index 063a31deef..d5aef84eaf 100644 --- a/tests/Tests/DanglingIndices/Import/ImportDanglingIndexUrlTests.cs +++ b/tests/Tests/DanglingIndices/Import/ImportDanglingIndexUrlTests.cs @@ -29,6 +29,7 @@ using System.Threading.Tasks; using OpenSearch.OpenSearch.Xunit.XunitPlumbing; using OpenSearch.Client; +using OpenSearch.Client.Specification.DanglingIndicesApi; using Tests.Framework.EndpointTests; using static Tests.Framework.EndpointTests.UrlTester; diff --git a/tests/Tests/DanglingIndices/List/ListDanglingIndicesApiTests.cs b/tests/Tests/DanglingIndices/List/ListDanglingIndicesApiTests.cs index 961023e697..5d0ebbb2ef 100644 --- a/tests/Tests/DanglingIndices/List/ListDanglingIndicesApiTests.cs +++ b/tests/Tests/DanglingIndices/List/ListDanglingIndicesApiTests.cs @@ -29,6 +29,7 @@ using System; using OpenSearch.Net; using OpenSearch.Client; +using OpenSearch.Client.Specification.DanglingIndicesApi; using Tests.Core.ManagedOpenSearch.Clusters; using Tests.Framework.EndpointTests; using Tests.Framework.EndpointTests.TestState; diff --git a/tests/Tests/DanglingIndices/List/ListDanglingIndicesUrlTests.cs b/tests/Tests/DanglingIndices/List/ListDanglingIndicesUrlTests.cs index aa85a8031b..f40a381f37 100644 --- a/tests/Tests/DanglingIndices/List/ListDanglingIndicesUrlTests.cs +++ b/tests/Tests/DanglingIndices/List/ListDanglingIndicesUrlTests.cs @@ -29,6 +29,7 @@ using System.Threading.Tasks; using OpenSearch.OpenSearch.Xunit.XunitPlumbing; using OpenSearch.Client; +using OpenSearch.Client.Specification.DanglingIndicesApi; using Tests.Framework.EndpointTests; using static Tests.Framework.EndpointTests.UrlTester; From e2b02d81de8f5df66caf39cce8b38d3b54611f60 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Mon, 1 May 2023 16:43:32 +1200 Subject: [PATCH 2/2] Add to changelog Signed-off-by: Thomas Farr --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2f71ae6c3..5627e22764 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ 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` ([#203](https://github.com/opensearch-project/opensearch-net/pull/203)) + ### Dependencies - Bumps `System.Reflection.Emit` from 4.3.0 to 4.7.0 - Bumps `Argu` from 5.5.0 to 6.1.1 @@ -53,4 +56,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.0-preview.2 to 1.0.3 [Unreleased]: https://github.com/opensearch-project/opensearch-net/compare/1.3.0...HEAD -[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/1.2.0...1.3.0 \ No newline at end of file +[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/1.2.0...1.3.0