11 changed files with 30 additions and 40 deletions
@ -1,30 +0,0 @@ |
|||
using System.Collections.Generic; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
using Microsoft.OpenApi.Models; |
|||
using Volo.Abp.Modularity; |
|||
|
|||
namespace EShopOnAbp.Shared.Hosting.AspNetCore |
|||
{ |
|||
public static class SwaggerWithAuthConfigurationHelper |
|||
{ |
|||
public static void Configure( |
|||
ServiceConfigurationContext context, |
|||
string authority, |
|||
Dictionary<string, string> scopes, |
|||
string apiTitle, |
|||
string apiVersion = "v1", |
|||
string apiName = "v1" |
|||
) |
|||
{ |
|||
context.Services.AddAbpSwaggerGenWithOAuth( |
|||
authority: authority, |
|||
scopes: scopes, |
|||
options => |
|||
{ |
|||
options.SwaggerDoc(apiName, new OpenApiInfo { Title = apiTitle, Version = apiVersion }); |
|||
options.DocInclusionPredicate((docName, description) => true); |
|||
options.CustomSchemaIds(type => type.FullName); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue