C# Class NSwag.CodeGeneration.CodeGenerators.ClientGeneratorBase

The client generator base.
Datei anzeigen Open project: NSwag/NSwag

Private Properties

Property Type Description
GenerateClientClass string
GenerateFile string
GenerateFile string
GetClassName string
GetExceptionType string
GetOperations List
GetParameterVariableName string
GetResultDescription string
GetResultType string
GetSuccessResponse SwaggerResponse
GetType string
HasResultType bool

Public Methods

Method Description
GenerateFile ( ) : string

Generates the the whole file containing all needed types.

Protected Methods

Method Description
ClientGeneratorBase ( ITypeResolver resolver, CodeGeneratorSettingsBase codeGeneratorSettings ) : System

Initializes a new instance of the ClientGeneratorBase class.

ResolveParameterType ( SwaggerParameter parameter ) : string

Resolves the type of the parameter.

Private Methods

Method Description
GenerateClientClass ( string controllerName, string controllerClassName, IList operations, ClientGeneratorOutputType outputType ) : string
GenerateFile ( SwaggerDocument document, ClientGeneratorOutputType type ) : string
GenerateFile ( string clientCode, IEnumerable clientClasses, ClientGeneratorOutputType outputType ) : string
GetClassName ( string controllerName ) : string
GetExceptionType ( SwaggerOperation operation ) : string
GetOperations ( SwaggerDocument document ) : List
GetParameterVariableName ( SwaggerParameter parameter ) : string
GetResultDescription ( SwaggerOperation operation ) : string
GetResultType ( SwaggerOperation operation ) : string
GetSuccessResponse ( SwaggerOperation operation ) : SwaggerResponse
GetType ( NJsonSchema.JsonSchema4 schema, bool isNullable, string typeNameHint ) : string
HasResultType ( SwaggerOperation operation ) : bool

Method Details

ClientGeneratorBase() protected method

Initializes a new instance of the ClientGeneratorBase class.
protected ClientGeneratorBase ( ITypeResolver resolver, CodeGeneratorSettingsBase codeGeneratorSettings ) : System
resolver ITypeResolver The type resolver.
codeGeneratorSettings CodeGeneratorSettingsBase The code generator settings.
return System

GenerateFile() public abstract method

Generates the the whole file containing all needed types.
public abstract GenerateFile ( ) : string
return string

ResolveParameterType() protected method

Resolves the type of the parameter.
protected ResolveParameterType ( SwaggerParameter parameter ) : string
parameter SwaggerParameter The parameter.
return string