@Test(expected = InvalidPiiAnnotationException.class) public void invalidPiiProperty() throws Exception { Schema schema = SchemaBuilder .record("r") .fields() .name("f") .prop(SENSITIVITY, PII) .type(SchemaBuilder.builder().map().values().stringType()) .noDefault() .endRecord(); DataHighwaySchemaValidator.validate(schema, DISALLOW_NON_NULLABLE_UNIONS); }
public static void validate(Schema schema, UnionRule unionRule) throws SchemaValidationException { validateIsRecord(schema); validateDoesNotContainReservedColumnName(schema); validateObfuscationAnnotations(schema); validateLogicalTypes(schema); SchemaValidator.validate(schema); if (DISALLOW_NON_NULLABLE_UNIONS == unionRule) { validateNonNullableUnions(schema); } }
DataHighwaySchemaValidator { public static void validate(Schema schema, UnionRule unionRule) throws SchemaValidationException { validateIsRecord(schema); validateDoesNotContainReservedColumnName(schema); validateObfuscationAnnotations(schema); validateLogicalTypes(schema); SchemaValidator.validate(schema); if (DISALLOW_NON_NULLABLE_UNIONS == unionRule) { validateNonNullableUnions(schema); } } }
DataHighwaySchemaValidator { public static void validate(Schema schema, UnionRule unionRule) throws SchemaValidationException { validateIsRecord(schema); validateDoesNotContainReservedColumnName(schema); validateObfuscationAnnotations(schema); validateLogicalTypes(schema); SchemaValidator.validate(schema); if (DISALLOW_NON_NULLABLE_UNIONS == unionRule) { validateNonNullableUnions(schema); } } private  DataHighwaySchemaValidator(); }
DataHighwaySchemaValidator { public static void validate(Schema schema, UnionRule unionRule) throws SchemaValidationException { validateIsRecord(schema); validateDoesNotContainReservedColumnName(schema); validateObfuscationAnnotations(schema); validateLogicalTypes(schema); SchemaValidator.validate(schema); if (DISALLOW_NON_NULLABLE_UNIONS == unionRule) { validateNonNullableUnions(schema); } } private  DataHighwaySchemaValidator(); static boolean isValid(Schema schema, UnionRule unionRule); static void validate(Schema schema, UnionRule unionRule); }
DataHighwaySchemaValidator { public static void validate(Schema schema, UnionRule unionRule) throws SchemaValidationException { validateIsRecord(schema); validateDoesNotContainReservedColumnName(schema); validateObfuscationAnnotations(schema); validateLogicalTypes(schema); SchemaValidator.validate(schema); if (DISALLOW_NON_NULLABLE_UNIONS == unionRule) { validateNonNullableUnions(schema); } } private  DataHighwaySchemaValidator(); static boolean isValid(Schema schema, UnionRule unionRule); static void validate(Schema schema, UnionRule unionRule);  }