From 8cdfba59098ef119c85fda207e5a47c5208a462c Mon Sep 17 00:00:00 2001 From: Jean-Pierre Portier Date: Fri, 24 Nov 2023 17:37:44 +0100 Subject: [PATCH] fix: Synch generated files (URLPathUtils usage) --- .../adapters/api/v1/ActiveNumberApi.java | 20 +++++------ .../adapters/api/v1/AvailableNumberApi.java | 18 ++++------ .../adapters/api/v1/AvailableRegionsApi.java | 5 ++- .../api/v1/CallbackConfigurationApi.java | 8 ++--- .../sms/adapters/api/v1/BatchesApi.java | 33 ++++++++----------- .../adapters/api/v1/DeliveryReportsApi.java | 16 ++++----- .../sms/adapters/api/v1/GroupsApi.java | 31 ++++++++--------- .../sms/adapters/api/v1/InboundsApi.java | 9 +++-- .../api/v1/QueryVerificationsApi.java | 17 ++++------ .../SendingAndReportingVerificationsApi.java | 14 +++----- .../dto/v1/VerificationResponseDto.java | 2 +- 11 files changed, 70 insertions(+), 103 deletions(-) diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/ActiveNumberApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/ActiveNumberApi.java index b4495ea2..90222d8d 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/ActiveNumberApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/ActiveNumberApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.numbers.models.dto.v1.ActiveNumberDto; import com.sinch.sdk.domains.numbers.models.dto.v1.ActiveNumberRequestDto; @@ -116,11 +116,10 @@ private HttpRequest numberServiceGetActiveNumberRequestBuilder( String localVarPath = "/v1/projects/{projectId}/activeNumbers/{phoneNumber}" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())) + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())) .replaceAll( "\\{" + "phoneNumber" + "\\}", - URLParameterUtils.encodeParameterValue(phoneNumber.toString())); + URLPathUtils.encodePathSegment(phoneNumber.toString())); List localVarQueryParams = new ArrayList<>(); @@ -271,8 +270,7 @@ private HttpRequest numberServiceListActiveNumbersRequestBuilder( String localVarPath = "/v1/projects/{projectId}/activeNumbers" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())); + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != regionCode) { @@ -401,11 +399,10 @@ private HttpRequest numberServiceReleaseNumberRequestBuilder(String projectId, S String localVarPath = "/v1/projects/{projectId}/activeNumbers/{phoneNumber}:release" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())) + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())) .replaceAll( "\\{" + "phoneNumber" + "\\}", - URLParameterUtils.encodeParameterValue(phoneNumber.toString())); + URLPathUtils.encodePathSegment(phoneNumber.toString())); List localVarQueryParams = new ArrayList<>(); @@ -501,11 +498,10 @@ private HttpRequest numberServiceUpdateActiveNumberRequestBuilder( String localVarPath = "/v1/projects/{projectId}/activeNumbers/{phoneNumber}" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())) + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())) .replaceAll( "\\{" + "phoneNumber" + "\\}", - URLParameterUtils.encodeParameterValue(phoneNumber.toString())); + URLPathUtils.encodePathSegment(phoneNumber.toString())); List localVarQueryParams = new ArrayList<>(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableNumberApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableNumberApi.java index 40674927..5b8d74e3 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableNumberApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableNumberApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.numbers.models.dto.v1.ActiveNumberDto; import com.sinch.sdk.domains.numbers.models.dto.v1.AvailableNumberDto; @@ -123,11 +123,10 @@ private HttpRequest numberServiceGetAvailableNumberRequestBuilder( String localVarPath = "/v1/projects/{projectId}/availableNumbers/{phoneNumber}" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())) + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())) .replaceAll( "\\{" + "phoneNumber" + "\\}", - URLParameterUtils.encodeParameterValue(phoneNumber.toString())); + URLPathUtils.encodePathSegment(phoneNumber.toString())); List localVarQueryParams = new ArrayList<>(); @@ -267,8 +266,7 @@ private HttpRequest numberServiceListAvailableNumbersRequestBuilder( String localVarPath = "/v1/projects/{projectId}/availableNumbers" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())); + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != numberPatternPattern) { @@ -389,8 +387,7 @@ private HttpRequest numberServiceRentAnyNumberRequestBuilder( String localVarPath = "/v1/projects/{projectId}/availableNumbers:rentAny" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())); + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -487,11 +484,10 @@ private HttpRequest numberServiceRentNumberRequestBuilder( String localVarPath = "/v1/projects/{projectId}/availableNumbers/{phoneNumber}:rent" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())) + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())) .replaceAll( "\\{" + "phoneNumber" + "\\}", - URLParameterUtils.encodeParameterValue(phoneNumber.toString())); + URLPathUtils.encodePathSegment(phoneNumber.toString())); List localVarQueryParams = new ArrayList<>(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableRegionsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableRegionsApi.java index 6ce73532..fc49aa7a 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableRegionsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableRegionsApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.numbers.models.dto.v1.ListAvailableRegionsResponseDto; import java.util.ArrayList; @@ -112,8 +112,7 @@ private HttpRequest numberServiceListAvailableRegionsRequestBuilder( String localVarPath = "/v1/projects/{projectId}/availableRegions" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())); + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != types) { diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/CallbackConfigurationApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/CallbackConfigurationApi.java index 120d64dc..5f35b55f 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/CallbackConfigurationApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/CallbackConfigurationApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.numbers.models.dto.v1.CallbackConfigurationDto; import com.sinch.sdk.domains.numbers.models.dto.v1.CallbackConfigurationUpdateDto; @@ -97,8 +97,7 @@ private HttpRequest getCallbackConfigurationRequestBuilder(String projectId) thr String localVarPath = "/v1/projects/{projectId}/callbackConfiguration" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())); + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -177,8 +176,7 @@ private HttpRequest updateCallbackConfigurationRequestBuilder( String localVarPath = "/v1/projects/{projectId}/callbackConfiguration" .replaceAll( - "\\{" + "projectId" + "\\}", - URLParameterUtils.encodeParameterValue(projectId.toString())); + "\\{" + "projectId" + "\\}", URLPathUtils.encodePathSegment(projectId.toString())); List localVarQueryParams = new ArrayList<>(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/BatchesApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/BatchesApi.java index 266bdc50..957773cc 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/BatchesApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/BatchesApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.sms.models.dto.v1.ApiBatchListDto; import com.sinch.sdk.domains.sms.models.dto.v1.ApiDeliveryFeedbackDto; @@ -115,10 +115,9 @@ private HttpRequest cancelBatchMessageRequestBuilder(String servicePlanId, Strin "/xms/v1/{service_plan_id}/batches/{batch_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "batch_id" + "\\}", - URLParameterUtils.encodeParameterValue(batchId.toString())); + "\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -215,10 +214,9 @@ private HttpRequest deliveryFeedbackRequestBuilder( "/xms/v1/{service_plan_id}/batches/{batch_id}/delivery_feedback" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "batch_id" + "\\}", - URLParameterUtils.encodeParameterValue(batchId.toString())); + "\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -311,7 +309,7 @@ private HttpRequest dryRunRequestBuilder( "/xms/v1/{service_plan_id}/batches/dry_run" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())); + URLPathUtils.encodePathSegment(servicePlanId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != perRecipient) { @@ -401,10 +399,9 @@ private HttpRequest getBatchMessageRequestBuilder(String servicePlanId, String b "/xms/v1/{service_plan_id}/batches/{batch_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "batch_id" + "\\}", - URLParameterUtils.encodeParameterValue(batchId.toString())); + "\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -519,7 +516,7 @@ private HttpRequest listBatchesRequestBuilder( "/xms/v1/{service_plan_id}/batches" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())); + URLPathUtils.encodePathSegment(servicePlanId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != page) { @@ -636,10 +633,9 @@ private HttpRequest replaceBatchRequestBuilder( "/xms/v1/{service_plan_id}/batches/{batch_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "batch_id" + "\\}", - URLParameterUtils.encodeParameterValue(batchId.toString())); + "\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -718,7 +714,7 @@ private HttpRequest sendSMSRequestBuilder( "/xms/v1/{service_plan_id}/batches" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())); + URLPathUtils.encodePathSegment(servicePlanId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -809,10 +805,9 @@ private HttpRequest updateBatchMessageRequestBuilder( "/xms/v1/{service_plan_id}/batches/{batch_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "batch_id" + "\\}", - URLParameterUtils.encodeParameterValue(batchId.toString())); + "\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString())); List localVarQueryParams = new ArrayList<>(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/DeliveryReportsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/DeliveryReportsApi.java index df92a507..af2bc6e1 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/DeliveryReportsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/DeliveryReportsApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.sms.models.dto.v1.DeliveryReportDto; import com.sinch.sdk.domains.sms.models.dto.v1.DeliveryReportListDto; @@ -134,10 +134,9 @@ private HttpRequest getDeliveryReportByBatchIdRequestBuilder( "/xms/v1/{service_plan_id}/batches/{batch_id}/delivery_report" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "batch_id" + "\\}", - URLParameterUtils.encodeParameterValue(batchId.toString())); + "\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != type) { @@ -245,13 +244,12 @@ private HttpRequest getDeliveryReportByPhoneNumberRequestBuilder( "/xms/v1/{service_plan_id}/batches/{batch_id}/delivery_report/{recipient_msisdn}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "batch_id" + "\\}", - URLParameterUtils.encodeParameterValue(batchId.toString())) + "\\{" + "batch_id" + "\\}", URLPathUtils.encodePathSegment(batchId.toString())) .replaceAll( "\\{" + "recipient_msisdn" + "\\}", - URLParameterUtils.encodeParameterValue(recipientMsisdn.toString())); + URLPathUtils.encodePathSegment(recipientMsisdn.toString())); List localVarQueryParams = new ArrayList<>(); @@ -369,7 +367,7 @@ private HttpRequest getDeliveryReportsRequestBuilder( "/xms/v1/{service_plan_id}/delivery_reports" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())); + URLPathUtils.encodePathSegment(servicePlanId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != page) { diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/GroupsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/GroupsApi.java index d258a8ae..88ead4ca 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/GroupsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/GroupsApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.sms.models.dto.v1.ApiGroupListDto; import com.sinch.sdk.domains.sms.models.dto.v1.CreateGroupResponseDto; @@ -111,7 +111,7 @@ private HttpRequest createGroupRequestBuilder(String servicePlanId, GroupObjectD "/xms/v1/{service_plan_id}/groups" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())); + URLPathUtils.encodePathSegment(servicePlanId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -181,10 +181,9 @@ private HttpRequest deleteGroupRequestBuilder(String servicePlanId, String group "/xms/v1/{service_plan_id}/groups/{group_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "group_id" + "\\}", - URLParameterUtils.encodeParameterValue(groupId.toString())); + "\\{" + "group_id" + "\\}", URLPathUtils.encodePathSegment(groupId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -257,10 +256,9 @@ private HttpRequest getMembersRequestBuilder(String servicePlanId, String groupI "/xms/v1/{service_plan_id}/groups/{group_id}/members" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "group_id" + "\\}", - URLParameterUtils.encodeParameterValue(groupId.toString())); + "\\{" + "group_id" + "\\}", URLPathUtils.encodePathSegment(groupId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -338,7 +336,7 @@ private HttpRequest listGroupsRequestBuilder(String servicePlanId, Integer page, "/xms/v1/{service_plan_id}/groups" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())); + URLPathUtils.encodePathSegment(servicePlanId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != page) { @@ -435,10 +433,9 @@ private HttpRequest replaceGroupRequestBuilder( "/xms/v1/{service_plan_id}/groups/{group_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "group_id" + "\\}", - URLParameterUtils.encodeParameterValue(groupId.toString())); + "\\{" + "group_id" + "\\}", URLPathUtils.encodePathSegment(groupId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -512,10 +509,9 @@ private HttpRequest retrieveGroupRequestBuilder(String servicePlanId, String gro "/xms/v1/{service_plan_id}/groups/{group_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "group_id" + "\\}", - URLParameterUtils.encodeParameterValue(groupId.toString())); + "\\{" + "group_id" + "\\}", URLPathUtils.encodePathSegment(groupId.toString())); List localVarQueryParams = new ArrayList<>(); @@ -611,10 +607,9 @@ private HttpRequest updateGroupRequestBuilder( "/xms/v1/{service_plan_id}/groups/{group_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "group_id" + "\\}", - URLParameterUtils.encodeParameterValue(groupId.toString())); + "\\{" + "group_id" + "\\}", URLPathUtils.encodePathSegment(groupId.toString())); List localVarQueryParams = new ArrayList<>(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/InboundsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/InboundsApi.java index 9b150ba7..a210a142 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/InboundsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/InboundsApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.sms.models.dto.v1.ApiInboundListDto; import com.sinch.sdk.domains.sms.models.dto.v1.InboundDto; @@ -157,7 +157,7 @@ private HttpRequest listInboundMessagesRequestBuilder( "/xms/v1/{service_plan_id}/inbounds" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())); + URLPathUtils.encodePathSegment(servicePlanId.toString())); List localVarQueryParams = new ArrayList<>(); if (null != page) { @@ -268,10 +268,9 @@ private HttpRequest retrieveInboundMessageRequestBuilder(String servicePlanId, S "/xms/v1/{service_plan_id}/inbounds/{inbound_id}" .replaceAll( "\\{" + "service_plan_id" + "\\}", - URLParameterUtils.encodeParameterValue(servicePlanId.toString())) + URLPathUtils.encodePathSegment(servicePlanId.toString())) .replaceAll( - "\\{" + "inbound_id" + "\\}", - URLParameterUtils.encodeParameterValue(inboundId.toString())); + "\\{" + "inbound_id" + "\\}", URLPathUtils.encodePathSegment(inboundId.toString())); List localVarQueryParams = new ArrayList<>(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/QueryVerificationsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/QueryVerificationsApi.java index 76209924..60a6c2df 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/QueryVerificationsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/QueryVerificationsApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.verification.models.dto.v1.VerificationResponseDto; import java.util.ArrayList; @@ -94,8 +94,7 @@ private HttpRequest verificationStatusByIdRequestBuilder(String id) throws ApiEx String localVarPath = "/verification/v1/verifications/id/{id}" - .replaceAll( - "\\{" + "id" + "\\}", URLParameterUtils.encodeParameterValue(id.toString())); + .replaceAll("\\{" + "id" + "\\}", URLPathUtils.encodePathSegment(id.toString())); List localVarQueryParams = new ArrayList<>(); @@ -182,14 +181,11 @@ private HttpRequest verificationStatusByIdentityRequestBuilder( String localVarPath = "/verification/v1/verifications/{method}/{type}/{endpoint}" + .replaceAll("\\{" + "type" + "\\}", URLPathUtils.encodePathSegment(type.toString())) .replaceAll( - "\\{" + "type" + "\\}", URLParameterUtils.encodeParameterValue(type.toString())) - .replaceAll( - "\\{" + "endpoint" + "\\}", - URLParameterUtils.encodeParameterValue(endpoint.toString())) + "\\{" + "endpoint" + "\\}", URLPathUtils.encodePathSegment(endpoint.toString())) .replaceAll( - "\\{" + "method" + "\\}", - URLParameterUtils.encodeParameterValue(method.toString())); + "\\{" + "method" + "\\}", URLPathUtils.encodePathSegment(method.toString())); List localVarQueryParams = new ArrayList<>(); @@ -256,8 +252,7 @@ private HttpRequest verificationStatusByReferenceRequestBuilder(String reference String localVarPath = "/verification/v1/verifications/reference/{reference}" .replaceAll( - "\\{" + "reference" + "\\}", - URLParameterUtils.encodeParameterValue(reference.toString())); + "\\{" + "reference" + "\\}", URLPathUtils.encodePathSegment(reference.toString())); List localVarQueryParams = new ArrayList<>(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/SendingAndReportingVerificationsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/SendingAndReportingVerificationsApi.java index bc2019d5..58f2d62a 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/SendingAndReportingVerificationsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/SendingAndReportingVerificationsApi.java @@ -23,7 +23,7 @@ import com.sinch.sdk.core.http.HttpResponse; import com.sinch.sdk.core.http.HttpStatus; import com.sinch.sdk.core.http.URLParameter; -import com.sinch.sdk.core.http.URLParameterUtils; +import com.sinch.sdk.core.http.URLPathUtils; import com.sinch.sdk.core.models.ServerConfiguration; import com.sinch.sdk.domains.verification.models.dto.v1.InitiateVerificationResourceDto; import com.sinch.sdk.domains.verification.models.dto.v1.InitiateVerificationResponseDto; @@ -116,8 +116,7 @@ private HttpRequest reportVerificationByIdRequestBuilder( String localVarPath = "/verification/v1/verifications/id/{id}" - .replaceAll( - "\\{" + "id" + "\\}", URLParameterUtils.encodeParameterValue(id.toString())); + .replaceAll("\\{" + "id" + "\\}", URLPathUtils.encodePathSegment(id.toString())); List localVarQueryParams = new ArrayList<>(); @@ -214,11 +213,9 @@ private HttpRequest reportVerificationByIdentityRequestBuilder( String localVarPath = "/verification/v1/verifications/{type}/{endpoint}" + .replaceAll("\\{" + "type" + "\\}", URLPathUtils.encodePathSegment(type.toString())) .replaceAll( - "\\{" + "type" + "\\}", URLParameterUtils.encodeParameterValue(type.toString())) - .replaceAll( - "\\{" + "endpoint" + "\\}", - URLParameterUtils.encodeParameterValue(endpoint.toString())); + "\\{" + "endpoint" + "\\}", URLPathUtils.encodePathSegment(endpoint.toString())); List localVarQueryParams = new ArrayList<>(); @@ -296,8 +293,7 @@ private HttpRequest startVerificationRequestBuilder( final Collection localVarAccepts = Arrays.asList("application/json"); - final Collection localVarContentTypes = - Arrays.asList("application/json; charset=UTF-8"); + final Collection localVarContentTypes = Arrays.asList("application/json"); final Collection localVarAuthNames = Arrays.asList("Basic"); final String serializedBody = diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/models/dto/v1/VerificationResponseDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/models/dto/v1/VerificationResponseDto.java index fee86e3c..c11e3016 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/models/dto/v1/VerificationResponseDto.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/models/dto/v1/VerificationResponseDto.java @@ -336,7 +336,7 @@ public void setCallResult(String callResult) { this.callResult = callResult; } - /** Return true if this StartVerificationResponse object is equal to o. */ + /** Return true if this VerificationResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) {