AssemblySource.

ToSwaggerSpecification(FilePath, SwaggerGeneratorSettings) Method

Summary

Generates a Swagger (Open API) specification at the given path using the specified settings
Assembly
Cake.NSwag.dll
Namespace
Cake.NSwag.Sources
Containing Type
AssemblySource

Syntax

public AssemblySource ToSwaggerSpecification(FilePath outputFile, SwaggerGeneratorSettings settings)

Examples

NSwag.FromAssembly("./assembly.dll").ToSwaggerSpecification("./swagger.json");
NSwag.FromWebApiAssembly("./apicontroller.dll").ToSwaggerSpecification("./swagger.json");

Parameters

Name Type Description
outputFile FilePath File path for the generated API specification
settings SwaggerGeneratorSettings Settings to further control the spec generation process

Return Value

Type Description
AssemblySource The metadata source