java.lang.Object
io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveSchema
io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveAvroSchema

public class DeriveAvroSchema extends DeriveSchema
  • Field Details

  • Constructor Details

    • DeriveAvroSchema

      public DeriveAvroSchema()
  • Method Details

    • mergeMultipleMessages

      protected com.fasterxml.jackson.databind.node.ArrayNode mergeMultipleMessages(List<com.fasterxml.jackson.databind.JsonNode> uniqueSchemas, Map<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.node.ArrayNode> schemaToIndex)
      Using mergeRecords to combine number and union types of fields
      Specified by:
      mergeMultipleMessages in class DeriveSchema
    • mergeMultipleDataTypes

      protected com.fasterxml.jackson.databind.node.ObjectNode mergeMultipleDataTypes(com.fasterxml.jackson.databind.node.ObjectNode mergedArray, List<com.fasterxml.jackson.databind.JsonNode> primitives, List<com.fasterxml.jackson.databind.JsonNode> records, List<com.fasterxml.jackson.databind.JsonNode> arrays, boolean check2dArray)
      Specified by:
      mergeMultipleDataTypes in class DeriveSchema
    • convertToFormat

      protected com.fasterxml.jackson.databind.JsonNode convertToFormat(com.fasterxml.jackson.databind.JsonNode schema, String name)
      Convert json schema template to avro format and validate generated schema
      Specified by:
      convertToFormat in class DeriveSchema
    • convertToFormatForRecord

      protected com.fasterxml.jackson.databind.node.ObjectNode convertToFormatForRecord(com.fasterxml.jackson.databind.JsonNode schema, String name)
    • convertToFormatArray

      protected com.fasterxml.jackson.databind.node.ObjectNode convertToFormatArray(com.fasterxml.jackson.databind.JsonNode schema, String name)
    • mergeUnions

      protected void mergeUnions(List<com.fasterxml.jackson.databind.JsonNode> records, List<com.fasterxml.jackson.databind.JsonNode> primitives)
      Check for fields with type union and null value, and if possible merge them Check recursively for records if there are multiple types