These are chat archives for NJsonSchema/NJsonSchema

8th
May 2018
Paulo Morgado
@paulomorgado
May 08 20:21
What's the difference between ArrayType and BaseArrayType and DictionaryType and DictionaryBaseType in CSharpGeneratorSettings?
Is there a way to avoid this?
public System.Collections.Generic.Dictionary<string, string> Attributes { get; set; } = new System.Collections.Generic.Dictionary<string, string>();
I'd like to have this:
public System.Collections.Generic.IDictionary<string, string> Attributes { get; set; }
Rico Suter
@RSuter
May 08 20:30
base types are used in inheritance scenarios, e.g. a schema which is a dictionary with the name MyDictionary will inherit from ArrayBaseType
ArrayType is used for properties
array properties are initialized to a new array instance when they cannot be null
This is implemented here and can be changed with an own generator:
image.png
Paulo Morgado
@paulomorgado
May 08 23:34
Thanks, @RSuter