Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing required fields #365

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed `_bulk` spec request and response types ([#355](https://github.com/opensearch-project/opensearch-api-specification/pull/355))
- Fixed `text/plain` response in `/_cat` ([#357](https://github.com/opensearch-project/opensearch-api-specification/pull/357))
- Fixed `/_cat/cluster_manager`, `/_cat/allocation`, `/_cat/shards`, and `/_cat/thread_pool` ([#373](https://github.com/opensearch-project/opensearch-api-specification/pull/373))
- Fixed optional field in `/_nodes` ([#365](https://github.com/opensearch-project/opensearch-api-specification/pull/365))

### Security

Expand Down
4 changes: 3 additions & 1 deletion spec/schemas/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,8 @@ components:
$ref: '#/components/schemas/VersionString'
licensed:
type: boolean
custom_foldername:
type: string
opensearch_version:
$ref: '#/components/schemas/VersionString'
required:
Expand All @@ -1117,7 +1119,6 @@ components:
- java_version
- name
- version
- licensed
NodeStatistics:
type: object
properties:
Expand Down Expand Up @@ -1690,6 +1691,7 @@ components:
- transform
- remote_cluster_client
- coordinating_only
- cluster_manager
HttpHeaders:
type: object
additionalProperties:
Expand Down
90 changes: 63 additions & 27 deletions spec/schemas/nodes.info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ components:
- aggregations
- indices
- search_pipelines
- _all
ResponseBase:
allOf:
- $ref: 'nodes._common.yaml#/components/schemas/NodesResponseBase'
- type: object
properties:
cluster_name:
Expand All @@ -33,9 +31,12 @@ components:
type: object
additionalProperties:
$ref: '#/components/schemas/NodeInfo'
_nodes:
$ref: 'nodes._common.yaml#/components/schemas/NodesResponseBase'
required:
- cluster_name
- nodes
- _nodes
NodeInfo:
type: object
properties:
Expand Down Expand Up @@ -99,9 +100,10 @@ components:
type: object
additionalProperties:
$ref: '#/components/schemas/NodeInfoAggregation'
search_pipelines:
$ref: '#/components/schemas/NodeInfoSearchPipelines'
required:
- attributes
- build_flavor
- build_hash
- build_type
- host
Expand Down Expand Up @@ -152,6 +154,8 @@ components:
type: string
vm_version:
$ref: '_common.yaml#/components/schemas/VersionString'
bundled_jdk:
type: boolean
using_bundled_jdk:
type: boolean
using_compressed_ordinary_object_pointers:
Expand All @@ -172,7 +176,7 @@ components:
- vm_name
- vm_vendor
- vm_version
- using_bundled_jdk
- bundled_jdk
- input_arguments
NodeInfoJvmMemory:
type: object
Expand Down Expand Up @@ -343,6 +347,8 @@ components:
$ref: '#/components/schemas/NodeInfoSearch'
ingest:
$ref: '#/components/schemas/NodeInfoSettingsIngest'
index:
$ref: '#/components/schemas/NodeInfoSettingsIndex'
required:
- cluster
- node
Expand All @@ -365,7 +371,6 @@ components:
$ref: '#/components/schemas/DeprecationIndexing'
required:
- name
- election
NodeInfoSettingsClusterElection:
type: object
properties:
Expand All @@ -388,9 +393,7 @@ components:
name:
$ref: '_common.yaml#/components/schemas/Name'
attr:
type: object
additionalProperties:
type: object
$ref: '#/components/schemas/NodeInfoShardIndexingPressureEnabled'
max_local_storage_nodes:
type: string
required:
Expand All @@ -414,7 +417,6 @@ components:
required:
- logs
- home
- repo
NodeInfoRepositories:
type: object
properties:
Expand All @@ -429,13 +431,18 @@ components:
type: string
required:
- allowed_urls
NodeInfoShardIndexingPressureEnabled:
type: object
properties:
shard_indexing_pressure_enabled:
type: string
required:
- shard_indexing_pressure_enabled
NodeInfoDiscover:
type: object
properties:
seed_hosts:
type: string
required:
- seed_hosts
NodeInfoAction:
type: object
properties:
Expand All @@ -454,7 +461,7 @@ components:
type: object
properties:
type:
$ref: '#/components/schemas/NodeInfoSettingsHttpType'
type: string
type.default:
type: string
compression:
Expand All @@ -467,13 +474,6 @@ components:
- type: string
required:
- type
NodeInfoSettingsHttpType:
type: object
properties:
default:
type: string
required:
- default
NodeInfoBootstrap:
type: object
properties:
Expand All @@ -485,18 +485,11 @@ components:
type: object
properties:
type:
$ref: '#/components/schemas/NodeInfoSettingsTransportType'
type: string
type.default:
type: string
required:
- type
NodeInfoSettingsTransportType:
type: object
properties:
default:
type: string
required:
- default
NodeInfoSettingsNetwork:
type: object
properties:
Expand Down Expand Up @@ -613,6 +606,28 @@ components:
type: string
required:
- enabled
NodeInfoSettingsIndex:
type: object
properties:
store:
$ref: '#/components/schemas/NodeInfoSettingsIndexStore'
NodeInfoSettingsIndexStore:
type: object
properties:
hybrid:
$ref: '#/components/schemas/NodeInfoSettingsIndexHybrid'
NodeInfoSettingsIndexHybrid:
type: object
properties:
mmap:
$ref: '#/components/schemas/NodeInfoSettingsIndexStoreMmap'
NodeInfoSettingsIndexStoreMmap:
type: object
properties:
extensions:
type: array
items:
type: string
NodeThreadPoolInfo:
type: object
properties:
Expand Down Expand Up @@ -673,3 +688,24 @@ components:
type: string
required:
- types
NodeInfoSearchPipelines:
type: object
properties:
response_processors:
type: array
items:
$ref: '#/components/schemas/NodeInfoIngestProcessor2'
request_processors:
type: array
items:
$ref: '#/components/schemas/NodeInfoIngestProcessor2'
required:
- response_processors
- request_processors
NodeInfoIngestProcessor2:
type: object
properties:
type:
type: string
required:
- type
9 changes: 9 additions & 0 deletions tests/_core/nodes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$schema: ../../json_schemas/test_story.schema.yaml

description: Test nodes endpoints.
chapters:
- synopsis: Nodes with a json response.
path: /_nodes
method: GET
response:
status: 200
Loading