diff --git a/CHANGELOG.md b/CHANGELOG.md index d971a52e9..30e545bd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,6 +83,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fixed request body for `/_search/scroll/{scroll_id}` ([#732](https://github.com/opensearch-project/opensearch-api-specification/pull/732)) - Fixed type in `_msearch/template` ([#735](https://github.com/opensearch-project/opensearch-api-specification/pull/735)) - Fixed indices API schemas ([#750](https://github.com/opensearch-project/opensearch-api-specification/pull/750)) +- Fixed cluster API schemas ([#754](https://github.com/opensearch-project/opensearch-api-specification/pull/754)) ### Changed - Changed `tasks._common:TaskInfo` and `tasks._common:TaskGroup` to be composed of a `tasks._common:TaskInfoBase` ([#683](https://github.com/opensearch-project/opensearch-api-specification/pull/683)) diff --git a/spec/namespaces/cluster.yaml b/spec/namespaces/cluster.yaml index 3ae08403a..566cf3176 100644 --- a/spec/namespaces/cluster.yaml +++ b/spec/namespaces/cluster.yaml @@ -401,6 +401,7 @@ paths: url: https://opensearch.org/docs/latest parameters: - $ref: '#/components/parameters/cluster.get_component_template::query.cluster_manager_timeout' + - $ref: '#/components/parameters/cluster.get_component_template::query.flat_settings' - $ref: '#/components/parameters/cluster.get_component_template::query.local' - $ref: '#/components/parameters/cluster.get_component_template::query.master_timeout' responses: @@ -417,6 +418,7 @@ paths: parameters: - $ref: '#/components/parameters/cluster.get_component_template::path.name' - $ref: '#/components/parameters/cluster.get_component_template::query.cluster_manager_timeout' + - $ref: '#/components/parameters/cluster.get_component_template::query.flat_settings' - $ref: '#/components/parameters/cluster.get_component_template::query.local' - $ref: '#/components/parameters/cluster.get_component_template::query.master_timeout' responses: @@ -528,7 +530,8 @@ components: type: boolean shard: description: Specifies the ID of the shard that you would like an explanation for. - type: number + type: integer + format: int32 description: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' cluster.put_component_template: content: @@ -637,7 +640,8 @@ components: remaining_delay_in_millis: $ref: '../schemas/_common.yaml#/components/schemas/DurationValueUnitMillis' shard: - type: number + type: integer + format: int32 unassigned_info: $ref: '../schemas/cluster.allocation_explain.yaml#/components/schemas/UnassignedInformation' note: @@ -772,32 +776,54 @@ components: content: application/json: schema: - type: object - properties: - acknowledged: - type: boolean - explanations: - type: array - items: - $ref: '../schemas/cluster.reroute.yaml#/components/schemas/RerouteExplanation' - state: - description: |- - There aren't any guarantees on the output/structure of the raw cluster state. - Here you will find the internal representation of the cluster, which can - differ from the external representation. - type: object - required: - - acknowledged + allOf: + - $ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase' + - type: object + properties: + explanations: + type: array + items: + $ref: '../schemas/cluster.reroute.yaml#/components/schemas/RerouteExplanation' + state: + description: |- + There aren't any guarantees on the output/structure of the raw cluster state. + Here you will find the internal representation of the cluster, which can + differ from the external representation. cluster.state@200: content: application/json: - schema: - type: object + schema: {} cluster.stats@200: content: application/json: schema: - $ref: '../schemas/cluster.stats.yaml#/components/schemas/StatsResponseBase' + allOf: + - $ref: '../schemas/nodes._common.yaml#/components/schemas/NodesResponseBase' + - type: object + properties: + cluster_name: + description: Name of the cluster, based on the Cluster name setting setting. + $ref: '../schemas/_common.yaml#/components/schemas/Name' + cluster_uuid: + description: Unique identifier for the cluster. + $ref: '../schemas/_common.yaml#/components/schemas/Uuid' + indices: + description: Contains statistics about indexes with shards assigned to selected nodes. + $ref: '../schemas/cluster.stats.yaml#/components/schemas/ClusterIndices' + nodes: + description: Contains statistics about nodes selected by the request's node filters. + $ref: '../schemas/cluster.stats.yaml#/components/schemas/ClusterNodes' + status: + description: Health status of the cluster, based on the state of its primary and replica shards. + $ref: '../schemas/_common.yaml#/components/schemas/HealthStatus' + timestamp: + description: Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed. + $ref: '../schemas/_common.yaml#/components/schemas/EpochTimeUnitMillis' + required: + - cluster_name + - cluster_uuid + - status + - timestamp parameters: cluster.allocation_explain::query.include_disk_info: in: query @@ -924,6 +950,14 @@ components: schema: $ref: '../schemas/_common.yaml#/components/schemas/Duration' x-version-added: '2.0' + cluster.get_component_template::query.flat_settings: + in: query + name: flat_settings + description: If `true`, returns settings in flat format. + schema: + type: boolean + default: false + style: form cluster.get_component_template::query.local: in: query name: local diff --git a/spec/namespaces/indices.yaml b/spec/namespaces/indices.yaml index ab17e1829..bdf1d34ae 100644 --- a/spec/namespaces/indices.yaml +++ b/spec/namespaces/indices.yaml @@ -867,8 +867,6 @@ paths: - $ref: '#/components/parameters/indices.upgrade::query.ignore_unavailable' - $ref: '#/components/parameters/indices.upgrade::query.only_ancient_segments' - $ref: '#/components/parameters/indices.upgrade::query.wait_for_completion' - requestBody: - $ref: '#/components/requestBodies/indices.upgrade' responses: '200': $ref: '#/components/responses/indices.upgrade@200' @@ -1856,8 +1854,6 @@ paths: - $ref: '#/components/parameters/indices.upgrade::query.ignore_unavailable' - $ref: '#/components/parameters/indices.upgrade::query.only_ancient_segments' - $ref: '#/components/parameters/indices.upgrade::query.wait_for_completion' - requestBody: - $ref: '#/components/requestBodies/indices.upgrade' responses: '200': $ref: '#/components/responses/indices.upgrade@200' @@ -1969,8 +1965,7 @@ components: settings: description: Configuration options for the target index. type: object - additionalProperties: - type: object + additionalProperties: true description: The configuration for the target index (`settings` and `aliases`) indices.create: content: @@ -2179,8 +2174,7 @@ components: Configuration options for the index. Data streams do not support this parameter. type: object - additionalProperties: - type: object + additionalProperties: true description: The conditions that needs to be met for executing rollover indices.shrink: content: @@ -2198,8 +2192,7 @@ components: settings: description: Configuration options for the target index. type: object - additionalProperties: - type: object + additionalProperties: true description: The configuration for the target index (`settings` and `aliases`) indices.simulate_index_template: content: @@ -2273,11 +2266,6 @@ components: $ref: '../schemas/indices.update_aliases.yaml#/components/schemas/Action' description: The definition of `actions` to perform required: true - indices.upgrade: - content: - application/json: - schema: - $ref: '../schemas/indices._common.yaml#/components/schemas/UpgradeRequest' indices.validate_query: content: application/json: @@ -2292,20 +2280,19 @@ components: content: application/json: schema: - type: object - properties: - acknowledged: - type: boolean - shards_acknowledged: - type: boolean - indices: - type: array - items: - $ref: '../schemas/indices.add_block.yaml#/components/schemas/IndicesBlockStatus' - required: - - acknowledged - - indices - - shards_acknowledged + allOf: + - $ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase' + - type: object + properties: + shards_acknowledged: + type: boolean + indices: + type: array + items: + $ref: '../schemas/indices.add_block.yaml#/components/schemas/IndicesBlockStatus' + required: + - indices + - shards_acknowledged indices.analyze@200: content: application/json: @@ -2327,36 +2314,34 @@ components: content: application/json: schema: - type: object - properties: - acknowledged: - type: boolean - index: - $ref: '../schemas/_common.yaml#/components/schemas/IndexName' - shards_acknowledged: - type: boolean - required: - - acknowledged - - index - - shards_acknowledged + allOf: + - $ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase' + - type: object + properties: + shards_acknowledged: + type: boolean + index: + $ref: '../schemas/_common.yaml#/components/schemas/IndexName' + required: + - index + - shards_acknowledged indices.close@200: content: application/json: schema: - type: object - properties: - acknowledged: - type: boolean - indices: - type: object - additionalProperties: - $ref: '../schemas/indices.close.yaml#/components/schemas/CloseIndexResult' - shards_acknowledged: - type: boolean - required: - - acknowledged - - indices - - shards_acknowledged + allOf: + - $ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase' + - type: object + properties: + indices: + type: object + additionalProperties: + $ref: '../schemas/indices.close.yaml#/components/schemas/CloseIndexResult' + shards_acknowledged: + type: boolean + required: + - indices + - shards_acknowledged indices.create@200: content: application/json: @@ -2633,32 +2618,31 @@ components: content: application/json: schema: - type: object - properties: - acknowledged: - type: boolean - conditions: - type: object - additionalProperties: - type: boolean - dry_run: - type: boolean - new_index: - type: string - old_index: - type: string - rolled_over: - type: boolean - shards_acknowledged: - type: boolean - required: - - acknowledged - - conditions - - dry_run - - new_index - - old_index - - rolled_over - - shards_acknowledged + allOf: + - $ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase' + - type: object + properties: + conditions: + type: object + additionalProperties: + type: boolean + dry_run: + type: boolean + new_index: + type: string + old_index: + type: string + rolled_over: + type: boolean + shards_acknowledged: + type: boolean + required: + - conditions + - dry_run + - new_index + - old_index + - rolled_over + - shards_acknowledged indices.segments@200: content: application/json: @@ -2690,18 +2674,17 @@ components: content: application/json: schema: - type: object - properties: - acknowledged: - type: boolean - shards_acknowledged: - type: boolean - index: - $ref: '../schemas/_common.yaml#/components/schemas/IndexName' - required: - - acknowledged - - index - - shards_acknowledged + allOf: + - $ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase' + - type: object + properties: + shards_acknowledged: + type: boolean + index: + $ref: '../schemas/_common.yaml#/components/schemas/IndexName' + required: + - index + - shards_acknowledged indices.simulate_index_template@200: content: application/json: @@ -2725,18 +2708,17 @@ components: content: application/json: schema: - type: object - properties: - acknowledged: - type: boolean - shards_acknowledged: - type: boolean - index: - $ref: '../schemas/_common.yaml#/components/schemas/IndexName' - required: - - acknowledged - - index - - shards_acknowledged + allOf: + - $ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase' + - type: object + properties: + shards_acknowledged: + type: boolean + index: + $ref: '../schemas/_common.yaml#/components/schemas/IndexName' + required: + - index + - shards_acknowledged indices.stats@200: content: application/json: @@ -2763,7 +2745,14 @@ components: content: application/json: schema: - $ref: '../schemas/indices._common.yaml#/components/schemas/IndexPostUpgradeStatus' + allOf: + - $ref: '../schemas/_common.yaml#/components/schemas/ShardsOperationResponseBase' + - type: object + properties: + upgraded_indices: + type: object + additionalProperties: + $ref: '../schemas/indices._common.yaml#/components/schemas/UpgradeVersionStatus' indices.validate_query@200: content: application/json: @@ -3658,7 +3647,8 @@ components: Set this parameter to 1 to merge all segments into one segment. The default behavior is to perform the merge as necessary. schema: - type: number + type: integer + format: int64 style: form indices.forcemerge::query.only_expunge_deletes: in: query @@ -4802,10 +4792,10 @@ components: description: List of shard health statuses used to limit the request. schema: oneOf: - - $ref: '../schemas/indices.shard_stores.yaml#/components/schemas/Status' + - $ref: '../schemas/indices.shard_stores.yaml#/components/schemas/ShardStoreStatus' - type: array items: - $ref: '../schemas/indices.shard_stores.yaml#/components/schemas/Status' + $ref: '../schemas/indices.shard_stores.yaml#/components/schemas/ShardStoreStatus' style: form indices.shrink::path.index: in: path diff --git a/spec/schemas/_common.yaml b/spec/schemas/_common.yaml index 7057e1736..4bd34cf65 100644 --- a/spec/schemas/_common.yaml +++ b/spec/schemas/_common.yaml @@ -1060,20 +1060,23 @@ components: description: |- The total number of non-deleted documents across all primary shards assigned to the selected nodes. This number is based on documents in Lucene segments and may include documents from nested fields. - type: number + type: integer + format: int64 deleted: description: |- The total number of deleted documents across all primary shards assigned to the selected nodes. This number is based on the number of documents stored in Lucene segments. OpenSearch reclaims the disk space previously occupied by the deleted Lucene documents when a segment is merged. - type: number + type: integer + format: int64 required: - count FielddataStats: type: object properties: evictions: - type: number + type: integer + format: int64 memory_size: $ref: '#/components/schemas/HumanReadableByteCount' memory_size_in_bytes: @@ -1100,16 +1103,20 @@ components: description: |- The total number of entries added to the query cache across all shards assigned to the selected nodes. This number includes all current and evicted entries. - type: number + type: integer + format: int64 cache_size: description: The total number of entries currently stored in the query cache across all shards assigned to the selected nodes. - type: number + type: integer + format: int64 evictions: description: The total number of query cache evictions across all shards assigned to the selected nodes. - type: number + type: integer + format: int64 hit_count: description: The total number of query cache hits across all shards assigned to the selected nodes. - type: number + type: integer + format: int64 memory_size: $ref: '#/components/schemas/HumanReadableByteCount' memory_size_in_bytes: @@ -1117,10 +1124,12 @@ components: $ref: '#/components/schemas/ByteCount' miss_count: description: The total number of query cache misses across all shards assigned to the selected nodes. - type: number + type: integer + format: int64 total_count: description: The total number of hits and misses stored in the query cache across all shards assigned to the selected nodes. - type: number + type: integer + format: int64 required: - cache_count - cache_size @@ -1164,13 +1173,16 @@ components: properties: failed: description: The number of failed upload syncs to the remote translog store. - type: number + type: integer + format: int64 started: description: The number of upload syncs to the remote translog store that have started. - type: number + type: integer + format: int64 succeeded: description: The number of successful upload syncs to the remote translog store. - type: number + type: integer + format: int64 required: - failed - started @@ -1225,7 +1237,6 @@ components: $ref: '#/components/schemas/RemoteStoreUploadDownloadStats' required: - max_refresh_time_lag_in_millis - - pressure - refresh_size_lag - total_time_spent_in_millis - total_upload_size @@ -1261,7 +1272,8 @@ components: properties: total_rejections: description: The total number of requests rejected due to segment store upload backpressure. - type: number + type: integer + format: int64 required: - total_rejections RemoteStoreUploadRefreshSizeLagStats: @@ -1300,24 +1312,42 @@ components: - total_download_size - total_time_spent_in_millis SegmentReplicationStats: - type: object - properties: - max_bytes_behind: - $ref: '#/components/schemas/ByteCount' - max_replication_lag: - $ref: '#/components/schemas/ByteCount' - total_bytes_behind: - $ref: '#/components/schemas/ByteCount' - required: - - max_bytes_behind - - max_replication_lag - - total_bytes_behind + x-version-added: 2.10.0 + oneOf: + - x-version-added: 2.10.0 + x-version-removed: 2.12.0 + type: object + properties: + max_bytes_behind: + $ref: '#/components/schemas/HumanReadableByteCount' + max_replication_lag: + $ref: '#/components/schemas/Duration' + total_bytes_behind: + $ref: '#/components/schemas/HumanReadableByteCount' + required: + - max_bytes_behind + - max_replication_lag + - total_bytes_behind + - x-version-added: 2.12.0 + type: object + properties: + max_bytes_behind: + $ref: '#/components/schemas/ByteCount' + max_replication_lag: + $ref: '#/components/schemas/DurationValueUnitMillis' + total_bytes_behind: + $ref: '#/components/schemas/ByteCount' + required: + - max_bytes_behind + - max_replication_lag + - total_bytes_behind SegmentsStats: type: object properties: count: description: The total number of segments across all shards assigned to the selected nodes. - type: number + type: integer + format: int32 doc_values_memory: $ref: '#/components/schemas/HumanReadableByteCount' doc_values_memory_in_bytes: @@ -1344,7 +1374,7 @@ components: $ref: '#/components/schemas/ByteCount' max_unsafe_auto_id_timestamp: description: The Unix timestamp, in milliseconds, of the most recently retried indexing request. - type: number + $ref: '#/components/schemas/EpochTimeUnitMillis' memory: description: The total amount of memory used for segments across all shards assigned to the selected nodes. $ref: '#/components/schemas/HumanReadableByteCount' @@ -1390,6 +1420,7 @@ components: remote_store: $ref: '#/components/schemas/RemoteStoreStats' segment_replication: + x-version-added: 2.10.0 $ref: '#/components/schemas/SegmentReplicationStats' required: - count @@ -1634,9 +1665,11 @@ components: type: object properties: periodic: - type: number + type: integer + format: int64 total: - type: number + type: integer + format: int64 total_time: $ref: '#/components/schemas/Duration' total_time_in_millis: @@ -1649,25 +1682,29 @@ components: type: object properties: total: - type: number + type: integer + format: int64 getTime: $ref: '#/components/schemas/Duration' time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' exists_total: - type: number + type: integer + format: int64 exists_time: $ref: '#/components/schemas/Duration' exists_time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' missing_total: - type: number + type: integer + format: int64 missing_time: $ref: '#/components/schemas/Duration' missing_time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' current: - type: number + type: integer + format: int64 required: - current - exists_time_in_millis @@ -1680,25 +1717,31 @@ components: type: object properties: index_total: - type: number + type: integer + format: int64 index_time: $ref: '#/components/schemas/Duration' index_time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' index_current: - type: number + type: integer + format: int64 index_failed: - type: number + type: integer + format: int64 delete_total: - type: number + type: integer + format: int64 delete_time: $ref: '#/components/schemas/Duration' delete_time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' delete_current: - type: number + type: integer + format: int64 noop_update_total: - type: number + type: integer + format: int64 is_throttled: type: boolean throttle_time: @@ -1727,21 +1770,25 @@ components: type: object properties: current: - type: number + type: integer + format: int64 current_docs: - type: number + type: integer + format: int64 current_size: $ref: '#/components/schemas/HumanReadableByteCount' current_size_in_bytes: $ref: '#/components/schemas/ByteCount' total: - type: number + type: integer + format: int64 total_auto_throttle: $ref: '#/components/schemas/HumanReadableByteCount' total_auto_throttle_in_bytes: $ref: '#/components/schemas/ByteCount' total_docs: - type: number + type: integer + format: int64 total_size: $ref: '#/components/schemas/HumanReadableByteCount' total_size_in_bytes: @@ -1759,7 +1806,8 @@ components: total_time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' unreferenced_file_cleanups_performed: - type: number + type: integer + format: int64 required: - current - current_docs @@ -1775,9 +1823,11 @@ components: type: object properties: current_as_source: - type: number + type: integer + format: int64 current_as_target: - type: number + type: integer + format: int64 throttle_time: $ref: '#/components/schemas/Duration' throttle_time_in_millis: @@ -1790,15 +1840,18 @@ components: type: object properties: external_total: - type: number + type: integer + format: int64 external_total_time: $ref: '#/components/schemas/Duration' external_total_time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' listeners: - type: number + type: integer + format: int64 total: - type: number + type: integer + format: int64 total_time: $ref: '#/components/schemas/Duration' total_time_in_millis: @@ -1813,15 +1866,18 @@ components: type: object properties: evictions: - type: number + type: integer + format: int64 hit_count: - type: number + type: integer + format: int64 memory_size: $ref: '#/components/schemas/HumanReadableByteCount' memory_size_in_bytes: $ref: '#/components/schemas/ByteCount' miss_count: - type: number + type: integer + format: int64 required: - evictions - hit_count @@ -1831,11 +1887,13 @@ components: type: object properties: open_contexts: - description: The number of open search contexts. - type: number + description: The number of open search contexts. + type: integer + format: int64 query_current: - description: The number of currently running shard query operations. - type: number + description: The number of currently running shard query operations. + type: integer + format: int64 query_time: description: The total amount of time taken to complete all shard query operations. $ref: '#/components/schemas/Duration' @@ -1844,10 +1902,12 @@ components: $ref: '#/components/schemas/DurationValueUnitMillis' query_total: description: The total number of shard query operations. - type: number + type: integer + format: int64 concurrent_query_total: - description: The total number of query operations using concurrent segment search. - type: number + description: The total number of query operations using concurrent segment search. + type: integer + format: int64 concurrent_query_time: $ref: '#/components/schemas/Duration' concurrent_query_time_in_millis: @@ -1855,13 +1915,16 @@ components: $ref: '#/components/schemas/DurationValueUnitMillis' concurrent_query_current: description: The number of currently running query operations using concurrent segment search. - type: number + type: integer + format: int64 concurrent_avg_slice_count: description: The average slice count of all search requests. This is computed as the total slice count divided by the total number of concurrent search requests. - type: number + type: integer + format: int64 fetch_current: - description: The number of currently running shard fetch operations. - type: number + description: The number of currently running shard fetch operations. + type: integer + format: int64 fetch_time: description: The total amount of time taken to complete all shard fetch operations. $ref: '#/components/schemas/Duration' @@ -1870,10 +1933,12 @@ components: $ref: '#/components/schemas/DurationValueUnitMillis' fetch_total: description: The total number of shard fetch operations. - type: number + type: integer + format: int64 scroll_current: description: The number of shard scroll operations that are currently running. - type: number + type: integer + format: int64 scroll_time: description: The total amount of time taken to complete all shard scroll operations. $ref: '#/components/schemas/Duration' @@ -1882,21 +1947,25 @@ components: $ref: '#/components/schemas/DurationValueUnitMillis' scroll_total: description: The total number of shard scroll operations. - type: number + type: integer + format: int64 point_in_time_total: - description: The total number of shard Point in Time (PIT) contexts created (completed and active) since the node last restarted. - type: number + description: The total number of shard Point in Time (PIT) contexts created (completed and active) since the node last restarted. + type: integer + format: int64 point_in_time_time: $ref: '#/components/schemas/Duration' point_in_time_time_in_millis: description: The amount of time that shard PIT contexts have been held open since the node last restarted, in milliseconds. $ref: '#/components/schemas/DurationValueUnitMillis' point_in_time_current: - description: The number of currently open shard PIT contexts. - type: number + description: The number of currently open shard PIT contexts. + type: integer + format: int64 suggest_current: - description: The number of currently running shard suggest operations. - type: number + description: The number of currently running shard suggest operations. + type: integer + format: int64 suggest_time: description: The total amount of time take to complete all shard suggest operations. $ref: '#/components/schemas/Duration' @@ -1904,10 +1973,12 @@ components: description: The total amount of time taken to complete all shard suggest operations, in milliseconds. $ref: '#/components/schemas/DurationValueUnitMillis' suggest_total: - description: The total number of shard suggest operations. - type: number + description: The total number of shard suggest operations. + type: integer + format: int64 search_idle_reactivate_count_total: - type: number + type: integer + format: int64 request: type: object description: Statistics related to coordinator search operations for the node. @@ -1934,9 +2005,11 @@ components: type: object properties: earliest_last_modified_age: - type: number + type: integer + format: int64 operations: - type: number + type: integer + format: int32 remote_store: $ref: '#/components/schemas/RemoteStoreTranslogStats' size: @@ -1944,7 +2017,8 @@ components: size_in_bytes: $ref: '#/components/schemas/ByteCount' uncommitted_operations: - type: number + type: integer + format: int32 uncommitted_size: $ref: '#/components/schemas/HumanReadableByteCount' uncommitted_size_in_bytes: @@ -1963,16 +2037,20 @@ components: time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' current: - type: number + type: integer + format: int64 total: - type: number + type: integer + format: int64 WarmerStats: type: object properties: current: - type: number + type: integer + format: int64 total: - type: number + type: integer + format: int64 total_time: $ref: '#/components/schemas/Duration' total_time_in_millis: diff --git a/spec/schemas/cluster.allocation_explain.yaml b/spec/schemas/cluster.allocation_explain.yaml index f90f94d7d..defad809b 100644 --- a/spec/schemas/cluster.allocation_explain.yaml +++ b/spec/schemas/cluster.allocation_explain.yaml @@ -116,7 +116,8 @@ components: path: type: string total: - type: number + type: integer + format: int64 shards: type: array items: @@ -140,7 +141,8 @@ components: transport_address: $ref: '_common.yaml#/components/schemas/TransportAddress' weight_ranking: - type: number + type: integer + format: int32 required: - attributes - id @@ -169,7 +171,8 @@ components: transport_address: $ref: '_common.yaml#/components/schemas/TransportAddress' weight_ranking: - type: number + type: integer + format: int32 required: - deciders - node_attributes @@ -211,7 +214,8 @@ components: details: type: string failed_allocation_attempts: - type: number + type: integer + format: int32 delayed: type: boolean allocation_status: diff --git a/spec/schemas/cluster.health.yaml b/spec/schemas/cluster.health.yaml index c62ccbb37..1776ac780 100644 --- a/spec/schemas/cluster.health.yaml +++ b/spec/schemas/cluster.health.yaml @@ -11,10 +11,12 @@ components: properties: active_primary_shards: description: The number of active primary shards. - type: number + type: integer + format: int32 active_shards: description: The total number of active primary and replica shards. - type: number + type: integer + format: int32 active_shards_percent: $ref: '_common.yaml#/components/schemas/PercentageString' active_shards_percent_as_number: @@ -29,7 +31,8 @@ components: $ref: '_common.yaml#/components/schemas/Name' delayed_unassigned_shards: description: The number of shards whose allocation has been delayed by the timeout settings. - type: number + type: integer + format: int32 discovered_master: description: True if the cluster-manager node has been discovered. type: boolean @@ -44,22 +47,28 @@ components: $ref: '#/components/schemas/IndexHealthStats' initializing_shards: description: The number of shards that are under initialization. - type: number + type: integer + format: int32 number_of_data_nodes: description: The number of nodes that are dedicated data nodes. - type: number + type: integer + format: int32 number_of_in_flight_fetch: description: The number of unfinished fetches. - type: number + type: integer + format: int32 number_of_nodes: description: The number of nodes within the cluster. - type: number + type: integer + format: int32 number_of_pending_tasks: description: The number of cluster-level changes that have not yet been executed. - type: number + type: integer + format: int32 relocating_shards: description: The number of shards that are under relocation. - type: number + type: integer + format: int32 status: $ref: '_common.yaml#/components/schemas/HealthStatus' task_max_waiting_in_queue: @@ -71,7 +80,8 @@ components: type: boolean unassigned_shards: description: The number of shards that are not allocated. - type: number + type: integer + format: int32 required: - active_primary_shards - active_shards @@ -92,17 +102,23 @@ components: type: object properties: active_primary_shards: - type: number + type: integer + format: int32 active_shards: - type: number + type: integer + format: int32 initializing_shards: - type: number + type: integer + format: int32 number_of_replicas: - type: number + type: integer + format: int32 number_of_shards: - type: number + type: integer + format: int32 relocating_shards: - type: number + type: integer + format: int32 shards: type: object additionalProperties: @@ -110,7 +126,8 @@ components: status: $ref: '_common.yaml#/components/schemas/HealthStatus' unassigned_shards: - type: number + type: integer + format: int32 required: - active_primary_shards - active_shards @@ -132,32 +149,42 @@ components: x-version-added: '2.5' properties: active_shards: - type: number + type: integer + format: int32 initializing_shards: - type: number + type: integer + format: int32 relocating_shards: - type: number + type: integer + format: int32 unassigned_shards: - type: number + type: integer + format: int32 data_nodes: - type: number + type: integer + format: int32 weight: - type: number + type: integer + format: int32 ShardHealthStats: type: object properties: active_shards: - type: number + type: integer + format: int32 initializing_shards: - type: number + type: integer + format: int32 primary_active: type: boolean relocating_shards: - type: number + type: integer + format: int32 status: $ref: '_common.yaml#/components/schemas/HealthStatus' unassigned_shards: - type: number + type: integer + format: int32 required: - active_shards - initializing_shards diff --git a/spec/schemas/cluster.pending_tasks.yaml b/spec/schemas/cluster.pending_tasks.yaml index efe552281..de5d9dc8f 100644 --- a/spec/schemas/cluster.pending_tasks.yaml +++ b/spec/schemas/cluster.pending_tasks.yaml @@ -14,7 +14,8 @@ components: type: boolean insert_order: description: The number that represents when the task has been inserted into the task queue. - type: number + type: integer + format: int32 priority: description: |- The priority of the pending task. diff --git a/spec/schemas/cluster.remote_info.yaml b/spec/schemas/cluster.remote_info.yaml index a92160bc8..82b8fac62 100644 --- a/spec/schemas/cluster.remote_info.yaml +++ b/spec/schemas/cluster.remote_info.yaml @@ -23,9 +23,11 @@ components: connected: type: boolean max_connections_per_cluster: - type: number + type: integer + format: int32 num_nodes_connected: - type: number + type: integer + format: int64 initial_connect_timeout: $ref: '_common.yaml#/components/schemas/Duration' skip_unavailable: @@ -60,9 +62,11 @@ components: server_name: type: string num_proxy_sockets_connected: - type: number + type: integer + format: int32 max_proxy_socket_connections: - type: number + type: integer + format: int32 required: - connected - initial_connect_timeout diff --git a/spec/schemas/cluster.reroute.yaml b/spec/schemas/cluster.reroute.yaml index 55ac62278..98de24c49 100644 --- a/spec/schemas/cluster.reroute.yaml +++ b/spec/schemas/cluster.reroute.yaml @@ -10,14 +10,48 @@ components: type: object properties: cancel: + description: |- + Cancel allocation of a shard (or recovery). Accepts `index` and `shard` for index + name and shard number, and `node` for the node to cancel the shard allocation + on. This can be used to force resynchronization of existing replicas from the + primary shard by cancelling them and allowing them to be reinitialized + through the standard recovery process. By default only replica shard + allocations can be cancelled. If it is necessary to cancel the allocation of + a primary shard then the `allow_primary` flag must also be included in the + request. $ref: '#/components/schemas/CommandCancelAction' move: + description: |- + Move a started shard from one node to another node. Accepts `index` and `shard` + for index name and shard number, `from_node` for the node to move the shard + from, and `to_node` for the node to move the shard to. $ref: '#/components/schemas/CommandMoveAction' allocate_replica: + description: |- + Allocate an unassigned replica shard to a node. Accepts `index` and `shard` for + index name and shard number, and `node` to allocate the shard to. Takes + allocation deciders into account. $ref: '#/components/schemas/CommandAllocateReplicaAction' allocate_stale_primary: + description: |- + Allocate a primary shard to a node that holds a stale copy. Accepts `index` + and `shard` for index name and shard number, and `node` to allocate the shard to. + Using this command may lead to data loss for the provided shard id. If a node + which has the good copy of the data rejoins the cluster later on, that data + will be deleted or overwritten with the data of the stale copy that was + forcefully allocated with this command. To ensure that these implications are + well-understood, this command requires the flag `accept_data_loss` to be + explicitly set to true. $ref: '#/components/schemas/CommandAllocatePrimaryAction' allocate_empty_primary: + description: |- + Allocate an empty primary shard to a node. Accepts `index` and `shard` for + index name and shard number, and `node` to allocate the shard to. Using this + command leads to a complete loss of all data that was indexed into this + shard, if it was previously started. If a node which has a copy of the data + rejoins the cluster later on, that data will be deleted. To ensure that these + implications are well-understood, this command requires the flag + `accept_data_loss` to be explicitly set to true. $ref: '#/components/schemas/CommandAllocatePrimaryAction' CommandCancelAction: type: object @@ -25,7 +59,8 @@ components: index: $ref: '_common.yaml#/components/schemas/IndexName' shard: - type: number + type: integer + format: int32 node: type: string allow_primary: @@ -40,7 +75,8 @@ components: index: $ref: '_common.yaml#/components/schemas/IndexName' shard: - type: number + type: integer + format: int32 from_node: description: The node to move the shard from type: string @@ -58,7 +94,8 @@ components: index: $ref: '_common.yaml#/components/schemas/IndexName' shard: - type: number + type: integer + format: int32 node: type: string required: @@ -71,7 +108,8 @@ components: index: $ref: '_common.yaml#/components/schemas/IndexName' shard: - type: number + type: integer + format: int32 node: type: string accept_data_loss: @@ -132,7 +170,8 @@ components: node: $ref: '_common.yaml#/components/schemas/NodeName' shard: - type: number + type: integer + format: int32 from_node: $ref: '_common.yaml#/components/schemas/NodeName' to_node: diff --git a/spec/schemas/cluster.stats.yaml b/spec/schemas/cluster.stats.yaml index 70cab97e5..669dc85d6 100644 --- a/spec/schemas/cluster.stats.yaml +++ b/spec/schemas/cluster.stats.yaml @@ -6,29 +6,6 @@ info: paths: {} components: schemas: - StatsResponseBase: - allOf: - - $ref: 'nodes._common.yaml#/components/schemas/NodesResponseBase' - - type: object - properties: - cluster_name: - $ref: '_common.yaml#/components/schemas/Name' - cluster_uuid: - $ref: '_common.yaml#/components/schemas/Uuid' - indices: - $ref: '#/components/schemas/ClusterIndices' - nodes: - $ref: '#/components/schemas/ClusterNodes' - status: - $ref: '_common.yaml#/components/schemas/HealthStatus' - timestamp: - description: Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed. - type: number - required: - - cluster_name - - cluster_uuid - - status - - timestamp ClusterIndices: type: object properties: @@ -38,7 +15,8 @@ components: $ref: '_common.yaml#/components/schemas/CompletionStats' count: description: Total number of indexes with shards assigned to selected nodes. - type: number + type: integer + format: int64 docs: $ref: '_common.yaml#/components/schemas/DocStats' fielddata: @@ -117,22 +95,12 @@ components: $ref: '_common.yaml#/components/schemas/Name' count: description: The number of occurrences of the field type in selected nodes. - type: number + type: integer + format: int32 index_count: description: The number of indexes containing the field type in selected nodes. - type: number - indexed_vector_count: - description: For `dense_vector` field types, number of indexed vector types in selected nodes. - type: number - indexed_vector_dim_max: - description: For `dense_vector` field types, the maximum dimension of all indexed vector types in selected nodes. - type: number - indexed_vector_dim_min: - description: For `dense_vector` field types, the minimum dimension of all indexed vector types in selected nodes. - type: number - script_count: - description: The number of fields that declare a script. - type: number + type: integer + format: int32 required: - count - index_count @@ -144,21 +112,27 @@ components: $ref: '#/components/schemas/ClusterIndicesShardsIndex' primaries: description: Number of primary shards assigned to selected nodes. - type: number + type: integer + format: int32 replication: description: Ratio of replica shards to primary shards across all selected nodes. - type: number + type: integer + format: int32 total: description: Total number of shards assigned to selected nodes. - type: number + type: integer + format: int32 ClusterIndicesShardsIndex: type: object properties: primaries: + description: Contains statistics about the number of primary shards assigned to selected nodes. $ref: '#/components/schemas/ClusterShardMetrics' replication: + description: Contains statistics about the number of replication shards assigned to selected nodes. $ref: '#/components/schemas/ClusterShardMetrics' shards: + description: Contains statistics about the number of shards assigned to selected nodes. $ref: '#/components/schemas/ClusterShardMetrics' required: - primaries @@ -170,12 +144,15 @@ components: avg: description: Mean number of shards in an index, counting only shards assigned to selected nodes. type: number + format: double max: description: Maximum number of shards in an index, counting only shards assigned to selected nodes. type: number + format: double min: description: Minimum number of shards in an index, counting only shards assigned to selected nodes. type: number + format: double required: - avg - max @@ -188,26 +165,17 @@ components: type: array items: $ref: '#/components/schemas/FieldTypes' - total_field_count: - description: Total number of fields in all non-system indexes. - type: number - total_deduplicated_field_count: - description: Total number of fields in all non-system indexes, accounting for mapping deduplication. - type: number - total_deduplicated_mapping_size: - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' - total_deduplicated_mapping_size_in_bytes: - description: Total size of all mappings, in bytes, after deduplication and compression. - $ref: '_common.yaml#/components/schemas/ByteCount' required: - field_types IndicesVersions: type: object properties: index_count: - type: number + type: integer + format: int32 primary_shard_count: - type: number + type: integer + format: int32 total_primary_bytes: $ref: '_common.yaml#/components/schemas/ByteCount' version: @@ -221,23 +189,29 @@ components: type: object properties: count: + description: Contains counts for nodes selected by the request's node filters. $ref: '#/components/schemas/ClusterNodeCount' discovery_types: description: Contains statistics about the discovery types used by selected nodes. type: object additionalProperties: - type: number + type: integer + format: int32 fs: + description: Contains statistics about file stores by selected nodes. $ref: '#/components/schemas/ClusterFileSystem' indexing_pressure: $ref: '#/components/schemas/IndexingPressure' ingest: $ref: '#/components/schemas/ClusterIngest' jvm: + description: Contains statistics about the Java Virtual Machines (JVMs) used by selected nodes. $ref: '#/components/schemas/ClusterJvm' network_types: + description: Contains statistics about the transport and HTTP networks used by selected nodes. $ref: '#/components/schemas/ClusterNetworkTypes' os: + description: Contains statistics about the operating systems used by selected nodes. $ref: '#/components/schemas/ClusterOperatingSystem' packaging_types: description: Contains statistics about OpenSearch distributions installed on selected nodes. @@ -252,6 +226,7 @@ components: items: $ref: '_common.yaml#/components/schemas/PluginStats' process: + description: Contains statistics about processes used by selected nodes. $ref: '#/components/schemas/ClusterProcess' versions: description: Array of OpenSearch versions used on selected nodes. @@ -262,39 +237,55 @@ components: type: object properties: coordinating_only: - type: number + type: integer + format: int32 data: - type: number + type: integer + format: int32 data_cold: - type: number + type: integer + format: int32 data_content: - type: number + type: integer + format: int32 data_frozen: - type: number + type: integer + format: int32 data_hot: - type: number + type: integer + format: int32 data_warm: - type: number + type: integer + format: int32 ingest: - type: number + type: integer + format: int32 master: - type: number + type: integer + format: int32 cluster_manager: - type: number + type: integer + format: int32 x-version-added: '2.0' ml: - type: number + type: integer + format: int32 remote_cluster_client: - type: number + type: integer + format: int32 search: - type: number + type: integer + format: int32 x-version-added: '2.4' total: - type: number + type: integer + format: int32 transform: - type: number + type: integer + format: int32 voting_only: - type: number + type: integer + format: int32 required: - coordinating_only - data @@ -390,7 +381,8 @@ components: type: object properties: number_of_pipelines: - type: number + type: integer + format: int32 processor_stats: type: object additionalProperties: @@ -402,11 +394,14 @@ components: type: object properties: count: - type: number + type: integer + format: int64 current: - type: number + type: integer + format: int64 failed: - type: number + type: integer + format: int64 time: $ref: '_common.yaml#/components/schemas/Duration' time_in_millis: @@ -427,7 +422,8 @@ components: $ref: '#/components/schemas/ClusterJvmMemory' threads: description: Number of active threads in use by JVM across all selected nodes. - type: number + type: integer + format: int64 versions: description: Contains statistics about the JVM versions used by selected nodes. type: array @@ -464,7 +460,8 @@ components: type: boolean count: description: Total number of selected nodes using JVM. - type: number + type: integer + format: int32 using_bundled_jdk: description: If `true`, a bundled JDK is in use by JVM. type: boolean @@ -493,12 +490,14 @@ components: description: Contains statistics about the HTTP network types used by selected nodes. type: object additionalProperties: - type: number + type: integer + format: int32 transport_types: description: Contains statistics about the transport network types used by selected nodes. type: object additionalProperties: - type: number + type: integer + format: int32 required: - http_types - transport_types @@ -510,7 +509,8 @@ components: Number of processors used to calculate thread pool size across all selected nodes. This number can be set with the processors setting of a node and defaults to the number of processors reported by the operating system. In both cases, this number will never be larger than 32. - type: number + type: integer + format: int32 architectures: description: Contains statistics about processor architectures (for example, x86_64 or aarch64) used by selected nodes. type: array @@ -518,7 +518,8 @@ components: $ref: '#/components/schemas/ClusterOperatingSystemArchitecture' available_processors: description: Number of processors available to JVM across all selected nodes. - type: number + type: integer + format: int32 mem: $ref: '#/components/schemas/OperatingSystemMemoryInfo' names: @@ -545,7 +546,8 @@ components: type: string count: description: Number of selected nodes using the architecture. - type: number + type: integer + format: int32 required: - arch - count @@ -590,7 +592,8 @@ components: properties: count: description: Number of selected nodes using the operating system. - type: number + type: integer + format: int32 name: $ref: '_common.yaml#/components/schemas/Name' required: @@ -601,7 +604,8 @@ components: properties: count: description: Number of selected nodes using the operating system. - type: number + type: integer + format: int32 pretty_name: $ref: '_common.yaml#/components/schemas/Name' required: @@ -612,7 +616,8 @@ components: properties: count: description: Number of selected nodes using the distribution flavor and file type. - type: number + type: integer + format: int32 flavor: description: Type of OpenSearch distribution. This is always `default`. type: string @@ -649,17 +654,20 @@ components: description: |- Average number of concurrently open file descriptors. Returns `-1` if not supported. - type: number + type: integer + format: int64 max: description: |- Maximum number of concurrently open file descriptors allowed across all selected nodes. Returns `-1` if not supported. - type: number + type: integer + format: int64 min: description: |- Minimum number of concurrently open file descriptors across all selected nodes. Returns -1 if not supported. - type: number + type: integer + format: int64 required: - avg - max diff --git a/spec/schemas/indices._common.yaml b/spec/schemas/indices._common.yaml index bfe248437..0b5ad7c36 100644 --- a/spec/schemas/indices._common.yaml +++ b/spec/schemas/indices._common.yaml @@ -1167,15 +1167,6 @@ components: $ref: '_common.yaml#/components/schemas/ByteCount' size_to_upgrade_ancient_in_bytes: $ref: '_common.yaml#/components/schemas/ByteCount' - IndexPostUpgradeStatus: - type: object - properties: - _shards: - $ref: '_common.yaml#/components/schemas/ShardStatistics' - upgraded_indices: - type: object - additionalProperties: - $ref: '#/components/schemas/UpgradeVersionStatus' UpgradeVersionStatus: type: object properties: @@ -1183,22 +1174,6 @@ components: $ref: '_common.yaml#/components/schemas/VersionString' oldest_lucene_segment_version: $ref: '_common.yaml#/components/schemas/VersionString' - UpgradeRequest: - type: object - properties: - allow_no_indices: - type: boolean - expand_wildcards: - type: string - enum: - - all - - closed - - none - - open - ignore_unavailable: - type: boolean - wait_for_completion: - type: boolean IndexError: type: object properties: diff --git a/spec/schemas/indices.analyze.yaml b/spec/schemas/indices.analyze.yaml index fb9b0d49e..ffe9e108e 100644 --- a/spec/schemas/indices.analyze.yaml +++ b/spec/schemas/indices.analyze.yaml @@ -49,17 +49,22 @@ components: bytes: type: string end_offset: - type: number + type: integer + format: int32 keyword: type: boolean position: - type: number + type: integer + format: int32 positionLength: - type: number + type: integer + format: int32 start_offset: - type: number + type: integer + format: int32 termFrequency: - type: number + type: integer + format: int32 token: type: string type: @@ -101,13 +106,17 @@ components: type: object properties: end_offset: - type: number + type: integer + format: int32 position: - type: number + type: integer + format: int32 positionLength: - type: number + type: integer + format: int32 start_offset: - type: number + type: integer + format: int32 token: type: string type: diff --git a/spec/schemas/indices.recovery.yaml b/spec/schemas/indices.recovery.yaml index bda47b369..1e09c8dcb 100644 --- a/spec/schemas/indices.recovery.yaml +++ b/spec/schemas/indices.recovery.yaml @@ -19,7 +19,8 @@ components: type: object properties: id: - type: number + type: integer + format: int32 index: $ref: '#/components/schemas/RecoveryIndexStatus' primary: @@ -125,11 +126,14 @@ components: percent: $ref: '_common.yaml#/components/schemas/PercentageString' recovered: - type: number + type: integer + format: int64 reused: - type: number + type: integer + format: int64 total: - type: number + type: integer + format: int64 required: - percent - recovered @@ -139,11 +143,13 @@ components: type: object properties: length: - type: number + type: integer + format: int64 name: type: string recovered: - type: number + type: integer + format: int64 required: - length - name @@ -203,11 +209,14 @@ components: percent: $ref: '_common.yaml#/components/schemas/PercentageString' recovered: - type: number + type: integer + format: int32 total: - type: number + type: integer + format: int32 total_on_start: - type: number + type: integer + format: int32 total_time: $ref: '_common.yaml#/components/schemas/Duration' total_time_in_millis: diff --git a/spec/schemas/indices.rollover.yaml b/spec/schemas/indices.rollover.yaml index 29158a356..455b688dd 100644 --- a/spec/schemas/indices.rollover.yaml +++ b/spec/schemas/indices.rollover.yaml @@ -16,9 +16,11 @@ components: max_age_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' min_docs: - type: number + type: integer + format: int64 max_docs: - type: number + type: integer + format: int64 max_size: $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' max_size_bytes: @@ -36,6 +38,8 @@ components: min_primary_shard_size_bytes: $ref: '_common.yaml#/components/schemas/ByteCount' max_primary_shard_docs: - type: number + type: integer + format: int64 min_primary_shard_docs: - type: number + type: integer + format: int64 diff --git a/spec/schemas/indices.segments.yaml b/spec/schemas/indices.segments.yaml index e2e8230ba..b86a63a93 100644 --- a/spec/schemas/indices.segments.yaml +++ b/spec/schemas/indices.segments.yaml @@ -23,11 +23,13 @@ components: type: object properties: num_committed_segments: - type: number + type: integer + format: int32 routing: $ref: '#/components/schemas/ShardSegmentRouting' num_search_segments: - type: number + type: integer + format: int32 segments: type: object additionalProperties: diff --git a/spec/schemas/indices.shard_stores.yaml b/spec/schemas/indices.shard_stores.yaml index 9b76b9027..b8411f90f 100644 --- a/spec/schemas/indices.shard_stores.yaml +++ b/spec/schemas/indices.shard_stores.yaml @@ -6,13 +6,20 @@ info: paths: {} components: schemas: - Status: - type: string - enum: - - all - - green - - red - - yellow + ShardStoreStatus: + oneOf: + - type: string + const: all + description: Return all shards, regardless of health status. + - type: string + const: green + description: The primary shard and all replica shards are assigned. + - type: string + const: red + description: The primary shard is unassigned. + - type: string + const: yellow + description: One or more replica shards are unassigned. IndicesShardStores: type: object properties: @@ -41,6 +48,7 @@ components: store_exception: $ref: '#/components/schemas/ShardStoreException' additionalProperties: + title: nodes $ref: '_common.yaml#/components/schemas/NodeAttributes' required: - allocation diff --git a/spec/schemas/indices.stats.yaml b/spec/schemas/indices.stats.yaml index 367ce207f..02abf2b1f 100644 --- a/spec/schemas/indices.stats.yaml +++ b/spec/schemas/indices.stats.yaml @@ -22,7 +22,8 @@ components: average_size_in_bytes: $ref: '_common.yaml#/components/schemas/ByteCount' count: - type: number + type: integer + format: int64 required: - description - size_in_bytes @@ -134,11 +135,13 @@ components: type: object properties: generation: - type: number + type: integer + format: int32 id: $ref: '_common.yaml#/components/schemas/Id' num_docs: - type: number + type: integer + format: int64 user_data: type: object additionalProperties: @@ -165,7 +168,8 @@ components: type: object properties: primary_term: - type: number + type: integer + format: int64 version: $ref: '_common.yaml#/components/schemas/VersionNumber' leases: @@ -184,7 +188,8 @@ components: retaining_seq_no: $ref: '_common.yaml#/components/schemas/SequenceNumber' timestamp: - type: number + type: integer + format: int64 source: type: string required: @@ -218,9 +223,11 @@ components: type: object properties: global_checkpoint: - type: number + type: integer + format: int64 local_checkpoint: - type: number + type: integer + format: int64 max_seq_no: $ref: '_common.yaml#/components/schemas/SequenceNumber' required: diff --git a/spec/schemas/nodes._common.yaml b/spec/schemas/nodes._common.yaml index 31a4317c3..7640634ab 100644 --- a/spec/schemas/nodes._common.yaml +++ b/spec/schemas/nodes._common.yaml @@ -185,6 +185,7 @@ components: type: object properties: _nodes: + description: Contains statistics about the number of nodes selected by the request's node filters. $ref: '_common.yaml#/components/schemas/NodeStatistics' NodeReloadResult: anyOf: diff --git a/tests/default/_core/upgrade.yaml b/tests/default/_core/upgrade.yaml index 9075e1a6f..27c8269fd 100644 --- a/tests/default/_core/upgrade.yaml +++ b/tests/default/_core/upgrade.yaml @@ -1,15 +1,30 @@ $schema: ../../../json_schemas/test_story.schema.yaml description: Test upgrading indices using both GET and POST methods. +epilogues: + - path: /movies + method: DELETE + status: [200, 404] +prologues: + - path: /_bulk + method: POST + parameters: + refresh: true + request: + content_type: application/x-ndjson + payload: + - {create: {_index: movies, _id: movie1}} + - {director: Bennett Miller, title: The Cruise, year: 1998} + - {create: {_index: movies, _id: movie2}} + - {director: Nicolas Winding Refn, title: Drive, year: 1960} chapters: - synopsis: Trigger upgrade (POST). path: /_upgrade method: POST - request: - payload: - allow_no_indices: false - expand_wildcards: closed - ignore_unavailable: false + parameters: + allow_no_indices: false + expand_wildcards: open + ignore_unavailable: false response: status: 200 diff --git a/tests/default/indices/upgrade.yaml b/tests/default/indices/upgrade.yaml index 46d81bb06..f21c3984f 100644 --- a/tests/default/indices/upgrade.yaml +++ b/tests/default/indices/upgrade.yaml @@ -23,11 +23,9 @@ chapters: method: POST parameters: index: [movies] - request: - payload: - allow_no_indices: true - expand_wildcards: open - ignore_unavailable: true + allow_no_indices: true + expand_wildcards: open + ignore_unavailable: true response: status: 200