-
-
Notifications
You must be signed in to change notification settings - Fork 535
Type Name Generators
Rico Suter edited this page Jun 30, 2017
·
13 revisions
You can provide an implementation of ITypeNameGenerator via the CodeGeneratorSettingsBase.TypeNameGenerator setting to customize the class or interface name generation.
Just implement an own class implementing ITypeNameGenerator
and assign an instance of the class to the settings' property:
public class MyTypeNameGenerator : ITypeNameGenerator
{
public string Generate(
JsonSchema4 schema,
string typeNameHint,
IEnumerable<string> reservedTypeNames)
{
...
}
}
settings.TypeNameGenerator = new MyTypeNameGenerator();