void () { final List<String> subSchemas = new ArrayList<>(); subSchemas.add(""" {"type": "string", "enum": [ "off", "warn", "error" ]}"""); subSchemas.add("{\"type\": \"integer\"}"); @Language("JSON") final String schema = schema("{\"oneOf\": [" + StringUtil.join(subSchemas, ", ") + "]}"); doTest(schema, "{\"prop\": \"off\"}"); doTest(schema, "{\"prop\": 12}"); doTest(schema, "{\"prop\": <warning descr=\"Value should be one of: \\\"off\\\", \\\"warn\\\", \\\"error\\\"\">\"wrong\"</warning>}"); }