Skip to content

Commit 7d8a8bd

Browse files
authored
Fix query parameters incorrectly typed as scalars (#5606)
* Fix query parameters incorrectly typed as scalars * Fix cluster.get_component_template * Run make contrib * Stop relying on GitHub cache to validate APIs * Use string | string[] instead of Names * Run prettier * Fix terms_enum too
1 parent f5b89d8 commit 7d8a8bd

File tree

13 files changed

+83
-48
lines changed

13 files changed

+83
-48
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 18 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 29 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_global/field_caps/FieldCapabilitiesRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export interface Request extends RequestBase {
9191
* @availability stack since=8.2.0
9292
* @availability serverless
9393
*/
94-
filters?: string
94+
filters?: string | string[]
9595
/**
9696
* A comma-separated list of field types to include.
9797
* Any fields that do not match one of these types will be excluded from the results.

specification/_global/terms_enum/TermsEnumRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { Field, IndexName } from '@_types/common'
21+
import { Field, Indices } from '@_types/common'
2222
import { integer } from '@_types/Numeric'
2323
import { QueryContainer } from '@_types/query_dsl/abstractions'
2424
import { Duration } from '@_types/Time'
@@ -50,7 +50,7 @@ export interface Request extends RequestBase {
5050
* Wildcard (`*`) expressions are supported.
5151
* To search all data streams or indices, omit this parameter or use `*` or `_all`.
5252
*/
53-
index: IndexName
53+
index: Indices
5454
}
5555
body: {
5656
/** The string to match at the start of indexed terms. If not provided, all terms in the field are considered. */

specification/indices/add_block/IndicesAddBlockRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { ExpandWildcards, IndexName } from '@_types/common'
21+
import { ExpandWildcards, Indices } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323
import { IndicesBlockOptions } from '@indices/_types/IndexSettings'
2424

@@ -46,7 +46,7 @@ export interface Request extends RequestBase {
4646
* To allow the adding of blocks to indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.
4747
* You can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API.
4848
*/
49-
index: IndexName
49+
index: Indices
5050
/**
5151
* The block type to add to the index.
5252
*/

specification/indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { ExpandWildcards, IndexName } from '@_types/common'
21+
import { ExpandWildcards, Indices } from '@_types/common'
2222

2323
/**
2424
* Get data stream stats.
@@ -48,7 +48,7 @@ export interface Request extends RequestBase {
4848
* Wildcard expressions (`*`) are supported.
4949
* To target all data streams in a cluster, omit this parameter or use `*`.
5050
*/
51-
name?: IndexName
51+
name?: Indices
5252
}
5353
query_parameters: {
5454
/**

specification/indices/remove_block/IndicesRemoveBlockRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { ExpandWildcards, IndexName } from '@_types/common'
21+
import { ExpandWildcards, Indices } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323
import { IndicesBlockOptions } from '@indices/_types/IndexSettings'
2424

@@ -47,7 +47,7 @@ export interface Request extends RequestBase {
4747
* To allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.
4848
* You can update this setting in the `elasticsearch.yml` file or by using the cluster update settings API.
4949
*/
50-
index: IndexName
50+
index: Indices
5151
/**
5252
* The block type to remove from the index.
5353
*/

specification/security/clear_cached_privileges/SecurityClearCachedPrivilegesRequest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
import { RequestBase } from '@_types/Base'
21-
import { Name } from '@_types/common'
21+
import { Names } from '@_types/common'
2222

2323
/**
2424
* Clear the privileges cache.
@@ -44,6 +44,6 @@ export interface Request extends RequestBase {
4444
* To clear all applications, use an asterism (`*`).
4545
* It does not support other wildcard patterns.
4646
*/
47-
application: Name
47+
application: Names
4848
}
4949
}

0 commit comments

Comments
 (0)