Skip to content

Commit

Permalink
fix: JOIN-32570 validate when additional fields are passed
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-taran committed Jun 16, 2023
1 parent 40dcae4 commit 5399af4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pubsub/src/Publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class Publisher<T = unknown> {

private logWarnIfMessageViolatesSchema(data: T): void {
if (this.writerAvroType) {
if (!this.writerAvroType.isValid(data)) {
if (!this.writerAvroType.isValid(data, {noUndeclaredFields: true})) {
this.logger?.warn(`[schema-violation] [${this.topicName}] Message violates writer avro schema`, { payload: data, metadata: this.avroMessageMetadata })
}
}
Expand Down

0 comments on commit 5399af4

Please sign in to comment.