Skip to content

Commit a1e0dbd

Browse files
committed
fix error model casing
1 parent 517c15f commit a1e0dbd

File tree

3 files changed

+40
-40
lines changed

3 files changed

+40
-40
lines changed

api/openapi.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11976,22 +11976,22 @@ components:
1197611976
last: last
1197711977
first: first
1197811978
errors:
11979-
- Description: Description
11980-
TelephoneNumbers:
11979+
- code: 0
11980+
telephoneNumbers:
1198111981
- TelephoneNumber: TelephoneNumber
1198211982
- TelephoneNumber: TelephoneNumber
11983-
Code: 0
11984-
- Description: Description
11985-
TelephoneNumbers:
11983+
description: description
11984+
- code: 0
11985+
telephoneNumbers:
1198611986
- TelephoneNumber: TelephoneNumber
1198711987
- TelephoneNumber: TelephoneNumber
11988-
Code: 0
11988+
description: description
1198911989
properties:
1199011990
links:
11991-
$ref: '#/components/schemas/Links'
11991+
$ref: '#/components/schemas/links'
1199211992
errors:
1199311993
items:
11994-
$ref: '#/components/schemas/Error'
11994+
$ref: '#/components/schemas/error'
1199511995
type: array
1199611996
data:
1199711997
items:
@@ -12000,7 +12000,7 @@ components:
1200012000
required:
1200112001
- data
1200212002
type: object
12003-
Links:
12003+
links:
1200412004
example:
1200512005
next: next
1200612006
previous: previous
@@ -12023,24 +12023,24 @@ components:
1202312023
\ return the last page of result."
1202412024
type: string
1202512025
type: object
12026-
Error:
12026+
error:
1202712027
example:
12028-
Description: Description
12029-
TelephoneNumbers:
12028+
code: 0
12029+
telephoneNumbers:
1203012030
- TelephoneNumber: TelephoneNumber
1203112031
- TelephoneNumber: TelephoneNumber
12032-
Code: 0
12032+
description: description
1203312033
properties:
12034-
Code:
12034+
code:
1203512035
type: integer
12036-
Description:
12036+
description:
1203712037
type: string
12038-
TelephoneNumbers:
12038+
telephoneNumbers:
1203912039
items:
12040-
$ref: '#/components/schemas/TelephoneNumber'
12040+
$ref: '#/components/schemas/telephoneNumber'
1204112041
type: array
1204212042
type: object
12043-
TelephoneNumber:
12043+
telephoneNumber:
1204412044
example:
1204512045
TelephoneNumber: TelephoneNumber
1204612046
properties:

bandwidth.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5099,16 +5099,16 @@ components:
50995099
- data
51005100
properties:
51015101
links:
5102-
$ref: '#/components/schemas/Links'
5102+
$ref: '#/components/schemas/links'
51035103
errors:
51045104
type: array
51055105
items:
5106-
$ref: '#/components/schemas/Error'
5106+
$ref: '#/components/schemas/error'
51075107
data:
51085108
items:
51095109
$ref: '#/components/schemas/webhookSubscription'
51105110
type: array
5111-
Links:
5111+
links:
51125112
type: object
51135113
properties:
51145114
first:
@@ -5129,18 +5129,18 @@ components:
51295129
If more results exist than specified by 'size', this link return the
51305130
last page of result.
51315131
type: string
5132-
Error:
5132+
error:
51335133
type: object
51345134
properties:
5135-
Code:
5135+
code:
51365136
type: integer
5137-
Description:
5137+
description:
51385138
type: string
5139-
TelephoneNumbers:
5139+
telephoneNumbers:
51405140
type: array
51415141
items:
5142-
$ref: '#/components/schemas/TelephoneNumber'
5143-
TelephoneNumber:
5142+
$ref: '#/components/schemas/telephoneNumber'
5143+
telephoneNumber:
51445144
type: object
51455145
properties:
51465146
TelephoneNumber:

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@
5353
*/
5454
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0")
5555
public class Error {
56-
public static final String SERIALIZED_NAME_CODE = "Code";
56+
public static final String SERIALIZED_NAME_CODE = "code";
5757
@SerializedName(SERIALIZED_NAME_CODE)
5858
@javax.annotation.Nullable
5959
private Integer code;
6060

61-
public static final String SERIALIZED_NAME_DESCRIPTION = "Description";
61+
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
6262
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
6363
@javax.annotation.Nullable
6464
private String description;
6565

66-
public static final String SERIALIZED_NAME_TELEPHONE_NUMBERS = "TelephoneNumbers";
66+
public static final String SERIALIZED_NAME_TELEPHONE_NUMBERS = "telephoneNumbers";
6767
@SerializedName(SERIALIZED_NAME_TELEPHONE_NUMBERS)
6868
@javax.annotation.Nullable
6969
private List<TelephoneNumber> telephoneNumbers = new ArrayList<>();
@@ -231,9 +231,9 @@ private String toIndentedString(Object o) {
231231
static {
232232
// a set of all properties/fields (JSON key names)
233233
openapiFields = new HashSet<String>();
234-
openapiFields.add("Code");
235-
openapiFields.add("Description");
236-
openapiFields.add("TelephoneNumbers");
234+
openapiFields.add("code");
235+
openapiFields.add("description");
236+
openapiFields.add("telephoneNumbers");
237237

238238
// a set of required properties/fields (JSON key names)
239239
openapiRequiredFields = new HashSet<String>();
@@ -252,18 +252,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
252252
}
253253
}
254254
JsonObject jsonObj = jsonElement.getAsJsonObject();
255-
if ((jsonObj.get("Description") != null && !jsonObj.get("Description").isJsonNull()) && !jsonObj.get("Description").isJsonPrimitive()) {
256-
throw new IllegalArgumentException(String.format("Expected the field `Description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Description").toString()));
255+
if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) {
256+
throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString()));
257257
}
258-
if (jsonObj.get("TelephoneNumbers") != null && !jsonObj.get("TelephoneNumbers").isJsonNull()) {
259-
JsonArray jsonArraytelephoneNumbers = jsonObj.getAsJsonArray("TelephoneNumbers");
258+
if (jsonObj.get("telephoneNumbers") != null && !jsonObj.get("telephoneNumbers").isJsonNull()) {
259+
JsonArray jsonArraytelephoneNumbers = jsonObj.getAsJsonArray("telephoneNumbers");
260260
if (jsonArraytelephoneNumbers != null) {
261261
// ensure the json data is an array
262-
if (!jsonObj.get("TelephoneNumbers").isJsonArray()) {
263-
throw new IllegalArgumentException(String.format("Expected the field `TelephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("TelephoneNumbers").toString()));
262+
if (!jsonObj.get("telephoneNumbers").isJsonArray()) {
263+
throw new IllegalArgumentException(String.format("Expected the field `telephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("telephoneNumbers").toString()));
264264
}
265265

266-
// validate the optional field `TelephoneNumbers` (array)
266+
// validate the optional field `telephoneNumbers` (array)
267267
for (int i = 0; i < jsonArraytelephoneNumbers.size(); i++) {
268268
TelephoneNumber.validateJsonElement(jsonArraytelephoneNumbers.get(i));
269269
};

0 commit comments

Comments
 (0)