This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.NSwag.
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 | Swagger |
Settings to further control the spec generation process |
Return Value
Type | Description |
---|---|
AssemblySource | The metadata source |