Skip to content

Fast.Swagger public API ​

Targets: net8.0;net9.0;net10.0. Select a type in the page outline to find its declaration and members. See the module guide for configuration, examples, and constraints.

Reference version 3.5.41. Source commit a8bd407bf5f6b811da7fb7bd1db827f4da119a94.

Fast.Swagger.OperationIdAttribute ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Method)]
public sealed class OperationIdAttribute : Attribute

Configures OperationId for normalized API documentation

Fast.Swagger.OperationIdAttribute.OperationIdAttribute ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public OperationIdAttribute(string operationId)

Initializes a new instance of the class

  • Parameter operationId: Unique operation identifier

Fast.Swagger.OperationIdAttribute.OperationId ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string OperationId { get; set; }

Custom OperationId

Fast.Swagger.SchemaIdAttribute ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
[AttributeUsage(AttributeTargets.Class)]
public sealed class SchemaIdAttribute : Attribute

Resolves SchemaId collisions in normalized API documentation

Fast.Swagger.SchemaIdAttribute.SchemaIdAttribute ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SchemaIdAttribute(string schemaId)

Initializes a new instance of the class

  • Parameter schemaId: Unique schema identifier

Fast.Swagger.SchemaIdAttribute.SchemaIdAttribute ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SchemaIdAttribute(string schemaId, bool replace)

Initializes a new instance of the class

  • Parameter schemaId: Unique schema identifier
  • Parameter replace: Custom value replacing the default SchemaId

Fast.Swagger.SchemaIdAttribute.SchemaId ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string SchemaId { get; set; }

Custom SchemaId

Fast.Swagger.SchemaIdAttribute.Replace ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool Replace { get; set; }

Replace completely

Remarks: Prepended by default; when true, uses SchemaId directly

Fast.Swagger.SwaggerDocumentBuilder ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public static class SwaggerDocumentBuilder

Normalized API documentation builder

Fast.Swagger.SwaggerDocumentBuilder.DocumentGroups ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static readonly IEnumerable<string> DocumentGroups;

Documentation group list

Fast.Swagger.SwaggerDocumentBuilder.CheckApiDescriptionInCurrentGroup ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static bool CheckApiDescriptionInCurrentGroup(string currentGroup, ApiDescription apiDescription)

Checks whether an operation belongs to a group

  • Parameter currentGroup: Documentation group currently being processed
  • Parameter apiDescription: Current API description
  • Returns: Returns true when the API belongs in the current documentation group; otherwise false

Fast.Swagger.SwaggerDocumentBuilder.GetOpenApiGroups ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static List<SwaggerOpenApiInfo> GetOpenApiGroups()

Gets all normalized documentation groups

  • Returns: Collection of all normalized documentation groups

Fast.Swagger.SwaggerDocumentBuilder.GetGroupOpenApiInfo ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static SwaggerOpenApiInfo GetGroupOpenApiInfo(string group)

Gets group settings

  • Parameter group: Documentation group name
  • Returns: Retrieved group settings

Fast.Swagger.SwaggerDocumentBuilder.GetControllerGroups ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static IEnumerable<GroupExtraInfo> GetControllerGroups(Type type)

Gets the controller's groups

  • Parameter type: Target type
  • Returns: Controller group collection

Fast.Swagger.SwaggerDocumentBuilder.GetActionGroups ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static IEnumerable<GroupExtraInfo> GetActionGroups(MethodInfo method)

Gets the action method's groups

  • Parameter method: Target method
  • Returns: Action method group collection

Fast.Swagger.SwaggerDocumentBuilder.GetControllerTag ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static string GetControllerTag(ControllerActionDescriptor controllerActionDescriptor)

Gets controller tags

  • Parameter controllerActionDescriptor: Description of the current controller action
  • Returns: Controller tags

Fast.Swagger.SwaggerDocumentBuilder.GetActionTag ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static string GetActionTag(ApiDescription apiDescription)

Gets action method tags

  • Parameter apiDescription: Current API description
  • Returns: Action method tags

Fast.Swagger.SwaggerDocumentBuilder.IsApiAction ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static bool IsApiAction(MethodInfo method, Type ReflectedType)

Whether this is an action method

  • Parameter method: Target method
  • Parameter ReflectedType: Reflected type
  • Returns: Returns true when the condition is met; otherwise false

Fast.Swagger.GroupExtraInfo ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public sealed class GroupExtraInfo

Additional group information

Fast.Swagger.GroupExtraInfo.Group ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Group { get; internal set; }

Group name

Fast.Swagger.GroupExtraInfo.Order ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public int Order { get; internal set; }

Group order

Fast.Swagger.GroupExtraInfo.Visible ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool Visible { get; internal set; }

Whether visible

Fast.Swagger.SwaggerLoginInfo ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public sealed class SwaggerLoginInfo

Swagger documentation authorization/login settings

Fast.Swagger.SwaggerLoginInfo.Enabled ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool Enabled { get; set; }

Whether authorization control is enabled

Fast.Swagger.SwaggerLoginInfo.CheckUrl ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string CheckUrl { get; set; }

Login-check URL

Fast.Swagger.SwaggerLoginInfo.SubmitUrl ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string SubmitUrl { get; set; }

Login submission URL

Fast.Swagger.SwaggerOpenApiInfo ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public sealed class SwaggerOpenApiInfo : OpenApiInfo

Public Swagger documentation API information

Fast.Swagger.SwaggerOpenApiInfo.SwaggerOpenApiInfo ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SwaggerOpenApiInfo()

Initializes a new instance of the class

Fast.Swagger.SwaggerOpenApiInfo.Group ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Group { get; set; }

Owning group

Fast.Swagger.SwaggerOpenApiInfo.Order ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public int? Order { get; set; }

Order

Fast.Swagger.SwaggerOpenApiInfo.Visible ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? Visible { get; set; }

Whether visible

Fast.Swagger.SwaggerOpenApiInfo.RouteTemplate ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string RouteTemplate { get; internal set; }

Route template

Fast.Swagger.SwaggerOpenApiSecurityRequirementItem ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public sealed class SwaggerOpenApiSecurityRequirementItem

Security requirement item

Fast.Swagger.SwaggerOpenApiSecurityRequirementItem.SwaggerOpenApiSecurityRequirementItem ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SwaggerOpenApiSecurityRequirementItem()

Initializes a new instance of the class

Fast.Swagger.SwaggerOpenApiSecurityRequirementItem.Scheme ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiSecurityScheme Scheme { get; set; }

Security schema

Fast.Swagger.SwaggerOpenApiSecurityRequirementItem.Accesses ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string[] Accesses { get; set; }

Permission

Fast.Swagger.SwaggerOpenApiSecurityScheme ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public sealed class SwaggerOpenApiSecurityScheme : OpenApiSecurityScheme

Swagger documentation security settings

Fast.Swagger.SwaggerOpenApiSecurityScheme.SwaggerOpenApiSecurityScheme ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SwaggerOpenApiSecurityScheme()

Initializes a new instance of the class

Fast.Swagger.SwaggerOpenApiSecurityScheme.Id ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Id { get; set; }

Unique ID

Fast.Swagger.SwaggerOpenApiSecurityScheme.Requirement ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SwaggerOpenApiSecurityRequirementItem Requirement { get; set; }

Security requirements

Fast.Swagger.IApplicationBuilderExtension ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public static class IApplicationBuilderExtension

Provides Swagger extensions for IApplicationBuilder

Fast.Swagger.IApplicationBuilderExtension.UseSwaggerDocuments ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static IApplicationBuilder UseSwaggerDocuments(this IApplicationBuilder app, Action<SwaggerOptions> configure = null,
        Action<SwaggerUIOptions> configureUI = null)

Enables Swagger

  • Parameter app: Application pipeline to configure
  • Parameter configure: Swagger configuration callback
  • Parameter configureUI: Swagger UI configuration callback
  • Returns: Returns the current application pipeline builder for fluent calls

Fast.Swagger.IServiceCollectionExtension ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public static class IServiceCollectionExtension

Provides Swagger extensions for IServiceCollection

Fast.Swagger.IServiceCollectionExtension.AddSwaggerDocuments ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static IServiceCollection AddSwaggerDocuments(this IServiceCollection services, IConfiguration configuration,
        string section = "SwaggerSettings", Action<SwaggerGenOptions> configure = null)

Adds Swagger services

  • Parameter services: The service collection to add services to
  • Parameter configuration: Configuration used to read module settings
  • Parameter section: Configuration section name
  • Parameter configure: Swagger generation configuration callback
  • Returns: Returns services for chaining

Fast.Swagger.IServiceCollectionExtension.AddSwaggerDocuments ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public static IServiceCollection AddSwaggerDocuments(this IServiceCollection services,
        Action<SwaggerSettingsOptions> optionAction, Action<SwaggerGenOptions> configure = null)

Adds Swagger services

  • Parameter services: The service collection to add services to
  • Parameter optionAction: Swagger configuration callback
  • Parameter configure: Swagger generation configuration callback
  • Returns: Returns services for chaining

Fast.Swagger.ISwaggerOptions ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public interface ISwaggerOptions

Swagger settings

Fast.Swagger.ISwaggerOptions.SwaggerGen ​

Source · Targets: net8.0, net9.0, net10.0

csharp
Action<SwaggerGenOptions> SwaggerGen();

Configures the Swagger generator

  • Returns: Configures the Swagger generator

Fast.Swagger.ISwaggerOptions.Swagger ​

Source · Targets: net8.0, net9.0, net10.0

csharp
Action<SwaggerOptions> Swagger();

Configures global Swagger parameters

  • Returns: Configures global Swagger parameters

Fast.Swagger.ISwaggerOptions.SwaggerUI ​

Source · Targets: net8.0, net9.0, net10.0

csharp
Action<SwaggerUIOptions> SwaggerUI();

Configures global Swagger UI parameters

  • Returns: Configures global Swagger UI parameters

Fast.Swagger.SwaggerSettingsOptions ​

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public sealed class SwaggerSettingsOptions : IPostConfigure

Swagger options

Fast.Swagger.SwaggerSettingsOptions.Enable ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? Enable { get; set; }

Whether to enable/register normalized API documentation

Fast.Swagger.SwaggerSettingsOptions.DocumentTitle ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string DocumentTitle { get; set; }

Document title

Fast.Swagger.SwaggerSettingsOptions.DefaultGroupName ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string DefaultGroupName { get; set; }

Default group name

Fast.Swagger.SwaggerSettingsOptions.EnableAuthorized ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? EnableAuthorized { get; set; }

Enable authorization support

Fast.Swagger.SwaggerSettingsOptions.FormatAsV2 ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? FormatAsV2 { get; set; }

Format as OpenAPI/Swagger V2

Fast.Swagger.SwaggerSettingsOptions.RoutePrefix ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string RoutePrefix { get; set; }

Normalized API documentation URL

Fast.Swagger.SwaggerSettingsOptions.DocExpansionState ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public DocExpansion? DocExpansionState { get; set; }

Documentation expansion settings

Fast.Swagger.SwaggerSettingsOptions.XmlComments ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string[] XmlComments { get; set; }

XML documentation files

Fast.Swagger.SwaggerSettingsOptions.GroupOpenApiInfos ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SwaggerOpenApiInfo[] GroupOpenApiInfos { get; set; }

Group information

Fast.Swagger.SwaggerSettingsOptions.SecurityDefinitions ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SwaggerOpenApiSecurityScheme[] SecurityDefinitions { get; set; }

Security definitions

Fast.Swagger.SwaggerSettingsOptions.Servers ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiServer[] Servers { get; set; }

Server configuration

Fast.Swagger.SwaggerSettingsOptions.HideServers ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? HideServers { get; set; }

Hide servers

Fast.Swagger.SwaggerSettingsOptions.RouteTemplate ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string RouteTemplate { get; set; }

Default swagger.json route template

Fast.Swagger.SwaggerSettingsOptions.PackagesGroups ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string[] PackagesGroups { get; set; }

Group name for installed third-party packages

Fast.Swagger.SwaggerSettingsOptions.EnableEnumSchemaFilter ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? EnableEnumSchemaFilter { get; set; }

Enable the enum schema filter

Fast.Swagger.SwaggerSettingsOptions.EnableTagsOrderDocumentFilter ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? EnableTagsOrderDocumentFilter { get; set; }

Enable the tag ordering filter

Fast.Swagger.SwaggerSettingsOptions.ServerDir ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public string ServerDir { get; set; }

Service directory used to correct IIS application hosting paths

Fast.Swagger.SwaggerSettingsOptions.LoginInfo ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public SwaggerLoginInfo LoginInfo { get; set; }

Normalized API documentation login settings

Fast.Swagger.SwaggerSettingsOptions.EnableAllGroups ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? EnableAllGroups { get; set; }

Enable All Groups

Fast.Swagger.SwaggerSettingsOptions.EnumToNumber ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? EnumToNumber { get; set; }

Generate enums as value types

Fast.Swagger.SwaggerSettingsOptions.PostConfigure ​

Source · Targets: net8.0, net9.0, net10.0

csharp
public void PostConfigure()

Documentation is inherited from an interface or base class; consult that declaration.