AssemblySource.

ToSwaggerSpecification(FilePath, Action<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, Action<SwaggerGeneratorSettings> configure = null)

Examples

NSwag.FromWebApiAssembly("./apicontroller.dll").ToSwaggerSpecification("./api.json");

Parameters

Name Type Description
outputFile FilePath File path for the generated API specification
configure Action<SwaggerGeneratorSettings> Optional settings to further control the specification

Return Value

Type Description
AssemblySource The metadata source