From f65be65cdbbcd62cc237fb6b8d24ab732547e638 Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 9 Sep 2024 08:21:21 -0400 Subject: [PATCH 1/3] Separated merger and tester fixtures. Signed-off-by: dblock --- tools/tests/merger/OpenApiMerger.test.ts | 4 +- .../merger/OpenApiVersionExtractor.test.ts | 6 +- .../{ => opensearch}/expected_1.3.yaml | 0 .../{ => opensearch}/expected_2.0.yaml | 0 .../merger/{ => animals}/expected.yaml | 0 .../animals}/_global_parameters.yaml | 0 .../{spec => specs/animals}/_info.yaml | 0 .../animals}/_superseded_operations.yaml | 0 .../animals}/namespaces/indices.yaml | 0 .../animals}/namespaces/shelter.yaml | 0 .../animals}/schemas/actions.yaml | 0 .../animals}/schemas/animals.yaml | 0 .../specs/opensearch/_global_parameters.yaml | 4 + .../fixtures/specs/opensearch/_info.yaml | 6 + .../opensearch/_superseded_operations.yaml | 1 + .../namespaces/cluster_manager.yaml | 17 +++ .../specs/opensearch/namespaces/index.yaml | 109 ++++++++++++++++++ .../specs/opensearch/namespaces/nodes.yaml | 90 +++++++++++++++ .../specs/opensearch/schemas/_common.yaml | 18 +++ 19 files changed, 250 insertions(+), 5 deletions(-) rename tools/tests/merger/fixtures/extractor/{ => opensearch}/expected_1.3.yaml (100%) rename tools/tests/merger/fixtures/extractor/{ => opensearch}/expected_2.0.yaml (100%) rename tools/tests/merger/fixtures/merger/{ => animals}/expected.yaml (100%) rename tools/tests/merger/fixtures/{spec => specs/animals}/_global_parameters.yaml (100%) rename tools/tests/merger/fixtures/{spec => specs/animals}/_info.yaml (100%) rename tools/tests/merger/fixtures/{spec => specs/animals}/_superseded_operations.yaml (100%) rename tools/tests/merger/fixtures/{spec => specs/animals}/namespaces/indices.yaml (100%) rename tools/tests/merger/fixtures/{spec => specs/animals}/namespaces/shelter.yaml (100%) rename tools/tests/merger/fixtures/{spec => specs/animals}/schemas/actions.yaml (100%) rename tools/tests/merger/fixtures/{spec => specs/animals}/schemas/animals.yaml (100%) create mode 100644 tools/tests/merger/fixtures/specs/opensearch/_global_parameters.yaml create mode 100644 tools/tests/merger/fixtures/specs/opensearch/_info.yaml create mode 100644 tools/tests/merger/fixtures/specs/opensearch/_superseded_operations.yaml create mode 100644 tools/tests/merger/fixtures/specs/opensearch/namespaces/cluster_manager.yaml create mode 100644 tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml create mode 100644 tools/tests/merger/fixtures/specs/opensearch/namespaces/nodes.yaml create mode 100644 tools/tests/merger/fixtures/specs/opensearch/schemas/_common.yaml diff --git a/tools/tests/merger/OpenApiMerger.test.ts b/tools/tests/merger/OpenApiMerger.test.ts index 057866dd2..d0beb2bb0 100644 --- a/tools/tests/merger/OpenApiMerger.test.ts +++ b/tools/tests/merger/OpenApiMerger.test.ts @@ -16,7 +16,7 @@ describe('OpenApiMerger', () => { describe('defaults', () => { beforeEach(() => { - merger = new OpenApiMerger('./tools/tests/merger/fixtures/spec/') + merger = new OpenApiMerger('./tools/tests/merger/fixtures/specs/animals') }) describe('merge()', () => { @@ -45,7 +45,7 @@ describe('OpenApiMerger', () => { test('writes a spec', () => { merger.write_to(filename) - expect(fs.readFileSync('./tools/tests/merger/fixtures/merger/expected.yaml', 'utf8')) + expect(fs.readFileSync('./tools/tests/merger/fixtures/merger/animals/expected.yaml', 'utf8')) .toEqual(fs.readFileSync(filename, 'utf8')) }) }) diff --git a/tools/tests/merger/OpenApiVersionExtractor.test.ts b/tools/tests/merger/OpenApiVersionExtractor.test.ts index ca3e14eb0..5195bd748 100644 --- a/tools/tests/merger/OpenApiVersionExtractor.test.ts +++ b/tools/tests/merger/OpenApiVersionExtractor.test.ts @@ -14,7 +14,7 @@ import fs from 'fs' import tmp from 'tmp' describe('extract() from a merged API spec', () => { - const merger = new OpenApiMerger('tools/tests/tester/fixtures/specs/complete') + const merger = new OpenApiMerger('tools/tests/merger/fixtures/specs/opensearch') describe('1.3', () => { const extractor = new OpenApiVersionExtractor(merger.spec(), '1.3', 'ignore') @@ -35,7 +35,7 @@ describe('extract() from a merged API spec', () => { test('writes a spec', () => { extractor.write_to(filename) - expect(fs.readFileSync('./tools/tests/merger/fixtures/extractor/expected_1.3.yaml', 'utf8')) + expect(fs.readFileSync('./tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml', 'utf8')) .toEqual(fs.readFileSync(filename, 'utf8')) }) }) @@ -74,7 +74,7 @@ describe('extract() from a merged API spec', () => { test('writes a spec', () => { extractor.write_to(filename) - expect(fs.readFileSync('./tools/tests/merger/fixtures/extractor/expected_2.0.yaml', 'utf8')) + expect(fs.readFileSync('./tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml', 'utf8')) .toEqual(fs.readFileSync(filename, 'utf8')) }) }) diff --git a/tools/tests/merger/fixtures/extractor/expected_1.3.yaml b/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml similarity index 100% rename from tools/tests/merger/fixtures/extractor/expected_1.3.yaml rename to tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml diff --git a/tools/tests/merger/fixtures/extractor/expected_2.0.yaml b/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml similarity index 100% rename from tools/tests/merger/fixtures/extractor/expected_2.0.yaml rename to tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml diff --git a/tools/tests/merger/fixtures/merger/expected.yaml b/tools/tests/merger/fixtures/merger/animals/expected.yaml similarity index 100% rename from tools/tests/merger/fixtures/merger/expected.yaml rename to tools/tests/merger/fixtures/merger/animals/expected.yaml diff --git a/tools/tests/merger/fixtures/spec/_global_parameters.yaml b/tools/tests/merger/fixtures/specs/animals/_global_parameters.yaml similarity index 100% rename from tools/tests/merger/fixtures/spec/_global_parameters.yaml rename to tools/tests/merger/fixtures/specs/animals/_global_parameters.yaml diff --git a/tools/tests/merger/fixtures/spec/_info.yaml b/tools/tests/merger/fixtures/specs/animals/_info.yaml similarity index 100% rename from tools/tests/merger/fixtures/spec/_info.yaml rename to tools/tests/merger/fixtures/specs/animals/_info.yaml diff --git a/tools/tests/merger/fixtures/spec/_superseded_operations.yaml b/tools/tests/merger/fixtures/specs/animals/_superseded_operations.yaml similarity index 100% rename from tools/tests/merger/fixtures/spec/_superseded_operations.yaml rename to tools/tests/merger/fixtures/specs/animals/_superseded_operations.yaml diff --git a/tools/tests/merger/fixtures/spec/namespaces/indices.yaml b/tools/tests/merger/fixtures/specs/animals/namespaces/indices.yaml similarity index 100% rename from tools/tests/merger/fixtures/spec/namespaces/indices.yaml rename to tools/tests/merger/fixtures/specs/animals/namespaces/indices.yaml diff --git a/tools/tests/merger/fixtures/spec/namespaces/shelter.yaml b/tools/tests/merger/fixtures/specs/animals/namespaces/shelter.yaml similarity index 100% rename from tools/tests/merger/fixtures/spec/namespaces/shelter.yaml rename to tools/tests/merger/fixtures/specs/animals/namespaces/shelter.yaml diff --git a/tools/tests/merger/fixtures/spec/schemas/actions.yaml b/tools/tests/merger/fixtures/specs/animals/schemas/actions.yaml similarity index 100% rename from tools/tests/merger/fixtures/spec/schemas/actions.yaml rename to tools/tests/merger/fixtures/specs/animals/schemas/actions.yaml diff --git a/tools/tests/merger/fixtures/spec/schemas/animals.yaml b/tools/tests/merger/fixtures/specs/animals/schemas/animals.yaml similarity index 100% rename from tools/tests/merger/fixtures/spec/schemas/animals.yaml rename to tools/tests/merger/fixtures/specs/animals/schemas/animals.yaml diff --git a/tools/tests/merger/fixtures/specs/opensearch/_global_parameters.yaml b/tools/tests/merger/fixtures/specs/opensearch/_global_parameters.yaml new file mode 100644 index 000000000..2355a0c60 --- /dev/null +++ b/tools/tests/merger/fixtures/specs/opensearch/_global_parameters.yaml @@ -0,0 +1,4 @@ +openapi: 3.1.0 +info: + title: '' + version: '' diff --git a/tools/tests/merger/fixtures/specs/opensearch/_info.yaml b/tools/tests/merger/fixtures/specs/opensearch/_info.yaml new file mode 100644 index 000000000..acbf44f19 --- /dev/null +++ b/tools/tests/merger/fixtures/specs/opensearch/_info.yaml @@ -0,0 +1,6 @@ +$schema: should-be-ignored + +title: OpenSearch API +description: OpenSearch API +version: 1.0.0 +x-api-version: 1.2.3 \ No newline at end of file diff --git a/tools/tests/merger/fixtures/specs/opensearch/_superseded_operations.yaml b/tools/tests/merger/fixtures/specs/opensearch/_superseded_operations.yaml new file mode 100644 index 000000000..a5d5e9940 --- /dev/null +++ b/tools/tests/merger/fixtures/specs/opensearch/_superseded_operations.yaml @@ -0,0 +1 @@ +$schema: should-be-ignored \ No newline at end of file diff --git a/tools/tests/merger/fixtures/specs/opensearch/namespaces/cluster_manager.yaml b/tools/tests/merger/fixtures/specs/opensearch/namespaces/cluster_manager.yaml new file mode 100644 index 000000000..680169ad6 --- /dev/null +++ b/tools/tests/merger/fixtures/specs/opensearch/namespaces/cluster_manager.yaml @@ -0,0 +1,17 @@ +openapi: 3.1.0 +info: + title: OpenSearch API + description: OpenSearch API + version: 1.0.0 +paths: + /cluster_manager: + get: + operationId: cluster_manager.0 + x-version-added: '2.0' + post: + operationId: cluster_manager.0 + x-version-added: '2.0' +components: + requestBodies: [] + parameters: [] + responses: [] diff --git a/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml b/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml new file mode 100644 index 000000000..0c0a09234 --- /dev/null +++ b/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml @@ -0,0 +1,109 @@ +openapi: 3.1.0 +info: + title: OpenSearch API + description: OpenSearch API + version: 1.0.0 +paths: + /index: + get: + operationId: get.0 + responses: + '200': + $ref: '#/components/responses/info@200' + '201': + $ref: '#/components/responses/info@201' + '404': + $ref: '#/components/responses/info@404' + added-2.0: + $ref: '#/components/responses/info@added-2.0' + x-version-added: '2.0' + removed-2.0: + $ref: '#/components/responses/info@removed-2.0' + x-version-removed: '2.0' + added-1.3-removed-2.0: + $ref: '#/components/responses/info@added-1.3-removed-2.0' + added-2.1: + $ref: '#/components/responses/info@added-2.1' + '500': + $ref: '#/components/responses/info@500' + '503': + $ref: '#/components/responses/info@503' + distributed-included-all: + $ref: '#/components/responses/info@distributed-all' + x-distributions-included: + - amazon-managed + - amazon-serverless + - opensearch.org + distributed-included-amazon-managed: + $ref: '#/components/responses/info@distributed-amazon-managed' + x-distributions-included: + - amazon-managed + distributed-excluded-amazon-serverless: + $ref: '#/components/responses/info@distributed-all' + x-distributions-excluded: + - amazon-serverless +components: + responses: + info@200: + content: + application/json: + schema: + type: object + properties: + _type: + $ref: '../schemas/_common.yaml#/components/schemas/Type' + tagline: + type: string + required: + - tagline + info@201: + content: + application/json: + schema: + type: object + properties: + tagline: + type: string + required: + - tagline + unevaluatedProperties: true + info@404: + content: + application/json: + schema: + type: object + properties: + tagline: + type: string + required: + - tagline + unevaluatedProperties: + type: object + info@added-2.0: + description: Added in 2.0 via attribute next to ref. + info@removed-2.0: + description: Removed in 2.0 via attribute next to ref. + info@added-1.3-removed-2.0: + description: Added in 1.3, removed in 2.0 via attribute in response body. + x-version-added: '1.3' + x-version-removed: '2.0' + info@added-2.1: + description: Added in 2.1 via attribute in response body. + x-version-added: '2.1' + info@distributed-amazon-managed: + description: Distributed only in AOS. + info@distributed-all: + description: Distributed in opensearch.org, AOS and AOSS. + info@500: + content: + application/json: + schema: + type: object + properties: + tagline: + type: string + info@503: + content: + application/json: + schema: + type: object \ No newline at end of file diff --git a/tools/tests/merger/fixtures/specs/opensearch/namespaces/nodes.yaml b/tools/tests/merger/fixtures/specs/opensearch/namespaces/nodes.yaml new file mode 100644 index 000000000..2b39054ea --- /dev/null +++ b/tools/tests/merger/fixtures/specs/opensearch/namespaces/nodes.yaml @@ -0,0 +1,90 @@ +openapi: 3.1.0 +info: + title: OpenSearch API + description: OpenSearch API + version: 1.0.0 +paths: + /nodes: + get: + operationId: nodes.0 + responses: + '200': + $ref: '#/components/responses/nodes.info@200' + /_nodes/{id}: + get: + operationId: nodes.info.1 + x-operation-group: nodes.info + x-version-added: '1.0' + description: Returns information about nodes in the cluster. + parameters: + - $ref: '#/components/parameters/nodes.info::path.id' + responses: + '200': + $ref: '#/components/responses/nodes.info@200' + post: + operationId: nodes.info.1 + x-operation-group: nodes.info + x-version-added: '2.0' + description: Returns information about nodes in the cluster. + parameters: + - $ref: '#/components/parameters/nodes.info::path.id' + - $ref: '#/components/parameters/nodes.info::query.flag' + requestBody: + $ref: '#/components/requestBodies/nodes.info' + responses: + '201': + $ref: '#/components/responses/nodes.info@201' + '200': + $ref: '#/components/responses/nodes.info@200' +components: + requestBodies: + nodes.info: + content: + application/json: + schema: + type: object + properties: + _all: + type: boolean + ids: + $ref: '../schemas/_common.yaml#/components/schemas/Ids' + x-version-added: '2.0' + description: Nodes options. + parameters: + nodes.info::path.id: + in: path + name: id + description: Node ID. + required: true + schema: + type: string + nodes.info::query.flag: + in: query + name: flag + description: Flag. + required: false + schema: + type: boolean + default: false + nodes.info::query.new: + in: query + name: new + description: New option added in 2.1. + required: false + x-version-added: '2.1' + schema: + type: array + default: false + responses: + nodes.info@200: + description: All nodes. + content: + application/json: + schema: + type: object + nodes.info@201: + description: All nodes. + content: + application/json: + schema: + type: object diff --git a/tools/tests/merger/fixtures/specs/opensearch/schemas/_common.yaml b/tools/tests/merger/fixtures/specs/opensearch/schemas/_common.yaml new file mode 100644 index 000000000..c3a4e41f3 --- /dev/null +++ b/tools/tests/merger/fixtures/specs/opensearch/schemas/_common.yaml @@ -0,0 +1,18 @@ +openapi: 3.1.0 +info: + title: Schemas of _common category + description: Schemas of _common category + version: 1.0.0 +components: + schemas: + Type: + type: string + x-version-removed: '2.0' + OldId: + type: string + Ids: + oneOf: + - $ref: '#/components/schemas/OldId' + - type: array + items: + $ref: '#/components/schemas/Ids' From 6b641b418fc7f8f217c55cbe07389839ac53d481 Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 9 Sep 2024 09:07:30 -0400 Subject: [PATCH 2/3] Fix: delete leftoever undefined array items. Signed-off-by: dblock --- tools/src/helpers.ts | 4 ++++ tools/tests/helpers.test.ts | 19 +++++++++++++++++++ .../merger/OpenApiVersionExtractor.test.ts | 6 +++--- .../extractor/opensearch/expected_1.3.yaml | 10 ++++++++++ .../extractor/opensearch/expected_2.0.yaml | 7 +++++++ .../specs/opensearch/namespaces/index.yaml | 8 ++++++++ 6 files changed, 51 insertions(+), 3 deletions(-) diff --git a/tools/src/helpers.ts b/tools/src/helpers.ts index 97cee98f3..4f1b346ef 100644 --- a/tools/src/helpers.ts +++ b/tools/src/helpers.ts @@ -67,11 +67,15 @@ export function sort_array_by_keys (values: any[], priorities: string[] = []): s export function delete_matching_keys(obj: any, condition: (obj: any) => boolean): void { for (const key in obj) { var item = obj[key] + if (_.isObject(item)) { if (condition(item)) { delete obj[key] } else { delete_matching_keys(item, condition) + if (_.isArray(item)) { + obj[key] = _.compact(item) + } } } } diff --git a/tools/tests/helpers.test.ts b/tools/tests/helpers.test.ts index 54773d226..f91dde573 100644 --- a/tools/tests/helpers.test.ts +++ b/tools/tests/helpers.test.ts @@ -122,6 +122,25 @@ describe('helpers', () => { expect(obj).toStrictEqual({ foo: [{}] }) }) }) + + describe('an object with an array where some items are removed', () => { + var obj: object + + beforeEach(() => { + obj = { + foo: [ + { value: 1 }, + { value: 1 }, + { value: 2 } + ] + } + }) + + test('removes matching values', () => { + delete_matching_keys(obj, (_item: any) => _item.value == 1) + expect(obj).toStrictEqual({ foo: [{ value: 2 }] }) + }) + }) }) describe('find_refs', () => { diff --git a/tools/tests/merger/OpenApiVersionExtractor.test.ts b/tools/tests/merger/OpenApiVersionExtractor.test.ts index 5195bd748..ab0dc97e9 100644 --- a/tools/tests/merger/OpenApiVersionExtractor.test.ts +++ b/tools/tests/merger/OpenApiVersionExtractor.test.ts @@ -43,7 +43,7 @@ describe('extract() from a merged API spec', () => { test('has matching responses', () => { const spec = extractor.extract() expect(_.keys(spec.paths['/index']?.get?.responses)).toEqual([ - '200', '201', '404', '500', '503', 'removed-2.0', 'added-1.3-removed-2.0', 'distributed-excluded-amazon-serverless' + '200', '201', '404', '500', '503', 'removed-2.0', 'removed-2.0-refs', 'added-1.3-removed-2.0', 'distributed-excluded-amazon-serverless' ]) }) }) @@ -54,7 +54,7 @@ describe('extract() from a merged API spec', () => { test('has matching responses', () => { const spec = extractor.extract() expect(_.keys(spec.paths['/index']?.get?.responses)).toEqual([ - '200', '201', '404', '500', '503', 'added-2.0', 'distributed-excluded-amazon-serverless' + '200', '201', '404', '500', '503', 'added-2.0', 'removed-2.0-refs', 'distributed-excluded-amazon-serverless' ]) }) @@ -86,7 +86,7 @@ describe('extract() from a merged API spec', () => { test('has matching responses', () => { const spec = extractor.extract() expect(_.keys(spec.paths['/index']?.get?.responses)).toEqual([ - '200', '201', '404', '500', '503', 'added-2.0', 'added-2.1', 'distributed-excluded-amazon-serverless' + '200', '201', '404', '500', '503', 'added-2.0', 'removed-2.0-refs', 'added-2.1', 'distributed-excluded-amazon-serverless' ]) }) }) diff --git a/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml b/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml index a4497ccbb..24d08aa4d 100644 --- a/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml +++ b/tools/tests/merger/fixtures/extractor/opensearch/expected_1.3.yaml @@ -33,6 +33,8 @@ paths: removed-2.0: $ref: '#/components/responses/info@removed-2.0' x-version-removed: '2.0' + removed-2.0-refs: + $ref: '#/components/responses/info@removed-2.0-refs' added-1.3-removed-2.0: $ref: '#/components/responses/info@added-1.3-removed-2.0' distributed-excluded-amazon-serverless: @@ -114,6 +116,12 @@ components: description: Distributed in opensearch.org, AOS and AOSS. info@removed-2.0: description: Removed in 2.0 via attribute next to ref. + info@removed-2.0-refs: + description: One of the ref values removed in 2.0. + schema: + oneOf: + - $ref: '#/components/schemas/_common:Type' + - $ref: '#/components/schemas/_common:OldId' nodes.info@200: description: All nodes. content: @@ -121,6 +129,8 @@ components: schema: type: object schemas: + _common:OldId: + type: string _common:Type: type: string x-version-removed: '2.0' diff --git a/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml b/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml index c684b7af9..a824f4787 100644 --- a/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml +++ b/tools/tests/merger/fixtures/extractor/opensearch/expected_2.0.yaml @@ -57,6 +57,8 @@ paths: added-2.0: $ref: '#/components/responses/info@added-2.0' x-version-added: '2.0' + removed-2.0-refs: + $ref: '#/components/responses/info@removed-2.0-refs' distributed-excluded-amazon-serverless: $ref: '#/components/responses/info@distributed-all' x-distributions-excluded: @@ -150,6 +152,11 @@ components: description: Added in 2.0 via attribute next to ref. info@distributed-all: description: Distributed in opensearch.org, AOS and AOSS. + info@removed-2.0-refs: + description: One of the ref values removed in 2.0. + schema: + oneOf: + - $ref: '#/components/schemas/_common:OldId' nodes.info@200: description: All nodes. content: diff --git a/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml b/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml index 0c0a09234..f03058350 100644 --- a/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml +++ b/tools/tests/merger/fixtures/specs/opensearch/namespaces/index.yaml @@ -20,6 +20,8 @@ paths: removed-2.0: $ref: '#/components/responses/info@removed-2.0' x-version-removed: '2.0' + removed-2.0-refs: + $ref: '#/components/responses/info@removed-2.0-refs' added-1.3-removed-2.0: $ref: '#/components/responses/info@added-1.3-removed-2.0' added-2.1: @@ -83,6 +85,12 @@ components: description: Added in 2.0 via attribute next to ref. info@removed-2.0: description: Removed in 2.0 via attribute next to ref. + info@removed-2.0-refs: + description: One of the ref values removed in 2.0. + schema: + oneOf: + - $ref: '../schemas/_common.yaml#/components/schemas/Type' + - $ref: '../schemas/_common.yaml#/components/schemas/OldId' info@added-1.3-removed-2.0: description: Added in 1.3, removed in 2.0 via attribute in response body. x-version-added: '1.3' From cf2ac23d12131cf78e42f6257b0a249e93d9539e Mon Sep 17 00:00:00 2001 From: dblock Date: Mon, 9 Sep 2024 12:19:29 -0400 Subject: [PATCH 3/3] Re-add x-version-added for geo types. Signed-off-by: dblock --- spec/schemas/_common.mapping.yaml | 4 ++-- spec/schemas/_common.query_dsl.yaml | 2 +- spec/schemas/_common.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/schemas/_common.mapping.yaml b/spec/schemas/_common.mapping.yaml index 14edfcebe..a26c15e61 100644 --- a/spec/schemas/_common.mapping.yaml +++ b/spec/schemas/_common.mapping.yaml @@ -934,7 +934,7 @@ components: - recursive - term XyPointProperty: - # x-version-added: 2.4 + x-version-added: '2.4' allOf: - $ref: '#/components/schemas/DocValuesPropertyBase' - type: object @@ -952,7 +952,7 @@ components: required: - type XyShapeProperty: - # x-version-added: 2.4 + x-version-added: '2.4' allOf: - $ref: '#/components/schemas/DocValuesPropertyBase' - type: object diff --git a/spec/schemas/_common.query_dsl.yaml b/spec/schemas/_common.query_dsl.yaml index 51dead39c..c532ef260 100644 --- a/spec/schemas/_common.query_dsl.yaml +++ b/spec/schemas/_common.query_dsl.yaml @@ -2001,7 +2001,7 @@ components: required: - shape XyShapeQuery: - x-version-added: 2.4 + x-version-added: '2.4' allOf: - $ref: '#/components/schemas/QueryBase' - type: object diff --git a/spec/schemas/_common.yaml b/spec/schemas/_common.yaml index 3c7c8c6aa..22c70dbfa 100644 --- a/spec/schemas/_common.yaml +++ b/spec/schemas/_common.yaml @@ -134,7 +134,7 @@ components: required: - wkt XyLocation: - x-version-added: 2.4 + x-version-added: '2.4' description: |- A two-dimensional Cartesian point specified by x and y coordinates. It can be represented in various ways: - as a `{x, y}` object