From 5594c30d007e73bfdd44d55dcb0f5f8bee071155 Mon Sep 17 00:00:00 2001 From: Stephen Crawford <65832608+scrawfor99@users.noreply.github.com> Date: Thu, 8 Jun 2023 12:16:54 -0400 Subject: [PATCH] Manual backport of #7933: bump com.networknt:json-schema-validator dependency from 1.0.81 to 1.0.83 (#7968) * backport schema patch Signed-off-by: Stephen Crawford * add pr number Signed-off-by: Stephen Crawford --------- Signed-off-by: Stephen Crawford --- CHANGELOG.md | 3 ++- buildSrc/build.gradle | 4 +++- .../gradle/precommit/ValidateJsonAgainstSchemaTask.java | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e248b287c9cb5..b5467100fda59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bump `netty` from 4.1.91.Final to 4.1.93.Final ([#7901](https://github.com/opensearch-project/OpenSearch/pull/7901)) - Bump `com.amazonaws` 1.12.270 to `software.amazon.awssdk` 2.20.55 ([7372](https://github.com/opensearch-project/OpenSearch/pull/7372/)) - Add `org.reactivestreams` 1.0.4 ([7372](https://github.com/opensearch-project/OpenSearch/pull/7372/)) +- Bump `com.networknt:json-schema-validator` from 1.0.81 to 1.0.83 ([7968](https://github.com/opensearch-project/OpenSearch/pull/7968)) ### Changed - Replace jboss-annotations-api_1.2_spec with jakarta.annotation-api ([#7836](https://github.com/opensearch-project/OpenSearch/pull/7836)) @@ -33,7 +34,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Removed ### Fixed -- Fixing error: adding a new/forgotten parameter to the configuration for checking the config on startup in plugins/repository-s3 #7924 +- Fixing error: adding a new/forgotten parameter to the configuration for checking the config on startup in plugins/repository-s3 #7924 ### Security diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index dca358061515e..0aec720d747f5 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -119,7 +119,9 @@ dependencies { api 'com.avast.gradle:gradle-docker-compose-plugin:0.16.11' api "org.yaml:snakeyaml:${props.getProperty('snakeyaml')}" api 'org.apache.maven:maven-model:3.9.2' - api 'com.networknt:json-schema-validator:1.0.81' + api 'com.networknt:json-schema-validator:1.0.83' + api 'org.jruby.jcodings:jcodings:1.0.58' + api 'org.jruby.joni:joni:2.1.48' api "com.fasterxml.jackson.core:jackson-databind:${props.getProperty('jackson_databind')}" api "org.ajoberstar.grgit:grgit-core:5.2.0" diff --git a/buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java b/buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java index ff28197feb02b..1ecc712ab27ca 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/precommit/ValidateJsonAgainstSchemaTask.java @@ -103,6 +103,7 @@ public void validate(InputChanges inputChanges) throws IOException { File jsonSchemaOnDisk = getJsonSchema(); getLogger().debug("JSON schema : [{}]", jsonSchemaOnDisk.getAbsolutePath()); SchemaValidatorsConfig config = new SchemaValidatorsConfig(); + config.setEcma262Validator(true); JsonSchemaFactory factory = JsonSchemaFactory.getInstance(SpecVersion.VersionFlag.V7); JsonSchema jsonSchema = factory.getSchema(mapper.readTree(jsonSchemaOnDisk), config); Map> errors = new LinkedHashMap<>();