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