SwaggerGeneratorSettings Class

Summary

Settings to control the creation of Swagger (Open API) specifications
Assembly
Cake.NSwag.dll
Namespace
Cake.NSwag.Settings
Base Types
graph BT Type-->Base0["GeneratorSettings"] click Base0 "/api/Cake.NSwag.Settings/GeneratorSettings" Base0-->Base1["Object"] Type["SwaggerGeneratorSettings"] class Type type-node

Syntax

public class SwaggerGeneratorSettings : GeneratorSettings

Constructors

Properties

Name Value Summary
ApiDescription string
Gets or sets the API description for the generated specification
ApiTitle string
Gets or sets the API title for the generated defintion
AssemblyPaths IEnumerable<FilePath>
Additional assembly paths to search for references when generating metadata
BasePath string
Gets or sets the base path for the API specification
CamelCaseProperties bool
Gets or sets a value indicating whether to represent properties in camel case in generated code.
ClientSettings ClientGeneratorBaseSettings
Container for operation-specific settings used when generating client libraries.
Inherited from GeneratorSettings
ControllerSettings ControllerGeneratorBaseSettings
Container for operation-specific settings used when generating controller code.
Inherited from GeneratorSettings
DefaultUrlTemplate string
Default URL template to be used when parsing routes
EnumAsString bool
Gets or sets a value indicating whether to represent enums as strings
JsonSettings JsonSchemaGeneratorSettings
Container for operation-specific settings used when generating JSON schemas, including Swagger specifications.
Inherited from GeneratorSettings

Methods

Name Value Summary
WithSettings(ClientGeneratorBaseSettings) GeneratorSettings
Specifies operation-specific settings for generating client code.
Inherited from GeneratorSettings
WithSettings(ControllerGeneratorBaseSettings) GeneratorSettings
Specificies operation-specific settings for generating controller code
Inherited from GeneratorSettings
WithSettings(JsonSchemaGeneratorSettings) GeneratorSettings
Specifies operation-specific settings for generating JSON schemas, including Swagger specifications.
Inherited from GeneratorSettings

Extension Methods

Name Value Summary
Dump<SwaggerGeneratorSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<SwaggerGeneratorSettings>(SwaggerGeneratorSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<SwaggerGeneratorSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<SwaggerGeneratorSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
SearchAssemblies(FilePath[]) SwaggerGeneratorSettings
Adds the given assemblies to the srach paths to gather additional metadata from.
Requires the Cake.NSwag addin
ThrowIfNull<SwaggerGeneratorSettings>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<SwaggerGeneratorSettings>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin
UseBasePath(string) SwaggerGeneratorSettings
Sets the base path for use in the Swagger specification
Requires the Cake.NSwag addin
UseIntegerEnums() SwaggerGeneratorSettings
Enables representing enums as integers in generated specifications
Requires the Cake.NSwag addin
UseStringEnums() SwaggerGeneratorSettings
Enables representing enums as strings in generated specifications
Requires the Cake.NSwag addin
UseUrlTemplate(string) SwaggerGeneratorSettings
Sets the default URL template to be used when parsing routes
Requires the Cake.NSwag addin
WithDescription(string) SwaggerGeneratorSettings
Sets the API description for use in the generated specification
Requires the Cake.NSwag addin
WithTitle(string) SwaggerGeneratorSettings
Sets the API title for the generated specification
Requires the Cake.NSwag addin