Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevon committed Nov 4, 2021
1 parent 7376ac6 commit fd327e5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ used to encode the message.
import avro from 'avsc'
import { readAVSCAsync } from '@kafkajs/confluent-schema-registry'

const rawSchema = await readAVSCAsync('path/to/protocol.avdl')
const readerSchema = avro.Type.forSchema(rawSchema)
const readerSchema = await readAVSCAsync('path/to/protocol.avdl')

const payload = await registry.decode(buffer, {
[SchemaType.AVRO]: { readerSchema }
Expand Down

0 comments on commit fd327e5

Please sign in to comment.