-
-
Notifications
You must be signed in to change notification settings - Fork 535
TypeScriptGeneratorSettings
Rico Suter edited this page Oct 20, 2017
·
16 revisions
- Package: NJsonSchema.CodeGeneration
- Settings for: TypeScriptGenerator
- Class: TypeScriptGeneratorSettings.cs
Inherits from CodeGeneratorSettingsBase
Properties:
-
TypeScriptVersion (default: 1.8): Specifies the target TypeScript version (controls whether to generate
readonly
keywords and additional typings for strict null-checks). -
TypeStyle:
-
Interface
: Generates interfaces -
Class
(default): Generates classes (lower camel cased fields, correct date handling, default values, extendable) -
KoObservableClass
: Generates classes with KnockoutJS observable fields (same advantages as with theClass
type style)
-
-
ClassTypes (list of class/type names): The type names which always generate plain TypeScript classes (i.e. force a TypeStyle of
Class
) - MarkOptionalProperties
- ModuleName
- Namespace
-
DateTimeType:
Date
,MomentJS
orString
- ExtendedClasses: Defines classes which are extendend in the generated TypeScript classes (same functionality as partial classes in C#). More information...
-
ExtensionCode: Specifies additional code which is appended (used in conjunction with
ExtendedClasses
). Can be the TypeScript code or a file path to a TypeScript file, when used as parameter in the NSwag command line - NullValue (Undefined|Null)
- HandleReferences: (default: false)
- GenerateCloneMethod: (default: false)
- GenerateConstructorInterface: (default: true, only applies for TypeStyle Class)