diff --git a/platform-core/schema-validator/src/main/java/org/sunbird/schema/impl/BaseSchemaValidator.java b/platform-core/schema-validator/src/main/java/org/sunbird/schema/impl/BaseSchemaValidator.java index d4f5886535fc18a961849eb5f87d41407ed0ab51..05cc77267d142d7799bb5baaf6034fd0b67aef2b 100644 --- a/platform-core/schema-validator/src/main/java/org/sunbird/schema/impl/BaseSchemaValidator.java +++ b/platform-core/schema-validator/src/main/java/org/sunbird/schema/impl/BaseSchemaValidator.java @@ -19,6 +19,7 @@ import org.sunbird.schema.dto.ValidationResult; import javax.json.JsonReader; import javax.json.JsonReaderFactory; +import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -68,8 +69,9 @@ public abstract class BaseSchemaValidator implements ISchemaValidator { * @param stream the InputStream for the schema. * @return the read schema. */ - protected JsonSchema readSchema(InputStream stream) { - try (JsonSchemaReader reader = schemaReaderFactory.createSchemaReader(stream)) { + protected JsonSchema readSchema(InputStream stream) throws IOException { byte[] data = stream.readAllBytes(); + ByteArrayInputStream bis = new ByteArrayInputStream(data); + try (JsonSchemaReader reader = schemaReaderFactory.createSchemaReader(bis)) { return reader.read(); } } diff --git a/schemas/content/1.0/config.json b/schemas/content/1.0/config.json index cff222330ae25adf1be056abf9346c75a794d6b1..0f0e7d02fd56d98c9cdcf214ae10851fdb9e8610 100644 --- a/schemas/content/1.0/config.json +++ b/schemas/content/1.0/config.json @@ -73,8 +73,8 @@ "version": "enable", "versionCheckMode": "ON", "frameworkCategories": ["board","medium","subject","gradeLevel","difficultyLevel","topic", "subDomains", "subjectCodes"], - "orgFrameworkTerms": ["boardIds", "gradeLevelIds", "subjectIds", "mediumIds", "topicsIds"], - "targetFrameworkTerms": ["targetFWIds", "targetBoardIds", "targetGradeLevelIds", "targetSubjectIds", "targetMediumIds", "targetTopicIds"], + "orgFrameworkTerms": ["boardIds", "gradeLevelIds", "subjectIds", "mediumIds", "topicsIds","difficultyLevelIds"], + "targetFrameworkTerms": ["targetFWIds", "targetBoardIds", "targetGradeLevelIds", "targetSubjectIds", "targetMediumIds", "targetTopicIds","targetDifficultyLevelIds"], "edge": { "properties": { "license": "License" diff --git a/schemas/content/1.0/schema.json b/schemas/content/1.0/schema.json index 9a0728d6bcfa7b6f92ab3e571ed73beec51d2f7e..8764343f456dcc5a2008579bd2a9243db77ced06 100644 --- a/schemas/content/1.0/schema.json +++ b/schemas/content/1.0/schema.json @@ -148,7 +148,7 @@ }, "compatibilityLevel": { "type": "number", - "default": 1 + "default": 2 }, "minGenieVersion": { "type": "string" @@ -1280,6 +1280,12 @@ "type": "string" } }, + "difficultyLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, "targetFWIds":{ "type": "array", "items": { @@ -1316,6 +1322,12 @@ "type": "string" } }, + "targetDifficultyLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, "maxAttempts": { "type": "number" }, @@ -1355,6 +1367,12 @@ "type": "string" } }, + "se_difficultyLevelIds": { + "type": "array", + "items": { + "type": "string" + } + }, "se_boards":{ "type": "array", "items": { @@ -1385,6 +1403,12 @@ "type": "string" } }, + "se_difficultyLevels": { + "type": "array", + "items": { + "type": "string" + } + }, "transcripts": { "type": "array", "items": {