jellyfin/Jellyfin.Api/Extensions/ApiApplicationBuilderExtensions.cs
2019-11-23 19:43:30 +01:00

20 lines
615 B
C#

using Microsoft.AspNetCore.Builder;
namespace Jellyfin.Api.Extensions
{
public static class ApiApplicationBuilderExtensions
{
public static IApplicationBuilder UseJellyfinApiSwagger(this IApplicationBuilder applicationBuilder)
{
applicationBuilder.UseSwagger();
// Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.),
// specifying the Swagger JSON endpoint.
return applicationBuilder.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Jellyfin API V1");
});
}
}
}