You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+143-1Lines changed: 143 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,148 @@ This functionality is backed by the following libraries:
12
12
-[fs2-kafka & fs2-kafka-vulcan](https://github.com/fd4s/fs2-kafka) which provides the serializers and deserializers interfaces that we implement along with the Schema Registry client that we enrich
13
13
-[confluent-schema-registry](https://github.com/confluentinc/schema-registry) is used as a basis for implementation and small portions are used for JSON Schema validation
14
14
15
+
### Usage ###
16
+
17
+
1. Define your data-types
18
+
```scala
19
+
objectBook {}
20
+
finalcaseclassBook(
21
+
name: String,
22
+
isbn: Int
23
+
)
24
+
25
+
objectPerson {}
26
+
finalcaseclassPersonV1(
27
+
name: String,
28
+
age: Int,
29
+
books: List[Book]
30
+
)
31
+
```
32
+
33
+
2. Derive JSON Schemas for your case classes and add extra JSON Schema information using `scala-jsonschema`
.flatMap(implicit des => kafkaConsumer[F, String, A](groupId))
150
+
```
151
+
152
+
### Settings ###
153
+
There are a number of settings that control a number of behaviors when it comes to serialization and deserialization of data.
154
+
Please check `JsonSchemaDeserializerSettings` and `JsonSchemaSerializerSettings` for more information. The `default` settings
155
+
work great unless you need fine-grained control
156
+
15
157
### Notes ###
16
-
- Please note that this is only an initial design to prove the functionality and I'm very happy to integrate this back into FS2 Kafka (and other Kafka libraries) so please submit an issue and we can take it from there
158
+
- Please note that this is only an initial design to prove the functionality, and I'm very happy to integrate this back into FS2 Kafka (and other Kafka libraries) so please submit an issue and we can take it from there
17
159
- This library provides additional validation checks for the Deserialization side on top of what Confluent provides in their Java JSON Schema Deserializer
0 commit comments