Skip to content

Commit 9a76a3b

Browse files
committed
fix: resolve Avro schema compilation errors
- Fix Location type reference issues in schemas - Use inline type definitions for location records - Update merchantLocation and homeLocation field definitions - Ensure all types are properly defined before reference
1 parent d6d342c commit 9a76a3b

File tree

5 files changed

+47
-2
lines changed

5 files changed

+47
-2
lines changed

src/main/java/com/codedstream/transfruad/library/avro/card_transaction.avsc renamed to src/main/java/com/codedstream/transfruad/library/avro/CardTransaction.avsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"name": "merchantLocation",
5555
"type": {
5656
"type": "record",
57-
"name": "Location",
57+
"name": "MerchantLocation",
5858
"fields": [
5959
{
6060
"name": "latitude",

src/main/java/com/codedstream/transfruad/library/avro/customer_profile.avsc renamed to src/main/java/com/codedstream/transfruad/library/avro/CustomerProfile.avsc

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,28 @@
3737
},
3838
{
3939
"name": "homeLocation",
40-
"type": "Location",
40+
"type": {
41+
"type": "record",
42+
"name": "CustomerLocation",
43+
"fields": [
44+
{
45+
"name": "latitude",
46+
"type": "double"
47+
},
48+
{
49+
"name": "longitude",
50+
"type": "double"
51+
},
52+
{
53+
"name": "city",
54+
"type": "string"
55+
},
56+
{
57+
"name": "country",
58+
"type": "string"
59+
}
60+
]
61+
},
4162
"doc": "Customer's home location"
4263
},
4364
{
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"type": "record",
3+
"name": "Location",
4+
"namespace": "com.codedstream.transfruad.library.schema",
5+
"doc": "Geographic location information",
6+
"fields": [
7+
{
8+
"name": "latitude",
9+
"type": "double"
10+
},
11+
{
12+
"name": "longitude",
13+
"type": "double"
14+
},
15+
{
16+
"name": "city",
17+
"type": "string"
18+
},
19+
{
20+
"name": "country",
21+
"type": "string"
22+
}
23+
]
24+
}

0 commit comments

Comments
 (0)