Initial commit - Auth
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Scalar.AspNetCore;
|
||||
|
||||
namespace Auth.API.Config;
|
||||
|
||||
public static class Swagger
|
||||
{
|
||||
public static IServiceCollection AddSwagger(this IServiceCollection services)
|
||||
{
|
||||
services.AddOpenApi(options =>
|
||||
{
|
||||
options.AddDocumentTransformer((document, context, cancellationToken) =>
|
||||
{
|
||||
document.Info.Title = "Auth API";
|
||||
document.Info.Version = "v1";
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
});
|
||||
return services;
|
||||
}
|
||||
|
||||
public static IEndpointRouteBuilder UseSwag(this IEndpointRouteBuilder app)
|
||||
{
|
||||
app.MapScalarApiReference();
|
||||
return app;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user