Skip to content

Commit 4d8824a

Browse files
authored
Merge pull request #1049 from watson-developer-cloud/service-updates
Add updates from services
2 parents b6a410a + 65de3d3 commit 4d8824a

File tree

416 files changed

+8305
-7308
lines changed

Some content is hidden

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

416 files changed

+8305
-7308
lines changed

.bumpversion.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ message = Update version numbers from {current_version} -> {new_version}
99

1010
[bumpversion:file:assistant/README.md]
1111

12+
[bumpversion:file:compare-comply/README.md]
13+
1214
[bumpversion:file:discovery/README.md]
1315

1416
[bumpversion:file:language-translator/README.md]

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ compare-comply/src/test/resources/compare_comply/cloud-object-storage-credential
2626
compare-comply/src/test/resources/compare_comply/cloud-object-storage-credentials-output.json
2727
secrets.tar
2828
package-lock.json
29-
*.mlmodel
29+
*.mlmodel
30+
.openapi-generator-ignore
31+
.openapi-generator/

.releaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"branch": "bintray-deploy",
2+
"branch": "master",
33
"tagFormat": "java-sdk-${version}",
44
"plugins": [
55
"@semantic-release/commit-analyzer",

.travis.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ before_install:
2222
sudo perl -pi.bak -e 's/^(security\.provider\.)([0-9]+)/$1.($2+1)/ge' /etc/java-7-openjdk/security/java.security
2323
echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a /etc/java-7-openjdk/security/java.security
2424
fi
25-
#- npm install -g [email protected]
26-
#- nvm install 'lts/*'
27-
#- sudo apt-get update
28-
#- sudo apt-get install python
25+
- npm install -g [email protected]
26+
- nvm install 'lts/*'
27+
- sudo apt-get update
28+
- sudo apt-get install python
2929
install:
3030
- if [ "${TRAVIS_TAG}" = "${TRAVIS_BRANCH}" ]; then cd appscan; make asoc-tool; cd
3131
../; fi
32-
#- npm install -g [email protected]
33-
#- npm install @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github @semantic-release/exec -D
34-
#- pip install --user bumpversion
32+
- npm install -g [email protected]
33+
- npm install @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/git @semantic-release/github @semantic-release/exec -D
34+
- pip install --user bumpversion
3535
before_script:
3636
- if [ "${TRAVIS_TAG}" = "${TRAVIS_BRANCH}" ]; then chmod a+x ./appscan/ASOC.sh; fi
3737
- env
@@ -54,14 +54,14 @@ deploy:
5454
skip_cleanup: true
5555
script: "./gradlew bintrayUpload"
5656
on:
57-
branch: bintray-deploy
57+
tags: true
58+
jdk: openjdk7
59+
- provider: script
60+
skip_cleanup: true
61+
script: "semantic-release"
62+
on:
63+
branch: master
5864
jdk: openjdk7
59-
#- provider: script
60-
# skip_cleanup: true
61-
# script: "semantic-release"
62-
# on:
63-
# branch: bintray-deploy
64-
# jdk: openjdk7
6565
- provider: script
6666
script: ".utility/push-javadoc-to-gh-pages.sh"
6767
skip_cleanup: true

.utility/bintray-release.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ bintray {
1313
user = System.getenv('BINTRAY_USER')
1414
key = System.getenv('BINTRAY_APIKEY')
1515
publications = ['maven']
16-
dryRun = true
1716
publish = true
1817
pkg {
1918
repo = 'ibm-cloud-sdk-repo'

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

MIGRATION.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# v7.0.0
2+
Hello! If you're reading this, you're probably upgrading to **v7.0.0** of the Watson Java SDK. If that's the case, this guide will help you transition smoothly to get on board with the latest Watson API features in your Java code. Let's get started!
3+
4+
## **Big** things
5+
### New library name
6+
For this release, we've changed package managers and decided to change the name along with it. Be sure to change this when upgrading by looking at the installation instructions in the README: https://github.com/watson-developer-cloud/java-sdk#installation
7+
8+
### Response formats
9+
For a while now, we've had three main methods to execute an API call: `execute()`, `enqueue()`, and `rx()`. In our `v5.3.0` release, we added some variations of those methods to return not only the basic response model, but some added HTTP information like response headers.
10+
11+
In this release, we've dropped those variants and instead have modified the base methods to always return the extra information. In addition, we've replaced `rx()` with `reactiveRequest()`, which lets you leverage [RxJava](https://github.com/ReactiveX/RxJava) to do some reactive programming if that's your thing.
12+
13+
In short, the general structure of responses is different and you can read more about that [here](https://github.com/watson-developer-cloud/java-sdk#parsing-responses). If you're looking for making asynchronous API calls, you can read the details about that and the new `reactiveRequest()` method [here](https://github.com/watson-developer-cloud/java-sdk#making-asynchronous-api-calls).
14+
15+
## Everything else
16+
Along with the major changes above, there have been more detailed breaking changes across services with API changes and updates to the SDK design. You can find these nitty-gritty details in the [release notes](https://github.com/watson-developer-cloud/java-sdk/releases/tag/java-sdk-7.0.0), along with the changes that are non-breaking.
17+
18+
---
19+
120
# 4.0
221

322
## Conversation

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ Java client library to use the [Watson APIs][wdc].
4848

4949
</details>
5050

51-
## Migration notice
52-
With the change to v7.0.0, the package name has changed. Be sure to look closely at the installation instructions for the new version!
51+
:speaking_head: :speaking_head: :speaking_head:
52+
## Heads up!
53+
`v7.0.0` is out! Be sure to check out the [migration guide](https://github.com/watson-developer-cloud/java-sdk/blob/java-sdk-7.0.0/MIGRATION.md) for major breaking changes and the [release notes](https://github.com/watson-developer-cloud/java-sdk/releases/tag/java-sdk-7.0.0) for extra info.
54+
:speaking_head: :speaking_head: :speaking_head:
5355

5456
## Before you begin
5557
* You need an [IBM Cloud][ibm-cloud-onboarding] account.
@@ -64,7 +66,7 @@ All the services:
6466
<dependency>
6567
<groupId>com.ibm.watson</groupId>
6668
<artifactId>ibm-watson</artifactId>
67-
<version>7.0.0</version>
69+
<version>6.14.0</version>
6870
</dependency>
6971
```
7072

@@ -74,7 +76,7 @@ Only Discovery:
7476
<dependency>
7577
<groupId>com.ibm.watson</groupId>
7678
<artifactId>discovery</artifactId>
77-
<version>7.0.0</version>
79+
<version>6.14.0</version>
7880
</dependency>
7981
```
8082

@@ -83,13 +85,13 @@ Only Discovery:
8385
All the services:
8486

8587
```gradle
86-
'com.ibm.watson:ibm-watson:7.0.0'
88+
'com.ibm.watson:ibm-watson:6.14.0'
8789
```
8890

8991
Only Assistant:
9092

9193
```gradle
92-
'com.ibm.watson:assistant:7.0.0'
94+
'com.ibm.watson:assistant:6.14.0'
9395
```
9496

9597
##### JAR

assistant/README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
##### Maven
66
```xml
77
<dependency>
8-
<groupId>com.ibm.watson.developer_cloud</groupId>
8+
<groupId>com.ibm.watson</groupId>
99
<artifactId>assistant</artifactId>
1010
<version>6.14.0</version>
1111
</dependency>
1212
```
1313

1414
##### Gradle
1515
```gradle
16-
'com.ibm.watson.developer_cloud:assistant:6.14.0'
16+
'com.ibm.watson:assistant:6.14.0'
1717
```
1818

1919
## Usage
@@ -22,15 +22,16 @@ Use the [Assistant][assistant] service to identify intents, entities, and conduc
2222
### Using Assistant v1
2323
```java
2424
// make sure to use the Assistant v1 import!
25-
import com.ibm.watson.developer_cloud.assistant.v1.Assistant;
25+
import com.ibm.watson.assistant.v1.Assistant;
2626

2727
Assistant service = new Assistant("2018-02-16");
2828
IamOptions options = new IamOptions.Builder()
2929
.apiKey("<iam_api_key>")
3030
.build();
3131
service.setIamCredentials(options);
3232

33-
InputData input = new InputData.Builder("Hi").build();
33+
MessageInput input = new MessageInput();
34+
input.setText("Hi");
3435
MessageOptions options = new MessageOptions.Builder(workspaceId)
3536
.input(input)
3637
.build();
@@ -41,24 +42,27 @@ System.out.println(response);
4142
Maintaining context across messages:
4243
```java
4344
// make sure to use the Assistant v1 import!
44-
import com.ibm.watson.developer_cloud.assistant.v1.Assistant;
45+
import com.ibm.watson.assistant.v1.Assistant;
4546

4647
Context context = null;
48+
MessageInput input = new MessageInput();
4749

4850
// first message
51+
input.setText("First message");
4952
MessageOptions newMessageOptions = new MessageOptions.Builder()
5053
.workspaceId("<workspace-id>")
51-
.input(new InputData.Builder("First message").build())
54+
.input(input)
5255
.context(context)
5356
.build();
5457

5558
MessageResponse response = service.message(newMessageOptions).execute().getResult();
5659
context = response.getContext();
5760

5861
// second message
62+
input.setText("Second message");
5963
newMessageOptions = new MessageOptions.Builder()
6064
.workspaceId("<workspace-id>")
61-
.input(new InputData.Builder("Second message").build())
65+
.input(input)
6266
.context(context) // using context from the first message
6367
.build();
6468

@@ -72,7 +76,7 @@ System.out.println(response);
7276
### Using Assistant v2
7377
```java
7478
// make sure to use the Assistant v2 import!
75-
import com.ibm.watson.developer_cloud.assistant.v2.Assistant;
79+
import com.ibm.watson.assistant.v2.Assistant;
7680

7781
Assistant service = new Assistant("2018-09-20");
7882
IamOptions options = new IamOptions.Builder()
@@ -96,7 +100,7 @@ System.out.println(messageResponse);
96100
Maintaining context across messages:
97101
```java
98102
// make sure to use the Assistant v2 import!
99-
import com.ibm.watson.developer_cloud.assistant.v2.Assistant;
103+
import com.ibm.watson.assistant.v2.Assistant;
100104

101105
MessageContext context = new MessageContext();
102106

0 commit comments

Comments
 (0)