void () { final List<String> subSchemas = new ArrayList<>(); subSchemas.add("{\"type\": \"string\", \"enum\": [\"a\", \"b\"]}"); subSchemas.add("{\"type\": \"string\", \"enum\": [\"a\", \"c\"]}"); @Language("JSON") final String schema = schema("{\"anyOf\": [" + StringUtil.join(subSchemas, ", ") + "]}"); doTest(schema, "prop: b"); doTest(schema, "prop: c"); doTest(schema, "prop: a"); doTest(schema, "prop: <warning descr=\"Schema validation: Value should be one of: \\\"a\\\", \\\"b\\\", \\\"c\\\"\">d</warning>"); }