Class SwaggerOptionsExtensions
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- Swashbuckle.AspNetCore.Swagger.dll
Extensions for helping with configuring instances of SwaggerOptions.
public static class SwaggerOptionsExtensions
- Inheritance
-
SwaggerOptionsExtensions
- Inherited Members
Methods
SetCustomDocumentSerializer<TDocumentSerializer>(SwaggerOptions, params object[])
Sets a custom Swagger document serializer to use.
public static void SetCustomDocumentSerializer<TDocumentSerializer>(this SwaggerOptions swaggerOptions, params object[] constructorParameters) where TDocumentSerializer : ISwaggerDocumentSerializer
Parameters
swaggerOptions
SwaggerOptionsThe options to configure the serializer for.
constructorParameters
object[]The parameters to pass into the constructor of the custom Swagger document serializer implementation.
Type Parameters
TDocumentSerializer
The type of the custom Swagger document serializer implementation.
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.