Skip to content

Commit cb6f58a

Browse files
committed
added car avro schemas
1 parent 876bab0 commit cb6f58a

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

README.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ Register first version of schema:
519519
[source,bash]
520520
----
521521
curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
522-
--data @src/main/resources/car_v1.avsc \
522+
--data @avro/car_v1.avsc \
523523
http://localhost:8081/subjects/cars-value/versions
524524
----
525525
@@ -568,7 +568,7 @@ Register new version of schema, with the addition of a field with default value:
568568
[source,bash]
569569
----
570570
curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
571-
--data @src/main/resources/car_v2.avsc \
571+
--data @avro/car_v2.avsc \
572572
http://localhost:8081/subjects/cars-value/versions
573573
----
574574
@@ -586,7 +586,7 @@ Register new version of schema, with the addition of a field with a required val
586586
[source,bash]
587587
----
588588
curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
589-
--data @src/main/resources/car_v3.avsc \
589+
--data @avro/car_v3.avsc \
590590
http://localhost:8081/subjects/cars-value/versions
591591
----
592592

avro/car_v1.avsc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"schema": "{ \"type\": \"record\", \"name\": \"Car\", \"namespace\": \"org.hifly.kafka.demo.producer.serializer.avro\",\"fields\": [ {\"name\": \"model\",\"type\": \"string\"},{\"name\": \"brand\",\"type\": \"string\"}] }" }

avro/car_v2.avsc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"schema": "{ \"type\": \"record\", \"name\": \"Car\", \"namespace\": \"org.hifly.kafka.demo.producer.serializer.avro\",\"fields\": [ {\"name\": \"engine\",\"type\": \"string\", \"default\":\"diesel\"}, {\"name\": \"model\",\"type\": \"string\"},{\"name\": \"brand\",\"type\": \"string\"}] }" }

avro/car_v3.avsc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"schema": "{ \"type\": \"record\", \"name\": \"Car\", \"namespace\": \"org.hifly.kafka.demo.producer.serializer.avro\",\"fields\": [ {\"name\": \"engine\",\"type\": \"string\"}, {\"name\": \"model\",\"type\": \"string\"},{\"name\": \"brand\",\"type\": \"string\"}] }" }

0 commit comments

Comments
 (0)