From 0edb266d4498155595eb39376f66a13678fde514 Mon Sep 17 00:00:00 2001 From: dblock Date: Tue, 2 Jul 2024 15:54:19 -0400 Subject: [PATCH] Added _cat tests. Signed-off-by: dblock --- .github/opensearch-cluster/docker-compose.yml | 3 +- spec/namespaces/_core.yaml | 6 +- spec/namespaces/cat.yaml | 19 ++++- spec/schemas/cat.allocation.yaml | 14 ++-- spec/schemas/cat.cluster_manager.yaml | 23 ++++++ spec/schemas/cat.shards.yaml | 8 +- spec/schemas/cat.templates.yaml | 2 +- spec/schemas/cat.thread_pool.yaml | 8 +- tests/_core/aliases.yaml | 77 +++++++++++++++++++ tests/cat/aliases.yaml | 18 ++++- tests/cat/allocation.yaml | 11 +++ tests/cat/cluster_manager.yaml | 11 +++ tests/cat/count.yaml | 11 +++ tests/cat/fielddata.yaml | 11 +++ tests/cat/nodeattrs.yaml | 11 +++ tests/cat/nodes.yaml | 11 +++ tests/cat/pending_tasks.yaml | 11 +++ tests/cat/pit_segments.yaml | 38 +++++++++ tests/cat/plugins.yaml | 11 +++ tests/cat/recovery.yaml | 11 +++ tests/cat/repositories.yaml | 11 +++ tests/cat/segement_replication.yaml | 11 +++ tests/cat/segments.yaml | 11 +++ tests/cat/shards.yaml | 11 +++ tests/cat/snapshots.yaml | 28 +++++++ tests/cat/tasks.yaml | 11 +++ tests/cat/templates.yaml | 11 +++ tests/cat/thread_pool.yaml | 11 +++ tests/indices/index.yaml | 2 +- tools/src/tester/SchemaValidator.ts | 10 ++- tools/tests/merger/fixtures/expected.yaml | 2 +- .../merger/fixtures/spec/schemas/animals.yaml | 2 +- .../tests/tester/fixtures/specs/excerpt.yaml | 2 +- 33 files changed, 410 insertions(+), 28 deletions(-) create mode 100644 spec/schemas/cat.cluster_manager.yaml create mode 100644 tests/_core/aliases.yaml create mode 100644 tests/cat/allocation.yaml create mode 100644 tests/cat/cluster_manager.yaml create mode 100644 tests/cat/count.yaml create mode 100644 tests/cat/fielddata.yaml create mode 100644 tests/cat/nodeattrs.yaml create mode 100644 tests/cat/nodes.yaml create mode 100644 tests/cat/pending_tasks.yaml create mode 100644 tests/cat/pit_segments.yaml create mode 100644 tests/cat/plugins.yaml create mode 100644 tests/cat/recovery.yaml create mode 100644 tests/cat/repositories.yaml create mode 100644 tests/cat/segement_replication.yaml create mode 100644 tests/cat/segments.yaml create mode 100644 tests/cat/shards.yaml create mode 100644 tests/cat/snapshots.yaml create mode 100644 tests/cat/tasks.yaml create mode 100644 tests/cat/templates.yaml create mode 100644 tests/cat/thread_pool.yaml diff --git a/.github/opensearch-cluster/docker-compose.yml b/.github/opensearch-cluster/docker-compose.yml index 2f1e4363d..f9c215ce9 100644 --- a/.github/opensearch-cluster/docker-compose.yml +++ b/.github/opensearch-cluster/docker-compose.yml @@ -8,4 +8,5 @@ services: - "9600:9600" environment: - discovery.type=single-node - - "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-myStrongPassword123!}" \ No newline at end of file + - "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-myStrongPassword123!}" + - "path.repo=/tmp/opensearch/repo" \ No newline at end of file diff --git a/spec/namespaces/_core.yaml b/spec/namespaces/_core.yaml index 3e8404ba5..e18103345 100644 --- a/spec/namespaces/_core.yaml +++ b/spec/namespaces/_core.yaml @@ -2418,7 +2418,7 @@ components: $ref: '../schemas/_common.query_dsl.yaml#/components/schemas/FieldAndFormat' knn: description: Defines the approximate kNN search to run. - oneOf: + anyOf: - $ref: '../schemas/_common.yaml#/components/schemas/KnnQuery' - type: array items: @@ -2441,7 +2441,7 @@ components: $ref: '../schemas/_common.query_dsl.yaml#/components/schemas/QueryContainer' rescore: description: Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases. - oneOf: + anyOf: - $ref: '../schemas/_core.search.yaml#/components/schemas/Rescore' - type: array items: @@ -5470,7 +5470,7 @@ components: name: sort description: A comma-separated list of : pairs. schema: - oneOf: + anyOf: - type: string - type: array items: diff --git a/spec/namespaces/cat.yaml b/spec/namespaces/cat.yaml index 4f12c0e7e..dfe6cde31 100644 --- a/spec/namespaces/cat.yaml +++ b/spec/namespaces/cat.yaml @@ -350,7 +350,7 @@ paths: responses: '200': $ref: '#/components/responses/cat.pending_tasks@200' - /_cat/pit_segments: + /_cat/pit_segments/{pit_id}: get: operationId: cat.pit_segments.0 x-operation-group: cat.pit_segments @@ -359,6 +359,7 @@ paths: externalDocs: url: https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ parameters: + - $ref: '#/components/parameters/cat.pit_segments::path.index' - $ref: '#/components/parameters/cat.pit_segments::query.bytes' - $ref: '#/components/parameters/cat.pit_segments::query.format' - $ref: '#/components/parameters/cat.pit_segments::query.h' @@ -818,6 +819,14 @@ components: $ref: '../schemas/cat.allocation.yaml#/components/schemas/AllocationRecord' cat.cluster_manager@200: description: '' + content: + text/plain: + type: string + application/json: + schema: + type: array + items: + $ref: '../schemas/cat.cluster_manager.yaml#/components/schemas/ClusterManagerRecord' cat.count@200: description: '' content: @@ -1768,7 +1777,7 @@ components: name: full_id description: If `true`, return the full node ID. If `false`, return the shortened node ID. schema: - oneOf: + anyOf: - type: boolean - type: string default: false @@ -1912,6 +1921,12 @@ components: type: boolean default: false description: Verbose mode. Display column headers. + cat.pit_segments::path.pit_id: + name: pit_id + in: path + description: The point-in-time ID. + schema: + $ref: '../schemas/_common.yaml#/components/schemas/String' cat.pit_segments::query.bytes: name: bytes in: query diff --git a/spec/schemas/cat.allocation.yaml b/spec/schemas/cat.allocation.yaml index 8c8913a44..a23183238 100644 --- a/spec/schemas/cat.allocation.yaml +++ b/spec/schemas/cat.allocation.yaml @@ -16,7 +16,7 @@ components: description: |- Disk space used by the node’s shards. Does not include disk space for the translog or unassigned shards. IMPORTANT: This metric double-counts disk space for hard-linked files, such as those created when shrinking, splitting, or cloning an index. - oneOf: + anyOf: - $ref: '_common.yaml#/components/schemas/ByteSize' - nullable: true type: string @@ -26,7 +26,7 @@ components: OpenSearch retrieves this metric from the node’s operating system (OS). The metric includes disk space for: OpenSearch, including the translog and unassigned shards; the node’s operating system; any other applications or files on the node. Unlike `disk.indices`, this metric does not double-count disk space for hard-linked files. - oneOf: + anyOf: - $ref: '_common.yaml#/components/schemas/ByteSize' - nullable: true type: string @@ -35,31 +35,31 @@ components: Free disk space available to OpenSearch. OpenSearch retrieves this metric from the node’s operating system. Disk-based shard allocation uses this metric to assign shards to nodes based on available disk space. - oneOf: + anyOf: - $ref: '_common.yaml#/components/schemas/ByteSize' - nullable: true type: string disk.total: description: Total disk space for the node, including in-use and available space. - oneOf: + anyOf: - $ref: '_common.yaml#/components/schemas/ByteSize' - nullable: true type: string disk.percent: description: Total percentage of disk space in use. Calculated as `disk.used / disk.total`. - oneOf: + anyOf: - $ref: '_common.yaml#/components/schemas/Percentage' - nullable: true type: string host: description: Network host for the node. Set using the `network.host` setting. - oneOf: + anyOf: - $ref: '_common.yaml#/components/schemas/Host' - nullable: true type: string ip: description: IP address and port for the node. - oneOf: + anyOf: - $ref: '_common.yaml#/components/schemas/Ip' - nullable: true type: string diff --git a/spec/schemas/cat.cluster_manager.yaml b/spec/schemas/cat.cluster_manager.yaml new file mode 100644 index 000000000..5b04fc472 --- /dev/null +++ b/spec/schemas/cat.cluster_manager.yaml @@ -0,0 +1,23 @@ +openapi: 3.1.0 +info: + title: Schemas of cat.cluster_manager category + description: Schemas of cat.cluster_manager category + version: 1.0.0 +paths: {} +components: + schemas: + ClusterManagerRecord: + type: object + properties: + id: + description: node id + type: string + host: + description: host name + type: string + ip: + description: ip address + type: string + node: + description: node name + type: string diff --git a/spec/schemas/cat.shards.yaml b/spec/schemas/cat.shards.yaml index f3621e6f0..649780d8d 100644 --- a/spec/schemas/cat.shards.yaml +++ b/spec/schemas/cat.shards.yaml @@ -29,19 +29,19 @@ components: type: string docs: description: The number of documents in the shard. - oneOf: + anyOf: - type: string - nullable: true type: string store: description: The disk space used by the shard. - oneOf: + anyOf: - type: string - nullable: true type: string ip: description: The IP address of the node. - oneOf: + anyOf: - type: string - nullable: true type: string @@ -50,7 +50,7 @@ components: type: string node: description: The name of node. - oneOf: + anyOf: - type: string - nullable: true type: string diff --git a/spec/schemas/cat.templates.yaml b/spec/schemas/cat.templates.yaml index aab5d1289..81c048955 100644 --- a/spec/schemas/cat.templates.yaml +++ b/spec/schemas/cat.templates.yaml @@ -19,7 +19,7 @@ components: type: string version: description: The template version. - oneOf: + anyOf: - $ref: '_common.yaml#/components/schemas/VersionString' - nullable: true type: string diff --git a/spec/schemas/cat.thread_pool.yaml b/spec/schemas/cat.thread_pool.yaml index 759ecf7b0..bc91a875e 100644 --- a/spec/schemas/cat.thread_pool.yaml +++ b/spec/schemas/cat.thread_pool.yaml @@ -60,25 +60,25 @@ components: type: string core: description: The core number of active threads allowed in a scaling thread pool. - oneOf: + anyOf: - type: string - nullable: true type: string max: description: The maximum number of active threads allowed in a scaling thread pool. - oneOf: + anyOf: - type: string - nullable: true type: string size: description: The number of active threads allowed in a fixed thread pool. - oneOf: + anyOf: - type: string - nullable: true type: string keep_alive: description: The thread keep alive time. - oneOf: + anyOf: - type: string - nullable: true type: string diff --git a/tests/_core/aliases.yaml b/tests/_core/aliases.yaml new file mode 100644 index 000000000..6fee4e691 --- /dev/null +++ b/tests/_core/aliases.yaml @@ -0,0 +1,77 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test aliases endpoints. +epilogues: + - path: /games + method: DELETE + status: [200, 404] +prologues: + - path: /{index} + method: PUT + parameters: + index: games +chapters: + - synopsis: Create an alias. + path: /{index}/_aliases/{name} + method: PUT + parameters: + index: games + name: jeux + - synopsis: Get an alias from index. + method: GET + path: /{index}/_alias/{name} + parameters: + index: games + name: jeux + response: + status: 200 + content_type: application/json + payload: + games: + aliases: + jeux: {} + - synopsis: Get an alias from _aliases. + method: GET + path: /_alias/{name} + parameters: + name: jeux + response: + status: 200 + content_type: application/json + payload: + games: + aliases: + jeux: {} + - synopsis: Multiple alias operations. + path: /_aliases + method: POST + request_body: + payload: + actions: + - remove: + index: games + alias: jeux + - add: + index: games + alias: juegos1 + - add: + index: games + alias: juegos2 + response: + status: 200 + payload: + acknowledged: true + - synopsis: Delete an alias from _aliases. + path: /{index}/_aliases/{name} + method: DELETE + parameters: + index: games + name: juegos1 + - synopsis: Delete an alias from _alias. + path: /{index}/_alias/{name} + method: DELETE + parameters: + index: games + name: juegos2 + + diff --git a/tests/cat/aliases.yaml b/tests/cat/aliases.yaml index d589354a4..5b50563ba 100644 --- a/tests/cat/aliases.yaml +++ b/tests/cat/aliases.yaml @@ -1,6 +1,20 @@ $schema: ../../json_schemas/test_story.schema.yaml description: Test cat/aliases endpoints. +epilogues: + - path: /games + method: DELETE + status: [200, 404] +prologues: + - path: /{index} + method: PUT + parameters: + index: games + - path: /{index}/_aliases/{name} + method: PUT + parameters: + index: games + name: jeux chapters: - synopsis: Cat with a text response. path: /_cat/aliases @@ -16,4 +30,6 @@ chapters: response: status: 200 content_type: application/json - payload: [] + payload: + - alias: jeux + index: games diff --git a/tests/cat/allocation.yaml b/tests/cat/allocation.yaml new file mode 100644 index 000000000..e5d22d0a1 --- /dev/null +++ b/tests/cat/allocation.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/allocation endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/allocation + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/cluster_manager.yaml b/tests/cat/cluster_manager.yaml new file mode 100644 index 000000000..ab27df451 --- /dev/null +++ b/tests/cat/cluster_manager.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/cluster_manager endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/cluster_manager + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/count.yaml b/tests/cat/count.yaml new file mode 100644 index 000000000..e5bc876ab --- /dev/null +++ b/tests/cat/count.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/count endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/count + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/fielddata.yaml b/tests/cat/fielddata.yaml new file mode 100644 index 000000000..750f570fb --- /dev/null +++ b/tests/cat/fielddata.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/fielddata endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/fielddata + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/nodeattrs.yaml b/tests/cat/nodeattrs.yaml new file mode 100644 index 000000000..ca6332073 --- /dev/null +++ b/tests/cat/nodeattrs.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/nodeattrs endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/nodeattrs + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/nodes.yaml b/tests/cat/nodes.yaml new file mode 100644 index 000000000..432cd60e0 --- /dev/null +++ b/tests/cat/nodes.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/nodes endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/nodes + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/pending_tasks.yaml b/tests/cat/pending_tasks.yaml new file mode 100644 index 000000000..e76ad3329 --- /dev/null +++ b/tests/cat/pending_tasks.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/pending_tasks endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/pending_tasks + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/pit_segments.yaml b/tests/cat/pit_segments.yaml new file mode 100644 index 000000000..a2dbe8917 --- /dev/null +++ b/tests/cat/pit_segments.yaml @@ -0,0 +1,38 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/pit_segments endpoints. +epilogues: + - path: /games + method: DELETE + status: [200, 404] +chapters: + - synopsis: Create an index named `games` with default settings. + path: /{index} + method: PUT + parameters: + index: games + - synopsis: Create a PIT. + id: create_pit + path: /{index}/_search/point_in_time + method: POST + parameters: + index: + - games + keep_alive: 1m + output: + pit_id: "payload.pit_id" + - synopsis: Cat _all with a json response. + path: /_cat/pit_segments/_all + method: GET + parameters: + format: json + response: + status: 200 + # - synopsis: Cat pit_segments/pit_id with a json response. + # path: /_cat/pit_segments/{pit_id} + # method: GET + # parameters: + # format: json + # pit_id: ${create_pit.pit_id} + # response: + # status: 200 diff --git a/tests/cat/plugins.yaml b/tests/cat/plugins.yaml new file mode 100644 index 000000000..6da16e057 --- /dev/null +++ b/tests/cat/plugins.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/plugins endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/plugins + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/recovery.yaml b/tests/cat/recovery.yaml new file mode 100644 index 000000000..ab4a9647b --- /dev/null +++ b/tests/cat/recovery.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/recovery endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/recovery + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/repositories.yaml b/tests/cat/repositories.yaml new file mode 100644 index 000000000..910db7091 --- /dev/null +++ b/tests/cat/repositories.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/repositories endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/repositories + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/segement_replication.yaml b/tests/cat/segement_replication.yaml new file mode 100644 index 000000000..685deee06 --- /dev/null +++ b/tests/cat/segement_replication.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/segment_replication endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/segment_replication + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/segments.yaml b/tests/cat/segments.yaml new file mode 100644 index 000000000..8d46443ec --- /dev/null +++ b/tests/cat/segments.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/segments endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/segments + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/shards.yaml b/tests/cat/shards.yaml new file mode 100644 index 000000000..b63abd31a --- /dev/null +++ b/tests/cat/shards.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/shards endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/shards + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/snapshots.yaml b/tests/cat/snapshots.yaml new file mode 100644 index 000000000..5c70685ed --- /dev/null +++ b/tests/cat/snapshots.yaml @@ -0,0 +1,28 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/snapshots endpoints. +epilogues: + - path: /_snapshot/{repository} + method: DELETE + status: [200, 404] + parameters: + repository: my-fs-repository +chapters: + - synopsis: Create a snapshot repository. + path: /_snapshot/{repository} + method: PUT + parameters: + repository: my-fs-repository + request_body: + payload: + type: fs + settings: + location: "/tmp/opensearch/repo" + - synopsis: Cat with a json response. + path: /_cat/snapshots/{repository} + method: GET + parameters: + format: json + repository: my-fs-repository + response: + status: 200 diff --git a/tests/cat/tasks.yaml b/tests/cat/tasks.yaml new file mode 100644 index 000000000..dbde807f1 --- /dev/null +++ b/tests/cat/tasks.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/tasks endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/tasks + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/templates.yaml b/tests/cat/templates.yaml new file mode 100644 index 000000000..6defd6d72 --- /dev/null +++ b/tests/cat/templates.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/templates endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/templates + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/cat/thread_pool.yaml b/tests/cat/thread_pool.yaml new file mode 100644 index 000000000..8849b1f93 --- /dev/null +++ b/tests/cat/thread_pool.yaml @@ -0,0 +1,11 @@ +$schema: ../../json_schemas/test_story.schema.yaml + +description: Test cat/thread_pool endpoints. +chapters: + - synopsis: Cat with a json response. + path: /_cat/thread_pool + method: GET + parameters: + format: json + response: + status: 200 diff --git a/tests/indices/index.yaml b/tests/indices/index.yaml index 456078f4a..3ccd60aee 100644 --- a/tests/indices/index.yaml +++ b/tests/indices/index.yaml @@ -28,7 +28,7 @@ chapters: response: status: 200 - - synopsis: Create an index named `games` with default settings, + - synopsis: Create an index named `games` with default settings. path: /{index} method: PUT parameters: diff --git a/tools/src/tester/SchemaValidator.ts b/tools/src/tester/SchemaValidator.ts index c8f13e09f..9fdc0dfb6 100644 --- a/tools/src/tester/SchemaValidator.ts +++ b/tools/src/tester/SchemaValidator.ts @@ -15,6 +15,14 @@ import { type Evaluation, Result } from './types/eval.types' import { Logger } from 'Logger' import { to_json } from '../helpers' +const ADDITIONAL_KEYWORDS = [ + 'discriminator', + 'x-version-added', + 'x-version-deprecated', + 'x-version-removed', + 'x-deprecation-message' +] + export default class SchemaValidator { private readonly ajv: AJV private readonly logger: Logger @@ -23,8 +31,8 @@ export default class SchemaValidator { this.logger = logger this.ajv = new AJV({ allErrors: true, strict: true }) addFormats(this.ajv) + for (const keyword of ADDITIONAL_KEYWORDS) this.ajv.addKeyword(keyword) ajv_errors(this.ajv, { singleError: true }) - this.ajv.addKeyword('discriminator') const schemas = spec.components?.schemas ?? {} for (const key in schemas) this.ajv.addSchema(schemas[key], `#/components/schemas/${key}`) } diff --git a/tools/tests/merger/fixtures/expected.yaml b/tools/tests/merger/fixtures/expected.yaml index 3c73f80a1..aa5c6de20 100644 --- a/tools/tests/merger/fixtures/expected.yaml +++ b/tools/tests/merger/fixtures/expected.yaml @@ -98,7 +98,7 @@ components: actions:Meow: type: string animals:Animal: - oneOf: + anyOf: - $ref: '#/components/schemas/animals:Dog' - $ref: '#/components/schemas/animals:Cat' animals:Cat: diff --git a/tools/tests/merger/fixtures/spec/schemas/animals.yaml b/tools/tests/merger/fixtures/spec/schemas/animals.yaml index 28db7f11e..e20014544 100644 --- a/tools/tests/merger/fixtures/spec/schemas/animals.yaml +++ b/tools/tests/merger/fixtures/spec/schemas/animals.yaml @@ -6,7 +6,7 @@ info: components: schemas: Animal: - oneOf: + anyOf: - $ref: '#/components/schemas/Dog' - $ref: '#/components/schemas/Cat' Dog: diff --git a/tools/tests/tester/fixtures/specs/excerpt.yaml b/tools/tests/tester/fixtures/specs/excerpt.yaml index 136f08511..219ec208e 100644 --- a/tools/tests/tester/fixtures/specs/excerpt.yaml +++ b/tools/tests/tester/fixtures/specs/excerpt.yaml @@ -209,7 +209,7 @@ components: $ref: '#/components/schemas/_common:ShardStatistics' additionalProperties: false _common:Indices: - oneOf: + anyOf: - $ref: '#/components/schemas/_common:IndexName' - type: array items: