Skip to content

Commit 1bac181

Browse files
authored
Update searchable_snapshot endpoints (#609)
1 parent 44e6a05 commit 1bac181

File tree

7 files changed

+58
-187
lines changed

7 files changed

+58
-187
lines changed

output/schema/schema.json

Lines changed: 36 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -9624,17 +9624,10 @@
96249624
"description": "DEPRECATED: This API is replaced by the Repositories Metering API.",
96259625
"docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html",
96269626
"name": "searchable_snapshots.repository_stats",
9627-
"request": {
9628-
"name": "Request",
9629-
"namespace": "searchable_snapshots.repository_stats"
9630-
},
9627+
"request": null,
96319628
"requestBodyRequired": false,
9632-
"response": {
9633-
"name": "Response",
9634-
"namespace": "searchable_snapshots.repository_stats"
9635-
},
9636-
"since": "7.10.0",
9637-
"stability": "TODO",
9629+
"response": null,
9630+
"stability": "experimental",
96389631
"urls": [
96399632
{
96409633
"methods": [
@@ -9662,7 +9655,7 @@
96629655
"namespace": "searchable_snapshots.stats"
96639656
},
96649657
"since": "7.10.0",
9665-
"stability": "TODO",
9658+
"stability": "experimental",
96669659
"urls": [
96679660
{
96689661
"methods": [
@@ -123275,6 +123268,24 @@
123275123268
"namespace": "rollup.stop_job"
123276123269
}
123277123270
},
123271+
{
123272+
"kind": "enum",
123273+
"members": [
123274+
{
123275+
"name": "cluster"
123276+
},
123277+
{
123278+
"name": "indices"
123279+
},
123280+
{
123281+
"name": "shards"
123282+
}
123283+
],
123284+
"name": {
123285+
"name": "StatsLevel",
123286+
"namespace": "searchable_snapshots._types"
123287+
}
123288+
},
123278123289
{
123279123290
"attachedBehaviors": [
123280123291
"CommonQueryParameters"
@@ -123594,20 +123605,7 @@
123594123605
"CommonQueryParameters"
123595123606
],
123596123607
"body": {
123597-
"kind": "properties",
123598-
"properties": [
123599-
{
123600-
"name": "stub_c",
123601-
"required": true,
123602-
"type": {
123603-
"kind": "instance_of",
123604-
"type": {
123605-
"name": "integer",
123606-
"namespace": "_types"
123607-
}
123608-
}
123609-
}
123610-
]
123608+
"kind": "no_body"
123611123609
},
123612123610
"inherits": {
123613123611
"type": {
@@ -123618,30 +123616,30 @@
123618123616
"kind": "request",
123619123617
"name": {
123620123618
"name": "Request",
123621-
"namespace": "searchable_snapshots.repository_stats"
123619+
"namespace": "searchable_snapshots.stats"
123622123620
},
123623123621
"path": [
123624123622
{
123625-
"name": "stub_a",
123626-
"required": true,
123623+
"name": "index",
123624+
"required": false,
123627123625
"type": {
123628123626
"kind": "instance_of",
123629123627
"type": {
123630-
"name": "integer",
123628+
"name": "Indices",
123631123629
"namespace": "_types"
123632123630
}
123633123631
}
123634123632
}
123635123633
],
123636123634
"query": [
123637123635
{
123638-
"name": "stub_b",
123639-
"required": true,
123636+
"name": "level",
123637+
"required": false,
123640123638
"type": {
123641123639
"kind": "instance_of",
123642123640
"type": {
123643-
"name": "integer",
123644-
"namespace": "_types"
123641+
"name": "StatsLevel",
123642+
"namespace": "searchable_snapshots._types"
123645123643
}
123646123644
}
123647123645
}
@@ -123652,95 +123650,17 @@
123652123650
"kind": "properties",
123653123651
"properties": [
123654123652
{
123655-
"name": "stub",
123656-
"required": true,
123657-
"type": {
123658-
"kind": "instance_of",
123659-
"type": {
123660-
"name": "integer",
123661-
"namespace": "_types"
123662-
}
123663-
}
123664-
}
123665-
]
123666-
},
123667-
"kind": "response",
123668-
"name": {
123669-
"name": "Response",
123670-
"namespace": "searchable_snapshots.repository_stats"
123671-
}
123672-
},
123673-
{
123674-
"attachedBehaviors": [
123675-
"CommonQueryParameters"
123676-
],
123677-
"body": {
123678-
"kind": "properties",
123679-
"properties": [
123680-
{
123681-
"name": "stub_c",
123653+
"name": "stats",
123682123654
"required": true,
123683123655
"type": {
123684-
"kind": "instance_of",
123685-
"type": {
123686-
"name": "integer",
123687-
"namespace": "_types"
123688-
}
123689-
}
123690-
}
123691-
]
123692-
},
123693-
"inherits": {
123694-
"type": {
123695-
"name": "RequestBase",
123696-
"namespace": "_types"
123697-
}
123698-
},
123699-
"kind": "request",
123700-
"name": {
123701-
"name": "Request",
123702-
"namespace": "searchable_snapshots.stats"
123703-
},
123704-
"path": [
123705-
{
123706-
"name": "stub_a",
123707-
"required": true,
123708-
"type": {
123709-
"kind": "instance_of",
123710-
"type": {
123711-
"name": "integer",
123712-
"namespace": "_types"
123713-
}
123714-
}
123715-
}
123716-
],
123717-
"query": [
123718-
{
123719-
"name": "stub_b",
123720-
"required": true,
123721-
"type": {
123722-
"kind": "instance_of",
123723-
"type": {
123724-
"name": "integer",
123725-
"namespace": "_types"
123656+
"kind": "user_defined_value"
123726123657
}
123727-
}
123728-
}
123729-
]
123730-
},
123731-
{
123732-
"body": {
123733-
"kind": "properties",
123734-
"properties": [
123658+
},
123735123659
{
123736-
"name": "stub",
123660+
"name": "total",
123737123661
"required": true,
123738123662
"type": {
123739-
"kind": "instance_of",
123740-
"type": {
123741-
"name": "integer",
123742-
"namespace": "_types"
123743-
}
123663+
"kind": "user_defined_value"
123744123664
}
123745123665
}
123746123666
]

output/schema/validation-errors.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,13 +1425,13 @@
14251425
},
14261426
"searchable_snapshots.repository_stats": {
14271427
"request": [
1428-
"Endpoint has \"@stability: TODO"
1428+
"Missing request & response"
14291429
],
14301430
"response": []
14311431
},
14321432
"searchable_snapshots.stats": {
14331433
"request": [
1434-
"Endpoint has \"@stability: TODO"
1434+
"Request: should not have a body"
14351435
],
14361436
"response": []
14371437
},

output/typescript/types.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12797,6 +12797,8 @@ export interface RollupStopJobResponse {
1279712797
stopped: boolean
1279812798
}
1279912799

12800+
export type SearchableSnapshotsStatsLevel = 'cluster' | 'indices' | 'shards'
12801+
1280012802
export interface SearchableSnapshotsClearCacheRequest extends RequestBase {
1280112803
index?: Indices
1280212804
expand_wildcards?: ExpandWildcards
@@ -12834,28 +12836,14 @@ export interface SearchableSnapshotsMountResponse {
1283412836
snapshot: SearchableSnapshotsMountMountedSnapshot
1283512837
}
1283612838

12837-
export interface SearchableSnapshotsRepositoryStatsRequest extends RequestBase {
12838-
stub_a: integer
12839-
stub_b: integer
12840-
body?: {
12841-
stub_c: integer
12842-
}
12843-
}
12844-
12845-
export interface SearchableSnapshotsRepositoryStatsResponse {
12846-
stub: integer
12847-
}
12848-
1284912839
export interface SearchableSnapshotsStatsRequest extends RequestBase {
12850-
stub_a: integer
12851-
stub_b: integer
12852-
body?: {
12853-
stub_c: integer
12854-
}
12840+
index?: Indices
12841+
level?: SearchableSnapshotsStatsLevel
1285512842
}
1285612843

1285712844
export interface SearchableSnapshotsStatsResponse {
12858-
stub: integer
12845+
stats: any
12846+
total: any
1285912847
}
1286012848

1286112849
export interface SecurityApplicationGlobalUserPrivileges {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* under the License.
1818
*/
1919

20-
import { integer } from '@_types/Numeric'
21-
22-
export class Response {
23-
body: { stub: integer }
20+
export enum StatsLevel {
21+
cluster = 0,
22+
indices = 1,
23+
shards = 2
2424
}

specification/searchable_snapshots/repository_stats/SearchableSnapshotsRepositoryStatsRequest.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

specification/searchable_snapshots/stats/SearchableSnapshotsStatsRequest.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,20 @@
1717
* under the License.
1818
*/
1919

20+
import { StatsLevel } from '../_types/stats'
2021
import { RequestBase } from '@_types/Base'
21-
import { integer } from '@_types/Numeric'
22+
import { Indices } from '@_types/common'
2223

2324
/**
2425
* @rest_spec_name searchable_snapshots.stats
2526
* @since 7.10.0
26-
* @stability TODO
27+
* @stability experimental
2728
*/
2829
export interface Request extends RequestBase {
2930
path_parts?: {
30-
stub_a: integer
31+
index?: Indices
3132
}
3233
query_parameters?: {
33-
stub_b: integer
34-
}
35-
body?: {
36-
stub_c: integer
34+
level?: StatsLevel
3735
}
3836
}

specification/searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
* under the License.
1818
*/
1919

20-
import { integer } from '@_types/Numeric'
20+
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
2121

2222
export class Response {
23-
body: { stub: integer }
23+
body: {
24+
stats: UserDefinedValue // TODO: complete this definition
25+
total: UserDefinedValue // TODO: complete this definition
26+
}
2427
}

0 commit comments

Comments
 (0)