diff --git a/src/BuildingBlocks/BuildingBlocks.csproj b/src/BuildingBlocks/BuildingBlocks.csproj
index 5b7da124..64496531 100644
--- a/src/BuildingBlocks/BuildingBlocks.csproj
+++ b/src/BuildingBlocks/BuildingBlocks.csproj
@@ -78,7 +78,6 @@
-
diff --git a/src/BuildingBlocks/Core/Model/Aggregate.cs b/src/BuildingBlocks/Core/Model/Aggregate.cs
index f64caafc..31865af9 100644
--- a/src/BuildingBlocks/Core/Model/Aggregate.cs
+++ b/src/BuildingBlocks/Core/Model/Aggregate.cs
@@ -25,5 +25,5 @@ public IEvent[] ClearDomainEvents()
public long Version { get; set; }
- public TId Id { get; set; }
+ public required TId Id { get; set; }
}
diff --git a/src/BuildingBlocks/Swagger/ServiceCollectionExtensions.cs b/src/BuildingBlocks/Swagger/ServiceCollectionExtensions.cs
index cc96b213..6e56479e 100644
--- a/src/BuildingBlocks/Swagger/ServiceCollectionExtensions.cs
+++ b/src/BuildingBlocks/Swagger/ServiceCollectionExtensions.cs
@@ -62,7 +62,7 @@ public static IServiceCollection AddCustomSwagger(this IServiceCollection servic
// options.OperationFilter();
// Enables Swagger annotations (SwaggerOperationAttribute, SwaggerParameterAttribute etc.)
- options.EnableAnnotations();
+ // options.EnableAnnotations();
});
services.Configure(o => o.InferSecuritySchemes = true);
diff --git a/src/Services/Booking/src/Booking/Booking/Features/CreatingBook/Commands/V1/CreateBookingEndpoint.cs b/src/Services/Booking/src/Booking/Booking/Features/CreatingBook/Commands/V1/CreateBookingEndpoint.cs
index bff022f4..e55954b3 100644
--- a/src/Services/Booking/src/Booking/Booking/Features/CreatingBook/Commands/V1/CreateBookingEndpoint.cs
+++ b/src/Services/Booking/src/Booking/Booking/Features/CreatingBook/Commands/V1/CreateBookingEndpoint.cs
@@ -7,7 +7,6 @@ namespace Booking.Booking.Features.CreatingBook.Commands.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record CreateBookingRequestDto(Guid PassengerId, Guid FlightId, string Description);
public record CreateBookingResponseDto(ulong Id);
diff --git a/src/Services/Booking/src/Booking/Booking/Models/BookingReadModel.cs b/src/Services/Booking/src/Booking/Booking/Models/BookingReadModel.cs
index 99b7e154..9a0a32be 100644
--- a/src/Services/Booking/src/Booking/Booking/Models/BookingReadModel.cs
+++ b/src/Services/Booking/src/Booking/Booking/Models/BookingReadModel.cs
@@ -4,9 +4,9 @@
public class BookingReadModel
{
- public Guid Id { get; init; }
- public Guid BookId { get; init; }
- public Trip Trip { get; init; }
- public PassengerInfo PassengerInfo { get; init; }
- public bool IsDeleted { get; init; }
+ public required Guid Id { get; init; }
+ public required Guid BookId { get; init; }
+ public required Trip Trip { get; init; }
+ public required PassengerInfo PassengerInfo { get; init; }
+ public required bool IsDeleted { get; init; }
}
diff --git a/src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft/V1/CreateAircraftEndpoint.cs b/src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft/V1/CreateAircraftEndpoint.cs
index 33c6fc1b..b7e47339 100644
--- a/src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft/V1/CreateAircraftEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft/V1/CreateAircraftEndpoint.cs
@@ -10,7 +10,6 @@ namespace Flight.Aircrafts.Features.CreatingAircraft.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record CreateAircraftRequestDto(string Name, string Model, int ManufacturingYear);
public record CreateAircraftResponseDto(Guid Id);
diff --git a/src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft/V1/CreateAircraftMongo.cs b/src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft/V1/CreateAircraftMongo.cs
index dcb50037..d1bfb96a 100644
--- a/src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft/V1/CreateAircraftMongo.cs
+++ b/src/Services/Flight/src/Flight/Aircrafts/Features/CreatingAircraft/V1/CreateAircraftMongo.cs
@@ -7,8 +7,8 @@
using BuildingBlocks.Core.CQRS;
using BuildingBlocks.Core.Event;
using Exceptions;
-using Flight.Aircrafts.Models;
-using Flight.Data;
+using Models;
+using Data;
using MapsterMapper;
using MediatR;
using MongoDB.Driver;
diff --git a/src/Services/Flight/src/Flight/Aircrafts/Models/AircraftReadModel.cs b/src/Services/Flight/src/Flight/Aircrafts/Models/AircraftReadModel.cs
index bdca7f03..32876523 100644
--- a/src/Services/Flight/src/Flight/Aircrafts/Models/AircraftReadModel.cs
+++ b/src/Services/Flight/src/Flight/Aircrafts/Models/AircraftReadModel.cs
@@ -4,10 +4,10 @@
public class AircraftReadModel
{
- public Guid Id { get; init; }
- public Guid AircraftId { get; init; }
- public string Name { get; init; }
- public string Model { get; init; }
- public int ManufacturingYear { get; init; }
- public bool IsDeleted { get; init; }
+ public required Guid Id { get; init; }
+ public required Guid AircraftId { get; init; }
+ public required string Name { get; init; }
+ public required string Model { get; init; }
+ public required int ManufacturingYear { get; init; }
+ public required bool IsDeleted { get; init; }
}
diff --git a/src/Services/Flight/src/Flight/Airports/Features/CreatingAirport/V1/CreateAirportEndpoint.cs b/src/Services/Flight/src/Flight/Airports/Features/CreatingAirport/V1/CreateAirportEndpoint.cs
index 3c8e794d..0e924ab1 100644
--- a/src/Services/Flight/src/Flight/Airports/Features/CreatingAirport/V1/CreateAirportEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Airports/Features/CreatingAirport/V1/CreateAirportEndpoint.cs
@@ -10,7 +10,6 @@ namespace Flight.Airports.Features.CreatingAirport.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record CreateAirportRequestDto(string Name, string Address, string Code);
public record CreateAirportResponseDto(Guid Id);
diff --git a/src/Services/Flight/src/Flight/Airports/Models/AirportReadModel.cs b/src/Services/Flight/src/Flight/Airports/Models/AirportReadModel.cs
index d6d8f996..53565628 100644
--- a/src/Services/Flight/src/Flight/Airports/Models/AirportReadModel.cs
+++ b/src/Services/Flight/src/Flight/Airports/Models/AirportReadModel.cs
@@ -4,10 +4,10 @@
public class AirportReadModel
{
- public Guid Id { get; init; }
- public Guid AirportId { get; init; }
- public string Name { get; init; }
+ public required Guid Id { get; init; }
+ public required Guid AirportId { get; init; }
+ public required string Name { get; init; }
public string Address { get; init; }
- public string Code { get; init; }
- public bool IsDeleted { get; init; }
+ public required string Code { get; init; }
+ public required bool IsDeleted { get; init; }
}
diff --git a/src/Services/Flight/src/Flight/Flights/Features/CreatingFlight/V1/CreateFlightEndpoint.cs b/src/Services/Flight/src/Flight/Flights/Features/CreatingFlight/V1/CreateFlightEndpoint.cs
index 11ed5588..3fdacb17 100644
--- a/src/Services/Flight/src/Flight/Flights/Features/CreatingFlight/V1/CreateFlightEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Flights/Features/CreatingFlight/V1/CreateFlightEndpoint.cs
@@ -10,7 +10,6 @@ namespace Flight.Flights.Features.CreatingFlight.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record CreateFlightRequestDto(string FlightNumber, Guid AircraftId, Guid DepartureAirportId,
DateTime DepartureDate, DateTime ArriveDate, Guid ArriveAirportId,
diff --git a/src/Services/Flight/src/Flight/Flights/Features/DeletingFlight/V1/DeleteFlightEndpoint.cs b/src/Services/Flight/src/Flight/Flights/Features/DeletingFlight/V1/DeleteFlightEndpoint.cs
index 4dac6ce4..ba91cb2c 100644
--- a/src/Services/Flight/src/Flight/Flights/Features/DeletingFlight/V1/DeleteFlightEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Flights/Features/DeletingFlight/V1/DeleteFlightEndpoint.cs
@@ -9,7 +9,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public class DeleteFlightEndpoint : IMinimalEndpoint
{
diff --git a/src/Services/Flight/src/Flight/Flights/Features/GettingAvailableFlights/V1/GetAvailableFlightsEndpoint.cs b/src/Services/Flight/src/Flight/Flights/Features/GettingAvailableFlights/V1/GetAvailableFlightsEndpoint.cs
index 7f20dc38..899dac50 100644
--- a/src/Services/Flight/src/Flight/Flights/Features/GettingAvailableFlights/V1/GetAvailableFlightsEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Flights/Features/GettingAvailableFlights/V1/GetAvailableFlightsEndpoint.cs
@@ -10,7 +10,6 @@ namespace Flight.Flights.Features.GettingAvailableFlights.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record GetAvailableFlightsResponseDto(IEnumerable FlightDtos);
diff --git a/src/Services/Flight/src/Flight/Flights/Features/GettingFlightById/V1/GetFlightByIdEndpoint.cs b/src/Services/Flight/src/Flight/Flights/Features/GettingFlightById/V1/GetFlightByIdEndpoint.cs
index aef08ee8..3d0bd2ea 100644
--- a/src/Services/Flight/src/Flight/Flights/Features/GettingFlightById/V1/GetFlightByIdEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Flights/Features/GettingFlightById/V1/GetFlightByIdEndpoint.cs
@@ -10,7 +10,6 @@ namespace Flight.Flights.Features.GettingFlightById.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record GetFlightByIdResponseDto(FlightDto FlightDto);
diff --git a/src/Services/Flight/src/Flight/Flights/Features/UpdatingFlight/V1/UpdateFlightEndpoint.cs b/src/Services/Flight/src/Flight/Flights/Features/UpdatingFlight/V1/UpdateFlightEndpoint.cs
index 7a2a4ae0..0bccebc1 100644
--- a/src/Services/Flight/src/Flight/Flights/Features/UpdatingFlight/V1/UpdateFlightEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Flights/Features/UpdatingFlight/V1/UpdateFlightEndpoint.cs
@@ -10,7 +10,6 @@ namespace Flight.Flights.Features.UpdatingFlight.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record UpdateFlightRequestDto(Guid Id, string FlightNumber, Guid AircraftId, Guid DepartureAirportId, DateTime DepartureDate, DateTime ArriveDate,
Guid ArriveAirportId, decimal DurationMinutes, DateTime FlightDate, Enums.FlightStatus Status, decimal Price, bool IsDeleted);
diff --git a/src/Services/Flight/src/Flight/Flights/Models/FlightReadModel.cs b/src/Services/Flight/src/Flight/Flights/Models/FlightReadModel.cs
index e11c22d2..74eec280 100644
--- a/src/Services/Flight/src/Flight/Flights/Models/FlightReadModel.cs
+++ b/src/Services/Flight/src/Flight/Flights/Models/FlightReadModel.cs
@@ -4,17 +4,17 @@ namespace Flight.Flights.Models;
public class FlightReadModel
{
- public Guid Id { get; init; }
- public Guid FlightId { get; init; }
- public string FlightNumber { get; init; }
- public Guid AircraftId { get; init; }
- public DateTime DepartureDate { get; init; }
- public Guid DepartureAirportId { get; init; }
- public DateTime ArriveDate { get; init; }
- public Guid ArriveAirportId { get; init; }
- public decimal DurationMinutes { get; init; }
- public DateTime FlightDate { get; init; }
- public Enums.FlightStatus Status { get; init; }
- public decimal Price { get; init; }
- public bool IsDeleted { get; init; }
+ public required Guid Id { get; init; }
+ public required Guid FlightId { get; init; }
+ public required string FlightNumber { get; init; }
+ public required Guid AircraftId { get; init; }
+ public required DateTime DepartureDate { get; init; }
+ public required Guid DepartureAirportId { get; init; }
+ public required DateTime ArriveDate { get; init; }
+ public required Guid ArriveAirportId { get; init; }
+ public required decimal DurationMinutes { get; init; }
+ public required DateTime FlightDate { get; init; }
+ public required Enums.FlightStatus Status { get; init; }
+ public required decimal Price { get; init; }
+ public required bool IsDeleted { get; init; }
}
diff --git a/src/Services/Flight/src/Flight/Seats/Features/CreatingSeat/V1/CreateSeatEndpoint.cs b/src/Services/Flight/src/Flight/Seats/Features/CreatingSeat/V1/CreateSeatEndpoint.cs
index 98dcf0e4..dfc39c2a 100644
--- a/src/Services/Flight/src/Flight/Seats/Features/CreatingSeat/V1/CreateSeatEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Seats/Features/CreatingSeat/V1/CreateSeatEndpoint.cs
@@ -10,7 +10,6 @@ namespace Flight.Seats.Features.CreatingSeat.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record CreateSeatRequestDto(string SeatNumber, Enums.SeatType Type, Enums.SeatClass Class, Guid FlightId);
public record CreateSeatResponseDto(Guid Id);
diff --git a/src/Services/Flight/src/Flight/Seats/Features/GettingAvailableSeats/V1/GetAvailableSeatsEndpoint.cs b/src/Services/Flight/src/Flight/Seats/Features/GettingAvailableSeats/V1/GetAvailableSeatsEndpoint.cs
index f5b20020..84e49c8e 100644
--- a/src/Services/Flight/src/Flight/Seats/Features/GettingAvailableSeats/V1/GetAvailableSeatsEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Seats/Features/GettingAvailableSeats/V1/GetAvailableSeatsEndpoint.cs
@@ -11,7 +11,6 @@ namespace Flight.Seats.Features.GettingAvailableSeats.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record GetAvailableSeatsResponseDto(IEnumerable SeatDtos);
diff --git a/src/Services/Flight/src/Flight/Seats/Features/ReservingSeat/Commands/V1/ReserveSeatEndpoint.cs b/src/Services/Flight/src/Flight/Seats/Features/ReservingSeat/Commands/V1/ReserveSeatEndpoint.cs
index 0b8c2627..dd5bfb06 100644
--- a/src/Services/Flight/src/Flight/Seats/Features/ReservingSeat/Commands/V1/ReserveSeatEndpoint.cs
+++ b/src/Services/Flight/src/Flight/Seats/Features/ReservingSeat/Commands/V1/ReserveSeatEndpoint.cs
@@ -10,7 +10,6 @@ namespace Flight.Seats.Features.ReservingSeat.Commands.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record ReserveSeatRequestDto(Guid FlightId, string SeatNumber);
public record ReserveSeatResponseDto(Guid Id);
diff --git a/src/Services/Flight/src/Flight/Seats/Models/SeatReadModel.cs b/src/Services/Flight/src/Flight/Seats/Models/SeatReadModel.cs
index b2ef7d3b..696827cb 100644
--- a/src/Services/Flight/src/Flight/Seats/Models/SeatReadModel.cs
+++ b/src/Services/Flight/src/Flight/Seats/Models/SeatReadModel.cs
@@ -4,11 +4,11 @@
public class SeatReadModel
{
- public Guid Id { get; init; }
- public Guid SeatId { get; init; }
- public string SeatNumber { get; init; }
- public Enums.SeatType Type { get; init; }
- public Enums.SeatClass Class { get; init; }
- public Guid FlightId { get; init; }
- public bool IsDeleted { get; init; }
+ public required Guid Id { get; init; }
+ public required Guid SeatId { get; init; }
+ public required string SeatNumber { get; init; }
+ public required Enums.SeatType Type { get; init; }
+ public required Enums.SeatClass Class { get; init; }
+ public required Guid FlightId { get; init; }
+ public required bool IsDeleted { get; init; }
}
diff --git a/src/Services/Identity/src/Identity/Identity/Features/RegisteringNewUser/V1/RegisterNewUserEndpoint.cs b/src/Services/Identity/src/Identity/Identity/Features/RegisteringNewUser/V1/RegisterNewUserEndpoint.cs
index d3aa53e9..9f25ae7c 100644
--- a/src/Services/Identity/src/Identity/Identity/Features/RegisteringNewUser/V1/RegisterNewUserEndpoint.cs
+++ b/src/Services/Identity/src/Identity/Identity/Features/RegisteringNewUser/V1/RegisterNewUserEndpoint.cs
@@ -10,7 +10,6 @@ namespace Identity.Identity.Features.RegisteringNewUser.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record RegisterNewUserRequestDto(string FirstName, string LastName, string Username, string Email,
string Password, string ConfirmPassword, string PassportNumber);
diff --git a/src/Services/Identity/src/Identity/Identity/Models/User.cs b/src/Services/Identity/src/Identity/Identity/Models/User.cs
index 12272232..2c1bdb08 100644
--- a/src/Services/Identity/src/Identity/Identity/Models/User.cs
+++ b/src/Services/Identity/src/Identity/Identity/Models/User.cs
@@ -7,8 +7,8 @@ namespace Identity.Identity.Models;
public class User : IdentityUser, IVersion
{
- public string FirstName { get; init; }
- public string LastName { get; init; }
- public string PassPortNumber { get; init; }
+ public required string FirstName { get; init; }
+ public required string LastName { get; init; }
+ public required string PassPortNumber { get; init; }
public long Version { get; set; }
}
diff --git a/src/Services/Passenger/src/Passenger/Passengers/Features/CompletingRegisterPassenger/V1/CompleteRegisterPassenger.cs b/src/Services/Passenger/src/Passenger/Passengers/Features/CompletingRegisterPassenger/V1/CompleteRegisterPassenger.cs
index 2deb2751..12179a1f 100644
--- a/src/Services/Passenger/src/Passenger/Passengers/Features/CompletingRegisterPassenger/V1/CompleteRegisterPassenger.cs
+++ b/src/Services/Passenger/src/Passenger/Passengers/Features/CompletingRegisterPassenger/V1/CompleteRegisterPassenger.cs
@@ -11,7 +11,9 @@ namespace Passenger.Passengers.Features.CompletingRegisterPassenger.V1;
using Dtos;
using MassTransit;
-public record CompleteRegisterPassenger(string PassportNumber, Enums.PassengerType PassengerType, int Age) : ICommand, IInternalCommand
+public record CompleteRegisterPassenger
+ (string PassportNumber, Enums.PassengerType PassengerType, int Age) : ICommand,
+ IInternalCommand
{
public Guid Id { get; init; } = NewId.NextGuid();
}
@@ -33,7 +35,9 @@ public CompleteRegisterPassengerValidator()
}
}
-internal class CompleteRegisterPassengerCommandHandler : ICommandHandler
+internal class
+ CompleteRegisterPassengerCommandHandler : ICommandHandler
{
private readonly IMapper _mapper;
private readonly PassengerDbContext _passengerDbContext;
@@ -44,7 +48,8 @@ public CompleteRegisterPassengerCommandHandler(IMapper mapper, PassengerDbContex
_passengerDbContext = passengerDbContext;
}
- public async Task Handle(CompleteRegisterPassenger request, CancellationToken cancellationToken)
+ public async Task Handle(CompleteRegisterPassenger request,
+ CancellationToken cancellationToken)
{
Guard.Against.Null(request, nameof(request));
diff --git a/src/Services/Passenger/src/Passenger/Passengers/Features/GettingPassengerById/Queries/V1/GetPassengerByIdEndpoint.cs b/src/Services/Passenger/src/Passenger/Passengers/Features/GettingPassengerById/Queries/V1/GetPassengerByIdEndpoint.cs
index d48b429a..e4f7678b 100644
--- a/src/Services/Passenger/src/Passenger/Passengers/Features/GettingPassengerById/Queries/V1/GetPassengerByIdEndpoint.cs
+++ b/src/Services/Passenger/src/Passenger/Passengers/Features/GettingPassengerById/Queries/V1/GetPassengerByIdEndpoint.cs
@@ -7,7 +7,6 @@ namespace Passenger.Passengers.Features.GettingPassengerById.Queries.V1;
using Microsoft.AspNetCore.Routing;
using Dtos;
using Microsoft.OpenApi.Models;
-using Swashbuckle.AspNetCore.Annotations;
public record GetPassengerByIdResponseDto(PassengerDto PassengerDto);
diff --git a/src/Services/Passenger/src/Passenger/Passengers/Models/PassengerReadModel.cs b/src/Services/Passenger/src/Passenger/Passengers/Models/PassengerReadModel.cs
index 2cca5795..82253997 100644
--- a/src/Services/Passenger/src/Passenger/Passengers/Models/PassengerReadModel.cs
+++ b/src/Services/Passenger/src/Passenger/Passengers/Models/PassengerReadModel.cs
@@ -2,11 +2,11 @@
public class PassengerReadModel
{
- public Guid Id { get; init; }
- public Guid PassengerId { get; init; }
- public string PassportNumber { get; init; }
- public string Name { get; init; }
- public Enums.PassengerType PassengerType { get; init; }
+ public required Guid Id { get; init; }
+ public required Guid PassengerId { get; init; }
+ public required string PassportNumber { get; init; }
+ public required string Name { get; init; }
+ public required Enums.PassengerType PassengerType { get; init; }
public int Age { get; init; }
- public bool IsDeleted { get; init; }
+ public required bool IsDeleted { get; init; }
}