Consuming a BookStore REST Endpoint in TIBCO Business Studio™ Container Edition

Importing the REST API document

Swagger 2.0-compliant REST API documents must be imported into the TIBCO Business Studio™ Container Edition Service Descriptors folder of the project. This gives you the ability to expand and collapse endpoints, operations, parameters and response codes in the Project Explorer view.

Accessing the BookStore Swagger in the Docker Environment

For the BookStore sample running in the Docker environment, the swagger URL should be accessible using the Docker external URL. in the format http://docker-external-ip/swagger.

Retrieving the Swagger Document

You can now retrieve the swagger document by accessed using the URL
http://<docker external ip>/swagger/swagger.json

or using the curl command:
curl http://<docker external ip>/swagger/swagger.json -o bookstore.json

Accessing the BookStore Swagger in the K8S Environment

If your BookStore sample is hosted in K8S environment, the swagger URL can be accessed using the external IP of the K8S service.

For example the following command will give you the external IP of the running Docker service

kubectl get svc rest-bookstore-app

Importing the Swagger Document in Service Descriptors Folder

For configuring the design time, import the bookstore.json file in your workspace project under the Service Descriptors folder.