Skip to content

Commit 17794c6

Browse files
authored
Fix cluster.reroute Response (#696)
1 parent 719be65 commit 17794c6

File tree

3 files changed

+88
-18
lines changed

3 files changed

+88
-18
lines changed

output/schema/schema.json

Lines changed: 69 additions & 15 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: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/cluster/reroute/types.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import {
3131
Uuid,
3232
VersionNumber
3333
} from '@_types/common'
34-
import { NodeAttributes } from '@_types/Node'
34+
import { NodeAttributes, NodeShard } from '@_types/Node'
3535
import { integer } from '@_types/Numeric'
3636

3737
/** @doc_url https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html#cluster-reroute-api-request-body */
@@ -127,10 +127,18 @@ export class RerouteState {
127127
version?: VersionNumber
128128
blocks?: EmptyObject // TODO: this is likely wrong too
129129
nodes?: Dictionary<NodeName, NodeAttributes>
130-
routing_table?: Dictionary<string, EmptyObject> // TODO: this is wrong, but the tests are not exhaustive enough
130+
routing_table?: RoutingTable
131131
routing_nodes?: ClusterStateRoutingNodes
132132
security_tokens?: Dictionary<string, string>
133133
snapshots?: ClusterStateSnapshots
134134
snapshot_deletions?: ClusterStateDeletedSnapshots
135135
metadata?: ClusterStateMetadata
136136
}
137+
138+
export class RoutingTable {
139+
indices: Dictionary<IndexName, RoutingTableIndex>
140+
}
141+
142+
export class RoutingTableIndex {
143+
shards: Dictionary<string, NodeShard[]>
144+
}

0 commit comments

Comments
 (0)