Skip to content

Instantly share code, notes, and snippets.

@lamoboos223
Created May 7, 2022 00:15
Show Gist options
  • Save lamoboos223/8255aa4453f7b03f59a970169766bd29 to your computer and use it in GitHub Desktop.
Save lamoboos223/8255aa4453f7b03f59a970169766bd29 to your computer and use it in GitHub Desktop.
{
"type": "record",
"namespace": "com.example.restaurant.avro.schema",
"name": "OrderAvro",
"fields": [
{
"name": "eventType",
"type": "string",
"default": "ORDER_CREATED"
},
{
"name": "takeAway",
"type": "boolean",
"default": false
},
{
"name": "items",
"default": [],
"type": {
"type": "array",
"items": {
"name": "ItemAvro",
"type": "record",
"fields": [
{
"name": "id",
"type": "int"
},
{
"name": "name",
"type": "string"
},
{
"name": "price",
"type": "double"
}
]
}
}
},
{
"name": "status",
"type": "string",
"default": "PENDING"
},
{
"name": "total",
"type": "double",
"default": 0.00
},
{
"name": "vat",
"type": "double",
"default": 0.00
},
{
"name": "timestamp",
"type": "string",
"default": "0000.00.00.00.00.00"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment