From: Kai Moritz Date: Sun, 7 Jun 2020 18:00:00 +0000 (+0200) Subject: TMP X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;ds=inline;p=demos%2Fmicroservices TMP --- diff --git a/validate-user/order-and-user.avsc b/validate-user/order-and-user.avsc new file mode 100644 index 0000000..7690f79 --- /dev/null +++ b/validate-user/order-and-user.avsc @@ -0,0 +1,27 @@ +[ + { + "namespace": "de.trion.microservices.avro", + "type": "enum", + "name": "CustomerLevel", + "symbols" : [ "BRONZE", "SILVER", "GOLD", "UNWANTED" ] + }, + { + "namespace": "de.trion.microservices.avro", + "type": "record", + "name": "User", + "fields": [ + { "name": "id", "type": "long" }, + { "name": "level", "type": "CustomerLevel" }, + { "name": "name", "type": "string" } + ] + }, + { + "namespace": "de.trion.microservices.avro", + "type": "record", + "name": "OrderAndUser", + "fields": [ + { "name": "orderId", "type": "string" }, + { "name": "user", "type": [ "null", "User" ] } + ] + } +] diff --git a/validate-user/user.avsc b/validate-user/user.avsc new file mode 100644 index 0000000..29cfce8 --- /dev/null +++ b/validate-user/user.avsc @@ -0,0 +1,19 @@ +{ + "namespace": "de.trion.microservices.avro", + "type": "record", + "name": "User", + "fields": [ + { "name": "id", "type": "long" }, + { + "name": "level", + "type": + { + "namespace": "de.trion.microservices.avro", + "type": "enum", + "name": "CustomerLevel", + "symbols" : [ "BRONZE", "SILVER", "GOLD", "UNWANTED" ] + } + }, + { "name": "name", "type": "string" } + ] +}