Skip to content

Commit 81e0612

Browse files
authored
Merge pull request #76 from cmgrote/master
Allow include_relationships parameter to be optional
2 parents 84ef985 + 80cf95b commit 81e0612

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<reactor-version>3.4.2</reactor-version>
5858
<reactor-netty-version>1.0.3</reactor-netty-version>
5959
<reactor-netty-ipc-version>0.7.15.RELEASE</reactor-netty-ipc-version>
60-
<netty-version>4.1.58.Final</netty-version>
60+
<netty-version>4.1.59.Final</netty-version>
6161
<testng.version>7.3.0</testng.version>
6262
<mock-server.version>5.11.2</mock-server.version>
6363
</properties>

java/src/main/java/com/ibm/watson/data/client/api/CategoriesApiV3.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ public Mono<Category> get(@NonNull String guid,
400400
*/
401401
public Mono<Category> get(@NonNull String guid,
402402
String runAsTenant,
403-
boolean includeRelationships) throws RestClientException {
403+
Boolean includeRelationships) throws RestClientException {
404404

405405
// create path and map variables
406406
final Map<String, Object> pathParams = new HashMap<>();
@@ -412,7 +412,9 @@ public Mono<Category> get(@NonNull String guid,
412412
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
413413
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
414414

415-
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "include_relationships", includeRelationships));
415+
if (includeRelationships != null) {
416+
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "include_relationships", includeRelationships));
417+
}
416418

417419
if (runAsTenant != null)
418420
headerParams.add("Run-As-Tenant", apiClient.parameterToString(runAsTenant));

0 commit comments

Comments
 (0)