diff --git a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs index 37838b82..eb26acc5 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs +++ b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/AdministrationServiceHttpApiHostModule.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using System; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Volo.Abp; @@ -41,7 +40,6 @@ public class AdministrationServiceHttpApiHostModule : AbpModule context: context, authority: configuration["AuthServer:Authority"]!, scopes: ["AdministrationService"], - flows: ["authorization_code"], discoveryEndpoint: configuration["AuthServer:MetadataAddress"], apiTitle: "Administration Service API" ); @@ -98,9 +96,11 @@ public class AdministrationServiceHttpApiHostModule : AbpModule app.UseRouting(); app.UseAuthentication(); app.UseAbpClaimsMap(); + app.UseUnitOfWork(); + app.UseDynamicClaims(); app.UseAuthorization(); app.UseSwagger(); - app.UseSwaggerUI(options => + app.UseAbpSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Administration Service API"); @@ -108,7 +108,6 @@ public class AdministrationServiceHttpApiHostModule : AbpModule }); app.UseAbpSerilogEnrichers(); app.UseAuditing(); - app.UseUnitOfWork(); app.UseConfiguredEndpoints(); } diff --git a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json index d98cb9cd..361ecb0a 100644 --- a/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json +++ b/services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json @@ -1,7 +1,7 @@ { "App": { "SelfUrl": "https://localhost:44353", - "CorsOrigins": "https://localhost:44372,https://localhost:44373,http://localhost:4200" + "CorsOrigins": "https://localhost:44372,https://localhost:44373,http://localhost:4200,http://localhost:8080" }, "AuthServer": { "Authority": "http://localhost:8080/realms/master", diff --git a/services/basket/src/EShopOnAbp.BasketService/BasketServiceModule.cs b/services/basket/src/EShopOnAbp.BasketService/BasketServiceModule.cs index 75f0b0ce..986332b9 100644 --- a/services/basket/src/EShopOnAbp.BasketService/BasketServiceModule.cs +++ b/services/basket/src/EShopOnAbp.BasketService/BasketServiceModule.cs @@ -95,7 +95,7 @@ public class BasketServiceModule : AbpModule app.UseAbpClaimsMap(); app.UseAuthorization(); app.UseSwagger(); - app.UseSwaggerUI(options => + app.UseAbpSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Basket Service API"); diff --git a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/CatalogServiceHttpApiHostModule.cs b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/CatalogServiceHttpApiHostModule.cs index 6413e5ae..06bb461b 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/CatalogServiceHttpApiHostModule.cs +++ b/services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/CatalogServiceHttpApiHostModule.cs @@ -103,7 +103,7 @@ public class CatalogServiceHttpApiHostModule : AbpModule app.UseAbpClaimsMap(); app.UseAuthorization(); app.UseSwagger(); - app.UseSwaggerUI(options => + app.UseAbpSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Catalog Service API"); diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs index faf107de..3216c58f 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Host/CmskitServiceHttpApiHostModule.cs @@ -115,7 +115,7 @@ public class CmskitServiceHttpApiHostModule : AbpModule app.UseAbpClaimsMap(); app.UseAuthorization(); app.UseSwagger(); - app.UseSwaggerUI(options => + app.UseAbpSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Cmskit Service API"); diff --git a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs index 50a6b0e4..49141ee4 100644 --- a/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs +++ b/services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/IdentityServiceHttpApiHostModule.cs @@ -87,7 +87,7 @@ public class IdentityServiceHttpApiHostModule : AbpModule app.UseAbpClaimsMap(); app.UseAuthorization(); app.UseSwagger(); - app.UseSwaggerUI(options => + app.UseAbpSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Identity Service API"); diff --git a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/OrderingServiceHttpApiHostModule.cs b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/OrderingServiceHttpApiHostModule.cs index 1592a687..eb2e80c9 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/OrderingServiceHttpApiHostModule.cs +++ b/services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/OrderingServiceHttpApiHostModule.cs @@ -90,7 +90,7 @@ public class OrderingServiceHttpApiHostModule : AbpModule app.UseAbpClaimsMap(); app.UseAuthorization(); app.UseSwagger(); - app.UseSwaggerUI(options => + app.UseAbpSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Ordering Service API"); diff --git a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/PaymentServiceHttpApiHostModule.cs b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/PaymentServiceHttpApiHostModule.cs index 5f147d17..953d02cf 100644 --- a/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/PaymentServiceHttpApiHostModule.cs +++ b/services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/PaymentServiceHttpApiHostModule.cs @@ -81,7 +81,7 @@ public class PaymentServiceHttpApiHostModule : AbpModule app.UseAbpClaimsMap(); app.UseAuthorization(); app.UseSwagger(); - app.UseSwaggerUI(options => + app.UseAbpSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService(); options.SwaggerEndpoint("/swagger/v1/swagger.json", "Payment Service API"); diff --git a/shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbp.Shared.Hosting.AspNetCore.csproj b/shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbp.Shared.Hosting.AspNetCore.csproj index edcf7009..65802e99 100644 --- a/shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbp.Shared.Hosting.AspNetCore.csproj +++ b/shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbp.Shared.Hosting.AspNetCore.csproj @@ -14,6 +14,7 @@ + diff --git a/shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbpSharedHostingAspNetCoreModule.cs b/shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbpSharedHostingAspNetCoreModule.cs index 9fef08f5..0c71d886 100644 --- a/shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbpSharedHostingAspNetCoreModule.cs +++ b/shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbpSharedHostingAspNetCoreModule.cs @@ -6,8 +6,9 @@ namespace EShopOnAbp.Shared.Hosting.AspNetCore; [DependsOn( typeof(EShopOnAbpSharedHostingModule), - typeof(AbpSwashbuckleModule), - typeof(AbpAspNetCoreSerilogModule) + typeof(EShopOnAbpSharedLocalizationModule), + typeof(AbpAspNetCoreSerilogModule), + typeof(AbpSwashbuckleModule) )] public class EShopOnAbpSharedHostingAspNetCoreModule : AbpModule { diff --git a/shared/EShopOnAbp.Shared.Hosting.AspNetCore/SwaggerConfigurationHelper.cs b/shared/EShopOnAbp.Shared.Hosting.AspNetCore/SwaggerConfigurationHelper.cs index 541feb5f..3cdd0e9b 100644 --- a/shared/EShopOnAbp.Shared.Hosting.AspNetCore/SwaggerConfigurationHelper.cs +++ b/shared/EShopOnAbp.Shared.Hosting.AspNetCore/SwaggerConfigurationHelper.cs @@ -6,18 +6,6 @@ namespace EShopOnAbp.Shared.Hosting.AspNetCore; public static class SwaggerConfigurationHelper { - public static void Configure( - ServiceConfigurationContext context, - string apiTitle - ) - { - context.Services.AddSwaggerGen(options => - { - options.SwaggerDoc("v1", new OpenApiInfo {Title = apiTitle, Version = "v1"}); - options.DocInclusionPredicate((docName, description) => true); - options.CustomSchemaIds(type => type.FullName); - }); - } public static void ConfigureWithOidc( ServiceConfigurationContext context, string authority, diff --git a/shared/EShopOnAbp.Shared.Hosting.Gateways/YarpSwaggerUIBuilderExtensions.cs b/shared/EShopOnAbp.Shared.Hosting.Gateways/YarpSwaggerUIBuilderExtensions.cs index fb0c92f5..d8d12012 100644 --- a/shared/EShopOnAbp.Shared.Hosting.Gateways/YarpSwaggerUIBuilderExtensions.cs +++ b/shared/EShopOnAbp.Shared.Hosting.Gateways/YarpSwaggerUIBuilderExtensions.cs @@ -14,7 +14,7 @@ public static class YarpSwaggerUIBuilderExtensions ApplicationInitializationContext context) { app.UseSwagger(); - app.UseSwaggerUI(options => + app.UseAbpSwaggerUI(options => { var configuration = context.ServiceProvider.GetRequiredService(); var logger = context.ServiceProvider.GetRequiredService>();