From c49659bec657a68fd95fa91a33c07685d85e853a Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Mon, 15 Jul 2024 16:26:13 -0400 Subject: [PATCH] Add `strict_allow_templates` dynamic mapping option (#14555) (#14737) (#14742) * The dynamic mapping parameter supports strict_allow_templates * Modify change log * Modify skip version in yml test file * Refactor some code * Keep the old methods * change public to private * Optimize some code * Do not override toString method for Dynamic * Optimize some code and modify the changelog --------- (cherry picked from commit 6b8b3efe01a62c221f308a2e3b019d75a7f5ad8a) Signed-off-by: Gao Binlong Signed-off-by: github-actions[bot] Signed-off-by: Andriy Redko Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] Signed-off-by: Kaushal Kumar --- .../rest-api-spec/test/index/110_strict_allow_templates.yml | 4 ++-- .../test/indices.put_mapping/all_path_options.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/index/110_strict_allow_templates.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/index/110_strict_allow_templates.yml index b3899e295eb61..623cb97c37728 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/index/110_strict_allow_templates.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/index/110_strict_allow_templates.yml @@ -1,8 +1,8 @@ --- "Index documents with setting dynamic parameter to strict_allow_templates in the mapping of the index": - skip: - version: " - 2.99.99" - reason: "introduced in 3.0.0" + version: " - 2.15.99" + reason: "introduced in 2.16.0" - do: indices.create: diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/all_path_options.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/all_path_options.yml index f579891478b19..89b47fde2a72c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/all_path_options.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_mapping/all_path_options.yml @@ -163,8 +163,8 @@ setup: --- "post a mapping with setting dynamic to strict_allow_templates": - skip: - version: " - 2.99.99" - reason: "introduced in 3.0.0" + version: " - 2.15.99" + reason: "introduced in 2.16.0" - do: indices.put_mapping: index: test_index1