Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/Identity-api-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
push:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Identity/**
- .github/workflows/Identity-api-CI.yml

pull_request:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Identity/**
- .github/workflows/Identity-api-CI.yml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/basket-api-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
push:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Basket/**
- .github/workflows/basket-api-CI.yml

pull_request:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Basket/**
- .github/workflows/basket-api-CI.yml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/catalog-api-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
push:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Catalog/**
- .github/workflows/catalog-api-CI.yml

pull_request:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/BuildingBlocSharedks/**
- src/Services/Catalog/**
- .github/workflows/catalog-api-CI.yml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/discount-grpc-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
push:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Discount/**
- .github/workflows/discount-grpc-CI.yml

pull_request:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Discount/**
- .github/workflows/discount-grpc-CI.yml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/order-command-api-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
push:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Order.Command/**
- .github/workflows/order-command-api-CI.yml

pull_request:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Order.Command/**
- .github/workflows/order-command-api-CI.yml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/order-query-api-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
push:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Order.Query/**
- .github/workflows/order-query-api-CI.yml

pull_request:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Order.Query/**
- .github/workflows/order-query-api-CI.yml

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/order-query-event-processor-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
push:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Order.Query/**
- .github/workflows/order-query-event-processor-CI.yml

pull_request:
branches: [ "main" ]
paths:
- src/BuildingBlocks/**
- src/Shared/**
- src/Services/Order.Query/**
- .github/workflows/order-query-event-processor-CI.yml

Expand Down
20 changes: 0 additions & 20 deletions src/BuildingBlocks/BuildingBlocks/BuildingBlocks.csproj

This file was deleted.

1 change: 0 additions & 1 deletion src/Services/Basket/Basket.API/Basket.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\BuildingBlocks\BuildingBlocks.csproj" />
<ProjectReference Include="..\..\Shared\Shared.csproj" />
<Protobuf Include="Protos\basket.proto" GrpcServices="none" />
<Protobuf Include="..\..\Discount\Discount.Grpc\Protos\discount.proto" GrpcServices="Client"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using BuildingBlocks.HealthChecks;
using eshop.Shared;
using eshop.Shared.HealthChecks;

namespace Basket.API.Common;

Expand Down
1 change: 0 additions & 1 deletion src/Services/Basket/Basket.API/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ RUN apk update && apk add --no-cache libc6-compat gcompat

WORKDIR /src
COPY ["Services/Basket/Basket.API/Basket.API.csproj", "Services/Basket/Basket.API/"]
COPY ["BuildingBlocks/BuildingBlocks/BuildingBlocks.csproj", "BuildingBlocks/BuildingBlocks/"]
COPY ["Services/Shared/Shared.csproj", "Services/Shared/"]
COPY ["Directory.Packages.props", "/"]
RUN dotnet restore "Services/Basket/Basket.API/Basket.API.csproj"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.Exceptions;
using eshop.Shared.Exceptions;

namespace Basket.API.Exceptions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.CQRS.Command;
using eshop.Shared.CQRS.Command;

namespace Basket.API.Features.DeleteBasket;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using eshop.Shared.CQRS.Query;

namespace Basket.API.Features.GetBasket;

public record GetBasketQuery(string Username) : IQuery<GetBasketResult>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.ObjectModel;
using BuildingBlocks.CQRS.Command;
using Discount;
using eshop.Shared.CQRS.Command;

namespace Basket.API.Features.StoreBasket;

Expand Down
1 change: 0 additions & 1 deletion src/Services/Basket/Basket.API/GlobalUsing.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
global using BuildingBlocks.CQRS.Query;
global using Basket.API.Models;
global using Basket.API.Models.Dtos;
global using Basket.API.Exceptions;
Expand Down
6 changes: 3 additions & 3 deletions src/Services/Basket/Basket.API/Program.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Basket.API.Authorization;
using Basket.API.Common;
using BuildingBlocks.CQRS.Extensions;
using BuildingBlocks.Exceptions.Handler;
using BuildingBlocks.HealthChecks;
using Discount;
using eshop.Shared;
using eshop.Shared.CQRS.Extensions;
using eshop.Shared.Exceptions.Handler;
using eshop.Shared.HealthChecks;
using Microsoft.AspNetCore.Authorization;

var builder = WebApplication.CreateBuilder(args);
Expand Down
1 change: 0 additions & 1 deletion src/Services/Catalog/Catalog.API/Catalog.API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\BuildingBlocks\BuildingBlocks.csproj"/>
<ProjectReference Include="..\..\Shared\Shared.csproj"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Catalog.API.Common;
using eshop.Shared.HealthChecks;

namespace Catalog.API.Common;

public static class HealthChecksExtension
{
Expand Down
1 change: 0 additions & 1 deletion src/Services/Catalog/Catalog.API/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Services/Catalog/Catalog.API/Catalog.API.csproj", "Services/Catalog/Catalog.API/"]
COPY ["BuildingBlocks/BuildingBlocks/BuildingBlocks.csproj", "BuildingBlocks/BuildingBlocks/"]
COPY ["Services/Shared/Shared.csproj", "Services/Shared/"]
COPY ["Directory.Packages.props", "/"]
RUN dotnet restore "./Services/Catalog/Catalog.API/Catalog.API.csproj"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Catalog.API.Exceptions;
using eshop.Shared.Exceptions;

namespace Catalog.API.Exceptions;

public class ProductNotFoundException(Ulid id) : NotFoundException("Product", id)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Catalog.API.Features.Products.CreateProduct;
using eshop.Shared.CQRS.Command;

namespace Catalog.API.Features.Products.CreateProduct;

public record CreateProductCommand(
string Id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Catalog.API.Features.Products.DeleteProduct;
using eshop.Shared.CQRS.Command;

namespace Catalog.API.Features.Products.DeleteProduct;

public record DeleteProductCommand(string? Id) : ICommand<DeleteProductResult>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Catalog.API.Features.Products.GetProductById;
using eshop.Shared.CQRS.Query;

namespace Catalog.API.Features.Products.GetProductById;

public record GetProductByIdQuery(string Id) : IQuery<Result>;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.Pagination;
using eshop.Shared.Pagination;

namespace Catalog.API.Features.Products.GetProducts;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Immutable;
using System.Collections.ObjectModel;
using BuildingBlocks.Pagination;
using eshop.Shared.CQRS.Query;
using eshop.Shared.Pagination;

namespace Catalog.API.Features.Products.GetProducts;

Expand All @@ -24,7 +25,7 @@

var result = MapToResult(products);

return new GetProductsResult(new PaginatedItems<ProductModule>(pageIndex, pageSize, totalItems, result));

Check warning on line 28 in src/Services/Catalog/Catalog.API/Features/Products/GetProducts/GetProductsHandler.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'data' in 'PaginatedItems<ProductModule>.PaginatedItems(int pageIndex, int pageSize, long count, IEnumerable<ProductModule> data)'.

Check warning on line 28 in src/Services/Catalog/Catalog.API/Features/Products/GetProducts/GetProductsHandler.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'data' in 'PaginatedItems<ProductModule>.PaginatedItems(int pageIndex, int pageSize, long count, IEnumerable<ProductModule> data)'.
}

private static ReadOnlyCollection<ProductModule>? MapToResult(IReadOnlyCollection<ProductDocument>? products)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.Pagination;
using eshop.Shared.Pagination;

namespace Catalog.API.Features.Products.GetProducts;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.Pagination;
using eshop.Shared.Pagination;

namespace Catalog.API.Features.Products.GetProductsByCategory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.ObjectModel;
using BuildingBlocks.Pagination;
using eshop.Shared.CQRS.Query;
using eshop.Shared.Pagination;

namespace Catalog.API.Features.Products.GetProductsByCategory;

Expand Down Expand Up @@ -29,7 +30,7 @@
var result = MapToResult(product);

return new GetProductByCategoryResult(
new PaginatedItems<ProductModule>(pageIndex, pageSize, totalItems, result));

Check warning on line 33 in src/Services/Catalog/Catalog.API/Features/Products/GetProductsByCategory/GetProductsByCategoryHandler.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'data' in 'PaginatedItems<ProductModule>.PaginatedItems(int pageIndex, int pageSize, long count, IEnumerable<ProductModule> data)'.

Check warning on line 33 in src/Services/Catalog/Catalog.API/Features/Products/GetProductsByCategory/GetProductsByCategoryHandler.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'data' in 'PaginatedItems<ProductModule>.PaginatedItems(int pageIndex, int pageSize, long count, IEnumerable<ProductModule> data)'.
}

private static ReadOnlyCollection<ProductModule>? MapToResult(IReadOnlyCollection<ProductDocument>? products)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.Pagination;
using eshop.Shared.Pagination;

namespace Catalog.API.Features.Products.GetProductsByCategory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Marten.Exceptions;
using eshop.Shared.CQRS.Command;
using Marten.Exceptions;
using Exception = System.Exception;

namespace Catalog.API.Features.Products.UpdateProduct;
Expand Down
9 changes: 2 additions & 7 deletions src/Services/Catalog/Catalog.API/GlobalUsing.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
global using BuildingBlocks.CQRS.Command;
global using BuildingBlocks.CQRS.Query;
global using BuildingBlocks.Exceptions;
global using Catalog.API.Exceptions;
global using Catalog.API.Exceptions;
global using Catalog.API.Models;
global using FluentValidation;
global using Marten;
global using MediatR;
global using Microsoft.AspNetCore.Http.HttpResults;
global using System.Text.Json.Serialization;
global using BuildingBlocks.HealthChecks;
global using BuildingBlocks.CQRS.Extensions;
global using System.Text.Json.Serialization;
4 changes: 3 additions & 1 deletion src/Services/Catalog/Catalog.API/Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using BuildingBlocks.Exceptions.Handler;
using Catalog.API.Authorization;
using Catalog.API.Common;
using Catalog.API.Data;
using eshop.Shared;
using eshop.Shared.CQRS.Extensions;
using eshop.Shared.Exceptions.Handler;
using eshop.Shared.HealthChecks;

var builder = WebApplication.CreateBuilder(args);
builder.AddDefaultOpenApi();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using eshop.Shared.Pagination;
using IntegrationTests.Common;
using Order.Command.API.Authorization;
using Order.Command.API.Endpoints.GetOrders;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using eshop.Shared.Pagination;
using IntegrationTests.Common;
using Order.Command.API.Authorization;
using Order.Command.API.Endpoints.GetOrdersByCustomer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using eshop.Shared.Pagination;
using IntegrationTests.Common;
using Order.Command.API.Authorization;
using Order.Command.API.Endpoints.GetOrdersByName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
global using Shouldly;
global using System.Net.Http.Json;
global using Microsoft.AspNetCore.Mvc;
global using BuildingBlocks.Pagination;
global using Microsoft.EntityFrameworkCore;
global using Order.Command.API.IntegrationTests.Given.SqlGiven;
global using Order.Command.Application.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.HealthChecks;
using eshop.Shared.HealthChecks;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Order.Command.API.Common.SqlHealthCheck;

Expand Down
1 change: 0 additions & 1 deletion src/Services/Order.Command/Order.Command.API/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN apk add icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
WORKDIR /src
COPY ["Services/Order.Command/Order.Command.API/Order.Command.API.csproj", "Services/Order.Command/Order.Command.API/"]
COPY ["BuildingBlocks/BuildingBlocks/BuildingBlocks.csproj", "BuildingBlocks/BuildingBlocks/"]
COPY ["Services/Shared/Shared.csproj", "Services/Shared/"]
COPY ["Services/Order.Command/Order.Command.Application/Order.Command.Application.csproj", "Services/Order.Command/Order.Command.Application/"]
COPY ["Services/Order.Command/Order.Command.Domain/Order.Command.Domain.csproj", "Services/Order.Command/Order.Command.Domain/"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.Pagination;
using eshop.Shared.Pagination;
using Order.Command.Application.Orders.Queries.GetOrders;

namespace Order.Command.API.Endpoints.GetOrders;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.Pagination;
using eshop.Shared.Pagination;
using Microsoft.AspNetCore.Mvc;
using Order.Command.Application.Dtos;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BuildingBlocks.Pagination;
using eshop.Shared.Pagination;
using Order.Command.API.Authorization;
using Order.Command.Application.Orders.Queries.GetOrderByCustomer;

Expand Down
Loading
Loading