mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-11 02:20:20 +08:00
feat: update packages to .net 10
This commit is contained in:
parent
d1dbe6209c
commit
3b86cf7917
@ -15,26 +15,26 @@ public class SecuritySchemeDocumentTransformer : IOpenApiDocumentTransformer
|
||||
document.Components.SecuritySchemes ??= new Dictionary<string, IOpenApiSecurityScheme>();
|
||||
|
||||
var securitySchemes = new Dictionary<string, IOpenApiSecurityScheme>
|
||||
{
|
||||
["Bearer"] = new OpenApiSecurityScheme
|
||||
{
|
||||
Name = "Authorization",
|
||||
Type = SecuritySchemeType.Http,
|
||||
Scheme = "bearer",
|
||||
BearerFormat = "JWT",
|
||||
In = ParameterLocation.Header,
|
||||
Description =
|
||||
{
|
||||
["Bearer"] = new OpenApiSecurityScheme
|
||||
{
|
||||
Name = "Authorization",
|
||||
Type = SecuritySchemeType.Http,
|
||||
Scheme = "bearer",
|
||||
BearerFormat = "JWT",
|
||||
In = ParameterLocation.Header,
|
||||
Description =
|
||||
"Enter 'Bearer' [space] and your token in the text input below.\n\nExample: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'",
|
||||
},
|
||||
["ApiKey"] = new OpenApiSecurityScheme
|
||||
{
|
||||
Name = "X-API-KEY",
|
||||
Type = SecuritySchemeType.ApiKey,
|
||||
In = ParameterLocation.Header,
|
||||
Description =
|
||||
},
|
||||
["ApiKey"] = new OpenApiSecurityScheme
|
||||
{
|
||||
Name = "X-API-KEY",
|
||||
Type = SecuritySchemeType.ApiKey,
|
||||
In = ParameterLocation.Header,
|
||||
Description =
|
||||
"Enter your API key in the text input below.\n\nExample: '12345-abcdef'",
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
foreach (var (key, scheme) in securitySchemes)
|
||||
{
|
||||
|
||||
@ -618,11 +618,11 @@ where TEntryPoint : class
|
||||
{
|
||||
PersistDbConnection = new NpgsqlConnection(persistOptions.ConnectionString);
|
||||
await PersistDbConnection.OpenAsync();
|
||||
|
||||
|
||||
using var scope = Fixture.ServiceProvider.CreateScope();
|
||||
var dbContext = scope.ServiceProvider.GetRequiredService<PersistMessageDbContext>();
|
||||
await dbContext.Database.EnsureCreatedAsync();
|
||||
|
||||
|
||||
await Fixture.PersistMessageBackgroundService.StartAsync(
|
||||
Fixture.CancellationTokenSource.Token);
|
||||
|
||||
@ -645,8 +645,8 @@ where TEntryPoint : class
|
||||
|
||||
_reSpawnerDefaultDb = await Respawner.CreateAsync(
|
||||
DefaultDbConnection,
|
||||
new RespawnerOptions
|
||||
{
|
||||
new RespawnerOptions
|
||||
{
|
||||
DbAdapter = DbAdapter.Postgres,
|
||||
TablesToIgnore = ["__EFMigrationsHistory",]
|
||||
});
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
namespace Integration.Test.Fakes;
|
||||
|
||||
using Flight;
|
||||
using MassTransit;
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
|
||||
namespace Flight.Flights.Dtos;
|
||||
|
||||
public record FlightDto(Guid Id, string FlightNumber, Guid AircraftId, Guid DepartureAirportId,
|
||||
DateTime DepartureDate, DateTime ArriveDate, Guid ArriveAirportId, decimal DurationMinutes, DateTime FlightDate,
|
||||
Enums.FlightStatus Status, decimal Price);
|
||||
@ -1,4 +1,5 @@
|
||||
namespace Flight.Flights.ValueObjects;
|
||||
|
||||
using System;
|
||||
using Flight.Flights.Exceptions;
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
namespace Flight.Flights.ValueObjects;
|
||||
|
||||
using System;
|
||||
using Flight.Flights.Exceptions;
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
namespace Flight.Flights.ValueObjects;
|
||||
|
||||
using System;
|
||||
using Flight.Flights.Exceptions;
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ using Integration.Test.Fakes;
|
||||
using Xunit;
|
||||
|
||||
namespace Integration.Test.Seat.Features;
|
||||
|
||||
public class ReserveSeatTests : FlightIntegrationTestBase
|
||||
{
|
||||
public ReserveSeatTests(
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using SmartCharging.Infrastructure.Exceptions;
|
||||
|
||||
namespace Passenger.Exceptions;
|
||||
|
||||
using System;
|
||||
|
||||
public class InvalidPassengerIdException : DomainException
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
namespace Passenger.Passengers.Dtos;
|
||||
|
||||
public record PassengerDto(Guid Id, string Name, string PassportNumber, Enums.PassengerType PassengerType, int Age);
|
||||
@ -1,4 +1,5 @@
|
||||
namespace Passenger.Passengers.Exceptions;
|
||||
|
||||
using BuildingBlocks.Exception;
|
||||
|
||||
public class InvalidAgeException : BadRequestException
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
namespace Passenger.Passengers.Exceptions;
|
||||
|
||||
using BuildingBlocks.Exception;
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
namespace Passenger.Passengers.Exceptions;
|
||||
|
||||
using BuildingBlocks.Exception;
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
namespace Passenger.Passengers.Models;
|
||||
|
||||
public class PassengerReadModel
|
||||
{
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
@ -6,6 +6,7 @@ using Passenger.Data;
|
||||
using Xunit;
|
||||
|
||||
namespace Integration.Test.Passenger.Features;
|
||||
|
||||
public class CompleteRegisterPassengerTests : PassengerIntegrationTestBase
|
||||
{
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user