Mike U
Mike U

Reputation: 237

Combine avro schema into a single object before validation?

I am using kafka, avro, schema registry. My avro schema is complex so some objects are in multiple files.

{
  "namespace": "com.example.avro.model",
  "type": "record",
  "name": "Company",
  "fields": [
    { "name": "name", "type": "string" },
    { "name": "address", "type": "com.example.avro.model.Address"} 
  ]
}

with address being

{
  "namespace": "com.example.avro.model",
  "type": "record",
  "name": "Address",
  "fields": [
    { "name": "city", "type": "string" },
    { "name": "house", "type": "string"} 
  ]
}

Schema registry has the Company object with the Address object declared inline, rather than a separate moodel. How can i validate the schema if changes applied?

<plugin>
   <groupId>io.confluent</groupId>
   <artifactId>kafka-schema-registry-maven-plugin</artifactId>
   <version>7.7.2</version> <!-- tried 7.8.0 as well -->
   .....
</plugin>

Can the plugin combine schema into one huge Company object before validation?

Upvotes: 0

Views: 12

Answers (0)

Related Questions