mirror of
https://github.com/Sea-Haven-Industries/proposal-system.git
synced 2026-09-30 04:13:13 +00:00
fix(api): migrate OpenAPI types for Swashbuckle 10
This commit is contained in:
parent
f59a70f3f3
commit
6ff48dea61
1 changed files with 3 additions and 9 deletions
|
|
@ -8,7 +8,7 @@ using FluentValidation;
|
|||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Microsoft.OpenApi;
|
||||
using ProposalSystem.Api.Middleware;
|
||||
using ProposalSystem.Api.Services;
|
||||
using ProposalSystem.Application.Interfaces;
|
||||
|
|
@ -186,15 +186,9 @@ builder.Services.AddSwaggerGen(options =>
|
|||
In = ParameterLocation.Header,
|
||||
Description = "Cognito JWT access token",
|
||||
});
|
||||
options.AddSecurityRequirement(new OpenApiSecurityRequirement
|
||||
options.AddSecurityRequirement(document => new OpenApiSecurityRequirement
|
||||
{
|
||||
{
|
||||
new OpenApiSecurityScheme
|
||||
{
|
||||
Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" },
|
||||
},
|
||||
Array.Empty<string>()
|
||||
},
|
||||
[new OpenApiSecuritySchemeReference("Bearer", document)] = [],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue