Class DeriveJsonSchema
java.lang.Object
io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveSchema
io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveJsonSchema
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveSchema
classToDataType, mapper, PRIMITIVE_SCHEMA_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.fasterxml.jackson.databind.JsonNodeconvertToFormat(com.fasterxml.jackson.databind.JsonNode schema, String name) Generate json schema and check for any errorsprotected com.fasterxml.jackson.databind.node.ObjectNodemergeMultipleDataTypes(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) Merge different records into one record and different arrays into one array Multiple data types are combined through oneOfcom.fasterxml.jackson.databind.node.ArrayNodemergeMultipleMessages(List<com.fasterxml.jackson.databind.JsonNode> uniqueSchemas, Map<com.fasterxml.jackson.databind.JsonNode, com.fasterxml.jackson.databind.node.ArrayNode> schemaToIndex) Merge the unique schemas into one record by combining fields and merging data typesMethods inherited from class io.confluent.kafka.schemaregistry.maven.derive.schema.DeriveSchema
checkName, getNullSchema, getPrimitiveSchema, getSchemaForArray, getSchemaForMultipleMessages, getSchemaForRecord, getSchemaOfAllElements, getSingleDataType, mergeArrays, mergeRecords, updateSchemaInformation
-
Field Details
-
NUMBER
- See Also:
-
STRING
- See Also:
-
BOOLEAN
- See Also:
-
NULL
- See Also:
-
-
Constructor Details
-
DeriveJsonSchema
public DeriveJsonSchema()
-
-
Method Details
-
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) Merge different records into one record and different arrays into one array Multiple data types are combined through oneOf- Specified by:
mergeMultipleDataTypesin classDeriveSchema
-
mergeMultipleMessages
public 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) Merge the unique schemas into one record by combining fields and merging data types- Specified by:
mergeMultipleMessagesin classDeriveSchema
-
convertToFormat
protected com.fasterxml.jackson.databind.JsonNode convertToFormat(com.fasterxml.jackson.databind.JsonNode schema, String name) Generate json schema and check for any errors- Specified by:
convertToFormatin classDeriveSchema
-