From 13a02df4c6ae7407f12f16ec2634b1d42125c1eb Mon Sep 17 00:00:00 2001 From: Arne Dumarey Date: Mon, 29 Jan 2024 18:33:40 +0100 Subject: [PATCH] fix: documentation examples --- .../Detail/SuspiciousCasesDetailResponse.cs | 4 +++- .../Detail/SuspiciousCasesDetailRequestHandler.cs | 4 ++-- .../appsettings.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Basisregisters.IntegrationDb.SuspiciousCases.Api.Abstractions/Detail/SuspiciousCasesDetailResponse.cs b/src/Basisregisters.IntegrationDb.SuspiciousCases.Api.Abstractions/Detail/SuspiciousCasesDetailResponse.cs index f178f1a9..3d037e15 100644 --- a/src/Basisregisters.IntegrationDb.SuspiciousCases.Api.Abstractions/Detail/SuspiciousCasesDetailResponse.cs +++ b/src/Basisregisters.IntegrationDb.SuspiciousCases.Api.Abstractions/Detail/SuspiciousCasesDetailResponse.cs @@ -92,7 +92,9 @@ public SuspiciousCasesDetailResponse GetExamples() new Uri(string.Format(_responseOptions.Value.AddressDetailUrl, "2")), "Verdacht geval 2") }, - new Uri(string.Format(_responseOptions.Value.SuspiciousCasesTypeNextUrl, SuspiciousCasesType.CurrentAddressWithoutLinkedParcelsOrBuildingUnits, 10, 2))); + new Uri( + string.Format(_responseOptions.Value.SuspiciousCasesTypeNextUrl, 10, 2) + .Replace("{type}", ((int)SuspiciousCasesType.CurrentAddressWithoutLinkedParcelsOrBuildingUnits).ToString()))); } } } diff --git a/src/Basisregisters.IntegrationDb.SuspiciousCases.Api/Detail/SuspiciousCasesDetailRequestHandler.cs b/src/Basisregisters.IntegrationDb.SuspiciousCases.Api/Detail/SuspiciousCasesDetailRequestHandler.cs index ea85f9d3..77fc4e3c 100644 --- a/src/Basisregisters.IntegrationDb.SuspiciousCases.Api/Detail/SuspiciousCasesDetailRequestHandler.cs +++ b/src/Basisregisters.IntegrationDb.SuspiciousCases.Api/Detail/SuspiciousCasesDetailRequestHandler.cs @@ -7,6 +7,7 @@ using Abstractions; using Abstractions.Detail; using Be.Vlaanderen.Basisregisters.Api.Search.Pagination; + using Be.Vlaanderen.Basisregisters.Utilities; using MediatR; using Microsoft.Extensions.Options; @@ -41,9 +42,8 @@ public async Task Handle(SuspiciousCasesDetailReq suspiciousCases.Count > paginationRequest.Limit ? new Uri(string.Format( _responseOptions.SuspiciousCasesTypeNextUrl, - (int)detailRequest.Type, paginationRequest.Offset + paginationRequest.Limit, - paginationRequest.Limit)) + paginationRequest.Limit).Replace("{type}", ((int)detailRequest.Type).ToString())) : null); } } diff --git a/src/Basisregisters.IntegrationDb.SuspiciousCases.Api/appsettings.json b/src/Basisregisters.IntegrationDb.SuspiciousCases.Api/appsettings.json index 49f1c19f..eadb7fd6 100644 --- a/src/Basisregisters.IntegrationDb.SuspiciousCases.Api/appsettings.json +++ b/src/Basisregisters.IntegrationDb.SuspiciousCases.Api/appsettings.json @@ -26,7 +26,7 @@ "ParcelDetailUrl": "https://api.basisregisters.vlaanderen.be/v2/percelen/{0}", "RoadSegmentDetailUrl": "https://api.basisregisters.vlaanderen.be/v2/wegsegmenten/{0}", "SuspiciousCasesTypeUrl": "https://api.basisregisters.vlaanderen.be/v2/verdachte-gevallen/{0}", - "SuspiciousCasesTypeNextUrl": "https://api.basisregisters.vlaanderen.be/v2/verdachte-gevallen/{0}?offset={1}&limit={2}" + "SuspiciousCasesTypeNextUrl": "https://api.basisregisters.vlaanderen.be/v2/verdachte-gevallen/{type}?offset={0}&limit={1}" }, "OvoCodeWhiteList": [