Skip to content

Commit 662032e

Browse files
committed
import avro schema
Signed-off-by: Ning Sun <[email protected]>
1 parent 6575ac5 commit 662032e

File tree

2 files changed

+66
-2
lines changed

2 files changed

+66
-2
lines changed

formats/avro/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<packaging>jar</packaging>
3333

3434
<properties>
35-
<avro.version>1.10.2</avro.version>
35+
<avro.version>1.9.2</avro.version>
3636
<module-name>io.cloudevents.formats.avro</module-name>
3737
</properties>
3838

@@ -96,7 +96,7 @@
9696
<dependency>
9797
<groupId>org.apache.avro</groupId>
9898
<artifactId>avro</artifactId>
99-
<version>1.10.2</version>
99+
<version>${avro.version}</version>
100100
</dependency>
101101

102102
<!-- Test deps -->

formats/avro/src/main/avro/spec.avsc

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"namespace":"io.cloudevents",
3+
"type":"record",
4+
"name":"AvroCloudEvent",
5+
"version":"1.0",
6+
"doc":"Avro Event Format for CloudEvents",
7+
"fields":[
8+
{
9+
"name":"attribute",
10+
"type":{
11+
"type":"map",
12+
"values":[
13+
"null",
14+
"boolean",
15+
"int",
16+
"string",
17+
"bytes"
18+
]
19+
}
20+
},
21+
{
22+
"name": "data",
23+
"type": [
24+
"bytes",
25+
"null",
26+
"boolean",
27+
{
28+
"type": "map",
29+
"values": [
30+
"null",
31+
"boolean",
32+
{
33+
"type": "record",
34+
"name": "AvroCloudEventData",
35+
"doc": "Representation of a JSON Value",
36+
"fields": [
37+
{
38+
"name": "value",
39+
"type": {
40+
"type": "map",
41+
"values": [
42+
"null",
43+
"boolean",
44+
{ "type": "map", "values": "AvroCloudEventData" },
45+
{ "type": "array", "items": "AvroCloudEventData" },
46+
"double",
47+
"string"
48+
]
49+
}
50+
}
51+
]
52+
},
53+
"double",
54+
"string"
55+
]
56+
},
57+
{ "type": "array", "items": "AvroCloudEventData" },
58+
"double",
59+
"string"
60+
]
61+
}
62+
]
63+
}
64+

0 commit comments

Comments
 (0)