C# Class NSwag.CodeGeneration.SwaggerGenerators.WebApi.WebApiAssemblyToSwaggerGenerator

Generates a SwaggerService from a Web API controller or type which is located in a .NET assembly.
Exibir arquivo Open project: NSwag/NSwag Class Usage Examples

Public Methods

Method Description
GenerateForControllers ( IEnumerable controllerClassNames ) : SwaggerDocument

Generates the Swagger definition for all controllers in the assembly.

GetControllerClasses ( ) : string[]

Gets the available controller classes from the given assembly.

WebApiAssemblyToSwaggerGenerator ( WebApiAssemblyToSwaggerGeneratorSettings settings ) : System

Initializes a new instance of the WebApiAssemblyToSwaggerGenerator class.

Private Methods

Method Description
GetAllReferencePaths ( WebApiAssemblyToSwaggerGeneratorSettings settings ) : string[]

Method Details

GenerateForControllers() public method

Generates the Swagger definition for all controllers in the assembly.
No assembly paths have been provided.
public GenerateForControllers ( IEnumerable controllerClassNames ) : SwaggerDocument
controllerClassNames IEnumerable The controller class names.
return SwaggerDocument

GetControllerClasses() public method

Gets the available controller classes from the given assembly.
The assembly could not be found. The assembly config file could not be found.. No assembly paths have been provided.
public GetControllerClasses ( ) : string[]
return string[]

WebApiAssemblyToSwaggerGenerator() public method

Initializes a new instance of the WebApiAssemblyToSwaggerGenerator class.
public WebApiAssemblyToSwaggerGenerator ( WebApiAssemblyToSwaggerGeneratorSettings settings ) : System
settings WebApiAssemblyToSwaggerGeneratorSettings The generator settings.
return System