committed by
GitHub
21 changed files with 237 additions and 108 deletions
@ -1,22 +1,22 @@ |
|||||
using Microsoft.Extensions.DependencyInjection; |
using Microsoft.Extensions.DependencyInjection; |
||||
using Microsoft.OpenApi.Models; |
using Microsoft.OpenApi.Models; |
||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
|
|
||||
namespace EShopOnAbp.Shared.Hosting.Microservices |
namespace EShopOnAbp.Shared.Hosting.AspNetCore |
||||
{ |
{ |
||||
public static class SwaggerConfigurationHelper |
public static class SwaggerConfigurationHelper |
||||
{ |
{ |
||||
public static void Configure( |
public static void Configure( |
||||
ServiceConfigurationContext context, |
ServiceConfigurationContext context, |
||||
string apiTitle |
string apiTitle |
||||
) |
) |
||||
{ |
{ |
||||
context.Services.AddSwaggerGen(options => |
context.Services.AddSwaggerGen(options => |
||||
{ |
{ |
||||
options.SwaggerDoc("v1", new OpenApiInfo {Title = apiTitle, Version = "v1"}); |
options.SwaggerDoc("v1", new OpenApiInfo {Title = apiTitle, Version = "v1"}); |
||||
options.DocInclusionPredicate((docName, description) => true); |
options.DocInclusionPredicate((docName, description) => true); |
||||
options.CustomSchemaIds(type => type.FullName); |
options.CustomSchemaIds(type => type.FullName); |
||||
}); |
}); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
@ -1,9 +1,9 @@ |
|||||
using Microsoft.Extensions.DependencyInjection; |
using System.Collections.Generic; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
using Microsoft.OpenApi.Models; |
using Microsoft.OpenApi.Models; |
||||
using System.Collections.Generic; |
|
||||
using Volo.Abp.Modularity; |
using Volo.Abp.Modularity; |
||||
|
|
||||
namespace EShopOnAbp.Shared.Hosting.Gateways |
namespace EShopOnAbp.Shared.Hosting.AspNetCore |
||||
{ |
{ |
||||
public static class SwaggerWithAuthConfigurationHelper |
public static class SwaggerWithAuthConfigurationHelper |
||||
{ |
{ |
||||
@ -0,0 +1,20 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace EShopOnAbp.Shared.Hosting.Gateways |
||||
|
{ |
||||
|
public class OcelotConfiguration |
||||
|
{ |
||||
|
public string ServiceName { get; set; } |
||||
|
public string DownstreamPathTemplate { get; set; } |
||||
|
public string DownstreamScheme { get; set; } |
||||
|
public string UpstreamPathTemplate { get; set; } |
||||
|
public List<string> UpstreamHttpMethod { get; set; } |
||||
|
public List<HostAndPort> DownstreamHostAndPorts { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class HostAndPort |
||||
|
{ |
||||
|
public string Host { get; set; } |
||||
|
public int Port { get; set; } |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue