diff --git a/src/BuildingBlocks/BuildingBlocks.csproj b/src/BuildingBlocks/BuildingBlocks.csproj
index 5b7da12..6449653 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 f64caaf..31865af 100644
--- a/src/BuildingBlocks/Core/Model/Aggregate.cs
+++ b/src/BuildingBlocks/Core/Model/Aggregate.cs
@@ -25,5 +25,5 @@ public abstract record Aggregate : Audit, IAggregate
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 cc96b21..6e56479 100644
--- a/src/BuildingBlocks/Swagger/ServiceCollectionExtensions.cs
+++ b/src/BuildingBlocks/Swagger/ServiceCollectionExtensions.cs
@@ -62,7 +62,7 @@ public static class ServiceCollectionExtensions
// 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 bff022f..e55954b 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 @@ using Microsoft.AspNetCore.Builder;
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 99b7e15..9a0a32b 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 @@ using ValueObjects;
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 33c6fc1..b7e4733 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 @@ using Microsoft.AspNetCore.Builder;
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 dcb5003..d1bfb96 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 Ardalis.GuardClauses;
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 bdca7f0..3287652 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 @@ using System;
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 3c8e794..0e924ab 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 @@ using Microsoft.AspNetCore.Builder;
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 d6d8f99..5356562 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 @@ using System;
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 11ed558..3fdacb1 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 @@ using Microsoft.AspNetCore.Builder;
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 4dac6ce..ba91cb2 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.Builder;
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 7f20dc3..899dac5 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 @@ using Microsoft.AspNetCore.Builder;
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 aef08ee..3d0bd2e 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 @@ using Microsoft.AspNetCore.Builder;
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 7a2a4ae..0bccebc 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 @@ using Microsoft.AspNetCore.Builder;
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 e11c22d..74eec28 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 @@ using System;
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 98dcf0e..dfc39c2 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 @@ using Microsoft.AspNetCore.Builder;
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 f5b2002..84e49c8 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 @@ using Microsoft.AspNetCore.Builder;
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 0b8c262..dd5bfb0 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 @@ using Microsoft.AspNetCore.Builder;
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 b2ef7d3..696827c 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 @@ using System;
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 d3aa53e..9f25ae7 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 @@ using Microsoft.AspNetCore.Builder;
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 1227223..2c1bdb0 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 @@ using BuildingBlocks.Core.Model;
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 2deb275..12179a1 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 @@ using Data;
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 @@ internal class CompleteRegisterPassengerValidator : AbstractValidator
+internal class
+ CompleteRegisterPassengerCommandHandler : ICommandHandler
{
private readonly IMapper _mapper;
private readonly PassengerDbContext _passengerDbContext;
@@ -44,7 +48,8 @@ internal class CompleteRegisterPassengerCommandHandler : ICommandHandler 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 d48b429..e4f7678 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 @@ using Microsoft.AspNetCore.Http;
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 2cca579..8225399 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; }
}