void () { READERS_MAP.put("$anchor", createFromStringValue((object, s) -> object.setId(s))); READERS_MAP.put("$id", createFromStringValue((object, s) -> object.setId(s))); READERS_MAP.put("id", createFromStringValue((object, s) -> object.setId(s))); READERS_MAP.put("$schema", createFromStringValue((object, s) -> object.setSchema(s))); READERS_MAP.put("description", createFromStringValue((object, s) -> object.setDescription(s))); // non-standard deprecation property used by VSCode READERS_MAP.put("deprecationMessage", createFromStringValue((object, s) -> object.setDeprecationMessage(s))); READERS_MAP.put(JsonSchemaObject.X_INTELLIJ_HTML_DESCRIPTION, createFromStringValue((object, s) -> object.setHtmlDescription(s))); READERS_MAP.put(JsonSchemaObject.X_INTELLIJ_LANGUAGE_INJECTION, (element, object, queue, virtualFile) -> readInjectionMetadata(element, object)); READERS_MAP.put(JsonSchemaObject.X_INTELLIJ_ENUM_METADATA, (element, object, queue, virtualFile) -> readEnumMetadata(element, object)); READERS_MAP.put(JsonSchemaObject.X_INTELLIJ_CASE_INSENSITIVE, (element, object, queue, virtualFile) -> { if (element.isBooleanLiteral()) object.setForceCaseInsensitive(getBoolean(element)); }); READERS_MAP.put("title", createFromStringValue((object, s) -> object.setTitle(s))); READERS_MAP.put("$ref", createFromStringValue((object, s) -> object.setRef(s))); READERS_MAP.put("$recursiveRef", createFromStringValue((object, s) -> { object.setRef(s); object.setRefRecursive(true); })); READERS_MAP.put("$recursiveAnchor", (element, object, queue, virtualFile) -> { if (element.isBooleanLiteral()) object.setRecursiveAnchor(true); }); READERS_MAP.put("default", createDefault()); READERS_MAP.put("example", createExampleConsumer()); READERS_MAP.put("format", createFromStringValue((object, s) -> object.setFormat(s))); READERS_MAP.put(JsonSchemaObject.DEFINITIONS, createDefinitionsConsumer()); READERS_MAP.put(JsonSchemaObject.DEFINITIONS_v9, createDefinitionsConsumer()); READERS_MAP.put(JsonSchemaObject.PROPERTIES, createPropertiesConsumer()); READERS_MAP.put("multipleOf", createFromNumber((object, i) -> object.setMultipleOf(i))); READERS_MAP.put("maximum", createFromNumber((object, i) -> object.setMaximum(i))); READERS_MAP.put("minimum", createFromNumber((object, i) -> object.setMinimum(i))); READERS_MAP.put("exclusiveMaximum", (element, object, queue, virtualFile) -> { if (element.isBooleanLiteral()) object.setExclusiveMaximum(getBoolean(element)); else if (element.isNumberLiteral()) object.setExclusiveMaximumNumber(getNumber(element)); }); READERS_MAP.put("exclusiveMinimum", (element, object, queue, virtualFile) -> { if (element.isBooleanLiteral()) object.setExclusiveMinimum(getBoolean(element)); else if (element.isNumberLiteral()) object.setExclusiveMinimumNumber(getNumber(element)); }); READERS_MAP.put("maxLength", createFromInteger((object, i) -> object.setMaxLength(i))); READERS_MAP.put("minLength", createFromInteger((object, i) -> object.setMinLength(i))); READERS_MAP.put("pattern", createFromStringValue((object, s) -> object.setPattern(s))); READERS_MAP.put(JsonSchemaObject.ADDITIONAL_ITEMS, createAdditionalItems()); READERS_MAP.put(JsonSchemaObject.ITEMS, createItems()); READERS_MAP.put("contains", createContains()); READERS_MAP.put("maxItems", createFromInteger((object, i) -> object.setMaxItems(i))); READERS_MAP.put("minItems", createFromInteger((object, i) -> object.setMinItems(i))); READERS_MAP.put("uniqueItems", (element, object, queue, virtualFile) -> { if (element.isBooleanLiteral()) object.setUniqueItems(getBoolean(element)); }); READERS_MAP.put("maxProperties", createFromInteger((object, i) -> object.setMaxProperties(i))); READERS_MAP.put("minProperties", createFromInteger((object, i) -> object.setMinProperties(i))); READERS_MAP.put("required", createRequired()); READERS_MAP.put("additionalProperties", createAdditionalProperties()); READERS_MAP.put("propertyNames", createFromObject("propertyNames", (object, schema) -> object.setPropertyNamesSchema(schema))); READERS_MAP.put("patternProperties", createPatternProperties()); READERS_MAP.put("dependencies", createDependencies()); READERS_MAP.put("enum", createEnum()); READERS_MAP.put("const", (element, object, queue, virtualFile) -> object.setEnum(ContainerUtil.createMaybeSingletonList(readEnumValue(element)))); READERS_MAP.put("type", createType()); READERS_MAP.put("allOf", createContainer((object, members) -> object.setAllOf(members))); READERS_MAP.put("anyOf", createContainer((object, members) -> object.setAnyOf(members))); READERS_MAP.put("oneOf", createContainer((object, members) -> object.setOneOf(members))); READERS_MAP.put("not", createFromObject("not", (object, schema1) -> object.setNot(schema1))); READERS_MAP.put("if", createFromObject("if", (object, schema) -> object.setIf(schema))); READERS_MAP.put("then", createFromObject("then", (object, schema) -> object.setThen(schema))); READERS_MAP.put("else", createFromObject("else", (object, schema) -> object.setElse(schema))); READERS_MAP.put("instanceof", ((element, object, queue, virtualFile) -> object.setShouldValidateAgainstJSType())); READERS_MAP.put("typeof", ((element, object, queue, virtualFile) -> object.setShouldValidateAgainstJSType())); }