diff --git a/docs/usage.md b/docs/usage.md index 1028e03..f10f95d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -65,11 +65,11 @@ const { SchemaType, readAVSCAsync, avdlToAVSCAsync } = require('@kafkajs/conflue // From an avsc file const schema = await readAVSCAsync('path/to/schema.avsc') -const { id } = await registry.register({ type: SchemaType.AVRO, schema }) // { id: 2 } +const { id } = await registry.register({ type: SchemaType.AVRO, schema: JSON.stringify(schema) }) // { id: 2 } // From an avdl file const schema = await avdlToAVSCAsync('path/to/protocol.avdl') -const { id } = await registry.register({ type: SchemaType.AVRO, schema }) // { id: 3 } +const { id } = await registry.register({ type: SchemaType.AVRO, schema: JSON.stringify(schema) }) // { id: 3 } ``` #### Subject @@ -317,4 +317,4 @@ const options = { ajvInstance: new Ajv() } } -``` \ No newline at end of file +```