Using an Open API Specification (Swagger)
TIBCO Cloud Integration - Flogo (PAYG) gives you the option to create the Flogo app logic (flows) by importing a Swagger 2.0 specification file. You simply drag and drop a Swagger file into the TIBCO Cloud Integration - Flogo (PAYG) UI or navigate to it, or if you already have a Swagger specification stored in the TIBCO Cloud™ Integration - API Modeler select it when creating the flow and the flows for your app automatically get created based on the definitions in the Swagger file that you uploaded.
Before the TIBCO Flogo® App is created, a validation process takes place to ensure that the features defined in the Swagger specification are supported by TIBCO Cloud Integration - Flogo (PAYG). So, consider the following when using a Swagger specification to create a TIBCO Flogo® App:
- TIBCO Cloud Integration - Flogo (PAYG) supports Swagger 2.0.
- Currently, TIBCO Cloud Integration - Flogo (PAYG) supports only the JSON format.
- Cyclic dependency is not supported while creating flows from Swagger specifications. For example, if you have a type Book which contains an object element of type, Author. The type Author in turn contains an element of type Book which represents the books written by the author. To retreive the Author, it creates a cyclic dependency where the Author object contains the Book object and the Book type in turn contains the Author object.
- Not all data types are supported in TIBCO Cloud Integration - Flogo (PAYG). A data type that appears in your specification but is not supported in TIBCO Cloud Integration - Flogo (PAYG) will result in an error being displayed.
- Schema references within schemas are not supported
- If the specification has a response code other than 200 (OK) and 500 (Error), the method that contains the unsupported response code will not be created. You can enter a schema for the response code 200, but the 500 response code must be a string.
- Basepath element in the schema is not supported
Should you get a validation error, you will have the option to either cancel out of the process of generating the app or you can click Continue. If you opt to continue, TIBCO Cloud Integration - Flogo (PAYG) will continue with the app creation and ignore the parts of the specification that did not pass the validation due to which you got an error.
To create an app using a Swagger specification, follow these steps: