|
19 | 19 | using Microsoft.Extensions.DependencyInjection; |
20 | 20 | using Microsoft.Extensions.Diagnostics.HealthChecks; |
21 | 21 | using Microsoft.Extensions.Logging; |
| 22 | +using Microsoft.OpenApi.Models; |
22 | 23 | using RabbitMQ.Client; |
23 | 24 | using System; |
24 | 25 | using System.Collections.Generic; |
@@ -189,18 +190,19 @@ public static IServiceCollection AddSwagger(this IServiceCollection services, IC |
189 | 190 | services.AddSwaggerGen(options => |
190 | 191 | { |
191 | 192 | options.DescribeAllEnumsAsStrings(); |
192 | | - options.SwaggerDoc("v1", new Microsoft.OpenApi.Models.OpenApiInfo |
| 193 | + options.SwaggerDoc("v1", new OpenApiInfo |
193 | 194 | { |
194 | 195 | Title = "eShopOnContainers - Webhooks HTTP API", |
195 | 196 | Version = "v1", |
196 | 197 | Description = "The Webhooks Microservice HTTP API. This is a simple webhooks CRUD registration entrypoint" |
197 | 198 | }); |
198 | 199 |
|
199 | | - options.AddSecurityDefinition("oauth2", new Microsoft.OpenApi.Models.OpenApiSecurityScheme |
| 200 | + options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme |
200 | 201 | { |
201 | | - Flows = new Microsoft.OpenApi.Models.OpenApiOAuthFlows() |
| 202 | + Type = SecuritySchemeType.OAuth2, |
| 203 | + Flows = new OpenApiOAuthFlows() |
202 | 204 | { |
203 | | - Implicit = new Microsoft.OpenApi.Models.OpenApiOAuthFlow() |
| 205 | + Implicit = new OpenApiOAuthFlow() |
204 | 206 | { |
205 | 207 | AuthorizationUrl = new Uri($"{configuration.GetValue<string>("IdentityUrlExternal")}/connect/authorize"), |
206 | 208 | TokenUrl = new Uri($"{configuration.GetValue<string>("IdentityUrlExternal")}/connect/token"), |
|
0 commit comments