Browse Source

Merge f8d45ee1d4 into 3af7133157

pull/1882/merge
Onurkan Bakırcı 2 years ago
committed by GitHub
parent
commit
70ea08d56e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 122 additions and 14 deletions
  1. +4
    -1
      src/Services/Basket/Basket.API/Basket.API.csproj
  2. +2
    -1
      src/Services/Basket/Basket.API/GlobalUsings.cs
  3. +16
    -1
      src/Services/Basket/Basket.API/Startup.cs
  4. +4
    -1
      src/Services/Catalog/Catalog.API/Catalog.API.csproj
  5. +16
    -3
      src/Services/Catalog/Catalog.API/Startup.cs
  6. +3
    -1
      src/Services/Identity/Identity.API/GlobalUsings.cs
  7. +5
    -0
      src/Services/Identity/Identity.API/Identity.API.csproj
  8. +25
    -1
      src/Services/Identity/Identity.API/Startup.cs
  9. +1
    -0
      src/Services/Ordering/Ordering.API/Application/Behaviors/TransactionBehaviour.cs
  10. +4
    -1
      src/Services/Ordering/Ordering.API/Ordering.API.csproj
  11. +18
    -2
      src/Services/Ordering/Ordering.API/Startup.cs
  12. +4
    -0
      src/Services/Webhooks/Webhooks.API/GlobalUsings.cs
  13. +16
    -1
      src/Services/Webhooks/Webhooks.API/Startup.cs
  14. +4
    -1
      src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj

+ 4
- 1
src/Services/Basket/Basket.API/Basket.API.csproj View File

@ -6,7 +6,10 @@
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Update="web.config">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>


+ 2
- 1
src/Services/Basket/Basket.API/GlobalUsings.cs View File

@ -58,4 +58,5 @@ global using System.Net;
global using System.Security.Claims;
global using System.Text.Json;
global using System.Threading.Tasks;
global using System;
global using System;
global using System.Reflection;

+ 16
- 1
src/Services/Basket/Basket.API/Startup.cs View File

@ -29,11 +29,26 @@ public class Startup
services.AddSwaggerGen(options =>
{
var basePath = AppDomain.CurrentDomain.BaseDirectory;
var fileName = typeof(Startup).GetTypeInfo().Assembly.GetName().Name + ".xml";
var xmlComments = Path.Combine(basePath, fileName);
options.IncludeXmlComments(xmlComments);
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "eShopOnContainers - Basket HTTP API",
Version = "v1",
Description = "The Basket Service HTTP API"
Description = "The Basket Service HTTP API",
TermsOfService = new Uri("https://microsoft.com/"),
Contact = new OpenApiContact
{
Name = "Microsoft Contact",
Url = new Uri("https://microsoft.com/")
},
License = new OpenApiLicense
{
Name = "Microsoft License",
Url = new Uri("https://microsoft.com/")
}
});
options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme


+ 4
- 1
src/Services/Catalog/Catalog.API/Catalog.API.csproj View File

@ -11,7 +11,10 @@
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Update="appsettings.json">


+ 16
- 3
src/Services/Catalog/Catalog.API/Startup.cs View File

@ -222,16 +222,29 @@ public static class CustomExtensionMethods
{
services.AddSwaggerGen(options =>
{
var basePath = AppDomain.CurrentDomain.BaseDirectory;
var fileName = typeof(Startup).GetTypeInfo().Assembly.GetName().Name + ".xml";
var xmlComments = Path.Combine(basePath, fileName);
options.IncludeXmlComments(xmlComments);
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "eShopOnContainers - Catalog HTTP API",
Version = "v1",
Description = "The Catalog Microservice HTTP API. This is a Data-Driven/CRUD microservice sample"
Description = "The Catalog Microservice HTTP API. This is a Data-Driven/CRUD microservice sample",
TermsOfService = new Uri("https://microsoft.com/terms"),
Contact = new OpenApiContact
{
Name = "Microsoft Contact",
Url = new Uri("https://microsoft.com/contact")
},
License = new OpenApiLicense
{
Name = "Microsoft License",
Url = new Uri("https://microsoft.com/license")
}
});
});
return services;
}
public static IServiceCollection AddIntegrationServices(this IServiceCollection services, IConfiguration configuration)


+ 3
- 1
src/Services/Identity/Identity.API/GlobalUsings.cs View File

@ -58,7 +58,9 @@ global using System.Security.Cryptography.X509Certificates;
global using System.Text.RegularExpressions;
global using System.Threading.Tasks;
global using System;
global using System.Reflection;
global using Microsoft.OpenApi.Models;
global using System.IO;


+ 5
- 0
src/Services/Identity/Identity.API/Identity.API.csproj View File

@ -8,6 +8,11 @@
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="Setup\**\*;">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>


+ 25
- 1
src/Services/Identity/Identity.API/Startup.cs View File

@ -1,4 +1,4 @@
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.DataProtection;
namespace Microsoft.eShopOnContainers.Services.Identity.API
{
@ -89,6 +89,30 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
services.AddControllersWithViews();
services.AddRazorPages();
services.AddSwaggerGen(options =>
{
var basePath = AppDomain.CurrentDomain.BaseDirectory;
var fileName = typeof(Startup).GetTypeInfo().Assembly.GetName().Name + ".xml";
var xmlComments = Path.Combine(basePath, fileName);
options.IncludeXmlComments(xmlComments);
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "Microsoft - Identity HTTP API",
Version = "v1",
Description = "The Identity Service HTTP API",
TermsOfService = new Uri("https://microsoft.com/"),
Contact = new OpenApiContact
{
Name = "Microsoft Contact",
Url = new Uri("https://microsoft.com/")
},
License = new OpenApiLicense
{
Name = "Microsoft License",
Url = new Uri("https://microsoft.com/")
}
});
});
var container = new ContainerBuilder();
container.Populate(services);


+ 1
- 0
src/Services/Ordering/Ordering.API/Application/Behaviors/TransactionBehaviour.cs View File

@ -3,6 +3,7 @@
using Microsoft.Extensions.Logging;
public class TransactionBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
where TRequest : IRequest<TResponse>
{
private readonly ILogger<TransactionBehaviour<TRequest, TResponse>> _logger;
private readonly OrderingContext _dbContext;


+ 4
- 1
src/Services/Ordering/Ordering.API/Ordering.API.csproj View File

@ -8,7 +8,10 @@
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Update="web.config;">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>


+ 18
- 2
src/Services/Ordering/Ordering.API/Startup.cs View File

@ -214,13 +214,29 @@ static class CustomExtensionsMethods
public static IServiceCollection AddCustomSwagger(this IServiceCollection services, IConfiguration configuration)
{
services.AddSwaggerGen(options =>
{
{
var basePath = AppDomain.CurrentDomain.BaseDirectory;
var fileName = typeof(Startup).GetTypeInfo().Assembly.GetName().Name + ".xml";
var xmlComments = Path.Combine(basePath, fileName);
options.IncludeXmlComments(xmlComments);
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "eShopOnContainers - Ordering HTTP API",
Version = "v1",
Description = "The Ordering Service HTTP API"
Description = "The Ordering Service HTTP API",
TermsOfService = new Uri("https://microsoft.com/terms"),
Contact = new OpenApiContact
{
Name = "Microsoft Contact",
Url = new Uri("https://microsoft.com/")
},
License = new OpenApiLicense
{
Name = "Microsoft License",
Url = new Uri("https://microsoft.com/")
}
});
options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme
{
Type = SecuritySchemeType.OAuth2,


+ 4
- 0
src/Services/Webhooks/Webhooks.API/GlobalUsings.cs View File

@ -48,3 +48,7 @@ global using Webhooks.API.IntegrationEvents;
global using Webhooks.API.Model;
global using Webhooks.API.Services;
global using Webhooks.API;
global using System.Reflection;
global using Microsoft.OpenApi.Models;
global using System.IO;

+ 16
- 1
src/Services/Webhooks/Webhooks.API/Startup.cs View File

@ -139,11 +139,26 @@ static class CustomExtensionMethods
{
services.AddSwaggerGen(options =>
{
var basePath = AppDomain.CurrentDomain.BaseDirectory;
var fileName = typeof(Startup).GetTypeInfo().Assembly.GetName().Name + ".xml";
var xmlComments = Path.Combine(basePath, fileName);
options.IncludeXmlComments(xmlComments);
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "eShopOnContainers - Webhooks HTTP API",
Version = "v1",
Description = "The Webhooks Microservice HTTP API. This is a simple webhooks CRUD registration entrypoint"
Description = "The Webhooks Microservice HTTP API. This is a simple webhooks CRUD registration entrypoint",
TermsOfService = new Uri("https://microsoft.com/"),
Contact = new OpenApiContact
{
Name = "Microsoft Contact",
Url = new Uri("https://microsoft.com/")
},
License = new OpenApiLicense
{
Name = "Microsoft License",
Url = new Uri("https://microsoft.com/")
}
});
options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme


+ 4
- 1
src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj View File

@ -8,7 +8,10 @@
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
<IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>
</PropertyGroup>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="5.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />


Loading…
Cancel
Save