-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
TypeScriptClientGeneratorSettings
Rico Suter edited this page Jun 6, 2019
·
10 revisions
- Package: NSwag.CodeGeneration
- Settings for: TypeScriptClientGenerator
- Class: TypeScriptClientGeneratorSettings.cs
Inherits ClientGeneratorBaseSettings
Properties:
- TypeScriptGeneratorSettings: The TypeScript DTO interface/class generator settings (implemented in NJsonSchema)
-
ClassName: The client class name. If multiple classes are generated, the placeholder
{controller}
is replaced with the name of the controller. -
Template: More information...
- JQueryCallbacks: The generated client class uses callbacks and JQuery for HTTP calls
- JQueryPromises: The generated client class uses the promises (Q or ES polyfilled) and JQuery for HTTP calls
- AngularJS: The generated client class uses the $http service from AngularJS
- Angular: The generated client class uses the http service from Angular 2
- Fetch: Uses the window.fetch API and ES6 promises
- Aurelia: Uses the fetch client of aurelia
- PromiseType: The promise type (Promise | QPromise), can only be changed for the JQuery templates
- WrapDtoExceptions: Specifies whether DTO exceptions are wrapped in a SwaggerError instance or thrown directly (default: false).
- ClientBaseClass
- ConfigurationClass
- UseTransformOptionsMethod
- UseTransformResultMethod
- BaseUrlTokenName (Angular template only)
-
ProtectedMethods: Methods which are generated with the
protected
keyword (usually used to provide an own implementation and call the protected in it) - ImportRequiredTypes: (default: true)
- UseGetBaseUrlMethod: (must be implemented in the base class or extension code)
For more properties: TypeScriptClientGeneratorSettings.cs