diff --git a/app/build.gradle b/app/build.gradle index 3a27996..c1b0f0d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ dependencies { implementation group: 'org.apache.commons', name: 'commons-text', version: '1.8' implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1' - implementation group: 'com.telefonica.baikal', name: 'spark-commons_2.12', version: '2.2.0' + implementation group: 'com.telefonica.baikal', name: 'spark-commons_2.12', version: '55e808c6ddee0d8620bbe381459afe3428f0bec0' // XXX: custom lib with performance improvements: https://github.com/Telefonica/libphonenumber-1 implementation group: 'com.googlecode.libphonenumber', name: 'libphonenumber', version: '8.12.25-4p' diff --git a/app/src/main/java/io/confluent/avro/random/generator/LogicalTypeGenerator.java b/app/src/main/java/io/confluent/avro/random/generator/LogicalTypeGenerator.java index 6dc7ddc..7fed211 100644 --- a/app/src/main/java/io/confluent/avro/random/generator/LogicalTypeGenerator.java +++ b/app/src/main/java/io/confluent/avro/random/generator/LogicalTypeGenerator.java @@ -293,12 +293,15 @@ public String random(String logicalType, Map propertiesProp) { case "feature-collection": int numFeatures = 10; ArrayList features = new ArrayList<>(numFeatures); - + Feature feat = null; for (int i = 0; i < numFeatures; i++) { features.add(new Feature(new Geometry(null, null))); } - return new FeatureCollection(features).toString(); + case "uuid-string": + return UUID.randomUUID().toString(); + case "semver": + return faker.regexify("(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-((0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\\+([0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*))?"); default: throw new IllegalArgumentException("Unsupported logical type: " + logicalType); } @@ -315,4 +318,12 @@ public Double randomDouble(String logicalType, Map propertiesProp) { } } + public Float randomFloat(String logicalType, Map propertiesProp) { + switch (logicalType) { + case "rate": + return random.nextFloat(); + default: + throw new IllegalArgumentException("Unsupported logical type: " + logicalType); + } + } } diff --git a/app/src/main/java/io/confluent/avro/random/generator/geojson/Geometry.java b/app/src/main/java/io/confluent/avro/random/generator/geojson/Geometry.java index 44e45dd..097a53b 100644 --- a/app/src/main/java/io/confluent/avro/random/generator/geojson/Geometry.java +++ b/app/src/main/java/io/confluent/avro/random/generator/geojson/Geometry.java @@ -2,6 +2,7 @@ import io.confluent.avro.random.generator.geojson.crs.CRS; import io.confluent.avro.random.generator.geojson.crs.EPSG4326; +import com.telefonica.baikal.utils.Validations; import java.util.Arrays; import java.util.List; @@ -74,27 +75,44 @@ private String randomCoordinates() { ) ).toString(); case MultiPolygon: - String first1 = new Point(null, null, crs).toString(); - String first2 = new Point(null, null, crs).toString(); - - return Arrays.asList( - List.of( + int i = 0; + String result = null; + while (i < 10000) { + String first1 = new Point(null, null, crs).toString(); + String first2 = new Point(null, null, crs).toString(); + Point point1 = new Point(null, null, crs); + Point point2 = new Point(point1.latitude, null, crs); + Point point3 = new Point(null, point2.longitude, crs); + Point point4 = new Point(null, null, crs); + Point point5 = new Point(point4.latitude, null, crs); + Point point6 = new Point(null, point5.longitude, crs); + /* NOTE: The polygon is formed by 5 points due to geojson library */ + result = Arrays.asList( + List.of( Arrays.asList( first1, - new Point(null, null, crs).toString(), - new Point(null, null, crs).toString(), + point1.toString(), + point2.toString(), + point3.toString(), first1 - ) - ), - List.of( + ), Arrays.asList( first2, - new Point(null, null, crs).toString(), - new Point(null, null, crs).toString(), + point4.toString(), + point5.toString(), + point6.toString(), first2 ) - ) - ).toString(); + ) + ).toString(); + + String geojson = "{\"type\": \"" + geometryType + "\", \"coordinates\": " + result + "}"; + if (Validations.isValidGeometry(geojson)) { + return result; + } + i++; + } + throw new RuntimeException("Could not generate a valid MultiPolygon after 1000 attempts."); default: return null; } diff --git a/app/src/main/java/io/confluent/avro/random/generator/geojson/crs/CRS.java b/app/src/main/java/io/confluent/avro/random/generator/geojson/crs/CRS.java index 96b7d68..9397287 100644 --- a/app/src/main/java/io/confluent/avro/random/generator/geojson/crs/CRS.java +++ b/app/src/main/java/io/confluent/avro/random/generator/geojson/crs/CRS.java @@ -22,12 +22,12 @@ protected void setBounds( public double randomLatitude() { Random r = new Random(); - return bottomBound + (upperBound - bottomBound) * r.nextDouble(); + return -90 + r.nextInt(180) + r.nextDouble(); } public double randomLongitude() { Random r = new Random(); - return leftBound + (rightBound - leftBound) * r.nextDouble(); + return -180 + r.nextInt(360) + r.nextDouble(); } public abstract String toString(); diff --git a/app/src/test/java/io/confluent/avro/random/generator/LogicalTypeGeneratorTest.java b/app/src/test/java/io/confluent/avro/random/generator/LogicalTypeGeneratorTest.java index e6bc73e..a345d6d 100644 --- a/app/src/test/java/io/confluent/avro/random/generator/LogicalTypeGeneratorTest.java +++ b/app/src/test/java/io/confluent/avro/random/generator/LogicalTypeGeneratorTest.java @@ -281,6 +281,7 @@ public void shouldCreateValidLongitude() { @Test public void shouldCreateValidLGeometry() { GenericRecord record = generateRecordWithSchema("test-schemas/logical-types/geometry.json"); + String field = "geometry"; assertNotNull(record.get(field)); String value = record.get(field).toString(); @@ -291,6 +292,7 @@ public void shouldCreateValidLGeometry() { @Test public void shouldCreateValidLFeature() { GenericRecord record = generateRecordWithSchema("test-schemas/logical-types/feature.json"); + String field = "feature"; assertNotNull(record.get(field)); String value = record.get(field).toString(); @@ -301,6 +303,7 @@ public void shouldCreateValidLFeature() { @Test public void shouldCreateValidLFeatureCollection() { GenericRecord record = generateRecordWithSchema("test-schemas/logical-types/feature-collection.json"); + String field = "featureCollection"; assertNotNull(record.get(field)); String value = record.get(field).toString(); @@ -308,4 +311,36 @@ public void shouldCreateValidLFeatureCollection() { assertTrue("Invalid feature-collection: " + value, Validations.isValidFeatureCollection(value)); } + @Test + public void shouldCreateValidUUID() { + GenericRecord record = generateRecordWithSchema("test-schemas/logical-types/uuid-string.json"); + + String field = "uuid"; + assertNotNull(record.get(field)); + String value = record.get(field).toString(); + System.out.println("Generated value is: " + value); + assertTrue("Invalid uuid: " + value, Validations.isValidUUID(value)); + } + + @Test + public void shouldCreateValidRate() { + GenericRecord record = generateRecordWithSchema("test-schemas/logical-types/rate.json"); + + String field = "rate"; + assertNotNull(record.get(field)); + Float value = (float)record.get(field); + System.out.println("Generated value is: " + value); + assertTrue("Invalid rate: " + value, Validations.isValidRate(value)); + } + + @Test + public void shouldCreateValidSemVer() { + GenericRecord record = generateRecordWithSchema("test-schemas/logical-types/semver.json"); + + String field = "semver"; + assertNotNull(record.get(field)); + String value = record.get(field).toString(); + System.out.println("Generated value is: " + value); + assertTrue("Invalid semver: " + value, Validations.isValidSemVer(value)); + } } diff --git a/app/src/test/java/io/confluent/avro/random/generator/geojson/FeatureCollectionTest.java b/app/src/test/java/io/confluent/avro/random/generator/geojson/FeatureCollectionTest.java index b74d86f..5b58f6b 100644 --- a/app/src/test/java/io/confluent/avro/random/generator/geojson/FeatureCollectionTest.java +++ b/app/src/test/java/io/confluent/avro/random/generator/geojson/FeatureCollectionTest.java @@ -24,10 +24,12 @@ public void shouldStringifyCorrectly() { FeatureCollection featureCollection = createFeatureCollection(); assertNotNull(featureCollection.toString()); Gson gson = new Gson(); - + String fcollection = featureCollection.toString(); try { - gson.fromJson(featureCollection.toString(), JsonObject.class); - } catch (JsonSyntaxException exception) { + gson.fromJson(fcollection, JsonObject.class); + } catch (Exception exception) { + + exception.printStackTrace(); fail(); } diff --git a/app/src/test/resources/test-schemas/logical-types/rate.json b/app/src/test/resources/test-schemas/logical-types/rate.json new file mode 100644 index 0000000..cf8c16b --- /dev/null +++ b/app/src/test/resources/test-schemas/logical-types/rate.json @@ -0,0 +1,14 @@ +{ "type": "record", + "name": "logicals", + "namespace": "io.confluent.avro.random.generator", + "fields": + [ + { + "name": "rate", + "type": { + "type": "float", + "logicalType": "rate" + } + } + ] +} \ No newline at end of file diff --git a/app/src/test/resources/test-schemas/logical-types/semver.json b/app/src/test/resources/test-schemas/logical-types/semver.json new file mode 100644 index 0000000..d8c445e --- /dev/null +++ b/app/src/test/resources/test-schemas/logical-types/semver.json @@ -0,0 +1,14 @@ +{ "type": "record", + "name": "logicals", + "namespace": "io.confluent.avro.random.generator", + "fields": + [ + { + "name": "semver", + "type": { + "type": "string", + "logicalType": "semver" + } + } + ] +} \ No newline at end of file diff --git a/app/src/test/resources/test-schemas/logical-types/uuid-string.json b/app/src/test/resources/test-schemas/logical-types/uuid-string.json new file mode 100644 index 0000000..57bb648 --- /dev/null +++ b/app/src/test/resources/test-schemas/logical-types/uuid-string.json @@ -0,0 +1,14 @@ +{ "type": "record", + "name": "logicals", + "namespace": "io.confluent.avro.random.generator", + "fields": + [ + { + "name": "uuid", + "type": { + "type": "string", + "logicalType": "uuid-string" + } + } + ] +} \ No newline at end of file diff --git a/samples/datasets/Full_LogicalType_Dataset_With_Complex_Types/v1.0.0/Full_LogicalType_Dataset_With_Complex_Types_1.0.0.avsc b/samples/datasets/Full_LogicalType_Dataset_With_Complex_Types/v1.0.0/Full_LogicalType_Dataset_With_Complex_Types_1.0.0.avsc index 7ae4b4a..b2e84d4 100644 --- a/samples/datasets/Full_LogicalType_Dataset_With_Complex_Types/v1.0.0/Full_LogicalType_Dataset_With_Complex_Types_1.0.0.avsc +++ b/samples/datasets/Full_LogicalType_Dataset_With_Complex_Types/v1.0.0/Full_LogicalType_Dataset_With_Complex_Types_1.0.0.avsc @@ -21,7 +21,14 @@ {"name":"IPV6", "type":{"type":"string", "logicalType":"ipv6", "x-fp-data-protection": "pseudonymize"}, "doc":"Internet Protocol Address v6"}, {"name":"LATITUDE", "type":{"type":"double", "logicalType":"latitude"}, "doc":"Latitude"}, {"name":"LONGITUDE", "type":{"type":"double", "logicalType":"longitude"}, "doc":"Longitude"}, - {"name": "SUB_RECORD", "type":{"name":"SUB_RECORD", "type": "record", "fields": [ + {"name":"DECIMAL", "type": {"type": "string", "logicalType": "decimal-string"}, "doc": "A string representation of a decimal numeral"}, + {"name":"GEOMETRY", "aliases": ["geometry"], "type": {"type": "string", "logicalType": "geometry"}, "doc": "A Geometry object represents points, curves, and surfaces in coordinate space"}, + {"name":"FEATURE", "aliases": ["feature"], "type": {"type": "string", "logicalType": "feature"}, "doc": "A Feature object represents a spatially bounded thing"}, + {"name":"FEATURE_COLLECTION", "aliases": ["feature_collection"], "type": {"type": "string", "logicalType": "feature-collection"}, "doc": "List of features"}, + {"name":"UUID", "aliases": ["uuid-string"], "type": {"type": "string", "logicalType": "uuid-string"}, "doc": "A string representation of a UUID"}, + {"name":"RATE", "aliases": ["rate"], "type": {"type": "float", "logicalType": "rate"}, "doc": "A float representation of a rate"}, + {"name":"SEMVER", "aliases": ["semver"], "type": {"type": "string", "logicalType": "semver"}, "doc": "A string representation of a SemVer"}, + {"name":"SUB_RECORD", "type":{"name":"SUB_RECORD", "type": "record", "fields": [ {"name":"PHONE_NUMBER", "type": { "type": "string", "logicalType": "phone-number", "x-fp-data-protection": "pseudonymize" }}, {"name":"IMSI", "type": { "type":"string", "logicalType":"imsi", "x-fp-data-protection": "pseudonymize" }}, {"name":"DATETIME", "type": { "type":"string", "logicalType":"datetime" }} diff --git a/samples/datasets/qa_all_logical_types/v1.0.0/qa_all_logical_types_1.0.0.avsc b/samples/datasets/qa_all_logical_types/v1.0.0/qa_all_logical_types_1.0.0.avsc index 92a51cb..598f76b 100644 --- a/samples/datasets/qa_all_logical_types/v1.0.0/qa_all_logical_types_1.0.0.avsc +++ b/samples/datasets/qa_all_logical_types/v1.0.0/qa_all_logical_types_1.0.0.avsc @@ -188,6 +188,33 @@ "logicalType": "feature-collection" }, "doc": "List of features" + }, + { + "name": "UUID", + "aliases": ["uuid-string"], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of a UUID" + }, + { + "name": "RATE", + "aliases": ["rate"], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of a rate" + }, + { + "name": "SEMVER", + "aliases": ["semver"], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of a SemVer" } ] } diff --git a/samples/datasets/qa_all_logical_types_array_map_records/v1.0.0/qa_all_logical_types_array_map_records_1.0.0.avsc b/samples/datasets/qa_all_logical_types_array_map_records/v1.0.0/qa_all_logical_types_array_map_records_1.0.0.avsc index 566fa74..071bc23 100644 --- a/samples/datasets/qa_all_logical_types_array_map_records/v1.0.0/qa_all_logical_types_array_map_records_1.0.0.avsc +++ b/samples/datasets/qa_all_logical_types_array_map_records/v1.0.0/qa_all_logical_types_array_map_records_1.0.0.avsc @@ -170,11 +170,14 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection" + "logicalType" : "feature-collection" }, "doc" : "List of features", "aliases" : [ "feature_collection" ] - } ] + }, + {"name":"UUID","aliases":["uuid"],"type":{"type":"string","logicalType":"uuid-string"},"doc":"A string representation of uuid"}, + {"name":"SEMVER","aliases":["SemVer"],"type":{"type":"string","logicalType":"semver"},"doc":"A string representation of SemVer"}, + {"name":"RATE","aliases":["rate"],"type":{"type":"float","logicalType":"rate"},"doc":"A float representation of rate"} ] } } } diff --git a/samples/datasets/qa_all_logical_types_array_records/v1.0.0/qa_all_logical_types_array_records_1.0.0.avsc b/samples/datasets/qa_all_logical_types_array_records/v1.0.0/qa_all_logical_types_array_records_1.0.0.avsc index 1443359..0c15a56 100644 --- a/samples/datasets/qa_all_logical_types_array_records/v1.0.0/qa_all_logical_types_array_records_1.0.0.avsc +++ b/samples/datasets/qa_all_logical_types_array_records/v1.0.0/qa_all_logical_types_array_records_1.0.0.avsc @@ -167,11 +167,14 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection" + "logicalType" : "feature-collection" }, "doc" : "List of features", "aliases" : [ "feature_collection" ] - } ] + }, + {"name":"UUID","aliases":["uuid"],"type":{"type":"string","logicalType":"uuid-string"},"doc":"A string representation of uuid"}, + {"name":"SEMVER","aliases":["SemVer"],"type":{"type":"string","logicalType":"semver"},"doc":"A string representation of SemVer"}, + {"name":"RATE","aliases":["rate"],"type":{"type":"float","logicalType":"rate"},"doc":"A float representation of rate"} ] } } } ], diff --git a/samples/datasets/qa_all_logical_types_map_records/v1.0.0/qa_all_logical_types_map_records_1.0.0.avsc b/samples/datasets/qa_all_logical_types_map_records/v1.0.0/qa_all_logical_types_map_records_1.0.0.avsc index 377f041..270a5aa 100644 --- a/samples/datasets/qa_all_logical_types_map_records/v1.0.0/qa_all_logical_types_map_records_1.0.0.avsc +++ b/samples/datasets/qa_all_logical_types_map_records/v1.0.0/qa_all_logical_types_map_records_1.0.0.avsc @@ -168,11 +168,14 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection" + "logicalType" : "feature-collection" }, "doc" : "List of features", "aliases" : [ "feature_collection" ] - } ] + }, + {"name":"UUID","aliases":["uuid"],"type":{"type":"string","logicalType":"uuid-string"},"doc":"A string representation of uuid"}, + {"name":"SEMVER","aliases":["SemVer"],"type":{"type":"string","logicalType":"semver"},"doc":"A string representation of SemVer"}, + {"name":"RATE","aliases":["rate"],"type":{"type":"float","logicalType":"rate"},"doc":"A float representation of rate"} ] } } } ], diff --git a/samples/datasets/qa_all_logical_types_nested_records/v1.0.0/qa_all_logical_types_nested_records_1.0.0.avsc b/samples/datasets/qa_all_logical_types_nested_records/v1.0.0/qa_all_logical_types_nested_records_1.0.0.avsc index 1484f6e..775b445 100644 --- a/samples/datasets/qa_all_logical_types_nested_records/v1.0.0/qa_all_logical_types_nested_records_1.0.0.avsc +++ b/samples/datasets/qa_all_logical_types_nested_records/v1.0.0/qa_all_logical_types_nested_records_1.0.0.avsc @@ -171,11 +171,14 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection" + "logicalType" : "feature-collection" }, "doc" : "List of features", "aliases" : [ "feature_collection" ] - } ] + }, + {"name":"UUID","aliases":["uuid"],"type":{"type":"string","logicalType":"uuid-string"},"doc":"A string representation of uuid"}, + {"name":"SEMVER","aliases":["SemVer"],"type":{"type":"string","logicalType":"semver"},"doc":"A string representation of SemVer"}, + {"name":"RATE","aliases":["rate"],"type":{"type":"float","logicalType":"rate"},"doc":"A float representation of rate"} ] } } ] } diff --git a/samples/extensions/Data_XDR/v5.9.0/extensions.malformed.json b/samples/extensions/Data_XDR/v5.9.0/extensions.malformed.json new file mode 100755 index 0000000..5bec863 --- /dev/null +++ b/samples/extensions/Data_XDR/v5.9.0/extensions.malformed.json @@ -0,0 +1,142 @@ +{ + "namespace": "com.plainAVRO", + "name": "Data_XDR", + "type": "record", + "doc": "MOCK PRADO", + "x-fp-version": "5.9.0", + "fields": [ + { + "name": "OPERATOR_ID", + "type": { + "type": "string", + "arg.properties": { + "options": { + "file": "samples/extensions/operators.json", + "encoding": "json" + } + } + } + }, + { + "name": "PHONE_ID", + "type": { + "type": "string", + "arg.properties": { + "regex": "(6[0-9]{8})|(7[1-4][0-9]{7})" + } + } + }, + { + "name": "USER_ID", + "type": { + "type": "string", + "arg.properties": { + "length": 15 + } + } + }, + { + "name": "CELL_ID", + "type": { + "type": "string", + "arg.properties": { + "length": 20 + } + } + }, + { + "name": "EVENT_TM", + "type": { + "type": "string", + "logicalType": "datetime", + "arg.properties": { + "range": { + "start": "${DATE_RANGE_START}T00:00:00Z", + "end": "${DATE_RANGE_END}T00:00:00Z" + } + } + }, + "doc": "Timestamp of the data." + }, + { + "name": "OPERATOR_PHONE_ID", + "type": { + "type": "string", + "arg.properties": { + "length": 6 + } + } + }, + { + "name": "TERMINATION_CODE_CD", + "type": { + "type": "string", + "arg.properties": { + "length": 3 + } + } + }, + { + "name": "TECHNOLOGY_CELL_CD", + "type": [ + "null", + { + "type": "string", + "arg.properties": { + "length": 80 + } + } + ] + }, + { + "name": "COUNTRY_ROAMING_CD", + "type": { + "type": "string", + "arg.properties": { + "length": 3 + } + } + }, + { + "name": "PHONE_WITH_PREFIX_ID", + "type": [ + "null", + { + "type": "string", + "logicalType": "phone-number", + "x-fp-identifier": "phone-number", + "arg.properties": { + "unique": true, + "regex": "(6[0-9]{8})|(7[1-4][0-9]{7})", + "prefix": "+34" + } + } + ], + "arg.properties": { + "position": 1 + } + }, + { + "name": "DAY_DT", + "type": { + "type": "string", + "logicalType": "iso-date", + "arg.properties": { + "options": ["2024-10-06"] + } + } + }, + { + "name": "USER_4P_ID", + "type": { + "type": "string", + "x-fp-user-id": true, + "arg.properties": { + "iteration": { + "start": "${ITERATION_STEP}" + } + } + } + } + ] +} diff --git a/samples/extensions/Data_XDR/v6.0.0/extensions.malformed.json b/samples/extensions/Data_XDR/v6.0.0/extensions.malformed.json new file mode 100755 index 0000000..d343f71 --- /dev/null +++ b/samples/extensions/Data_XDR/v6.0.0/extensions.malformed.json @@ -0,0 +1,270 @@ +{ + "namespace": "com.plainAVRO", + "name": "Data_XDR", + "type": "record", + "doc": "MOCK PRADO", + "x-fp-version": "6.0.0", + "fields": [ + { + "name": "OPERATOR_ID", + "type": { + "type": "string", + "arg.properties": { + "options": { + "file": "samples/extensions/operators.json", + "encoding": "json" + } + } + } + }, + { + "name": "PHONE_ID", + "type": { + "type": "string", + "arg.properties": { + "regex": "(6[0-9]{8})|(7[1-4][0-9]{7})" + } + } + }, + { + "name": "USER_ID", + "type": { + "type": "string", + "arg.properties": { + "length": 15 + } + } + }, + { + "name": "CELL_ID", + "type": { + "type": "string", + "arg.properties": { + "length": 20 + } + } + }, + { + "name": "EVENT_TM", + "type": { + "type": "string", + "logicalType": "datetime", + "arg.properties": { + "range": { + "start": "${DATE_RANGE_START}T00:00:00Z", + "end": "${DATE_RANGE_END}T00:00:00Z" + }, + "malformed-rate": 0.7 + } + }, + "doc": "Timestamp of the data." + }, + { + "name": "OPERATOR_PHONE_ID", + "type": { + "type": "string", + "arg.properties": { + "length": 6 + } + } + }, + { + "name": "TERMINATION_CODE_CD", + "type": { + "type": "string", + "arg.properties": { + "length": 3 + } + } + }, + { + "name": "TECHNOLOGY_CELL_CD", + "type": [ + "null", + { + "type": "string", + "arg.properties": { + "length": 80 + } + } + ] + }, + { + "name": "COUNTRY_ROAMING_CD", + "type": { + "type": "string", + "arg.properties": { + "length": 3 + } + } + }, + { + "name": "PHONE_WITH_PREFIX_ID", + "type": [ + "null", + { + "type": "string", + "logicalType": "phone-number", + "x-fp-identifier": "phone-number", + "arg.properties": { + "unique": true, + "regex": "(6[0-9]{8})|(7[1-4][0-9]{7})", + "prefix": "+34", + "malformed-rate": 0.3 + } + } + ], + "arg.properties": { + "position": 1 + } + }, + { + "name": "DAY_DT", + "type": { + "type": "string", + "logicalType": "iso-date", + "arg.properties": { + "options": ["06-10-2024T13:03:00Z"] + + } + } + }, + { + "name": "USER_4P_ID", + "type": { + "type": "string", + "x-fp-user-id": true, + "arg.properties": { + "iteration": { + "start": "${ITERATION_STEP}" + } + } + } + }, + { + "name": "RECORDS_ARRAY", + "type": [ + "null", + { + "type": "array", + "items": { + "name": "RECORDS_ARRAY_ITEMS", + "type": "record", + "namespace": "com.telefonica.baikal.qa.RECORDS_ARRAY_ITEMS", + "fields": [ + { + "name": "PHONE_NUMBER", + "type": { + "type": "string", + "logicalType": "phone-number", + "x-fp-data-protection": "pseudonymize", + "arg.properties": { + "unique": true, + "regex": "(6[0-9]{8})|(7[1-4][0-9]{7})", + "prefix": "+34" + } + } + }, + { + "name": "IMSI", + "type": { + "type": "string", + "logicalType": "imsi", + "x-fp-data-protection": "pseudonymize" + } + }, + { + "name": "DATETIME", + "type": { + "type": "string", + "logicalType": "datetime", + "arg.properties": { + "range": { + "start": "${DATE_RANGE_START}T00:00:00Z", + "end": "${DATE_RANGE_END}T00:00:00Z" + } + } + } + } + ] + }, + "arg.properties": { + "length": 5 + } + } + ], + "doc": "Array of records", + "arg.properties": { + "position": 1 + } + }, + { + "name": "RECORDS_MAP", + "type": [ + "null", + { + "type": "map", + "x-fp-data-protection": "pseudonymize", + "values": { + "name": "RECORDS_MAP_VALUE", + "type": "record", + "namespace": "com.telefonica.baikal.qa.RECORDS_MAP_VALUE", + "fields": [ + { + "name": "PHONE_NUMBER", + "type": { + "type": "string", + "logicalType": "phone-number", + "x-fp-data-protection": "pseudonymize", + "arg.properties": { + "unique": true, + "regex": "(6[0-9]{8})|(7[1-4][0-9]{7})", + "prefix": "+34" + } + } + }, + { + "name": "IMSI", + "type": { + "type": "string", + "logicalType": "imsi", + "x-fp-data-protection": "pseudonymize" + } + }, + { + "name": "DATETIME", + "type": { + "type": "string", + "logicalType": "datetime", + "arg.properties": { + "range": { + "start": "${DATE_RANGE_START}T00:00:00Z", + "end": "${DATE_RANGE_END}T00:00:00Z" + } + } + } + } + ] + }, + "arg.properties": { + "length": 5, + "unique": true, + "keys": { + "options": [ + "key-1", + "key-2", + "key-3", + "key-4", + "key-5" + ] + } + } + } + ], + "doc": "Map field with record as value", + "arg.properties": { + "position": 1 + } + } + ] +} diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions.errors.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions.errors.json index 2e8d959..ed8c0dc 100644 --- a/samples/extensions/qa_all_logical_types/v1.0.0/extensions.errors.json +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions.errors.json @@ -236,7 +236,7 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection", + "logicalType" : "feature-collection", "arg.properties" : { "options" : [ "invalid", @@ -250,6 +250,67 @@ }, "doc" : "List of features", "aliases" : [ "feature_collection" ] + }, { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string", + "arg.properties": { + "options": [ + "590ded1b5b42_4aee-931c-3b5a7dda8ba1", + "accbc835-f21a4439-84f6.c45c248601a3", + "accbc835-f21a-443984f6-c45c248601a3", + "accbc835-f21a-4439/84f6c45c248601a3", + "accbc835+21a-4439-84f6c45c248601a3-v5w249s", + "abcde", + "AAAAAAAAAAAAAAA", + "" + ] + } + }, + "doc": "A string representation of uuid" + }, { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver", + "arg.properties": { + "options": [ + "1945.14,0-s", + "0.6,8", + "0.0.0y+-", + "2.80.10.0-R-0|1", + "...", + "a.b.c" + ] + } + }, + "doc": "A string representation of SemVer" + }, { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate", + "arg.properties": { + "options": [ + 1.01, + 1256.5363, + 2.713, + 12.4562, + 5.82 + ] + } + }, + "doc": "A float representation of rate" } ] } diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions.json index 41f9af6..3872adb 100644 --- a/samples/extensions/qa_all_logical_types/v1.0.0/extensions.json +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions.json @@ -8,150 +8,105 @@ "name" : "PHONE_NUMBER", "type" : { "type" : "string", - "logicalType" : "phone-number", - "arg.properties" : { - "options" : [ "+34667895234", "+447911223344", "+34983879621", "+551122334455", "+64 (0) 24099 2001", "1111111111111111111111111111111111", "77777777777777777", "+3333", "+", "", "+44765DD78906", "+158976543215" ] - } + "logicalType" : "phone-number" }, "doc" : "International number value according to ITU E.164" }, { "name" : "IMSI", "type" : { "type" : "string", - "logicalType" : "imsi", - "arg.properties" : { - "options" : [ "002170234567891", "2143423232323", "", "7480767890546324567", "122330567890658", "7301876A9c124f3", "214091234567890", "214050987654321", "214342323232323", "255086767675434", "748076789054632", "722330567890654" ] - } + "logicalType" : "imsi" }, "doc" : "A valid International Mobile Subscriber Identity" }, { "name" : "IMEI", "type" : { "type" : "string", - "logicalType" : "imei", - "arg.properties" : { - "options" : [ "262189041050750", "889198767562944708", "62189041050", "AAAAAAAAAAAAAAA", "", "1345A6B89CD765", "62189041050750", "91987675629447", "05363487594832", "04160044677810" ] - } + "logicalType" : "imei" }, "doc" : "International Mobile Equipment Identity" }, { "name" : "DATE", "type" : { "type" : "string", - "logicalType" : "iso-date", - "arg.properties" : { - "options" : [ "21:48:66Z21:48:66Z", "13-18-05", "252025", "08:17:46+28:00", "016032", "00", "20071103", "2018-05-03", "2013-W44-6", "2019W303", "2015307", "1998-001", "20071303", "2018/05/03", "", "19", "1980", "2014W", "16-04-07", "20021990", "20190740", "00000000" ] - } + "logicalType" : "iso-date" }, "doc" : "A valid ISO-8601 value that contains a complete date representation, with no time specification" }, { "name" : "TIME", "type" : { "type" : "string", - "logicalType" : "time", - "arg.properties" : { - "options" : [ "00", "25", "14:34:12", "063305", "152025Z", "000000", "21:48:13Z", "08:17:46-02:00", "11:47:15.12", "13:18:05", "240000", "17:38:15.44Z", "08:17:46-02:00", "18:29:14.58+01:00", "101515-01", "02:20:05+03", "123824.28-0300", "162609.29Z", "063305.32" ] - } + "logicalType" : "time" }, "doc" : "A valid ISO-8601 value that contains a complete time representation" }, { "name" : "DATETIME", "type" : { "type" : "string", - "logicalType" : "datetime", - "arg.properties" : { - "options" : [ "0000304T150605Z", "2007-15-03T16:18:05Z", "2015-12-33T16:18:05Z", "2016-12-13T26:18:05Z", "19900304T156605Z", "19750804T153661", "20170929153600", "2011/11/11T26:18:05Z", "19800304T150605Z", "2007-11-03T16:18:05Z", "20071103T131805", "2017-12-03T13:18:05", "20071103T131805-0300", "2009-03-08T20:18:05-03:00", "1986250T231305", "2000-002T13:18:05", "1997107T161805Z", "1956-007T16:56:05Z", "2007138T143905-06", "2008-096T13:18:05-03", "1986W403T131805", "2013-W44-6T06:05:05", "2010W103T161805Z", "1978-W49-2T02:13:05Z", "2007W386T211805-0300", "1981-W26-1T13:49:05-04:00" ] - } + "logicalType" : "datetime" }, "doc" : "A valid ISO-8601 value that contains a complete date and time representation" }, { "name" : "TIMESTAMP", "type" : { "type" : "string", - "logicalType" : "iso8601-timestamp", - "arg.properties" : { - "options" : [ "19750804T153661", "19900304T156605Z", "2016-12-13T26:18:05Z", "19750804T153661", "19800304T150605Z", "2007-11-03T16:18:05Z", "20071103T131805", "2017-12-03T13:18:05", "20071103T131805-0300", "2009-03-08T20:18:05-03:00", "1986250T231305", "2000-002T13:18:05", "1997107T161805Z", "1956-007T16:56:05Z", "2007138T143905-06", "2008-096T13:18:05-03", "1986W403T131805", "2013-W44-6T06:05:05", "2010W103T161805Z", "1978-W49-2T02:13:05Z", "2007W386T211805-0300", "1981-W26-1T13:49:05-04:00" ] - } + "logicalType" : "iso8601-timestamp" }, "doc" : "A valid ISO-8601 value that contains a complete date and time representation" }, { "name" : "DURATION", "type" : { "type" : "string", - "logicalType" : "duration", - "arg.properties" : { - "options" : [ "", "P", "P1", "8Y3M5D", "T23H", "P3Y13M43DT", "P1Y4M23DT3H34M56S", "P0Y7M9DT8H12M33S", "P9M2DT23H55M55S", "P28DT12H12M36S", "PT09H7M6S", "PT90M", "P8M", "P6Y", "P12D", "PT15H", "PT0S", "P5Y12W", "P2W" ] - } + "logicalType" : "duration" }, "doc" : "A valid ISO-8601 value that contains a complete duration representation" }, { "name" : "COUNTRY_CODE2", "type" : { "type" : "string", - "logicalType" : "country-code-alpha-2", - "arg.properties" : { - "options" : [ "AN", "JJJJJJJJJJ", "", "H4", "55", "XX", "BLZ", "108", "ES", "UK", "BR", "DE" ] - } + "logicalType" : "country-code-alpha-2" }, "doc" : "A valid ISO-3166-1 alpha-2 country code" }, { "name" : "COUNTRY_CODE3", "type" : { "type" : "string", - "logicalType" : "country-code-alpha-3", - "arg.properties" : { - "options" : [ "AF", "XXX", "DZAMD", "A8D", "020", "", "ESP", "BRA", "DEU", "GBR" ] - } + "logicalType" : "country-code-alpha-3" }, "doc" : "A valid ISO-3166-1 alpha-3 country code" }, { "name" : "COUNTRY_NUMERIC", "type" : { "type" : "string", - "logicalType" : "country-code-numeric", - "arg.properties" : { - "options" : [ "127", "973", "00", "87956214", "ALA", "", "2", "6B0", "276", "076", "724", "826" ] - } + "logicalType" : "country-code-numeric" }, "doc" : "A valid ISO-3166-1 numeric country code" }, { "name" : "CURRENCY_CODE", "type" : { "type" : "string", - "logicalType" : "currency-code-alpha", - "arg.properties" : { - "options" : [ "AEDIN", "ZZM", "AL", "", "", "784", "A0A", "EUR", "USD", "BRL", "GBP" ] - } + "logicalType" : "currency-code-alpha" }, "doc" : "A valid ISO-4217 alpha currency code" }, { "name" : "CURRENCY_NUMERIC", "type" : { "type" : "string", - "logicalType" : "currency-code-numeric", - "arg.properties" : { - "options" : [ "1000", "88", "EUR", "9.e0", "+2E8", "13:18:05", "063305.32", "978", "784", "840", "986", "826" ] - } + "logicalType" : "currency-code-numeric" }, "doc" : "A valid ISO-4217 numeric currency code" }, { "name" : "DECIMAL", "type" : { "type" : "string", - "logicalType" : "decimal-string", - "arg.properties" : { - "options" : [ "0,5", "1,99", "44,5555", "99,999999999", "e12", "-E15", "2.e34", "e3", "12345678912345678912345.2", "-23.123456789009876543212345643", "5e7", "6E-4", "+12e-5", "-57.6789", "+89.076", "28.04E-10", "-2.89e3", "9.e0", "-3.", ".23450987654322", "-12345678912345678989.123456789123456789", "4.67", "234.345e12" ] - } + "logicalType" : "decimal-string" }, "doc" : "A string representation of a decimal numeral" }, { "name" : "IPV4", "type" : { "type" : "string", - "logicalType" : "ipv4", - "arg.properties" : { - "options" : [ "80.90.3.10", "192.127.55.98", "90.77.6.99", "100.100.100.100", "10", "10.10", "10.10.10", "", "10.10.0.0/16", "11000000.10101000.00000101.11111111", "10.A.10.10", "10.10.A.10", "10.10.10.A", "A.10.10.10", "10...", ".10..", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789", "256.0.0.0", "-1.0.0.0", "1.2.3.1.2" ] - } + "logicalType" : "ipv4" }, "doc" : "A string representation of a ipv4", "aliases" : [ "ipv4" ] @@ -159,10 +114,7 @@ "name" : "IPV6", "type" : { "type" : "string", - "logicalType" : "ipv6", - "arg.properties" : { - "options" : [ "FFFF:129.144.52.38", "ABCDE:EF01:2345:6789:ABCD:EF01:2345:6789", "GGGG:EF01:2345:6789:ABCD:EF01:2345:6789", "", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789", "2001:DB8:0:0:8:800:200C:417A", "FF01:0:0:0:0:0:0:101", "2001:0DB8:0:CD30::/60", "::13.1.68.3", "2001:0DB8:0000:CD30:0000:0000:0000:0000/60", "0:0:0:0:0:FFFF:129.144.52.38", "2001:0DB8::CD30:0:0:0:0/60", "0:0:0:0:0:0:13.1.68.3", "0:0:0:0:0:0:0:1", "0:0:0:0:0:0:0:0", "2001:DB8::8:800:200C:417A", "FF01::101", "::1", "::" ] - } + "logicalType" : "ipv6" }, "doc" : "A string representation of a ipv6", "aliases" : [ "ipv6" ] @@ -170,10 +122,7 @@ "name" : "TIMEZONE", "type" : { "type" : "string", - "logicalType" : "time-zone", - "arg.properties" : { - "options" : [ "+01:00", "-01:00", "+01:30", "+02:00", "+03:00", "+05:000", "+00:00", "-00:00", "-11:", ":00", "AA:BB", ":", "1:98", "-37:00", "" ] - } + "logicalType" : "time-zone" }, "doc" : "A string representation of timezone", "aliases" : [ "timezone" ] @@ -181,10 +130,7 @@ "name" : "LATITUDE", "type" : { "type" : "double", - "logicalType" : "latitude", - "arg.properties" : { - "options" : [ -90.1, 90.1, 60.896802461096335, 19.620623405587907, 2000.0, -2000.0 ] - } + "logicalType" : "latitude" }, "doc" : "A double representation of latitude", "aliases" : [ "latitude" ] @@ -192,10 +138,7 @@ "name" : "LONGITUDE", "type" : { "type" : "double", - "logicalType" : "longitude", - "arg.properties" : { - "options" : [ -90.1, 90.1, 60.896802461096335, 19.620623405587907, 2000.0, -2000.0 ] - } + "logicalType" : "longitude" }, "doc" : "A double representation of longitude", "aliases" : [ "longitude" ] @@ -203,18 +146,7 @@ "name" : "GEOMETRY", "type" : { "type" : "string", - "logicalType" : "geometry", - "arg.properties" : { - "options" : [ - "{\"type\": \"Point\", \"coordinates\": [83.85858933276846, 71.6389665812352]}", - "{\"type\": \"LineString\", \"coordinates\": [[1.608617407055661, -78.73731870470039], [9.233333601632339, 179.35618944377535], [76.67083587579512, -9.426422664692637]]}", - "{\"type\": \"MultiLineString\", \"coordinates\": [[[-62.88038973341574, -7.884525178928072], [66.62719048051727, 145.7757244249645]], [[-17.12030356893561, -41.22146995188922], [20.98303684075934, 75.2642730867853]]]}", - "invalid", - "", - "{}", - "{'type': 'invalid'}" - ] - } + "logicalType" : "geometry" }, "doc" : "A Geometry object represents points, curves, and surfaces in coordinate space", "aliases" : [ "geometry" ] @@ -222,19 +154,7 @@ "name" : "FEATURE", "type" : { "type" : "string", - "logicalType" : "feature", - "arg.properties" : { - "options" : [ - "{\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[0.04663030905000198, -121.56197861492906], [76.29177684652296, 78.16814444674833], [-55.01124082925347, 125.72150609944998]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}", - "{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-65.64400991049877, 52.29151789124609], [-38.041574011488024, 143.10225630696914], [-60.605846152018785, 41.472639873206816], [-65.64400991049877, 52.29151789124609]]], [[[-6.815279395562541, 116.12152263328517], [30.92811713123509, 75.18762820656474], [-17.963080757434298, 167.78113693494697], [-6.815279395562541, 116.12152263328517]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}", - "{\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-29.334665882083, -146.60839755831736]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}", - "invalid", - "", - "{}", - "{'type': 'invalid'}", - "{\"type\": \"Point\", \"coordinates\": [83.85858933276846, 71.6389665812352]}" - ] - } + "logicalType" : "feature" }, "doc" : "A Feature object represents a spatially bounded thing", "aliases" : [ "feature" ] @@ -242,23 +162,37 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection", - "arg.properties" : { - "options" : [ - "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-1.867158911404701, -90.27531864319347], [63.5382867569839, 136.17493352529294]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[71.18439879377914, -169.61479086298385], [-32.83066571071359, 69.7533031231707], [-44.67841400113613, -111.45740226847289], [71.18439879377914, -169.61479086298385]]], [[[-23.32145842025224, 163.02236996069666], [70.66813767071994, -7.124959740229997], [-16.080966255400355, 119.64528468466801], [-23.32145842025224, 163.02236996069666]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-70.24643380933952, 104.31204415936338], [68.48055794394433, 7.5247658724218525], [-2.7820364780107525, 51.72088124827221], [-70.24643380933952, 104.31204415936338]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[23.331816514267643, -129.02350660196527], [-67.33313931923854, -125.46036922875982]], [[33.57349837726482, -24.846030003957168], [15.303115231241904, -116.16856677209415]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[18.917754571217884, 52.190677943927454], [-47.75841196162983, -119.46794524419475], [18.6648295247426, -64.62891329509273], [18.917754571217884, 52.190677943927454]]], [[[72.06785851992095, -163.02441175460802], [-88.48255106182341, -137.65518719341597], [-47.07601992800039, 37.60930664928466], [72.06785851992095, -163.02441175460802]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-83.138780187925, 157.33529151142181], [-83.64813323974192, 109.36130468577329], [-45.716180636337356, -38.125501493399696], [-83.138780187925, 157.33529151142181]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-47.24214375647202, -35.514038622067915], [-89.39349388756034, -176.37406797796476], [41.32360097125755, 70.16247569746335], [-47.24214375647202, -35.514038622067915]]], [[[27.07305924971098, 45.688414593785524], [-7.289580334066812, -103.10057017427428], [6.573108312868115, 22.037416247588055], [27.07305924971098, 45.688414593785524]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.301001952643063, 146.13584284200078]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-67.79315735408184, -68.03193431648407], [80.39360165337001, 121.34798073222873]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-33.78320125245034, -68.23968809532704], [67.83597215887056, 94.62443304420935], [80.54142551247953, -17.883846172672833]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", - "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-69.16091937553688, 110.23354387866686], [-17.81735887932585, 113.2744468510507]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [62.75745916665444, 176.74676197324504]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-7.514075414510742, -43.16356175087137]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[40.021056250582006, 60.65211681709138], [45.35028056651753, -114.2616702183166], [89.88034998612721, -101.39727539717974]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[72.5365105239107, -119.49427440748279], [55.70405914007731, -171.96151099495518], [-50.44751452275972, 53.532071026353094], [72.5365105239107, -119.49427440748279]]], [[[-83.20486449408207, 10.378190646545306], [-67.34024525291971, 86.36510872230758], [-85.16828773186253, -8.560965456512292], [-83.20486449408207, 10.378190646545306]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-3.5260553286850893, 6.817642886123309], [-63.75798263101828, -58.23966495457404], [51.086622820248095, -127.53775035064764], [-3.5260553286850893, 6.817642886123309]]], [[[-25.51837687755139, -15.27744020587383], [-71.38752359475777, -161.5131092935444], [86.28703120003321, 109.28564089638752], [-25.51837687755139, -15.27744020587383]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-11.612417557114384, 154.9154668705993], [5.021873094043343, 69.49687534607742], [56.80836206520238, 126.93701253044316]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-82.55561106677499, 0.447771698179281], [15.768625684965158, -148.5751625393454], [-38.500267092109965, -94.5695814685565]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[44.5378981002369, -29.79485171335594], [-4.614081083542374, 50.14324703578643]], [[-34.087454055820885, 165.64410706723942], [31.30554694313765, 22.530559289580737]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-42.69849323471047, 51.431448151254585], [15.110025996462085, 120.03895941011604], [10.585255860270536, 131.8307641624089], [-42.69849323471047, 51.431448151254585]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", - "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[58.46286075328916, 25.645208644676643], [80.25047595712385, -83.350766591553]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[-18.327561500299353, -72.79650715622958], [-26.98124381836807, 91.77404895243762]], [[18.794805090390682, 52.22768440030217], [24.64167867281492, -109.83806381484352]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[38.357199380684506, 129.8756284862298], [-56.33847791807992, 33.99922597558327], [2.2171435818095944, -13.31799952115179], [38.357199380684506, 129.8756284862298]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[84.20562507638921, -160.40882830530217], [10.842194445722555, -138.1731026003748], [44.767833049478014, -52.57200953176559], [84.20562507638921, -160.40882830530217]]], [[[6.102908199568759, 10.795252852933203], [-31.106772820646682, 61.65042019776982], [-64.01708053563729, -108.94658938614187], [6.102908199568759, 10.795252852933203]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-29.53735735877531, -147.8640054152043], [-58.82679352019741, 112.57612099218022], [14.98238901607148, -65.85491836074006], [-29.53735735877531, -147.8640054152043]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[83.24237481525904, 40.0159982000111], [-49.39380608605501, -69.00894065716054], [71.49165371414698, -8.269353470693972], [83.24237481525904, 40.0159982000111]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[82.11962630987114, 58.95544613310716], [34.420962504524056, -150.6298443538362]], [[-36.88643359798914, -25.218660344284558], [42.15581789058159, 16.734408223531403]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-22.950825426196047, -155.32801566416538]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[1.1912385978825029, 82.3005035852687], [47.21307199281306, 153.27589439557306]], [[36.57150118326193, -128.9054578099788], [67.13222640414574, -152.243709957608]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-68.73882929995113, -138.1733815346053], [-85.37738380808756, 3.977899903804399], [62.9071330120679, -73.32098524309771]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", - "invalid", - "", - "{}", - "{'type': 'invalid'}", - "{\"type\": \"Point\", \"coordinates\": [83.85858933276846, 71.6389665812352]}", - "{\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-29.334665882083, -146.60839755831736]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}" - ] - } + "logicalType" : "feature-collection" }, "doc" : "List of features", "aliases" : [ "feature_collection" ] + }, + { + "name": "UUID", + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of a UUID", + "aliases": ["uuid-string"] + }, + { + "name": "RATE", + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of a rate", + "aliases": ["rate"] + }, + { + "name": "SEMVER", + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of a SemVer", + "aliases": ["semver"] } ] diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions.m2m.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions.m2m.json index 5504793..2105d8b 100644 --- a/samples/extensions/qa_all_logical_types/v1.0.0/extensions.m2m.json +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions.m2m.json @@ -169,10 +169,37 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection" + "logicalType" : "feature-collection" }, "doc" : "List of features", "aliases" : [ "feature_collection" ] + }, + { + "name": "UUID", + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of a UUID", + "aliases": ["uuid-string"] + }, + { + "name": "RATE", + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of a rate", + "aliases": ["rate"] + }, + { + "name": "SEMVER", + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of a SemVer", + "aliases": ["semver"] } ] diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions.malformed.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions.malformed.json new file mode 100644 index 0000000..efbf544 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions.malformed.json @@ -0,0 +1,670 @@ +{ + "type": "record", + "name": "qa_all_logical_types", + "namespace": "com.telefonica.baikal.qa", + "x-fp-version": "1.0.0", + "doc": "Schema for logical types supported by spark sdk", + "fields": [ + { + "name": "PHONE_NUMBER", + "type": { + "type": "string", + "logicalType": "phone-number", + "arg.properties": { + "options": [ + "+34667895234", + "+447911223344", + "+34983879621", + "+551122334455", + "+64 (0) 24099 2001", + "1111111111111111111111111111111111", + "77777777777777777", + "+3333", + "+", + "", + "+44765DD78906", + "+158976543215" + ] + } + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "type": { + "type": "string", + "logicalType": "imsi", + "arg.properties": { + "options": [ + "002170234567891", + "2143423232323", + "", + "7480767890546324567", + "122330567890658", + "7301876A9c124f3", + "214091234567890", + "214050987654321", + "214342323232323", + "255086767675434", + "748076789054632", + "722330567890654" + ] + } + }, + "doc": "A valid International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "type": { + "type": "string", + "logicalType": "imei", + "arg.properties": { + "options": [ + "262189041050750", + "889198767562944708", + "62189041050", + "AAAAAAAAAAAAAAA", + "", + "1345A6B89CD765", + "62189041050750", + "91987675629447", + "05363487594832", + "04160044677810" + ] + } + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "type": { + "type": "string", + "logicalType": "iso-date", + "arg.properties": { + "options": [ + "21:48:66Z21:48:66Z", + "13-18-05", + "252025", + "08:17:46+28:00", + "016032", + "00", + "20071103", + "2018-05-03", + "2013-W44-6", + "2019W303", + "2015307", + "1998-001", + "20071303", + "2018/05/03", + "", + "19", + "1980", + "2014W", + "16-04-07", + "20021990", + "20190740", + "00000000" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete date representation, with no time specification" + }, + { + "name": "TIME", + "type": { + "type": "string", + "logicalType": "time", + "arg.properties": { + "options": [ + "00", + "25", + "14:34:12", + "063305", + "152025Z", + "000000", + "21:48:13Z", + "08:17:46-02:00", + "11:47:15.12", + "13:18:05", + "240000", + "17:38:15.44Z", + "08:17:46-02:00", + "18:29:14.58+01:00", + "101515-01", + "02:20:05+03", + "123824.28-0300", + "162609.29Z", + "063305.32" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "type": { + "type": "string", + "logicalType": "datetime", + "arg.properties": { + "options": [ + "0000304T150605Z", + "2007-15-03T16:18:05Z", + "2015-12-33T16:18:05Z", + "2016-12-13T26:18:05Z", + "19900304T156605Z", + "19750804T153661", + "20170929153600", + "2011/11/11T26:18:05Z", + "19800304T150605Z", + "2007-11-03T16:18:05Z", + "20071103T131805", + "2017-12-03T13:18:05", + "20071103T131805-0300", + "2009-03-08T20:18:05-03:00", + "1986250T231305", + "2000-002T13:18:05", + "1997107T161805Z", + "1956-007T16:56:05Z", + "2007138T143905-06", + "2008-096T13:18:05-03", + "1986W403T131805", + "2013-W44-6T06:05:05", + "2010W103T161805Z", + "1978-W49-2T02:13:05Z", + "2007W386T211805-0300", + "1981-W26-1T13:49:05-04:00" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "type": { + "type": "string", + "logicalType": "iso8601-timestamp", + "arg.properties": { + "options": [ + "19750804T153661", + "19900304T156605Z", + "2016-12-13T26:18:05Z", + "19750804T153661", + "19800304T150605Z", + "2007-11-03T16:18:05Z", + "20071103T131805", + "2017-12-03T13:18:05", + "20071103T131805-0300", + "2009-03-08T20:18:05-03:00", + "1986250T231305", + "2000-002T13:18:05", + "1997107T161805Z", + "1956-007T16:56:05Z", + "2007138T143905-06", + "2008-096T13:18:05-03", + "1986W403T131805", + "2013-W44-6T06:05:05", + "2010W103T161805Z", + "1978-W49-2T02:13:05Z", + "2007W386T211805-0300", + "1981-W26-1T13:49:05-04:00" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "type": { + "type": "string", + "logicalType": "duration", + "arg.properties": { + "options": [ + "", + "P", + "P1", + "8Y3M5D", + "T23H", + "P3Y13M43DT", + "P1Y4M23DT3H34M56S", + "P0Y7M9DT8H12M33S", + "P9M2DT23H55M55S", + "P28DT12H12M36S", + "PT09H7M6S", + "PT90M", + "P8M", + "P6Y", + "P12D", + "PT15H", + "PT0S", + "P5Y12W", + "P2W" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "type": { + "type": "string", + "logicalType": "country-code-alpha-2", + "arg.properties": { + "options": [ + "AN", + "JJJJJJJJJJ", + "", + "H4", + "55", + "XX", + "BLZ", + "108", + "ES", + "GB", + "BR", + "DE" + ] + } + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "type": { + "type": "string", + "logicalType": "country-code-alpha-3", + "arg.properties": { + "options": [ + "AF", + "XXX", + "DZAMD", + "A8D", + "020", + "", + "ESP", + "BRA", + "DEU", + "GBR" + ] + } + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "type": { + "type": "string", + "logicalType": "country-code-numeric", + "arg.properties": { + "options": [ + "127", + "973", + "00", + "87956214", + "ALA", + "", + "2", + "6B0", + "276", + "076", + "724", + "826" + ] + } + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "type": { + "type": "string", + "logicalType": "currency-code-alpha", + "arg.properties": { + "options": [ + "AEDIN", + "ZZM", + "AL", + "", + "", + "784", + "A0A", + "EUR", + "USD", + "BRL", + "GBP" + ] + } + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "type": { + "type": "string", + "logicalType": "currency-code-numeric", + "arg.properties": { + "options": [ + "1000", + "88", + "EUR", + "9.e0", + "+2E8", + "13:18:05", + "063305.32", + "978", + "784", + "840", + "986", + "826" + ] + } + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "type": { + "type": "string", + "logicalType": "decimal-string", + "arg.properties": { + "options": [ + "0,5", + "1,99", + "44,5555", + "99,999999999", + "e12", + "-E15", + "2.e34", + "e3", + "12345678912345678912345.2", + "-23.123456789009876543212345643", + "5e7", + "6E-4", + "+12e-5", + "-57.6789", + "+89.076", + "28.04E-10", + "-2.89e3", + "9.e0", + "-3.", + ".23450987654322", + "-12345678912345678989.123456789123456789", + "4.67", + "234.345e12" + ] + } + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "type": { + "type": "string", + "logicalType": "ipv4", + "arg.properties": { + "options": [ + "80.90.3.10", + "192.127.55.98", + "90.77.6.99", + "100.100.100.100", + "10", + "10.10", + "10.10.10", + "", + "10.10.0.0/16", + "11000000.10101000.00000101.11111111", + "10.A.10.10", + "10.10.A.10", + "10.10.10.A", + "A.10.10.10", + "10...", + ".10..", + "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789", + "256.0.0.0", + "-1.0.0.0", + "1.2.3.1.2" + ] + } + }, + "doc": "A string representation of a ipv4", + "aliases": [ + "ipv4" + ] + }, + { + "name": "IPV6", + "type": { + "type": "string", + "logicalType": "ipv6", + "arg.properties": { + "options": [ + "FFFF:129.144.52.38", + "ABCDE:EF01:2345:6789:ABCD:EF01:2345:6789", + "GGGG:EF01:2345:6789:ABCD:EF01:2345:6789", + "", + "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789", + "2001:DB8:0:0:8:800:200C:417A", + "FF01:0:0:0:0:0:0:101", + "2001:0DB8:0:CD30::/60", + "::13.1.68.3", + "2001:0DB8:0000:CD30:0000:0000:0000:0000/60", + "0:0:0:0:0:FFFF:129.144.52.38", + "2001:0DB8::CD30:0:0:0:0/60", + "0:0:0:0:0:0:13.1.68.3", + "0:0:0:0:0:0:0:1", + "0:0:0:0:0:0:0:0", + "2001:DB8::8:800:200C:417A", + "FF01::101", + "::1", + "::" + ] + } + }, + "doc": "A string representation of a ipv6", + "aliases": [ + "ipv6" + ] + }, + { + "name": "TIMEZONE", + "type": { + "type": "string", + "logicalType": "time-zone", + "arg.properties": { + "options": [ + "+01:00", + "-01:00", + "+01:30", + "+02:00", + "+03:00", + "+05:000", + "+00:00", + "-00:00", + "-11:", + ":00", + "AA:BB", + ":", + "1:98", + "-37:00", + "" + ] + } + }, + "doc": "A string representation of timezone", + "aliases": [ + "timezone" + ] + }, + { + "name": "LATITUDE", + "type": { + "type": "double", + "logicalType": "latitude", + "arg.properties": { + "options": [ + -90.1, + 90.1, + 60.896802461096335, + 19.620623405587907, + 2000.0, + -2000.0 + ] + } + }, + "doc": "A double representation of latitude", + "aliases": [ + "latitude" + ] + }, + { + "name": "LONGITUDE", + "type": { + "type": "double", + "logicalType": "longitude", + "arg.properties": { + "options": [ + -90.1, + 90.1, + 60.896802461096335, + 19.620623405587907, + 2000.0, + -2000.0 + ] + } + }, + "doc": "A double representation of longitude", + "aliases": [ + "longitude" + ] + }, + { + "name": "GEOMETRY", + "type": { + "type": "string", + "logicalType": "geometry", + "arg.properties": { + "options": [ + "{\"type\": \"Point\", \"coordinates\": [83.85858933276846, 71.6389665812352]}", + "{\"type\": \"LineString\", \"coordinates\": [[1.608617407055661, -78.73731870470039], [9.233333601632339, 179.35618944377535], [76.67083587579512, -9.426422664692637]]}", + "{\"type\": \"MultiLineString\", \"coordinates\": [[[-62.88038973341574, -7.884525178928072], [66.62719048051727, 145.7757244249645]], [[-17.12030356893561, -41.22146995188922], [20.98303684075934, 75.2642730867853]]]}", + "invalid", + "", + "{}", + "{'type': 'invalid'}" + ] + } + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space", + "aliases": [ + "geometry" + ] + }, + { + "name": "FEATURE", + "type": { + "type": "string", + "logicalType": "feature", + "arg.properties": { + "options": [ + "{\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[0.04663030905000198, -121.56197861492906], [76.29177684652296, 78.16814444674833], [-55.01124082925347, 125.72150609944998]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}", + "{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-65.64400991049877, 52.29151789124609], [-38.041574011488024, 143.10225630696914], [-60.605846152018785, 41.472639873206816], [-65.64400991049877, 52.29151789124609]]], [[[-6.815279395562541, 116.12152263328517], [30.92811713123509, 75.18762820656474], [-17.963080757434298, 167.78113693494697], [-6.815279395562541, 116.12152263328517]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}", + "{\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-29.334665882083, -146.60839755831736]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}", + "invalid", + "", + "{}", + "{'type': 'invalid'}", + "{\"type\": \"Point\", \"coordinates\": [83.85858933276846, 71.6389665812352]}" + ] + } + }, + "doc": "A Feature object represents a spatially bounded thing", + "aliases": [ + "feature" + ] + }, + { + "name": "FEATURE_COLLECTION", + "type": { + "type": "string", + "logicalType": "feature-collection", + "arg.properties": { + "options": [ + "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-1.867158911404701, -90.27531864319347], [63.5382867569839, 136.17493352529294]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[71.18439879377914, -169.61479086298385], [-32.83066571071359, 69.7533031231707], [-44.67841400113613, -111.45740226847289], [71.18439879377914, -169.61479086298385]]], [[[-23.32145842025224, 163.02236996069666], [70.66813767071994, -7.124959740229997], [-16.080966255400355, 119.64528468466801], [-23.32145842025224, 163.02236996069666]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-70.24643380933952, 104.31204415936338], [68.48055794394433, 7.5247658724218525], [-2.7820364780107525, 51.72088124827221], [-70.24643380933952, 104.31204415936338]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[23.331816514267643, -129.02350660196527], [-67.33313931923854, -125.46036922875982]], [[33.57349837726482, -24.846030003957168], [15.303115231241904, -116.16856677209415]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[18.917754571217884, 52.190677943927454], [-47.75841196162983, -119.46794524419475], [18.6648295247426, -64.62891329509273], [18.917754571217884, 52.190677943927454]]], [[[72.06785851992095, -163.02441175460802], [-88.48255106182341, -137.65518719341597], [-47.07601992800039, 37.60930664928466], [72.06785851992095, -163.02441175460802]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-83.138780187925, 157.33529151142181], [-83.64813323974192, 109.36130468577329], [-45.716180636337356, -38.125501493399696], [-83.138780187925, 157.33529151142181]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-47.24214375647202, -35.514038622067915], [-89.39349388756034, -176.37406797796476], [41.32360097125755, 70.16247569746335], [-47.24214375647202, -35.514038622067915]]], [[[27.07305924971098, 45.688414593785524], [-7.289580334066812, -103.10057017427428], [6.573108312868115, 22.037416247588055], [27.07305924971098, 45.688414593785524]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.301001952643063, 146.13584284200078]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-67.79315735408184, -68.03193431648407], [80.39360165337001, 121.34798073222873]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-33.78320125245034, -68.23968809532704], [67.83597215887056, 94.62443304420935], [80.54142551247953, -17.883846172672833]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", + "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-69.16091937553688, 110.23354387866686], [-17.81735887932585, 113.2744468510507]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [62.75745916665444, 176.74676197324504]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-7.514075414510742, -43.16356175087137]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[40.021056250582006, 60.65211681709138], [45.35028056651753, -114.2616702183166], [89.88034998612721, -101.39727539717974]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[72.5365105239107, -119.49427440748279], [55.70405914007731, -171.96151099495518], [-50.44751452275972, 53.532071026353094], [72.5365105239107, -119.49427440748279]]], [[[-83.20486449408207, 10.378190646545306], [-67.34024525291971, 86.36510872230758], [-85.16828773186253, -8.560965456512292], [-83.20486449408207, 10.378190646545306]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-3.5260553286850893, 6.817642886123309], [-63.75798263101828, -58.23966495457404], [51.086622820248095, -127.53775035064764], [-3.5260553286850893, 6.817642886123309]]], [[[-25.51837687755139, -15.27744020587383], [-71.38752359475777, -161.5131092935444], [86.28703120003321, 109.28564089638752], [-25.51837687755139, -15.27744020587383]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-11.612417557114384, 154.9154668705993], [5.021873094043343, 69.49687534607742], [56.80836206520238, 126.93701253044316]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-82.55561106677499, 0.447771698179281], [15.768625684965158, -148.5751625393454], [-38.500267092109965, -94.5695814685565]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[44.5378981002369, -29.79485171335594], [-4.614081083542374, 50.14324703578643]], [[-34.087454055820885, 165.64410706723942], [31.30554694313765, 22.530559289580737]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-42.69849323471047, 51.431448151254585], [15.110025996462085, 120.03895941011604], [10.585255860270536, 131.8307641624089], [-42.69849323471047, 51.431448151254585]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", + "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[58.46286075328916, 25.645208644676643], [80.25047595712385, -83.350766591553]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[-18.327561500299353, -72.79650715622958], [-26.98124381836807, 91.77404895243762]], [[18.794805090390682, 52.22768440030217], [24.64167867281492, -109.83806381484352]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[38.357199380684506, 129.8756284862298], [-56.33847791807992, 33.99922597558327], [2.2171435818095944, -13.31799952115179], [38.357199380684506, 129.8756284862298]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[84.20562507638921, -160.40882830530217], [10.842194445722555, -138.1731026003748], [44.767833049478014, -52.57200953176559], [84.20562507638921, -160.40882830530217]]], [[[6.102908199568759, 10.795252852933203], [-31.106772820646682, 61.65042019776982], [-64.01708053563729, -108.94658938614187], [6.102908199568759, 10.795252852933203]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-29.53735735877531, -147.8640054152043], [-58.82679352019741, 112.57612099218022], [14.98238901607148, -65.85491836074006], [-29.53735735877531, -147.8640054152043]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[83.24237481525904, 40.0159982000111], [-49.39380608605501, -69.00894065716054], [71.49165371414698, -8.269353470693972], [83.24237481525904, 40.0159982000111]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[82.11962630987114, 58.95544613310716], [34.420962504524056, -150.6298443538362]], [[-36.88643359798914, -25.218660344284558], [42.15581789058159, 16.734408223531403]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-22.950825426196047, -155.32801566416538]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[1.1912385978825029, 82.3005035852687], [47.21307199281306, 153.27589439557306]], [[36.57150118326193, -128.9054578099788], [67.13222640414574, -152.243709957608]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-68.73882929995113, -138.1733815346053], [-85.37738380808756, 3.977899903804399], [62.9071330120679, -73.32098524309771]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", + "invalid", + "", + "{}", + "{'type': 'invalid'}", + "{\"type\": \"Point\", \"coordinates\": [83.85858933276846, 71.6389665812352]}", + "{\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [-29.334665882083, -146.60839755831736]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}" + ] + } + }, + "doc": "List of features", + "aliases": [ + "feature_collection" + ] + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string", + "arg.properties": { + "options": [ + "231b40b2-dfca-4ca5-ac10-a4a162456103", + "c1574ae4-ce38-49e1-a85d-892f56f7eea0", + "3ad4456c-9602-4996-9c86-846b9b83dd31", + "57abb8dc-28cb-44eb-8862-b9d450a24de3", + "accbc835-f21a-4439-84f6c45c248601a3-v5w249s", + "a-b-c-d-e", + "AAAAAAAAAAAAAAA" + ] + } + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver", + "arg.properties": { + "options": [ + "1945.14,0-s", + "0.0.0y+-", + "0.0.5-0+i", + "2.80.10.0-R-0|1", + "0.0.29" + ] + } + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate", + "arg.properties": { + "options": [ + 0.78, + 0.713, + 0.34, + 5.82 + ] + } + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_code2.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_code2.json new file mode 100644 index 0000000..e877304 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_code2.json @@ -0,0 +1,295 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2", + "arg.properties": { + "options": [ + "AN", + "JJJJJJJJJJ", + "", + "H4", + "55", + "XX", + "BLZ", + "108" + ] + } + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_code3.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_code3.json new file mode 100644 index 0000000..ed0f07b --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_code3.json @@ -0,0 +1,293 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3", + "arg.properties": { + "options": [ + "AF", + "XXX", + "DZAMD", + "A8D", + "020", + "" + ] + } + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_numeric.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_numeric.json new file mode 100644 index 0000000..87f176a --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_country_numeric.json @@ -0,0 +1,295 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric", + "arg.properties": { + "options": [ + "127", + "973", + "00", + "87956214", + "ALA", + "", + "2", + "6B0" + ] + } + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_currency_code.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_currency_code.json new file mode 100644 index 0000000..f9b0fb5 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_currency_code.json @@ -0,0 +1,294 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha", + "arg.properties": { + "options": [ + "AEDIN", + "ZZM", + "AL", + "", + "", + "784", + "A0A" + ] + } + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_currency_numeric.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_currency_numeric.json new file mode 100644 index 0000000..d5676b9 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_currency_numeric.json @@ -0,0 +1,294 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric", + "arg.properties": { + "options": [ + "1000", + "88", + "EUR", + "9.e0", + "+2E8", + "13:18:05", + "063305.32" + ] + } + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_date.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_date.json new file mode 100644 index 0000000..38589ac --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_date.json @@ -0,0 +1,292 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date", + "arg.properties": { + "options": [ + "00", + "", + "19", + "2014W", + "00000000" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_datetime.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_datetime.json new file mode 100644 index 0000000..e4146d6 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_datetime.json @@ -0,0 +1,289 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime", + "arg.properties": { + "options": [ + "20170929153600", + "19900304T156605Z" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_decimal.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_decimal.json new file mode 100644 index 0000000..8979e3c --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_decimal.json @@ -0,0 +1,293 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string", + "arg.properties": { + "options": [ + "e12", + "-E15", + "2.e34", + "e3", + "5,7", + "6E,4" + ] + } + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_duration.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_duration.json new file mode 100644 index 0000000..7877576 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_duration.json @@ -0,0 +1,293 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration", + "arg.properties": { + "options": [ + "", + "P", + "P1", + "8Y3M5D", + "T23H", + "P3Y13M43DT" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_feature.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_feature.json new file mode 100644 index 0000000..2d5d881 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_feature.json @@ -0,0 +1,292 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string", + "arg.properties": { + "options": [ + "invalid", + "", + "{}", + "{'type': 'invalid'}", + "{'type': 'Point', 'coordinates': [13.137473007859413, 162.2166467497301]}" + ] + } + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_feature_collection.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_feature_collection.json new file mode 100644 index 0000000..e2f0172 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_feature_collection.json @@ -0,0 +1,293 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string", + "arg.properties": { + "options": [ + "invalid", + "", + "{}", + "{'type': 'invalid'}", + "{'type': 'Point', 'coordinates': [13.137473007859413, 162.2166467497301]}", + "{'type': 'Feature', 'geometry': {'type': 'Point', 'coordinates': [-29.334665882083, -146.60839755831736]}, 'properties': {'date_time': 'Fri Jul 07 12:20:08 UTC 2023', 'crs': 'EPSG4326'}}" + ] + } + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_geometry.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_geometry.json new file mode 100644 index 0000000..d5b344d --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_geometry.json @@ -0,0 +1,291 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string", + "arg.properties": { + "options": [ + "invalid", + "", + "{}", + "{'type': 'invalid'}" + ] + } + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_imei.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_imei.json new file mode 100644 index 0000000..563b9a7 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_imei.json @@ -0,0 +1,293 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei", + "arg.properties": { + "options": [ + "262189041050750", + "889198767562944708", + "62189041050", + "AAAAAAAAAAAAAAA", + "", + "1345A6B89CD765" + ] + } + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_imsi.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_imsi.json new file mode 100644 index 0000000..7c8a2f6 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_imsi.json @@ -0,0 +1,293 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi", + "arg.properties": { + "options": [ + "002170234567891", + "2143423232323", + "", + "7480767890546324567", + "122330567890658", + "7301876A9c124f3" + ] + } + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_ipv4.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_ipv4.json new file mode 100644 index 0000000..e308b7d --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_ipv4.json @@ -0,0 +1,303 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4", + "arg.properties": { + "options": [ + "10", + "10.10", + "10.10.10", + "", + "10.10.0.0/16", + "11000000.10101000.00000101.11111111", + "10.A.10.10", + "10.10.A.10", + "10.10.10.A", + "A.10.10.10", + "10...", + ".10..", + "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789", + "256.0.0.0", + "-1.0.0.0", + "1.2.3.1.2" + ] + } + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_ipv6.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_ipv6.json new file mode 100644 index 0000000..3d36e29 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_ipv6.json @@ -0,0 +1,291 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6", + "arg.properties": { + "options": [ + "FFFF:129.144.52.38", + "ABCDE:EF01:2345:6789:ABCD:EF01:2345:6789", + "GGGG:EF01:2345:6789:ABCD:EF01:2345:6789", + "" + ] + } + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_latitude.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_latitude.json new file mode 100644 index 0000000..a528272 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_latitude.json @@ -0,0 +1,289 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude", + "arg.properties": { + "options": [ + 2.0E12, + -2.0E14 + ] + } + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_longitude.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_longitude.json new file mode 100644 index 0000000..e01c685 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_longitude.json @@ -0,0 +1,289 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude", + "arg.properties": { + "options": [ + 2.0E14, + -2.0E13 + ] + } + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_phone_number.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_phone_number.json new file mode 100644 index 0000000..6c5a4ee --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_phone_number.json @@ -0,0 +1,295 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number", + "arg.properties": { + "options": [ + "+64 (0) 24099 2001", + "1111111111111111111111111111111111", + "77777777777777777", + "+3333", + "+", + "", + "+44765DD78906", + "+158976543215" + ] + } + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_rate.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_rate.json new file mode 100644 index 0000000..806aaeb --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_rate.json @@ -0,0 +1,292 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate", + "arg.properties": { + "options": [ + 1.01, + 1256.5363, + 2.713, + 12.4562, + 5.82 + ] + } + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_semver.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_semver.json new file mode 100644 index 0000000..fec3519 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_semver.json @@ -0,0 +1,293 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver", + "arg.properties": { + "options": [ + "1945.14,0-s", + "0.6,8", + "0.0.0y+-", + "2.80.10.0-R-0|1", + "...", + "a.b.c" + ] + } + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_time.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_time.json new file mode 100644 index 0000000..50908cd --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_time.json @@ -0,0 +1,292 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time", + "arg.properties": { + "options": [ + "bad", + "", + "sd3fN4LKD", + "2014W", + "time" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_timestamp.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_timestamp.json new file mode 100644 index 0000000..c858ce0 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_timestamp.json @@ -0,0 +1,291 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp", + "arg.properties": { + "options": [ + "19868888825077T231305", + "2000-X-002-113T13:18:05", + "A1907T161805Z", + "1956-ABC-007T16:56:05Z" + ] + } + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_timezone.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_timezone.json new file mode 100644 index 0000000..7de3fa6 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_timezone.json @@ -0,0 +1,294 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone", + "arg.properties": { + "options": [ + "-11:", + ":00", + "AA:BB", + ":", + "1:98", + "-37:00", + "" + ] + } + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string" + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_uuid.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_uuid.json new file mode 100644 index 0000000..309dc73 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_bad_uuid.json @@ -0,0 +1,295 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number" + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi" + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei" + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date" + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time" + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp" + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration" + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2" + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3" + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric" + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha" + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric" + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string" + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4" + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6" + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone" + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude" + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude" + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string" + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string" + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string" + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string", + "arg.properties": { + "options": [ + "590ded1b5b42_4aee-931c-3b5a7dda8ba1", + "accbc835-f21a4439-84f6.c45c248601a3", + "accbc835-f21a-443984f6-c45c248601a3", + "accbc835-f21a-4439/84f6c45c248601a3", + "accbc835+21a-4439-84f6c45c248601a3-v5w249s", + "abcde", + "AAAAAAAAAAAAAAA", + "" + ] + } + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver" + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate" + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types/v1.0.0/extensions_malformed_rate.json b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_malformed_rate.json new file mode 100644 index 0000000..2bdb6e9 --- /dev/null +++ b/samples/extensions/qa_all_logical_types/v1.0.0/extensions_malformed_rate.json @@ -0,0 +1,358 @@ +{ + "name": "Logical_Types", + "type": "record", + "doc": "Description of logical types of spark_sdk", + "x-fp-version": "1.0.0", + "fields": [ + { + "name": "PHONE_NUMBER", + "aliases": [ + "phone_number" + ], + "type": { + "type": "string", + "logicalType": "phone-number", + "arg.properties": { + "malformed-rate": 0.5 + } + }, + "doc": "International number value according to ITU E.164" + }, + { + "name": "IMSI", + "aliases": [ + "imsi" + ], + "type": { + "type": "string", + "logicalType": "imsi", + "arg.properties": { + "malformed-rate": 0.4 + } + }, + "doc": "International Mobile Subscriber Identity" + }, + { + "name": "IMEI", + "aliases": [ + "imei" + ], + "type": { + "type": "string", + "logicalType": "imei", + "arg.properties": { + "malformed-rate": 0.7 + } + }, + "doc": "International Mobile Equipment Identity" + }, + { + "name": "DATE", + "aliases": [ + "date" + ], + "type": { + "type": "string", + "logicalType": "iso-date", + "arg.properties": { + "malformed-rate": 0.2 + } + }, + "doc": "A valid ISO-8601 value that contains a complete date representation" + }, + { + "name": "TIME", + "aliases": [ + "time" + ], + "type": { + "type": "string", + "logicalType": "time", + "arg.properties": { + "malformed-rate": 0.6 + } + }, + "doc": "A valid ISO-8601 value that contains a complete time representation" + }, + { + "name": "DATETIME", + "aliases": [ + "datetime" + ], + "type": { + "type": "string", + "logicalType": "datetime", + "arg.properties": { + "malformed-rate": 0.3 + } + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "TIMESTAMP", + "aliases": [ + "timestamp" + ], + "type": { + "type": "string", + "logicalType": "iso8601-timestamp", + "arg.properties": { + "malformed-rate": 0.3 + } + }, + "doc": "A valid ISO-8601 value that contains a complete date and time representation" + }, + { + "name": "DURATION", + "aliases": [ + "duration" + ], + "type": { + "type": "string", + "logicalType": "duration", + "arg.properties": { + "malformed-rate": 0.9 + } + }, + "doc": "A valid ISO-8601 value that contains a complete duration representation" + }, + { + "name": "COUNTRY_CODE2", + "aliases": [ + "country_code2" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-2", + "arg.properties": { + "malformed-rate": 0.7 + } + }, + "doc": "A valid ISO-3166-1 alpha-2 country code" + }, + { + "name": "COUNTRY_CODE3", + "aliases": [ + "country_code3" + ], + "type": { + "type": "string", + "logicalType": "country-code-alpha-3", + "arg.properties": { + "malformed-rate": 0.3 + } + }, + "doc": "A valid ISO-3166-1 alpha-3 country code" + }, + { + "name": "COUNTRY_NUMERIC", + "aliases": [ + "country_numeric" + ], + "type": { + "type": "string", + "logicalType": "country-code-numeric", + "arg.properties": { + "malformed-rate": 0.5 + } + }, + "doc": "A valid ISO-3166-1 numeric country code" + }, + { + "name": "CURRENCY_CODE", + "aliases": [ + "currency_code" + ], + "type": { + "type": "string", + "logicalType": "currency-code-alpha", + "arg.properties": { + "malformed-rate": 0.8 + } + }, + "doc": "A valid ISO-4217 alpha currency code" + }, + { + "name": "CURRENCY_NUMERIC", + "aliases": [ + "currency_numeric" + ], + "type": { + "type": "string", + "logicalType": "currency-code-numeric", + "arg.properties": { + "malformed-rate": 0.2 + } + }, + "doc": "A valid ISO-4217 numeric currency code" + }, + { + "name": "DECIMAL", + "aliases": [ + "decimal" + ], + "type": { + "type": "string", + "logicalType": "decimal-string", + "arg.properties": { + "malformed-rate": 0.4 + } + }, + "doc": "A string representation of a decimal numeral" + }, + { + "name": "IPV4", + "aliases": [ + "ipv4" + ], + "type": { + "type": "string", + "logicalType": "ipv4", + "arg.properties": { + "malformed-rate": 0.3 + } + }, + "doc": "A string representation of a ipv4" + }, + { + "name": "IPV6", + "aliases": [ + "ipv6" + ], + "type": { + "type": "string", + "logicalType": "ipv6", + "arg.properties": { + "malformed-rate": 0.7 + } + }, + "doc": "A string representation of a ipv6" + }, + { + "name": "TIMEZONE", + "aliases": [ + "timezone" + ], + "type": { + "type": "string", + "logicalType": "time-zone", + "arg.properties": { + "malformed-rate": 0.5 + } + }, + "doc": "A string representation of timezone" + }, + { + "name": "LATITUDE", + "aliases": [ + "latitude" + ], + "type": { + "type": "double", + "logicalType": "latitude", + "arg.properties": { + "malformed-rate": 0.2 + } + }, + "doc": "A double representation of latitude" + }, + { + "name": "LONGITUDE", + "aliases": [ + "longitude" + ], + "type": { + "type": "double", + "logicalType": "longitude", + "arg.properties": { + "malformed-rate": 0.7 + } + }, + "doc": "A double representation of longitude" + }, + { + "name": "GEOMETRY", + "aliases": [ + "geometry" + ], + "type": { + "logicalType": "geometry", + "type": "string", + "arg.properties": { + "malformed-rate": 0.5 + } + }, + "doc": "A Geometry object represents points, curves, and surfaces in coordinate space" + }, + { + "name": "FEATURE", + "aliases": [ + "feature" + ], + "type": { + "logicalType": "feature", + "type": "string", + "arg.properties": { + "malformed-rate": 0.1 + } + }, + "doc": "A Feature object represents a spatially bounded thing" + }, + { + "name": "FEATURE_COLLECTION", + "aliases": [ + "feature_collection" + ], + "type": { + "logicalType": "feature-collection", + "type": "string", + "arg.properties": { + "malformed-rate": 0.1 + } + }, + "doc": "List of features" + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string", + "arg.properties": { + "malformed-rate": 0.3 + } + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver", + "arg.properties": { + "malformed-rate": 0.8 + } + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate", + "arg.properties": { + "malformed-rate": 0.5 + } + }, + "doc": "A float representation of rate" + } + ] +} \ No newline at end of file diff --git a/samples/extensions/qa_all_logical_types_array_map_records/v1.0.0/extensions.json b/samples/extensions/qa_all_logical_types_array_map_records/v1.0.0/extensions.json index 49e16ef..68d6ad1 100644 --- a/samples/extensions/qa_all_logical_types_array_map_records/v1.0.0/extensions.json +++ b/samples/extensions/qa_all_logical_types_array_map_records/v1.0.0/extensions.json @@ -250,7 +250,7 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection", + "logicalType" : "feature-collection", "arg.properties" : { "options" : [ "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-1.867158911404701, -90.27531864319347], [63.5382867569839, 136.17493352529294]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[71.18439879377914, -169.61479086298385], [-32.83066571071359, 69.7533031231707], [-44.67841400113613, -111.45740226847289], [71.18439879377914, -169.61479086298385]]], [[[-23.32145842025224, 163.02236996069666], [70.66813767071994, -7.124959740229997], [-16.080966255400355, 119.64528468466801], [-23.32145842025224, 163.02236996069666]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-70.24643380933952, 104.31204415936338], [68.48055794394433, 7.5247658724218525], [-2.7820364780107525, 51.72088124827221], [-70.24643380933952, 104.31204415936338]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[23.331816514267643, -129.02350660196527], [-67.33313931923854, -125.46036922875982]], [[33.57349837726482, -24.846030003957168], [15.303115231241904, -116.16856677209415]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[18.917754571217884, 52.190677943927454], [-47.75841196162983, -119.46794524419475], [18.6648295247426, -64.62891329509273], [18.917754571217884, 52.190677943927454]]], [[[72.06785851992095, -163.02441175460802], [-88.48255106182341, -137.65518719341597], [-47.07601992800039, 37.60930664928466], [72.06785851992095, -163.02441175460802]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-83.138780187925, 157.33529151142181], [-83.64813323974192, 109.36130468577329], [-45.716180636337356, -38.125501493399696], [-83.138780187925, 157.33529151142181]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-47.24214375647202, -35.514038622067915], [-89.39349388756034, -176.37406797796476], [41.32360097125755, 70.16247569746335], [-47.24214375647202, -35.514038622067915]]], [[[27.07305924971098, 45.688414593785524], [-7.289580334066812, -103.10057017427428], [6.573108312868115, 22.037416247588055], [27.07305924971098, 45.688414593785524]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.301001952643063, 146.13584284200078]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-67.79315735408184, -68.03193431648407], [80.39360165337001, 121.34798073222873]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-33.78320125245034, -68.23968809532704], [67.83597215887056, 94.62443304420935], [80.54142551247953, -17.883846172672833]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", @@ -267,6 +267,75 @@ }, "doc" : "List of features", "aliases" : [ "feature_collection" ] + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string", + "arg.properties": { + "options": [ + "590ded1b5b42-4aee-931c-3b5a7dda8ba1", + "accbc835-f21a4439-84f6-c45c248601a3", + "e1d47a2d-2514-451b-aa24-5734827add4d", + "accbc835-f21a-443984f6-c45c248601a3", + "accbc835-f21a-4439-84f6c45c248601a3", + "6d299ea4-b028-4ff2-80b5-02e260d1cf67", + "accbc835-f21a-4439-84f6c45c248601a3-v5w249s", + "a-b-c-d-e", + "AAAAAAAAAAAAAAA", + "" + ] + } + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver", + "arg.properties": { + "options": [ + "1945.14,0-s", + "0.6,8", + "0.0.0y+-", + "0.0.5-0+i", + "2.80.10.0-R-0|1", + "...", + "a.b.c", + "0.0.29" + ] + } + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate", + "arg.properties": { + "options": [ + 0.78, + 1256.5363, + 0.713, + 12.4562, + 0.34, + 5.82 + ] + } + }, + "doc": "A float representation of rate" } ] }, "arg.properties" : { diff --git a/samples/extensions/qa_all_logical_types_array_records/v1.0.0/extensions.json b/samples/extensions/qa_all_logical_types_array_records/v1.0.0/extensions.json index 41478b2..dda8502 100644 --- a/samples/extensions/qa_all_logical_types_array_records/v1.0.0/extensions.json +++ b/samples/extensions/qa_all_logical_types_array_records/v1.0.0/extensions.json @@ -248,7 +248,7 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection", + "logicalType" : "feature-collection", "arg.properties" : { "options" : [ "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-1.867158911404701, -90.27531864319347], [63.5382867569839, 136.17493352529294]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[71.18439879377914, -169.61479086298385], [-32.83066571071359, 69.7533031231707], [-44.67841400113613, -111.45740226847289], [71.18439879377914, -169.61479086298385]]], [[[-23.32145842025224, 163.02236996069666], [70.66813767071994, -7.124959740229997], [-16.080966255400355, 119.64528468466801], [-23.32145842025224, 163.02236996069666]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-70.24643380933952, 104.31204415936338], [68.48055794394433, 7.5247658724218525], [-2.7820364780107525, 51.72088124827221], [-70.24643380933952, 104.31204415936338]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[23.331816514267643, -129.02350660196527], [-67.33313931923854, -125.46036922875982]], [[33.57349837726482, -24.846030003957168], [15.303115231241904, -116.16856677209415]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[18.917754571217884, 52.190677943927454], [-47.75841196162983, -119.46794524419475], [18.6648295247426, -64.62891329509273], [18.917754571217884, 52.190677943927454]]], [[[72.06785851992095, -163.02441175460802], [-88.48255106182341, -137.65518719341597], [-47.07601992800039, 37.60930664928466], [72.06785851992095, -163.02441175460802]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-83.138780187925, 157.33529151142181], [-83.64813323974192, 109.36130468577329], [-45.716180636337356, -38.125501493399696], [-83.138780187925, 157.33529151142181]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-47.24214375647202, -35.514038622067915], [-89.39349388756034, -176.37406797796476], [41.32360097125755, 70.16247569746335], [-47.24214375647202, -35.514038622067915]]], [[[27.07305924971098, 45.688414593785524], [-7.289580334066812, -103.10057017427428], [6.573108312868115, 22.037416247588055], [27.07305924971098, 45.688414593785524]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.301001952643063, 146.13584284200078]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-67.79315735408184, -68.03193431648407], [80.39360165337001, 121.34798073222873]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-33.78320125245034, -68.23968809532704], [67.83597215887056, 94.62443304420935], [80.54142551247953, -17.883846172672833]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", @@ -265,6 +265,75 @@ }, "doc" : "List of features", "aliases" : [ "feature_collection" ] + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string", + "arg.properties": { + "options": [ + "590ded1b5b42-4aee-931c-3b5a7dda8ba1", + "accbc835-f21a4439-84f6-c45c248601a3", + "e1d47a2d-2514-451b-aa24-5734827add4d", + "accbc835-f21a-443984f6-c45c248601a3", + "accbc835-f21a-4439-84f6c45c248601a3", + "6d299ea4-b028-4ff2-80b5-02e260d1cf67", + "accbc835-f21a-4439-84f6c45c248601a3-v5w249s", + "a-b-c-d-e", + "AAAAAAAAAAAAAAA", + "" + ] + } + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver", + "arg.properties": { + "options": [ + "1945.14,0-s", + "0.6,8", + "0.0.0y+-", + "0.0.5-0+i", + "2.80.10.0-R-0|1", + "...", + "a.b.c", + "0.0.29" + ] + } + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate", + "arg.properties": { + "options": [ + 0.78, + 1256.5363, + 0.713, + 12.4562, + 0.34, + 5.82 + ] + } + }, + "doc": "A float representation of rate" } ] } } diff --git a/samples/extensions/qa_all_logical_types_map_records/v1.0.0/extensions.json b/samples/extensions/qa_all_logical_types_map_records/v1.0.0/extensions.json index 23d8b22..47f12ba 100644 --- a/samples/extensions/qa_all_logical_types_map_records/v1.0.0/extensions.json +++ b/samples/extensions/qa_all_logical_types_map_records/v1.0.0/extensions.json @@ -248,7 +248,7 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection", + "logicalType" : "feature-collection", "arg.properties" : { "options" : [ "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-1.867158911404701, -90.27531864319347], [63.5382867569839, 136.17493352529294]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[71.18439879377914, -169.61479086298385], [-32.83066571071359, 69.7533031231707], [-44.67841400113613, -111.45740226847289], [71.18439879377914, -169.61479086298385]]], [[[-23.32145842025224, 163.02236996069666], [70.66813767071994, -7.124959740229997], [-16.080966255400355, 119.64528468466801], [-23.32145842025224, 163.02236996069666]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-70.24643380933952, 104.31204415936338], [68.48055794394433, 7.5247658724218525], [-2.7820364780107525, 51.72088124827221], [-70.24643380933952, 104.31204415936338]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[23.331816514267643, -129.02350660196527], [-67.33313931923854, -125.46036922875982]], [[33.57349837726482, -24.846030003957168], [15.303115231241904, -116.16856677209415]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[18.917754571217884, 52.190677943927454], [-47.75841196162983, -119.46794524419475], [18.6648295247426, -64.62891329509273], [18.917754571217884, 52.190677943927454]]], [[[72.06785851992095, -163.02441175460802], [-88.48255106182341, -137.65518719341597], [-47.07601992800039, 37.60930664928466], [72.06785851992095, -163.02441175460802]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-83.138780187925, 157.33529151142181], [-83.64813323974192, 109.36130468577329], [-45.716180636337356, -38.125501493399696], [-83.138780187925, 157.33529151142181]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-47.24214375647202, -35.514038622067915], [-89.39349388756034, -176.37406797796476], [41.32360097125755, 70.16247569746335], [-47.24214375647202, -35.514038622067915]]], [[[27.07305924971098, 45.688414593785524], [-7.289580334066812, -103.10057017427428], [6.573108312868115, 22.037416247588055], [27.07305924971098, 45.688414593785524]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.301001952643063, 146.13584284200078]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-67.79315735408184, -68.03193431648407], [80.39360165337001, 121.34798073222873]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-33.78320125245034, -68.23968809532704], [67.83597215887056, 94.62443304420935], [80.54142551247953, -17.883846172672833]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", @@ -265,6 +265,75 @@ }, "doc" : "List of features", "aliases" : [ "feature_collection" ] + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string", + "arg.properties": { + "options": [ + "590ded1b5b42-4aee-931c-3b5a7dda8ba1", + "accbc835-f21a4439-84f6-c45c248601a3", + "e1d47a2d-2514-451b-aa24-5734827add4d", + "accbc835-f21a-443984f6-c45c248601a3", + "accbc835-f21a-4439-84f6c45c248601a3", + "6d299ea4-b028-4ff2-80b5-02e260d1cf67", + "accbc835-f21a-4439-84f6c45c248601a3-v5w249s", + "a-b-c-d-e", + "AAAAAAAAAAAAAAA", + "" + ] + } + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver", + "arg.properties": { + "options": [ + "1945.14,0-s", + "0.6,8", + "0.0.0y+-", + "0.0.5-0+i", + "2.80.10.0-R-0|1", + "...", + "a.b.c", + "0.0.29" + ] + } + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate", + "arg.properties": { + "options": [ + 0.78, + 1256.5363, + 0.713, + 12.4562, + 0.34, + 5.82 + ] + } + }, + "doc": "A float representation of rate" } ] }, "arg.properties" : { @@ -274,5 +343,5 @@ } } } - } ], + } ] } diff --git a/samples/extensions/qa_all_logical_types_nested_records/v1.0.0/extensions.json b/samples/extensions/qa_all_logical_types_nested_records/v1.0.0/extensions.json index eda85e7..e33323a 100644 --- a/samples/extensions/qa_all_logical_types_nested_records/v1.0.0/extensions.json +++ b/samples/extensions/qa_all_logical_types_nested_records/v1.0.0/extensions.json @@ -252,7 +252,7 @@ "name" : "FEATURE_COLLECTION", "type" : { "type" : "string", - "logicalType" : "feature_collection", + "logicalType" : "feature-collection", "arg.properties" : { "options" : [ "{\"type\": \"FeatureCollection\", \"features\":[{\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-1.867158911404701, -90.27531864319347], [63.5382867569839, 136.17493352529294]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[71.18439879377914, -169.61479086298385], [-32.83066571071359, 69.7533031231707], [-44.67841400113613, -111.45740226847289], [71.18439879377914, -169.61479086298385]]], [[[-23.32145842025224, 163.02236996069666], [70.66813767071994, -7.124959740229997], [-16.080966255400355, 119.64528468466801], [-23.32145842025224, 163.02236996069666]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-70.24643380933952, 104.31204415936338], [68.48055794394433, 7.5247658724218525], [-2.7820364780107525, 51.72088124827221], [-70.24643380933952, 104.31204415936338]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiLineString\", \"coordinates\": [[[23.331816514267643, -129.02350660196527], [-67.33313931923854, -125.46036922875982]], [[33.57349837726482, -24.846030003957168], [15.303115231241904, -116.16856677209415]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[18.917754571217884, 52.190677943927454], [-47.75841196162983, -119.46794524419475], [18.6648295247426, -64.62891329509273], [18.917754571217884, 52.190677943927454]]], [[[72.06785851992095, -163.02441175460802], [-88.48255106182341, -137.65518719341597], [-47.07601992800039, 37.60930664928466], [72.06785851992095, -163.02441175460802]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-83.138780187925, 157.33529151142181], [-83.64813323974192, 109.36130468577329], [-45.716180636337356, -38.125501493399696], [-83.138780187925, 157.33529151142181]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPolygon\", \"coordinates\": [[[[-47.24214375647202, -35.514038622067915], [-89.39349388756034, -176.37406797796476], [41.32360097125755, 70.16247569746335], [-47.24214375647202, -35.514038622067915]]], [[[27.07305924971098, 45.688414593785524], [-7.289580334066812, -103.10057017427428], [6.573108312868115, 22.037416247588055], [27.07305924971098, 45.688414593785524]]]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [9.301001952643063, 146.13584284200078]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"MultiPoint\", \"coordinates\": [[-67.79315735408184, -68.03193431648407], [80.39360165337001, 121.34798073222873]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}, {\"type\": \"Feature\", \"geometry\": {\"type\": \"LineString\", \"coordinates\": [[-33.78320125245034, -68.23968809532704], [67.83597215887056, 94.62443304420935], [80.54142551247953, -17.883846172672833]]}, \"properties\": {\"date_time\": \"Fri Jul 07 12:20:08 UTC 2023\", \"crs\": \"EPSG4326\"}}]}", @@ -269,6 +269,75 @@ }, "doc" : "List of features", "aliases" : [ "feature_collection" ] + }, + { + "name": "UUID", + "aliases": [ + "uuid" + ], + "type": { + "type": "string", + "logicalType": "uuid-string", + "arg.properties": { + "options": [ + "590ded1b5b42-4aee-931c-3b5a7dda8ba1", + "accbc835-f21a4439-84f6-c45c248601a3", + "e1d47a2d-2514-451b-aa24-5734827add4d", + "accbc835-f21a-443984f6-c45c248601a3", + "accbc835-f21a-4439-84f6c45c248601a3", + "6d299ea4-b028-4ff2-80b5-02e260d1cf67", + "accbc835-f21a-4439-84f6c45c248601a3-v5w249s", + "a-b-c-d-e", + "AAAAAAAAAAAAAAA", + "" + ] + } + }, + "doc": "A string representation of uuid" + }, + { + "name": "SEMVER", + "aliases": [ + "SemVer" + ], + "type": { + "type": "string", + "logicalType": "semver", + "arg.properties": { + "options": [ + "1945.14,0-s", + "0.6,8", + "0.0.0y+-", + "0.0.5-0+i", + "2.80.10.0-R-0|1", + "...", + "a.b.c", + "0.0.29" + ] + } + }, + "doc": "A string representation of SemVer" + }, + { + "name": "RATE", + "aliases": [ + "rate" + ], + "type": { + "type": "float", + "logicalType": "rate", + "arg.properties": { + "options": [ + 0.78, + 1256.5363, + 0.713, + 12.4562, + 0.34, + 5.82 + ] + } + }, + "doc": "A float representation of rate" } ] } } ]