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

Generating Endpoints from OpenSearch API Specification #193

Closed
wants to merge 6 commits into from
Closed
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
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
],
"require": {
"php": "^7.3 || ^8.0",
"ext-json": ">=1.3.7",
"ext-curl": "*",
"ext-json": ">=1.3.7",
"ezimuel/ringphp": "^1.1.2",
"psr/log": "^1|^2|^3"
"psr/log": "^1|^2|^3",
"symfony/yaml": "*"
},
"require-dev": {
"ext-zip": "*",
Expand Down
1 change: 1 addition & 0 deletions src/OpenSearch/Endpoints/AbstractEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

use OpenSearch\Common\Exceptions\UnexpectedValueException;
use OpenSearch\Serializers\SerializerInterface;

use function array_filter;

abstract class AbstractEndpoint
Expand Down
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
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
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
8 changes: 7 additions & 1 deletion src/OpenSearch/Endpoints/Cat/PendingTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,25 @@ public function getParamWhitelist(): array
'format',
'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
8 changes: 7 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Plugins.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
7 changes: 6 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Recovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ public function getParamWhitelist(): array
'index',
's',
'time',
'v'
'v',
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand Down
8 changes: 7 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Repositories.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
14 changes: 13 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Segments.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,27 @@ public function getParamWhitelist(): array
return [
'format',
'bytes',
'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'];
}
}
8 changes: 7 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Shards.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,25 @@ public function getParamWhitelist(): array
'bytes',
'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
Loading