Using Swagger to Create a REST Service

You can drag and drop a path from the Swagger file on to the left boundary of the Process Editor to create a REST service or drag it to the center and select Create Service from the resulting menu.

Note: When you create a REST service, make sure to edit the Default Host field in the HTTP Connection Resource to reflect the actual host name. By default, the Default Host field is set to localhost using the BW.HOST.NAME module property.
Note: When you use Swagger to create a REST service, the fields in the Bindings tab of the service properties display as read-only. Swagger is like a contract that must be followed exactly, so the service you create with the Swagger file cannot be modified.
Note: You can use the Refactor option to delete both REST Service and Reference Bindings WSDL operations using topdown/bottomup approach.

To create a REST service from a Swagger file:

Procedure

  1. Create an empty project. For more information, see "Developing a Basic Process" in the TIBCO ActiveMatrix BusinessWorks™ Application Development guide.
  2. Import the Swagger JSON file into the Service Descriptors folder of your project by dragging and dropping it from the File Explorer view.
  3. Expand the .json node that you just created under the Service Descriptors folder to view the available paths.
  4. Drag and drop a path from the Service Descriptors folder to the left side of the process editor to create a service or to the right side of the process editor to create a reference.
    TIBCO Business Studio for BusinessWorks automatically generates a corresponding XSD schema for the Swagger file in the Schemas folder.