Class ServiceCollectionExtensions
- Assembly
- Codebelt.Extensions.Swashbuckle.AspNetCore.dll
Extension methods for the IServiceCollection interface.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
Methods
AddRestfulSwagger(IServiceCollection, Action<RestfulSwaggerOptions>)
Adds complementary configurations for both Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenOptions and Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIOptions - optimized for RESTful APIs.
public static IServiceCollection AddRestfulSwagger(this IServiceCollection services, Action<RestfulSwaggerOptions> setup = null)
Parameters
services
IServiceCollectionThe IServiceCollection to extend.
setup
Action<RestfulSwaggerOptions>The RestfulSwaggerOptions that may be configured.
Returns
- IServiceCollection
A reference to
services
so that additional calls can be chained.