|
|
@ -19,6 +19,7 @@ using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Diagnostics.HealthChecks; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using Microsoft.OpenApi.Models; |
|
|
|
using RabbitMQ.Client; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
@ -189,18 +190,19 @@ namespace Webhooks.API |
|
|
|
services.AddSwaggerGen(options => |
|
|
|
{ |
|
|
|
options.DescribeAllEnumsAsStrings(); |
|
|
|
options.SwaggerDoc("v1", new Microsoft.OpenApi.Models.OpenApiInfo |
|
|
|
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" |
|
|
|
}); |
|
|
|
|
|
|
|
options.AddSecurityDefinition("oauth2", new Microsoft.OpenApi.Models.OpenApiSecurityScheme |
|
|
|
options.AddSecurityDefinition("oauth2", new OpenApiSecurityScheme |
|
|
|
{ |
|
|
|
Flows = new Microsoft.OpenApi.Models.OpenApiOAuthFlows() |
|
|
|
Type = SecuritySchemeType.OAuth2, |
|
|
|
Flows = new OpenApiOAuthFlows() |
|
|
|
{ |
|
|
|
Implicit = new Microsoft.OpenApi.Models.OpenApiOAuthFlow() |
|
|
|
Implicit = new OpenApiOAuthFlow() |
|
|
|
{ |
|
|
|
AuthorizationUrl = new Uri($"{configuration.GetValue<string>("IdentityUrlExternal")}/connect/authorize"), |
|
|
|
TokenUrl = new Uri($"{configuration.GetValue<string>("IdentityUrlExternal")}/connect/token"), |
|
|
|