mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-28 02:21:00 +01:00
add redoc
This commit is contained in:
@@ -14,14 +14,18 @@ namespace Jellyfin.Server.Extensions
|
||||
/// <returns>The updated application builder.</returns>
|
||||
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");
|
||||
});
|
||||
const string specEndpoint = "/swagger/v1/swagger.json";
|
||||
return applicationBuilder.UseSwagger()
|
||||
.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint(specEndpoint, "Jellyfin API V1");
|
||||
})
|
||||
.UseReDoc(c =>
|
||||
{
|
||||
c.SpecUrl(specEndpoint);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user