I'm using @kafkajs/confluent-schema-registry
in a typescript node app, attempting to pull down schemas. I have done this in Java with the analogus confluent schema registry java library w\o issue.
When creating the schema registry client, I don't see a way to specify any options regarding strictness.
My JSON schema has a property named "version" that's in the schema {}
block. I am able to retrieve the latest schema ID for the subject, but retrieving the schema itself fails. Seems to be using some strictness setting that is not allowing properties to exist in the schema that it doesn't expect. I did not see this issue when accessing the schemas from the confluent schema registry java library.
Is there some way to shut off this strictness mode?
var subject = "my-subject";
var schemaRegistry = new SchemaRegistry({ host: myUrl, });
const schemaId = await schemaRegistry.getLatestSchemaId(subject);
return await schemaRegistry.getSchema(schemaId);
ConfluentSchemaRegistryArgumentError: strict mode: unknown keyword: "version"
at Object.<anonymous>.exports.schemaFromConfluentSchema (node_modules/@kafkajs/confluent-schema-registry/src/schemaTypeResolver.ts:99:11)
at SchemaRegistry.getSchema (node_modules/@kafkajs/confluent-schema-registry/src/SchemaRegistry.ts:171:28)