Skip to content

Commit 935ee19

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-8265 Update SDK Based on Recent Spec Changes (#192)
* Generate SDK with OpenAPI Generator Version * update test --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent e89b4e9 commit 935ee19

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

api/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12479,7 +12479,7 @@ components:
1247912479
was encountered.
1248012480
example: "400"
1248112481
type: string
12482-
errorDescription:
12482+
errorMessage:
1248312483
description: A description of the error that was encountered.
1248412484
example: cannot process request.
1248512485
type: string

bandwidth.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5424,7 +5424,7 @@ components:
54245424
be interpreted as an HTTP status code in regards to the error that
54255425
was encountered.
54265426
example: '400'
5427-
errorDescription:
5427+
errorMessage:
54285428
type: string
54295429
description: A description of the error that was encountered.
54305430
example: cannot process request.

docs/FailureWebhook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
|**accountId** | **String** | User&#39;s account ID. | [optional] |
1111
|**phoneNumber** | **String** | Toll-free telephone number in E.164 format. | [optional] |
1212
|**errorCode** | **String** | An error code indicating what error was encountered. This code can be interpreted as an HTTP status code in regards to the error that was encountered. | [optional] |
13-
|**errorDescription** | **String** | A description of the error that was encountered. | [optional] |
13+
|**errorMessage** | **String** | A description of the error that was encountered. | [optional] |
1414
|**errors** | **List&lt;String&gt;** | Details of the errors that were encountered when processing the request. | [optional] |
1515
|**internalTicketNumber** | **UUID** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] |
1616

src/main/java/com/bandwidth/sdk/model/FailureWebhook.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public class FailureWebhook {
6868
@javax.annotation.Nullable
6969
private String errorCode;
7070

71-
public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "errorDescription";
72-
@SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION)
71+
public static final String SERIALIZED_NAME_ERROR_MESSAGE = "errorMessage";
72+
@SerializedName(SERIALIZED_NAME_ERROR_MESSAGE)
7373
@javax.annotation.Nullable
74-
private String errorDescription;
74+
private String errorMessage;
7575

7676
public static final String SERIALIZED_NAME_ERRORS = "errors";
7777
@SerializedName(SERIALIZED_NAME_ERRORS)
@@ -143,22 +143,22 @@ public void setErrorCode(@javax.annotation.Nullable String errorCode) {
143143
}
144144

145145

146-
public FailureWebhook errorDescription(@javax.annotation.Nullable String errorDescription) {
147-
this.errorDescription = errorDescription;
146+
public FailureWebhook errorMessage(@javax.annotation.Nullable String errorMessage) {
147+
this.errorMessage = errorMessage;
148148
return this;
149149
}
150150

151151
/**
152152
* A description of the error that was encountered.
153-
* @return errorDescription
153+
* @return errorMessage
154154
*/
155155
@javax.annotation.Nullable
156-
public String getErrorDescription() {
157-
return errorDescription;
156+
public String getErrorMessage() {
157+
return errorMessage;
158158
}
159159

160-
public void setErrorDescription(@javax.annotation.Nullable String errorDescription) {
161-
this.errorDescription = errorDescription;
160+
public void setErrorMessage(@javax.annotation.Nullable String errorMessage) {
161+
this.errorMessage = errorMessage;
162162
}
163163

164164

@@ -265,15 +265,15 @@ public boolean equals(Object o) {
265265
return Objects.equals(this.accountId, failureWebhook.accountId) &&
266266
Objects.equals(this.phoneNumber, failureWebhook.phoneNumber) &&
267267
Objects.equals(this.errorCode, failureWebhook.errorCode) &&
268-
Objects.equals(this.errorDescription, failureWebhook.errorDescription) &&
268+
Objects.equals(this.errorMessage, failureWebhook.errorMessage) &&
269269
Objects.equals(this.errors, failureWebhook.errors) &&
270270
Objects.equals(this.internalTicketNumber, failureWebhook.internalTicketNumber)&&
271271
Objects.equals(this.additionalProperties, failureWebhook.additionalProperties);
272272
}
273273

274274
@Override
275275
public int hashCode() {
276-
return Objects.hash(accountId, phoneNumber, errorCode, errorDescription, errors, internalTicketNumber, additionalProperties);
276+
return Objects.hash(accountId, phoneNumber, errorCode, errorMessage, errors, internalTicketNumber, additionalProperties);
277277
}
278278

279279
@Override
@@ -283,7 +283,7 @@ public String toString() {
283283
sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
284284
sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n");
285285
sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
286-
sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n");
286+
sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
287287
sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
288288
sb.append(" internalTicketNumber: ").append(toIndentedString(internalTicketNumber)).append("\n");
289289
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
@@ -312,7 +312,7 @@ private String toIndentedString(Object o) {
312312
openapiFields.add("accountId");
313313
openapiFields.add("phoneNumber");
314314
openapiFields.add("errorCode");
315-
openapiFields.add("errorDescription");
315+
openapiFields.add("errorMessage");
316316
openapiFields.add("errors");
317317
openapiFields.add("internalTicketNumber");
318318

@@ -342,8 +342,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
342342
if ((jsonObj.get("errorCode") != null && !jsonObj.get("errorCode").isJsonNull()) && !jsonObj.get("errorCode").isJsonPrimitive()) {
343343
throw new IllegalArgumentException(String.format("Expected the field `errorCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorCode").toString()));
344344
}
345-
if ((jsonObj.get("errorDescription") != null && !jsonObj.get("errorDescription").isJsonNull()) && !jsonObj.get("errorDescription").isJsonPrimitive()) {
346-
throw new IllegalArgumentException(String.format("Expected the field `errorDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorDescription").toString()));
345+
if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) {
346+
throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString()));
347347
}
348348
// ensure the optional json data is an array if present
349349
if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) {

src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class FailureWebhookTest {
3232
.accountId("accountId")
3333
.phoneNumber("phoneNumber")
3434
.errorCode("errorCode")
35-
.errorDescription("errorDescription")
35+
.errorMessage("errorMessage")
3636
.errors(new ArrayList<String>(Arrays.asList("errors")))
3737
.internalTicketNumber(UUID.randomUUID());
3838

@@ -69,11 +69,11 @@ public void errorCodeTest() {
6969
}
7070

7171
/**
72-
* Test the property 'errorDescription'
72+
* Test the property 'errorMessage'
7373
*/
7474
@Test
75-
public void errorDescriptionTest() {
76-
assertThat(model.getErrorDescription(), instanceOf(String.class));
75+
public void errorMessageTest() {
76+
assertThat(model.getErrorMessage(), instanceOf(String.class));
7777
}
7878

7979
/**

0 commit comments

Comments
 (0)