Skip to content

Commit

Permalink
Generating Endpoints from OpenSearch API Specification
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi committed May 22, 2024
1 parent 762bad4 commit 05ed029
Show file tree
Hide file tree
Showing 149 changed files with 1,549 additions and 497 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"ext-json": ">=1.3.7",
"ezimuel/ringphp": "^1.1.2",
"psr/log": "^1|^2|^3",
"symfony/yaml": "^7.0"
"symfony/yaml": "*"
},
"require-dev": {
"ext-zip": "*",
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
8 changes: 7 additions & 1 deletion src/OpenSearch/Endpoints/Cat/Snapshots.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,17 @@ public function getParamWhitelist(): array
'format',
'ignore_unavailable',
'master_timeout',
'cluster_manager_timeout',
'h',
'help',
's',
'time',
'v',
'cluster_manager_timeout'
'pretty',
'human',
'error_trace',
'source',
'filter_path'
];
}

Expand All @@ -69,6 +74,7 @@ public function setRepository($repository): Snapshots

return $this;
}

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

0 comments on commit 05ed029

Please sign in to comment.