Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloem committed Dec 2, 2022
1 parent 254c258 commit aff5ea4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import com.fasterxml.jackson.databind.ObjectMapper;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import org.apache.beam.sdk.annotations.Experimental;
import org.apache.beam.sdk.annotations.Experimental.Kind;
import org.apache.beam.sdk.schemas.Schema;
Expand Down Expand Up @@ -134,7 +135,8 @@ public static Schema beamSchemaFromJsonSchema(String jsonSchemaStr) {

private static Schema beamSchemaFromJsonSchema(org.everit.json.schema.ObjectSchema jsonSchema) {
Schema.Builder beamSchemaBuilder = Schema.builder();
for (Map.Entry<String, org.everit.json.schema.Schema> entry : jsonSchema.getPropertySchemas().entries()) {
for (Map.Entry<String, org.everit.json.schema.Schema> entry :
jsonSchema.getPropertySchemas().entrySet()) {
String propertyName = entry.getKey();
org.everit.json.schema.Schema propertySchema = entry.getValue();
if (propertySchema == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public void testUnsupportedTupleArrays() throws IOException {
});

assertThat(
thrownException.getMessage(), containsString("Array schema is not properly formatted"));
thrownException.getMessage(),
containsString(
"Tuple-like arrays are unsupported. Expected a single item type for field tupleArray"));
}
}

Expand All @@ -192,7 +194,8 @@ public void testUnsupportedNestedTupleArrays() throws IOException {

assertThat(
thrownException.getCause().getMessage(),
containsString("Array schema is not properly formatted"));
containsString(
"Tuple-like arrays are unsupported. Expected a single item type for field tupleArray"));
}
}
}

0 comments on commit aff5ea4

Please sign in to comment.