C# Class NSwag.CodeGeneration.CodeGenerators.TypeScript.SwaggerToTypeScriptClientGenerator

Generates the CSharp service client code.
Inheritance: ClientGeneratorBase
Afficher le fichier Open project: NSwag/NSwag Class Usage Examples

Private Properties

Свойство Type Description
AppendExtensionClassIfNecessary string
GenerateClientClass string
GenerateFile string
GetClassName string
GetExceptionType string
GetResultType string
GetType string
UpdateUseDtoClassAndDataConversionCodeProperties void

Méthodes publiques

Méthode Description
GenerateFile ( ) : string

Generates the file.

SwaggerToTypeScriptClientGenerator ( SwaggerDocument document, SwaggerToTypeScriptClientGeneratorSettings settings ) : System

Initializes a new instance of the SwaggerToTypeScriptClientGenerator class.

SwaggerToTypeScriptClientGenerator ( SwaggerDocument document, SwaggerToTypeScriptClientGeneratorSettings settings, TypeScriptTypeResolver resolver ) : System

Initializes a new instance of the SwaggerToTypeScriptClientGenerator class.

Méthodes protégées

Méthode Description
ResolveParameterType ( SwaggerParameter parameter ) : string

Resolves the type of the parameter.

Private Methods

Méthode Description
AppendExtensionClassIfNecessary ( string controllerName, string code ) : string
GenerateClientClass ( string controllerName, string controllerClassName, IList operations, ClientGeneratorOutputType outputType ) : string
GenerateFile ( string clientCode, IEnumerable clientClasses, ClientGeneratorOutputType outputType ) : string
GetClassName ( string className ) : string
GetExceptionType ( SwaggerOperation operation ) : string
GetResultType ( SwaggerOperation operation ) : string
GetType ( NJsonSchema.JsonSchema4 schema, bool isNullable, string typeNameHint ) : string
UpdateUseDtoClassAndDataConversionCodeProperties ( IEnumerable operations ) : void

Method Details

GenerateFile() public méthode

Generates the file.
public GenerateFile ( ) : string
Résultat string

ResolveParameterType() protected méthode

Resolves the type of the parameter.
protected ResolveParameterType ( SwaggerParameter parameter ) : string
parameter SwaggerParameter The parameter.
Résultat string

SwaggerToTypeScriptClientGenerator() public méthode

Initializes a new instance of the SwaggerToTypeScriptClientGenerator class.
is .
public SwaggerToTypeScriptClientGenerator ( SwaggerDocument document, SwaggerToTypeScriptClientGeneratorSettings settings ) : System
document SwaggerDocument The Swagger document.
settings SwaggerToTypeScriptClientGeneratorSettings The settings.
Résultat System

SwaggerToTypeScriptClientGenerator() public méthode

Initializes a new instance of the SwaggerToTypeScriptClientGenerator class.
is .
public SwaggerToTypeScriptClientGenerator ( SwaggerDocument document, SwaggerToTypeScriptClientGeneratorSettings settings, TypeScriptTypeResolver resolver ) : System
document SwaggerDocument The Swagger document.
settings SwaggerToTypeScriptClientGeneratorSettings The settings.
resolver TypeScriptTypeResolver The resolver.
Résultat System