/// <summary> /// Key Value Schema using passed in schema type, support JSON and AVRO currently. /// </summary> public static ISchema <KeyValue <K, V> > Of(Type Key, Type Value, SchemaType Type) { Condition.CheckArgument(SchemaType.JSON == Type || SchemaType.AVRO == Type); if (SchemaType.JSON == Type) { return(new KeyValueSchema <K, V>(JSONSchema <K> .Of(Key), JSONSchema <V> .Of(Value), KeyValueEncodingType.INLINE)); } else { // AVRO return(new KeyValueSchema <K, V>(AvroSchema <K> .Of(Key), AvroSchema <V> .Of(Value), KeyValueEncodingType.INLINE)); } }
public static JSONSchema <T> Of <T>(Type Pojo, IDictionary <string, string> Properties) { return(JSONSchema <T> .Of(ISchemaDefinition <T> .Builder().WithPojo(Pojo).WithProperties(Properties).Build())); }
public static JSONSchema <T> Of(Type Pojo) { return(JSONSchema <T> .Of(ISchemaDefinition <T> .Builder().WithPojo(Pojo).Build())); }