Using Swagger 3.0 Files

You can now import Swagger 3.0 JSON files containing callbacks. For more information about callbacks, see Callbacks at Swagger.io documentation.

When you import a Swagger 3.0 based .json file having callbacks keyword in TIBCO Business Studio for BusinessWorks, the JSON file has the following structure:

The definition of each callback starts with the event name. For each event, there exists a callback URL.

If you drag a callback URL from the tree view to the process editor, you get options whether to create a REST service or a REST reference.

The callback URL contains methods of the callback message. The method has the message format and the expected responses that are similar to regular request and response definitions.

Run time expressions

In the following example, the expression {$request.path.eventType} represents run time expression.

Note: When you create a REST service binding from a runtime-expression based URL, it does not populate the Resource Service Path with an abstract path but rather with a concrete path. By default, the Resource Service Path value is set to /callback.

If you want to change the Resource Service Path, then after creation of REST service from an external Swagger file, select the Generate Implementation Specification check box on the General tab for that REST service binding.

The service to be created from the DnD of run time expression based URL should be created on an independent process so that the generated swagger file has the details of only that binding specification. To override the same on reference binding use the dynamicConfigurations URL field in Invoke activity. For more information, see Dynamic Invocation of a REST Service.

Note: For the REST service binding , which are created using drag and drop of callback URL node from the tree view, select the Generate Implementation Specification check box. This creates a new Swagger specification and binds it to the service binding so that while exporting the application EAR, the Manifest.json accomodates the details about the service.