Class SwaggerOptions
- Namespace
- Swashbuckle.AspNetCore.Swagger
- Assembly
- Swashbuckle.AspNetCore.Swagger.dll
public class SwaggerOptions
- Inheritance
-
SwaggerOptions
- Inherited Members
- Extension Methods
Constructors
SwaggerOptions()
public SwaggerOptions()
Properties
CustomDocumentSerializer
Gets or sets an optional custom ISwaggerDocumentSerializer implementation to use to serialize Swagger documents.
public ISwaggerDocumentSerializer CustomDocumentSerializer { get; set; }
Property Value
Remarks
For the CLI tool to be able to use this, this needs to be configured for use in the service collection of your application.
PreSerializeFilters
Actions that can be applied to an OpenApiDocument before it's serialized. Useful for setting metadata that's derived from the current request.
public List<Action<OpenApiDocument, HttpRequest>> PreSerializeFilters { get; }
Property Value
- List<Action<OpenApiDocument, HttpRequest>>
RouteTemplate
Sets a custom route for the Swagger JSON/YAML endpoint(s). Must include the {documentName} parameter
public string RouteTemplate { get; set; }
Property Value
SerializeAsV2
Return Swagger JSON/YAML in the V2 format rather than V3
public bool SerializeAsV2 { get; set; }