@Test public void discriminatedUnionSelectorMustBeString() { Exception e = assertThrows(InvalidSchemaException.class, () -> newDocument() .rootSchema(object( field("httpPipeline", object( field("type", integer()), field("config", union("type")) )) ) ).build()); assertThat(e.getMessage(), matchesPattern("Discriminator attribute 'type' must be a string \\(but it is not\\)")); }
public static Builder newDocument() { return new Builder(); }
DocumentFormat { public static Builder newDocument() { return new Builder(); } }
DocumentFormat { public static Builder newDocument() { return new Builder(); } private  DocumentFormat(Builder builder); }
DocumentFormat { public static Builder newDocument() { return new Builder(); } private  DocumentFormat(Builder builder); void validateObject(JsonNode tree); static Builder newDocument(); }
DocumentFormat { public static Builder newDocument() { return new Builder(); } private  DocumentFormat(Builder builder); void validateObject(JsonNode tree); static Builder newDocument();  }