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

Move indices API requests into the .Specification.IndicesApi namespace #205

Merged
merged 4 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
- 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))

### Dependencies
- Bumps `System.Reflection.Emit` from 4.3.0 to 4.7.0
Expand Down Expand Up @@ -57,4 +57,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
[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/1.2.0...1.3.0
2 changes: 1 addition & 1 deletion src/OpenSearch.Client/Descriptors.Indices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// ReSharper disable UnusedTypeParameter
// ReSharper disable PartialMethodWithSinglePart
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
///<summary>Descriptor for AddBlock <para></para></summary>
public partial class AddIndexBlockDescriptor : RequestDescriptorBase<AddIndexBlockDescriptor, AddIndexBlockRequestParameters, IAddIndexBlockRequest>, IAddIndexBlockRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using OpenSearch.Client.Specification.IndicesApi;
using OpenSearch.Net;
using static OpenSearch.Client.Infer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

using System;
using System.Collections.Generic;
using OpenSearch.Client.Specification.IndicesApi;
using OpenSearch.Net;

namespace OpenSearch.Client
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch.Client/Indices/AliasManagement/Alias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
using System;
using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
/// <summary>
/// An alias to one or more indices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using System.Runtime.Serialization;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[InterfaceDataContract]
public interface IAliasAddAction : IAliasAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Runtime.Serialization;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class AliasAddOperation
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using System.Runtime.Serialization;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[InterfaceDataContract]
public interface IAliasRemoveAction : IAliasAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Runtime.Serialization;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[InterfaceDataContract]
public interface IAliasRemoveIndexAction : IAliasAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class AliasRemoveIndexOperation
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Runtime.Serialization;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class AliasRemoveOperation
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using OpenSearch.Net.Utf8Json.Internal;


namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
/// <summary>
/// Marker interface for alias operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[MapsApi("indices.update_aliases.json")]
public partial interface IBulkAliasRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class BulkAliasResponse : AcknowledgedResponseBase { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class AliasDefinition
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[MapsApi("indices.exists_alias.json")]
public partial interface IAliasExistsRequest { }
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch.Client/Indices/AliasManagement/Aliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Collections.Generic;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[JsonFormatter(typeof(VerbatimDictionaryKeysFormatter<Aliases, IAliases, IndexName, IAlias>))]
public interface IAliases : IIsADictionary<IndexName, IAlias> { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[MapsApi("indices.delete_alias.json")]
public partial interface IDeleteAliasRequest { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class DeleteAliasResponse : ResponseBase { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[MapsApi("indices.get_alias.json")]
public partial interface IGetAliasRequest { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using OpenSearch.Net;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[JsonFormatter(typeof(ResolvableDictionaryResponseFormatter<GetAliasResponse, IndexName, IndexAliases>))]
public class GetAliasResponse : DictionaryResponseBase<IndexName, IndexAliases>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using OpenSearch.Client.Specification.IndicesApi;
using OpenSearch.Net;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public static class AliasPointingToIndexExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
using System.Threading.Tasks;
using OpenSearch.Net;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
/// <summary>
/// Implements several handy alias extensions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
using System;
using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
/// <summary>
/// A request to put an alias to one or more indices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class PutAliasResponse : ResponseBase { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Collections.Generic;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[JsonFormatter(typeof(UnionListFormatter<AnalyzeCharFilters, string, ICharFilter>))]
public class AnalyzeCharFilters : List<Union<string, ICharFilter>>
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch.Client/Indices/Analyze/AnalyzeRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
using System.Linq.Expressions;
using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[MapsApi("indices.analyze.json")]
[ReadAs(typeof(AnalyzeRequest))]
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch.Client/Indices/Analyze/AnalyzeResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Runtime.Serialization;
using OpenSearch.Net;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[DataContract]
public class AnalyzeResponse : ResponseBase
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSearch.Client/Indices/Analyze/AnalyzeToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[DataContract]
public class AnalyzeToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Collections.Generic;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
/// <summary>
/// A list of string references to stored token filters and/or inline token filter definitions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using System;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class AnalyzeTokenizersSelector : SelectorBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
/// <summary>
/// A request to the indices add block API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
using System.Runtime.Serialization;
using OpenSearch.Net;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class AddIndexBlockResponse : AcknowledgedResponseBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

using OpenSearch.Net;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
/// <summary>
/// Block type for an index.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
using System;
using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
/// <summary>
/// A request to the clone index API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class CloneIndexResponse : AcknowledgedResponseBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using System;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[MapsApi("indices.create.json")]
[ReadAs(typeof(CreateIndexRequest))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class CreateIndexResponse : AcknowledgedResponseBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[MapsApi("indices.delete.json")]
public partial interface IDeleteIndexRequest { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
public class DeleteIndexResponse : IndicesResponseBase { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* under the License.
*/

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[MapsApi("indices.get.json")]
public partial interface IGetIndexRequest { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
using System.Collections.Generic;
using OpenSearch.Net.Utf8Json;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[JsonFormatter(typeof(ResolvableDictionaryResponseFormatter<GetIndexResponse, IndexName, IndexState>))]
public class GetIndexResponse : DictionaryResponseBase<IndexName, IndexState>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

using System.Runtime.Serialization;

namespace OpenSearch.Client
namespace OpenSearch.Client.Specification.IndicesApi
{
[DataContract]
public class ExistsResponse : ResponseBase
Expand Down
Loading
Loading