void () { @Language("JSON") String schema = """ { "if": { "properties": { "a": { "type": "string" } }, "required": ["a"] }, "then": { "properties": { "b": { "type": "number" } }, "required": ["b"] }, "else": { "properties": { "c": { "type": "boolean" } }, "required": ["c"] } }"""; doTest(schema, "<warning>{}</warning>"); doTest(schema, "{\"c\": <warning>5</warning>}"); doTest(schema, "{\"c\": true}"); doTest(schema, "{<warning descr=\"Missing required property 'c'\" textAttributesKey=\"WARNING_ATTRIBUTES\">\"a\": 5</warning>, \"b\": 5}"); doTest(schema, "{\"a\": 5, \"c\": <warning>5</warning>}"); doTest(schema, "{\"a\": 5, \"c\": true}"); doTest(schema, "{<warning descr=\"Missing required property 'b'\" textAttributesKey=\"WARNING_ATTRIBUTES\">\"a\": \"a\"</warning>, \"c\": true}"); doTest(schema, "{\"a\": \"a\", \"b\": <warning>true</warning>}"); doTest(schema, "{\"a\": \"a\", \"b\": 5}"); }