Skip to content

Commit dfeeee2

Browse files
committed
update to 7.9.0
1 parent 1f8041f commit dfeeee2

File tree

94 files changed

+2835
-2875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+2835
-2875
lines changed

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.6.0
1+
7.9.0

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Bandwidth
44
- API version: 1.0.0
5-
- Generator version: 7.6.0
5+
- Generator version: 7.9.0
66

77
Bandwidth's Communication APIs
88

@@ -85,7 +85,7 @@ import com.bandwidth.sdk.ApiClient;
8585
import com.bandwidth.sdk.ApiException;
8686
import com.bandwidth.sdk.Configuration;
8787
import com.bandwidth.sdk.auth.*;
88-
import com.bandwidth.sdk.models.*;
88+
import com.bandwidth.sdk.model.*;
8989
import com.bandwidth.sdk.api.CallsApi;
9090

9191
public class Example {

build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,13 @@ dependencies {
112112
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
113113
implementation 'com.google.code.gson:gson:2.9.1'
114114
implementation 'io.gsonfire:gson-fire:1.9.0'
115-
implementation 'javax.ws.rs:jsr311-api:1.1.1'
116-
implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
115+
implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6'
117116
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
118117
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
119118
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
120-
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
119+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3'
121120
testImplementation 'org.mockito:mockito-core:3.12.4'
122-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
121+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3'
123122
}
124123

125124
javadoc {

build.sbt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ lazy val root = (project in file(".")).
1414
"com.squareup.okhttp3" % "logging-interceptor" % "4.12.0",
1515
"com.google.code.gson" % "gson" % "2.9.1",
1616
"org.apache.commons" % "commons-lang3" % "3.12.0",
17-
"javax.ws.rs" % "jsr311-api" % "1.1.1",
18-
"javax.ws.rs" % "javax.ws.rs-api" % "2.1.1",
17+
"jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6",
1918
"org.openapitools" % "jackson-databind-nullable" % "0.2.6",
2019
"io.gsonfire" % "gson-fire" % "1.9.0" % "compile",
2120
"jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile",
2221
"com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile",
2322
"jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile",
24-
"org.junit.jupiter" % "junit-jupiter-api" % "5.10.2" % "test",
23+
"org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test",
2524
"com.novocode" % "junit-interface" % "0.10" % "test",
2625
"org.mockito" % "mockito-core" % "3.12.4" % "test"
2726
)

openapitools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
33
"spaces": 2,
44
"generator-cli": {
5-
"version": "7.6.0"
5+
"version": "7.9.0"
66
}
77
}

src/main/java/com/bandwidth/sdk/ApiClient.java

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,30 @@ public List<Pair> parameterToPairs(String collectionFormat, String name, Collect
735735
return params;
736736
}
737737

738+
/**
739+
* Formats the specified free-form query parameters to a list of {@code Pair} objects.
740+
*
741+
* @param value The free-form query parameters.
742+
* @return A list of {@code Pair} objects.
743+
*/
744+
public List<Pair> freeFormParameterToPairs(Object value) {
745+
List<Pair> params = new ArrayList<>();
746+
747+
// preconditions
748+
if (value == null || !(value instanceof Map )) {
749+
return params;
750+
}
751+
752+
final Map<String, Object> valuesMap = (Map<String, Object>) value;
753+
754+
for (Map.Entry<String, Object> entry : valuesMap.entrySet()) {
755+
params.add(new Pair(entry.getKey(), parameterToString(entry.getValue())));
756+
}
757+
758+
return params;
759+
}
760+
761+
738762
/**
739763
* Formats the specified collection path parameter to a string value.
740764
*
@@ -1173,10 +1197,6 @@ public Call buildCall(String baseUrl, String path, String method, List<Pair> que
11731197
* @throws com.bandwidth.sdk.ApiException If fail to serialize the request body object
11741198
*/
11751199
public Request buildRequest(String baseUrl, String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
1176-
// aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams
1177-
List<Pair> allQueryParams = new ArrayList<Pair>(queryParams);
1178-
allQueryParams.addAll(collectionQueryParams);
1179-
11801200
final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
11811201

11821202
// prepare HTTP request body
@@ -1204,10 +1224,12 @@ public Request buildRequest(String baseUrl, String path, String method, List<Pai
12041224
reqBody = serialize(body, contentType);
12051225
}
12061226

1227+
List<Pair> updatedQueryParams = new ArrayList<>(queryParams);
1228+
12071229
// update parameters with authentication settings
1208-
updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
1230+
updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url));
12091231

1210-
final Request.Builder reqBuilder = new Request.Builder().url(url);
1232+
final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
12111233
processHeaderParams(headerParams, reqBuilder);
12121234
processCookieParams(cookieParams, reqBuilder);
12131235

src/main/java/com/bandwidth/sdk/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* <p>ApiException class.</p>
2222
*/
2323
@SuppressWarnings("serial")
24-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
24+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.9.0")
2525
public class ApiException extends Exception {
2626
private static final long serialVersionUID = 1L;
2727

src/main/java/com/bandwidth/sdk/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package com.bandwidth.sdk;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.9.0")
1717
public class Configuration {
1818
public static final String VERSION = "10.1.0";
1919

src/main/java/com/bandwidth/sdk/JSON.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
package com.bandwidth.sdk;
1515

16-
import com.fasterxml.jackson.databind.util.StdDateFormat;
1716
import com.google.gson.Gson;
1817
import com.google.gson.GsonBuilder;
1918
import com.google.gson.JsonParseException;
2019
import com.google.gson.TypeAdapter;
20+
import com.google.gson.internal.bind.util.ISO8601Utils;
2121
import com.google.gson.stream.JsonReader;
2222
import com.google.gson.stream.JsonWriter;
2323
import com.google.gson.JsonElement;
@@ -31,16 +31,14 @@
3131
import java.lang.reflect.Type;
3232
import java.text.DateFormat;
3333
import java.text.ParseException;
34+
import java.text.ParsePosition;
3435
import java.time.LocalDate;
3536
import java.time.OffsetDateTime;
36-
import java.time.ZoneId;
37-
import java.time.ZoneOffset;
3837
import java.time.format.DateTimeFormatter;
3938
import java.util.Date;
4039
import java.util.Locale;
4140
import java.util.Map;
4241
import java.util.HashMap;
43-
import java.util.TimeZone;
4442

4543
/*
4644
* A JSON utility class
@@ -57,11 +55,6 @@ public class JSON {
5755
private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
5856
private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
5957

60-
private static final StdDateFormat sdf = new StdDateFormat()
61-
.withTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault()))
62-
.withColonInTimeZone(true);
63-
private static final DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
64-
6558
@SuppressWarnings("unchecked")
6659
public static GsonBuilder createGson() {
6760
GsonFireBuilder fireBuilder = new GsonFireBuilder()
@@ -409,7 +402,7 @@ public java.sql.Date read(JsonReader in) throws IOException {
409402
if (dateFormat != null) {
410403
return new java.sql.Date(dateFormat.parse(date).getTime());
411404
}
412-
return new java.sql.Date(sdf.parse(date).getTime());
405+
return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
413406
} catch (ParseException e) {
414407
throw new JsonParseException(e);
415408
}
@@ -419,7 +412,7 @@ public java.sql.Date read(JsonReader in) throws IOException {
419412

420413
/**
421414
* Gson TypeAdapter for java.util.Date type
422-
* If the dateFormat is null, DateTimeFormatter will be used.
415+
* If the dateFormat is null, ISO8601Utils will be used.
423416
*/
424417
public static class DateTypeAdapter extends TypeAdapter<Date> {
425418

@@ -444,7 +437,7 @@ public void write(JsonWriter out, Date date) throws IOException {
444437
if (dateFormat != null) {
445438
value = dateFormat.format(date);
446439
} else {
447-
value = date.toInstant().atOffset(ZoneOffset.UTC).format(dtf);
440+
value = ISO8601Utils.format(date, true);
448441
}
449442
out.value(value);
450443
}
@@ -463,7 +456,7 @@ public Date read(JsonReader in) throws IOException {
463456
if (dateFormat != null) {
464457
return dateFormat.parse(date);
465458
}
466-
return sdf.parse(date);
459+
return ISO8601Utils.parse(date, new ParsePosition(0));
467460
} catch (ParseException e) {
468461
throw new JsonParseException(e);
469462
}

src/main/java/com/bandwidth/sdk/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package com.bandwidth.sdk;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.9.0")
1717
public class Pair {
1818
private String name = "";
1919
private String value = "";

0 commit comments

Comments
 (0)