Skip to content

Commit

Permalink
Generated Endpoints Using OpenSearch API Specifications
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi committed May 28, 2024
1 parent 3ae14bd commit 6eddbf6
Show file tree
Hide file tree
Showing 334 changed files with 11,807 additions and 5,755 deletions.
1,323 changes: 823 additions & 500 deletions src/OpenSearch/Client.php

Large diffs are not rendered by default.

48 changes: 0 additions & 48 deletions src/OpenSearch/Endpoints/AsyncSearch/Delete.php

This file was deleted.

52 changes: 0 additions & 52 deletions src/OpenSearch/Endpoints/AsyncSearch/Get.php

This file was deleted.

7 changes: 6 additions & 1 deletion src/OpenSearch/Endpoints/Bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ public function getParamWhitelist(): array
'_source_excludes',
'_source_includes',
'pipeline',
'require_alias'
'require_alias',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
7 changes: 6 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ public function getParamWhitelist(): array
'help',
's',
'v',
'expand_wildcards'
'expand_wildcards',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
48 changes: 48 additions & 0 deletions src/OpenSearch/Endpoints/Cat/AllPitSegments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

declare(strict_types=1);

/**
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/

namespace OpenSearch\Endpoints\Cat;

use OpenSearch\Endpoints\AbstractEndpoint;

class AllPitSegments extends AbstractEndpoint
{
public function getURI(): string
{
return "/_cat/pit_segments/_all";
}

public function getParamWhitelist(): array
{
return [
'format',
'h',
'help',
's',
'v',
'bytes',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

public function getMethod(): string
{
return 'GET';
}
}
7 changes: 6 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Allocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,16 @@ public function getParamWhitelist(): array
'bytes',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
13 changes: 12 additions & 1 deletion src/OpenSearch/Endpoints/Cat/ClusterManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,27 @@ public function getParamWhitelist(): array
return [
'format',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'v'
'v',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

public function getMethod(): string
{
return 'GET';
}

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
}
}
7 changes: 6 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Count.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ public function getParamWhitelist(): array
'h',
'help',
's',
'v'
'v',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
7 changes: 6 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Fielddata.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ public function getParamWhitelist(): array
'help',
's',
'v',
'fields'
'fields',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
7 changes: 6 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Health.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ public function getParamWhitelist(): array
's',
'time',
'ts',
'v'
'v',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
7 changes: 6 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ public function getParamWhitelist(): array
{
return [
'help',
's'
's',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
8 changes: 7 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Indices.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function getParamWhitelist(): array
'bytes',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'health',
'help',
Expand All @@ -51,14 +52,19 @@ public function getParamWhitelist(): array
'v',
'include_unloaded_segments',
'expand_wildcards',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

public function getMethod(): string
{
return 'GET';
}

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
11 changes: 7 additions & 4 deletions src/OpenSearch/Endpoints/Cat/Master.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@

use OpenSearch\Endpoints\AbstractEndpoint;

/**
* @deprecated use \OpenSearch\Endpoints\Cat\ClusterManager instead
*/
class Master extends AbstractEndpoint
{
public function getURI(): string
Expand All @@ -39,18 +36,24 @@ public function getParamWhitelist(): array
'format',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

public function getMethod(): string
{
return 'GET';
}

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
8 changes: 7 additions & 1 deletion src/OpenSearch/Endpoints/Cat/NodeAttrs.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,24 @@ public function getParamWhitelist(): array
'format',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

public function getMethod(): string
{
return 'GET';
}

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
8 changes: 7 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Nodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,25 @@ public function getParamWhitelist(): array
'full_id',
'local',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'time',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

public function getMethod(): string
{
return 'GET';
}

protected function getParamDeprecation(): array
{
return ['master_timeout' => 'cluster_manager_timeout'];
Expand Down
Loading

0 comments on commit 6eddbf6

Please sign in to comment.