From a6b72cd85922f265fbd7c609bb9f0daac71c6e97 Mon Sep 17 00:00:00 2001 From: Dmitry Tarakanov Date: Mon, 27 Apr 2026 21:35:07 +0300 Subject: [PATCH 1/4] #23 rename old endpoint to the best price packages were updated --- .../Crypto.Compare.Services.csproj | 2 +- ....cs => GetSymbolsBestPriceQueryHandler.cs} | 8 ++-- ...lsQuery.cs => GetSymbolsBestPriceQuery.cs} | 4 +- .../Crypto.Compare.DataAccess.csproj | 4 +- .../Crypto.Comapre.Binance.csproj | 2 +- .../Crypto.Compare.BingX.csproj | 2 +- .../Crypto.Compare.BitMart.csproj | 2 +- .../Crypto.Compare.Bitget.csproj | 2 +- .../Crypto.Compare.ByBit.csproj | 2 +- .../Crypto.Compare.GateIo.csproj | 2 +- .../Crypto.Compare.Mexc.csproj | 3 +- .../Crypto.Compare.Xtcom.csproj | 2 +- .../Controllers/SymbolsController.cs | 37 ++++++++++++++----- .../Crypto.Compare.PublicApi.csproj | 10 ++--- .../Dtos/{SymbolDto.cs => SymbolBestDto.cs} | 2 +- .../Ioc/ServicesRegistry.cs | 2 +- .../Mapping/MapsterProfile.cs | 4 +- .../v1/Symbols/GetSymbolsBestResponse.cs | 7 ++++ .../v1/Symbols/GetSymbolsResponse.cs | 8 ---- ...le.cs => GetSymbolsBestResponseExample.cs} | 6 +-- .../Crypto.Compare.PublicApi.Tests.csproj | 12 +++--- .../Crypto.Compare.Services.Tests.csproj | 6 +-- 22 files changed, 73 insertions(+), 56 deletions(-) rename sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/{GetSymbolsQueryHandler.cs => GetSymbolsBestPriceQueryHandler.cs} (86%) rename sources/core/Crypto.Compare.Services/Queries/Symbols/{GetSymbolsQuery.cs => GetSymbolsBestPriceQuery.cs} (78%) rename sources/presentation/Crypto.Compare.PublicApi/Dtos/{SymbolDto.cs => SymbolBestDto.cs} (97%) create mode 100644 sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsBestResponse.cs delete mode 100644 sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsResponse.cs rename sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/{GetSymbolsResponseExample.cs => GetSymbolsBestResponseExample.cs} (82%) diff --git a/sources/core/Crypto.Compare.Services/Crypto.Compare.Services.csproj b/sources/core/Crypto.Compare.Services/Crypto.Compare.Services.csproj index aa8f946..2bb644a 100644 --- a/sources/core/Crypto.Compare.Services/Crypto.Compare.Services.csproj +++ b/sources/core/Crypto.Compare.Services/Crypto.Compare.Services.csproj @@ -12,7 +12,7 @@ - + diff --git a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsBestPriceQueryHandler.cs similarity index 86% rename from sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs rename to sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsBestPriceQueryHandler.cs index 4d54b67..df46c1a 100644 --- a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs +++ b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsBestPriceQueryHandler.cs @@ -7,20 +7,20 @@ namespace Crypto.Compare.Services.Handlers.Queries.Symbols; -public class GetSymbolsQueryHandler : IRequestHandler> +public class GetSymbolsBestPriceQueryHandler : IRequestHandler> { private readonly CryptoCompareContext _cryptoCompareContext; - public GetSymbolsQueryHandler(CryptoCompareContext cryptoCompareContext) + public GetSymbolsBestPriceQueryHandler(CryptoCompareContext cryptoCompareContext) { _cryptoCompareContext = cryptoCompareContext; } - public async Task> Handle(GetSymbolsQuery request, CancellationToken cancellationToken) + public async Task> Handle(GetSymbolsBestPriceQuery request, CancellationToken cancellationToken) { var query = _cryptoCompareContext .Symbols - .Include(x=>x.SymbolProviders) + .Include(x => x.SymbolProviders) .AsQueryable() .AsNoTracking(); diff --git a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsBestPriceQuery.cs similarity index 78% rename from sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs rename to sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsBestPriceQuery.cs index cfc3a9f..9fa5413 100644 --- a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs +++ b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsBestPriceQuery.cs @@ -4,12 +4,12 @@ namespace Crypto.Compare.Services.Queries.Symbols; -public class GetSymbolsQuery : IRequest> +public class GetSymbolsBestPriceQuery : IRequest> { private const int MaxRows = 30; private const int DefaultRows = 10; - public GetSymbolsQuery(string? ticker = null, long? skip = 0, int? rows = DefaultRows) + public GetSymbolsBestPriceQuery(string? ticker = null, long? skip = 0, int? rows = DefaultRows) { Ticker = ticker?.ToLowerInvariant(); Skip = skip ?? 0; diff --git a/sources/infrastructure/Crypto.Compare.DataAccess/Crypto.Compare.DataAccess.csproj b/sources/infrastructure/Crypto.Compare.DataAccess/Crypto.Compare.DataAccess.csproj index a40eccd..f1f699e 100644 --- a/sources/infrastructure/Crypto.Compare.DataAccess/Crypto.Compare.DataAccess.csproj +++ b/sources/infrastructure/Crypto.Compare.DataAccess/Crypto.Compare.DataAccess.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/sources/integrations/Crypto.Comapre.Binance/Crypto.Comapre.Binance.csproj b/sources/integrations/Crypto.Comapre.Binance/Crypto.Comapre.Binance.csproj index 91faeb8..ed3797d 100644 --- a/sources/integrations/Crypto.Comapre.Binance/Crypto.Comapre.Binance.csproj +++ b/sources/integrations/Crypto.Comapre.Binance/Crypto.Comapre.Binance.csproj @@ -7,7 +7,7 @@ - + diff --git a/sources/integrations/Crypto.Compare.BingX/Crypto.Compare.BingX.csproj b/sources/integrations/Crypto.Compare.BingX/Crypto.Compare.BingX.csproj index 424ef34..fef50f8 100644 --- a/sources/integrations/Crypto.Compare.BingX/Crypto.Compare.BingX.csproj +++ b/sources/integrations/Crypto.Compare.BingX/Crypto.Compare.BingX.csproj @@ -7,7 +7,7 @@ - + diff --git a/sources/integrations/Crypto.Compare.BitMart/Crypto.Compare.BitMart.csproj b/sources/integrations/Crypto.Compare.BitMart/Crypto.Compare.BitMart.csproj index e3e7a76..cbf2318 100644 --- a/sources/integrations/Crypto.Compare.BitMart/Crypto.Compare.BitMart.csproj +++ b/sources/integrations/Crypto.Compare.BitMart/Crypto.Compare.BitMart.csproj @@ -12,7 +12,7 @@ - + diff --git a/sources/integrations/Crypto.Compare.Bitget/Crypto.Compare.Bitget.csproj b/sources/integrations/Crypto.Compare.Bitget/Crypto.Compare.Bitget.csproj index 652f48a..7ba9ad7 100644 --- a/sources/integrations/Crypto.Compare.Bitget/Crypto.Compare.Bitget.csproj +++ b/sources/integrations/Crypto.Compare.Bitget/Crypto.Compare.Bitget.csproj @@ -7,7 +7,7 @@ - + diff --git a/sources/integrations/Crypto.Compare.ByBit/Crypto.Compare.ByBit.csproj b/sources/integrations/Crypto.Compare.ByBit/Crypto.Compare.ByBit.csproj index a995d8c..0eaa9a3 100644 --- a/sources/integrations/Crypto.Compare.ByBit/Crypto.Compare.ByBit.csproj +++ b/sources/integrations/Crypto.Compare.ByBit/Crypto.Compare.ByBit.csproj @@ -7,7 +7,7 @@ - + diff --git a/sources/integrations/Crypto.Compare.GateIo/Crypto.Compare.GateIo.csproj b/sources/integrations/Crypto.Compare.GateIo/Crypto.Compare.GateIo.csproj index 33d9141..0e3ed04 100644 --- a/sources/integrations/Crypto.Compare.GateIo/Crypto.Compare.GateIo.csproj +++ b/sources/integrations/Crypto.Compare.GateIo/Crypto.Compare.GateIo.csproj @@ -7,7 +7,7 @@ - + diff --git a/sources/integrations/Crypto.Compare.Mexc/Crypto.Compare.Mexc.csproj b/sources/integrations/Crypto.Compare.Mexc/Crypto.Compare.Mexc.csproj index 5baed1e..78328eb 100644 --- a/sources/integrations/Crypto.Compare.Mexc/Crypto.Compare.Mexc.csproj +++ b/sources/integrations/Crypto.Compare.Mexc/Crypto.Compare.Mexc.csproj @@ -11,7 +11,8 @@ - + + diff --git a/sources/integrations/Crypto.Compare.Xtcom/Crypto.Compare.Xtcom.csproj b/sources/integrations/Crypto.Compare.Xtcom/Crypto.Compare.Xtcom.csproj index 1b52b6d..d60dc53 100644 --- a/sources/integrations/Crypto.Compare.Xtcom/Crypto.Compare.Xtcom.csproj +++ b/sources/integrations/Crypto.Compare.Xtcom/Crypto.Compare.Xtcom.csproj @@ -10,7 +10,7 @@ - + diff --git a/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs b/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs index 46d6744..1e204b0 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs @@ -41,17 +41,17 @@ public SymbolsProvider(IMediator mediator, IResponseMapper responseMapper) /// Cancellation token [HttpGet("")] [Produces(MediaTypeNames.Application.Json)] - [SwaggerResponse(StatusCodes.Status200OK, "Get all list of symbols", typeof(GetSymbolsResponse))] - [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsResponseExample))] + [SwaggerResponse(StatusCodes.Status200OK, "Get all list of symbols", typeof(GetSymbolsBestResponse))] + [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsBestResponseExample))] public async Task GetSymbols([FromQuery] int? skip, [FromQuery] int? rows, CancellationToken cancellationToken) { - var command = new GetSymbolsQuery( + var command = new GetSymbolsBestPriceQuery( skip: skip, rows: rows); var result = await _mediator.Send(command, cancellationToken); - return _responseMapper.ToCustomResponse(result); + return _responseMapper.ToCustomResponse(result); } /// @@ -63,8 +63,8 @@ public async Task GetSymbols([FromQuery] int? skip, [FromQuery] i /// Cancellation token [HttpGet("provider/{providerId}")] [Produces(MediaTypeNames.Application.Json)] - [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols for provider", typeof(GetSymbolsResponse))] - [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsResponseExample))] + [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols for provider", typeof(GetSymbolsBestResponse))] + [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsBestResponseExample))] public async Task GetSymbolsByProvider([FromRoute] int providerId, [FromQuery] int? skip, [FromQuery] int? rows, CancellationToken cancellationToken) { var command = new GetSymbolProvidersQuery(providerId: providerId, @@ -93,19 +93,36 @@ public async Task GetSymbolsByProvider([FromRoute] long id, Cance } /// - /// Get list of symbols + /// Get list of symbols with best price + /// + /// Ticker of symbols + /// Cancellation token + [HttpGet("ticker/best/{ticker}")] + [Produces(MediaTypeNames.Application.Json)] + [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols with best price", typeof(GetSymbolsBestResponse))] + [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsBestResponseExample))] + public async Task GetSymbolsBestByTicker([FromRoute] string ticker, CancellationToken cancellationToken) + { + var command = new GetSymbolsBestPriceQuery(ticker: ticker); + var result = await _mediator.Send(command, cancellationToken); + + return _responseMapper.ToCustomResponse(result); + } + + /// + /// Get list of symbols by ticker /// /// Ticker of symbols /// Cancellation token [HttpGet("ticker/{ticker}")] [Produces(MediaTypeNames.Application.Json)] - [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols", typeof(GetSymbolsResponse))] - [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsResponseExample))] + [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols by ticker", typeof(GetSymbolsBestResponse))] + [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsBestResponseExample))] public async Task GetSymbolsByTicker([FromRoute] string ticker, CancellationToken cancellationToken) { var command = new GetSymbolsQuery(ticker: ticker); var result = await _mediator.Send(command, cancellationToken); - return _responseMapper.ToCustomResponse(result); + return _responseMapper.ToCustomResponse(result); } } diff --git a/sources/presentation/Crypto.Compare.PublicApi/Crypto.Compare.PublicApi.csproj b/sources/presentation/Crypto.Compare.PublicApi/Crypto.Compare.PublicApi.csproj index 7dfeae4..b6bac22 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Crypto.Compare.PublicApi.csproj +++ b/sources/presentation/Crypto.Compare.PublicApi/Crypto.Compare.PublicApi.csproj @@ -11,13 +11,13 @@ - + - - - - + + + + diff --git a/sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolDto.cs b/sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolBestDto.cs similarity index 97% rename from sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolDto.cs rename to sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolBestDto.cs index 365b478..1bd8d9a 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolDto.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolBestDto.cs @@ -1,6 +1,6 @@ namespace Crypto.Compare.PublicApi.Dtos; -public class SymbolDto +public class SymbolBestDto { /// /// Uniq id diff --git a/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs b/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs index f15bb4a..d57ce22 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs @@ -283,7 +283,7 @@ private static IServiceCollection AddMediator(this IServiceCollection services) .AddMediatR(cfg => cfg.RegisterServicesFromAssembly(Assembly.GetCallingAssembly())) .AddScoped>, GetSymbolQueryHandler>() - .AddScoped>, GetSymbolsQueryHandler>() + .AddScoped>, GetSymbolsBestPriceQueryHandler>() .AddScoped>, GetProviderQueryHandler>() .AddScoped>, GetProvidersQueryHandler>() .AddScoped>, GetSymbolProvidersQueryHandler>() diff --git a/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs b/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs index 1c08951..1202ce7 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs @@ -16,9 +16,9 @@ public void Register(TypeAdapterConfig config) { // Простые маппинги (аналогичны CreateMap) config.NewConfig(); - config.NewConfig(); + config.NewConfig(); config.NewConfig(); - config.NewConfig(); + config.NewConfig(); config.NewConfig(); config.NewConfig(); diff --git a/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsBestResponse.cs b/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsBestResponse.cs new file mode 100644 index 0000000..c92a3ae --- /dev/null +++ b/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsBestResponse.cs @@ -0,0 +1,7 @@ +using Crypto.Compare.PublicApi.Dtos; +namespace Crypto.Compare.PublicApi.Responses.v1.Symbols; + +public class GetSymbolsBestResponse : BaseApiResponse +{ + public List Symbols { get; set; } +} \ No newline at end of file diff --git a/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsResponse.cs b/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsResponse.cs deleted file mode 100644 index b5a3c00..0000000 --- a/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsResponse.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Crypto.Compare.PublicApi.Dtos; - -namespace Crypto.Compare.PublicApi.Responses.v1.Symbols; - -public class GetSymbolsResponse : BaseApiResponse -{ - public List Symbols { get; set; } -} \ No newline at end of file diff --git a/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs b/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsBestResponseExample.cs similarity index 82% rename from sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs rename to sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsBestResponseExample.cs index b0e620b..69b8b45 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsBestResponseExample.cs @@ -4,12 +4,12 @@ namespace Crypto.Compare.PublicApi.Swaggers.Responses.v1.Symbols; -public class GetSymbolsResponseExample : IExamplesProvider +public class GetSymbolsBestResponseExample : IExamplesProvider { - public GetSymbolsResponse GetExamples() + public GetSymbolsBestResponse GetExamples() => new() { - Symbols = new List + Symbols = new List { new() { diff --git a/tests/Crypto.Compare.PublicApi.Tests/Crypto.Compare.PublicApi.Tests.csproj b/tests/Crypto.Compare.PublicApi.Tests/Crypto.Compare.PublicApi.Tests.csproj index d3f6736..6dc868b 100644 --- a/tests/Crypto.Compare.PublicApi.Tests/Crypto.Compare.PublicApi.Tests.csproj +++ b/tests/Crypto.Compare.PublicApi.Tests/Crypto.Compare.PublicApi.Tests.csproj @@ -10,13 +10,13 @@ - + - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Crypto.Compare.Services.Tests/Crypto.Compare.Services.Tests.csproj b/tests/Crypto.Compare.Services.Tests/Crypto.Compare.Services.Tests.csproj index 4333e04..fe5719b 100644 --- a/tests/Crypto.Compare.Services.Tests/Crypto.Compare.Services.Tests.csproj +++ b/tests/Crypto.Compare.Services.Tests/Crypto.Compare.Services.Tests.csproj @@ -9,9 +9,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive From 3a1456d14d07106e4997f7b0028456fac2972d80 Mon Sep 17 00:00:00 2001 From: Dmitry Tarakanov Date: Tue, 28 Apr 2026 21:29:18 +0300 Subject: [PATCH 2/4] #23 chnage old models --- .../Queries/Symbols/GetSymbolsBestPriceQueryHandler.cs | 6 +++--- .../Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs | 10 ++++++++++ .../Queries/Symbols/GetSymbolsBestPriceQuery.cs | 2 +- .../Queries/Symbols/GetSymbolsQuery.cs | 3 +++ .../Results/Symbols/GetSymbolsBestPriceResult.cs | 6 ++++++ .../Results/Symbols/GetSymbolsResult.cs | 10 ++++++---- .../Controllers/SymbolsController.cs | 4 ++-- .../Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs | 2 +- .../Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs | 2 +- 9 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs create mode 100644 sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs create mode 100644 sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsBestPriceResult.cs diff --git a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsBestPriceQueryHandler.cs b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsBestPriceQueryHandler.cs index df46c1a..b0c701b 100644 --- a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsBestPriceQueryHandler.cs +++ b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsBestPriceQueryHandler.cs @@ -7,7 +7,7 @@ namespace Crypto.Compare.Services.Handlers.Queries.Symbols; -public class GetSymbolsBestPriceQueryHandler : IRequestHandler> +public class GetSymbolsBestPriceQueryHandler : IRequestHandler> { private readonly CryptoCompareContext _cryptoCompareContext; @@ -16,7 +16,7 @@ public GetSymbolsBestPriceQueryHandler(CryptoCompareContext cryptoCompareContext _cryptoCompareContext = cryptoCompareContext; } - public async Task> Handle(GetSymbolsBestPriceQuery request, CancellationToken cancellationToken) + public async Task> Handle(GetSymbolsBestPriceQuery request, CancellationToken cancellationToken) { var query = _cryptoCompareContext .Symbols @@ -57,7 +57,7 @@ public async Task> Handle(GetSymbolsBestPriceQuery requ .Take(request.Rows) .ToListAsync(cancellationToken); - return new GetSymbolsResult + return new GetSymbolsBestPriceResult { Symbols = symbols }; diff --git a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs new file mode 100644 index 0000000..bd7bce3 --- /dev/null +++ b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs @@ -0,0 +1,10 @@ +using Crypto.Compare.Services.Queries.Symbols; +using Crypto.Compare.Services.Results.Symbols; +using FluentResults; +using MediatR; + +namespace Crypto.Compare.Services.Handlers.Queries.Symbols; + +internal class GetSymbolsQueryHandler : IRequestHandler> +{ +} diff --git a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsBestPriceQuery.cs b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsBestPriceQuery.cs index 9fa5413..51d113c 100644 --- a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsBestPriceQuery.cs +++ b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsBestPriceQuery.cs @@ -4,7 +4,7 @@ namespace Crypto.Compare.Services.Queries.Symbols; -public class GetSymbolsBestPriceQuery : IRequest> +public class GetSymbolsBestPriceQuery : IRequest> { private const int MaxRows = 30; private const int DefaultRows = 10; diff --git a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs new file mode 100644 index 0000000..5cb70ca --- /dev/null +++ b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs @@ -0,0 +1,3 @@ +namespace Crypto.Compare.Services.Queries.Symbols; + +internal record GetSymbolsQuery(string Ticker); diff --git a/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsBestPriceResult.cs b/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsBestPriceResult.cs new file mode 100644 index 0000000..cc4c86a --- /dev/null +++ b/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsBestPriceResult.cs @@ -0,0 +1,6 @@ +namespace Crypto.Compare.Services.Results.Symbols; + +public class GetSymbolsBestPriceResult : IHandlerResult +{ + public List Symbols { get; set; } +} \ No newline at end of file diff --git a/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsResult.cs b/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsResult.cs index 9ee52e2..98cfb45 100644 --- a/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsResult.cs +++ b/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsResult.cs @@ -1,6 +1,8 @@ -namespace Crypto.Compare.Services.Results.Symbols; +using Crypto.Compare.Data; -public class GetSymbolsResult : IHandlerResult +namespace Crypto.Compare.Services.Results.Symbols; + +internal class GetSymbolsResult { - public List Symbols { get; set; } -} \ No newline at end of file + public List Symbols { get; set; } +} diff --git a/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs b/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs index 1e204b0..43bdf2b 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs @@ -51,7 +51,7 @@ public async Task GetSymbols([FromQuery] int? skip, [FromQuery] i var result = await _mediator.Send(command, cancellationToken); - return _responseMapper.ToCustomResponse(result); + return _responseMapper.ToCustomResponse(result); } /// @@ -106,7 +106,7 @@ public async Task GetSymbolsBestByTicker([FromRoute] string ticke var command = new GetSymbolsBestPriceQuery(ticker: ticker); var result = await _mediator.Send(command, cancellationToken); - return _responseMapper.ToCustomResponse(result); + return _responseMapper.ToCustomResponse(result); } /// diff --git a/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs b/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs index d57ce22..870993d 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs @@ -283,7 +283,7 @@ private static IServiceCollection AddMediator(this IServiceCollection services) .AddMediatR(cfg => cfg.RegisterServicesFromAssembly(Assembly.GetCallingAssembly())) .AddScoped>, GetSymbolQueryHandler>() - .AddScoped>, GetSymbolsBestPriceQueryHandler>() + .AddScoped>, GetSymbolsBestPriceQueryHandler>() .AddScoped>, GetProviderQueryHandler>() .AddScoped>, GetProvidersQueryHandler>() .AddScoped>, GetSymbolProvidersQueryHandler>() diff --git a/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs b/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs index 1202ce7..262c44c 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs @@ -18,7 +18,7 @@ public void Register(TypeAdapterConfig config) config.NewConfig(); config.NewConfig(); config.NewConfig(); - config.NewConfig(); + config.NewConfig(); config.NewConfig(); config.NewConfig(); From 088b2eaadbae9a94af67ef9bc77e68e6ded01a8b Mon Sep 17 00:00:00 2001 From: Dmitry Tarakanov Date: Wed, 29 Apr 2026 20:17:29 +0300 Subject: [PATCH 3/4] #22 correct result to controller --- .../Queries/Symbols/GetSymbolsQueryHandler.cs | 29 ++++++++++++-- .../Queries/Symbols/GetSymbolsQuery.cs | 9 ++++- .../Results/Symbols/GetSymbolsResult.cs | 2 +- .../Controllers/SymbolsController.cs | 16 ++++---- .../Dtos/SymbolDto.cs | 39 +++++++++++++++++++ .../Ioc/ServicesRegistry.cs | 2 +- .../Mapping/MapsterProfile.cs | 7 +++- .../v1/Symbols/GetSymbolsResponse.cs | 8 ++++ .../v1/Symbols/GetSymbolsResponseExample.cs | 34 ++++++++++++++++ 9 files changed, 129 insertions(+), 17 deletions(-) create mode 100644 sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolDto.cs create mode 100644 sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsResponse.cs create mode 100644 sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs diff --git a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs index bd7bce3..37d8209 100644 --- a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs +++ b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs @@ -1,10 +1,33 @@ -using Crypto.Compare.Services.Queries.Symbols; +using Crypto.Compare.DataAccess; +using Crypto.Compare.Services.Queries.Symbols; using Crypto.Compare.Services.Results.Symbols; using FluentResults; using MediatR; +using Microsoft.EntityFrameworkCore; namespace Crypto.Compare.Services.Handlers.Queries.Symbols; -internal class GetSymbolsQueryHandler : IRequestHandler> +public class GetSymbolsQueryHandler : IRequestHandler> { -} + private readonly CryptoCompareContext _cryptoCompareContext; + + public GetSymbolsQueryHandler(CryptoCompareContext cryptoCompareContext) + { + _cryptoCompareContext = cryptoCompareContext; + } + + public async Task> Handle(GetSymbolsQuery request, CancellationToken cancellationToken) + { + return + new GetSymbolsResult() + { + Symbols = await _cryptoCompareContext + .SymbolProviders + .AsQueryable() + .AsNoTracking() + .Include(x => x.Symbol) + .Where(x => x.Symbol.Ticker == request.Ticker) + .ToListAsync(cancellationToken) + }; + } +} \ No newline at end of file diff --git a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs index 5cb70ca..9dbd30d 100644 --- a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs +++ b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs @@ -1,3 +1,8 @@ -namespace Crypto.Compare.Services.Queries.Symbols; +using Crypto.Compare.Data; +using Crypto.Compare.Services.Results.Symbols; +using FluentResults; +using MediatR; -internal record GetSymbolsQuery(string Ticker); +namespace Crypto.Compare.Services.Queries.Symbols; + +public record GetSymbolsQuery(string Ticker) : IRequest>; diff --git a/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsResult.cs b/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsResult.cs index 98cfb45..8652331 100644 --- a/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsResult.cs +++ b/sources/core/Crypto.Compare.Services/Results/Symbols/GetSymbolsResult.cs @@ -2,7 +2,7 @@ namespace Crypto.Compare.Services.Results.Symbols; -internal class GetSymbolsResult +public class GetSymbolsResult { public List Symbols { get; set; } } diff --git a/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs b/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs index 43bdf2b..d27b7ac 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Controllers/SymbolsController.cs @@ -41,7 +41,7 @@ public SymbolsProvider(IMediator mediator, IResponseMapper responseMapper) /// Cancellation token [HttpGet("")] [Produces(MediaTypeNames.Application.Json)] - [SwaggerResponse(StatusCodes.Status200OK, "Get all list of symbols", typeof(GetSymbolsBestResponse))] + [SwaggerResponse(StatusCodes.Status200OK, "Get all list of symbols", typeof(GetSymbolsResponse))] [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsBestResponseExample))] public async Task GetSymbols([FromQuery] int? skip, [FromQuery] int? rows, CancellationToken cancellationToken) { @@ -51,7 +51,7 @@ public async Task GetSymbols([FromQuery] int? skip, [FromQuery] i var result = await _mediator.Send(command, cancellationToken); - return _responseMapper.ToCustomResponse(result); + return _responseMapper.ToCustomResponse(result); } /// @@ -63,7 +63,7 @@ public async Task GetSymbols([FromQuery] int? skip, [FromQuery] i /// Cancellation token [HttpGet("provider/{providerId}")] [Produces(MediaTypeNames.Application.Json)] - [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols for provider", typeof(GetSymbolsBestResponse))] + [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols for provider", typeof(GetSymbolsResponse))] [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsBestResponseExample))] public async Task GetSymbolsByProvider([FromRoute] int providerId, [FromQuery] int? skip, [FromQuery] int? rows, CancellationToken cancellationToken) { @@ -99,7 +99,7 @@ public async Task GetSymbolsByProvider([FromRoute] long id, Cance /// Cancellation token [HttpGet("ticker/best/{ticker}")] [Produces(MediaTypeNames.Application.Json)] - [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols with best price", typeof(GetSymbolsBestResponse))] + [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols with best price", typeof(GetSymbolsResponse))] [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsBestResponseExample))] public async Task GetSymbolsBestByTicker([FromRoute] string ticker, CancellationToken cancellationToken) { @@ -116,13 +116,13 @@ public async Task GetSymbolsBestByTicker([FromRoute] string ticke /// Cancellation token [HttpGet("ticker/{ticker}")] [Produces(MediaTypeNames.Application.Json)] - [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols by ticker", typeof(GetSymbolsBestResponse))] - [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsBestResponseExample))] + [SwaggerResponse(StatusCodes.Status200OK, "Get list of symbols by ticker", typeof(GetSymbolsResponse))] + [SwaggerResponseExample(StatusCodes.Status200OK, typeof(GetSymbolsResponseExample))] public async Task GetSymbolsByTicker([FromRoute] string ticker, CancellationToken cancellationToken) { - var command = new GetSymbolsQuery(ticker: ticker); + var command = new GetSymbolsQuery(ticker); var result = await _mediator.Send(command, cancellationToken); - return _responseMapper.ToCustomResponse(result); + return _responseMapper.ToCustomResponse(result); } } diff --git a/sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolDto.cs b/sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolDto.cs new file mode 100644 index 0000000..271ed71 --- /dev/null +++ b/sources/presentation/Crypto.Compare.PublicApi/Dtos/SymbolDto.cs @@ -0,0 +1,39 @@ +namespace Crypto.Compare.PublicApi.Dtos; + +public class SymbolDto +{ + /// + /// Uniq id + /// + public long Id { get; set; } + + /// + /// Ticker name + /// + public string Ticker { get; set; } + + /// + /// symbol or viewed name + /// + public string Symbol { get; set; } + + /// + /// Id provider + /// + public int ProviderId { get; set; } + + /// + /// Price sell + /// + public decimal PriceSell { get; set; } + + /// + /// Current sell price + /// + public decimal PriceBuy { get; set; } + + /// + /// Last date get quotes + /// + public DateTime UpdatedAt { get; set; } +} diff --git a/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs b/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs index 870993d..792e723 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs @@ -287,7 +287,7 @@ private static IServiceCollection AddMediator(this IServiceCollection services) .AddScoped>, GetProviderQueryHandler>() .AddScoped>, GetProvidersQueryHandler>() .AddScoped>, GetSymbolProvidersQueryHandler>() - + .AddScoped>, GetSymbolsQueryHandler>() ; } } diff --git a/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs b/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs index 262c44c..94104e1 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Mapping/MapsterProfile.cs @@ -16,9 +16,12 @@ public void Register(TypeAdapterConfig config) { // Простые маппинги (аналогичны CreateMap) config.NewConfig(); - config.NewConfig(); config.NewConfig(); - config.NewConfig(); + config.NewConfig(); + config.NewConfig(); + config.NewConfig(); + config.NewConfig(); + config.NewConfig(); config.NewConfig(); diff --git a/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsResponse.cs b/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsResponse.cs new file mode 100644 index 0000000..88d4ef9 --- /dev/null +++ b/sources/presentation/Crypto.Compare.PublicApi/Responses/v1/Symbols/GetSymbolsResponse.cs @@ -0,0 +1,8 @@ +using Crypto.Compare.PublicApi.Dtos; + +namespace Crypto.Compare.PublicApi.Responses.v1.Symbols; + +public class GetSymbolsResponse : BaseApiResponse +{ + public List Symbols { get; set; } +} diff --git a/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs b/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs new file mode 100644 index 0000000..4b05307 --- /dev/null +++ b/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs @@ -0,0 +1,34 @@ +using Crypto.Compare.PublicApi.Dtos; +using Crypto.Compare.PublicApi.Responses.v1.Symbols; +using Swashbuckle.AspNetCore.Filters; + +namespace Crypto.Compare.PublicApi.Swaggers.Responses.v1.Symbols; + +public class GetSymbolsResponseExample : IExamplesProvider +{ + public GetSymbolsResponse GetExamples() + => new() + { + Symbols = new List + { + new() + { + Id = 1, + Symbol = "ETHUSDT", + PriceSell = 82000, + PriceBuy = 79000, + ProviderId = 1, + Ticker = "ETHUSDT" + }, + new() + { + Id = 2, + Symbol = "ETHUSDT", + PriceSell = 3200, + PriceBuy = 3100, + ProviderId = 2, + Ticker = "ETHUSDT" + } + } + }; +} \ No newline at end of file From e79a3b0f9ac3a3d4f97896218415ec3c174ea8b3 Mon Sep 17 00:00:00 2001 From: Dmitry Tarakanov Date: Mon, 4 May 2026 21:48:08 +0300 Subject: [PATCH 4/4] #23 fix error start application --- .../Queries/Symbols/GetSymbolsQueryHandler.cs | 18 ++++++++++++++---- .../Queries/Symbols/GetSymbolsQuery.cs | 5 ++--- .../SymbolProviders/GetSymbolProviderResult.cs | 4 +--- .../Ioc/ServicesRegistry.cs | 3 ++- .../v1/Symbols/GetSymbolsResponseExample.cs | 2 +- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs index 37d8209..b3f5568 100644 --- a/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs +++ b/sources/core/Crypto.Compare.Services/Handlers/Queries/Symbols/GetSymbolsQueryHandler.cs @@ -1,13 +1,13 @@ using Crypto.Compare.DataAccess; using Crypto.Compare.Services.Queries.Symbols; -using Crypto.Compare.Services.Results.Symbols; +using Crypto.Compare.Services.Results.SymbolProviders; using FluentResults; using MediatR; using Microsoft.EntityFrameworkCore; namespace Crypto.Compare.Services.Handlers.Queries.Symbols; -public class GetSymbolsQueryHandler : IRequestHandler> +public class GetSymbolsQueryHandler : IRequestHandler> { private readonly CryptoCompareContext _cryptoCompareContext; @@ -16,10 +16,10 @@ public GetSymbolsQueryHandler(CryptoCompareContext cryptoCompareContext) _cryptoCompareContext = cryptoCompareContext; } - public async Task> Handle(GetSymbolsQuery request, CancellationToken cancellationToken) + public async Task> Handle(GetSymbolsQuery request, CancellationToken cancellationToken) { return - new GetSymbolsResult() + new GetSymbolProviderResult() { Symbols = await _cryptoCompareContext .SymbolProviders @@ -27,6 +27,16 @@ public async Task> Handle(GetSymbolsQuery request, Canc .AsNoTracking() .Include(x => x.Symbol) .Where(x => x.Symbol.Ticker == request.Ticker) + .Select(s => new SymbolProviderResult + { + Id = s.Symbol.Id, + Ticker = s.Ticker, + Symbol = $"{s.Symbol.BaseSymbol}/{s.Symbol.QuoteSymbol}", + ProviderId = s.ProviderId, + PriceSell = s.PriceSell, + PriceBuy = s.PriceBuy, + UpdatedAt = s.UpdatedAt + }) .ToListAsync(cancellationToken) }; } diff --git a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs index 9dbd30d..2cc187a 100644 --- a/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs +++ b/sources/core/Crypto.Compare.Services/Queries/Symbols/GetSymbolsQuery.cs @@ -1,8 +1,7 @@ -using Crypto.Compare.Data; -using Crypto.Compare.Services.Results.Symbols; +using Crypto.Compare.Services.Results.SymbolProviders; using FluentResults; using MediatR; namespace Crypto.Compare.Services.Queries.Symbols; -public record GetSymbolsQuery(string Ticker) : IRequest>; +public record GetSymbolsQuery(string Ticker) : IRequest>; diff --git a/sources/core/Crypto.Compare.Services/Results/SymbolProviders/GetSymbolProviderResult.cs b/sources/core/Crypto.Compare.Services/Results/SymbolProviders/GetSymbolProviderResult.cs index 20e1683..5453bb5 100644 --- a/sources/core/Crypto.Compare.Services/Results/SymbolProviders/GetSymbolProviderResult.cs +++ b/sources/core/Crypto.Compare.Services/Results/SymbolProviders/GetSymbolProviderResult.cs @@ -1,6 +1,4 @@ -using Crypto.Compare.Data; - -namespace Crypto.Compare.Services.Results.SymbolProviders; +namespace Crypto.Compare.Services.Results.SymbolProviders; public class GetSymbolProviderResult : IHandlerResult { diff --git a/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs b/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs index 792e723..de3bc20 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Ioc/ServicesRegistry.cs @@ -15,6 +15,7 @@ using Crypto.Compare.DataAccess; using Crypto.Compare.GateIo; using Crypto.Compare.Mexc; +using Crypto.Compare.PublicApi.Dtos; using Crypto.Compare.PublicApi.HostedServices; using Crypto.Compare.PublicApi.Mapping; using Crypto.Compare.Services.AdaptersObservable.Impl; @@ -287,7 +288,7 @@ private static IServiceCollection AddMediator(this IServiceCollection services) .AddScoped>, GetProviderQueryHandler>() .AddScoped>, GetProvidersQueryHandler>() .AddScoped>, GetSymbolProvidersQueryHandler>() - .AddScoped>, GetSymbolsQueryHandler>() + .AddScoped>, GetSymbolsQueryHandler>() ; } } diff --git a/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs b/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs index 4b05307..d888181 100644 --- a/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs +++ b/sources/presentation/Crypto.Compare.PublicApi/Swaggers/Responses/v1/Symbols/GetSymbolsResponseExample.cs @@ -9,7 +9,7 @@ public class GetSymbolsResponseExample : IExamplesProvider public GetSymbolsResponse GetExamples() => new() { - Symbols = new List + Symbols = new List { new() {