Defining resources, models, and operations in a REST API by using the OpenAPI editor

Use the OpenAPI Editor to graphically define resources, models, and operations in a REST API.

Before you begin

Create a REST API in the IBM® App Connect Enterprise Toolkit, as described in Creating a REST API.

About this task

Use the sections in the OpenAPI Editor to define your REST API.

The OpenAPI Editor has a Navigation view to position into the various objects of the OAI3 document and to create and delete those objects. Selecting an object in the Navigation view displays a Form View where you can view, create, and change the content of that object. There is also a Source View, which you can use to display the raw OpenAPI 3.0 document. The Source View is accessed by clicking the Source View icon.

Procedure

To define resources, models, and operations in a REST API, complete the following steps:

  1. Click Edit API document in OpenAPI Editor to open the OpenAPI editor in a separate window.
  2. Click the '+' sign next to Path to open the Path editor
  3. Enter a path name into the Path field.
  4. Optional: Enter a summary in the Summary field.
  5. Optional: Enter a description in the Description field.
  6. Click Create to create the OpenAPI 3.0 document.
  7. Click the '+' sign next to Operations to add an operation.
  8. Select an operation from the menu.
  9. Optional: Enter a summary in the Summary field.
  10. Optional: Enter a description in the Description field.
  11. Click Create to create the operation.
  12. Click Save to save the operation.
  13. Continue to update the REST API by adding items from the list of components, such as Servers, Tags, Parameters.
  14. When you finish updating the RESTAPI, click Save.
  15. Close the OpenAPI editor.
    If you return to the IBM App Connect Enterprise Toolkit, you can see that the Resources and Operations section of the RESTAPI is now populated.

Results

The resources, models, and operations are defined in the REST API.

What to do next

Implement each of the operations in the REST API as a subflow, as described in Implementing an operation for REST APIs based on OpenAPI 3.0 documents.