From a73876995085bfb5aa7f6e1929764320e1a9ec68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onurkan=20Bak=C4=B1rc=C4=B1?= Date: Tue, 22 Mar 2022 01:00:36 +0300 Subject: [PATCH] Identity server syntax err edited. --- src/Services/Identity/Identity.API/Startup.cs | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src/Services/Identity/Identity.API/Startup.cs b/src/Services/Identity/Identity.API/Startup.cs index 70a667a72..8fded06ba 100644 --- a/src/Services/Identity/Identity.API/Startup.cs +++ b/src/Services/Identity/Identity.API/Startup.cs @@ -89,28 +89,30 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API services.AddControllersWithViews(); services.AddRazorPages(); - 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 + 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 { - Name = "Microsoft Contact", - Url = new Uri("https://microsoft.com/") - }, - License = new OpenApiLicense - { - Name = "Microsoft License", - Url = new Uri("https://microsoft.com/") - } - }); - + 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);