OpenAPI Support Summary

erwin DM supports OpenAPI modeling using predefined specification components that follow structure and terminology according to the OpenAPI Specification (OAS). These components, when used for modeling are designed to include metadata for APIs, requests, and responses. The OAS implementation in erwin DM supports JSON and YAML file formats for reverse engineering and forward engineering.

OAS implementation supports only Physical modeling.

Creating OAS Models

To create OAS models and objects, and define their properties, follow these steps:

  1. In erwin DM, click File > New.

    The New Model screen appears.

  2. Configure the following options:

    1. Click Physical.

    2. In the Database list, select OpenAPI.

    3. Click OK.

      A blank physical model is created.

    4. On the ribbon, click Home > OpenAPI Objects and add it to the diagram.

      An object with empty predefined OAS object types is added to the model diagram. The + sign on the object indicates that you can expand it. To expand the object, you can double-click the object name or on the ribbon, click Actions > Hierarchical View.

      To view all available predefined OAS objects, click the Components tab. These components are reusable objects.

      Use the path object available in the model diagram to specify the relative path to an individual API endpoint. Path names must start with a / (front-slash). For example, /erwinmodels as shown in the following image:

    5. On the object type where you want to add objects, right-click and click Field Properties.

      For example, right-click the parameters object type and click Field Properties. These properties form the API metadata.

    6. On the Field Editor, right-click the component name and click Add Component.

      This adds the corresponding predefined component with all the necessary properties.

      For example, right-click { } parameters and click Add Component.

    7. Set up the required property values and click Close.

      Similarly, set up all the required object properties to complete the OAS model.

For a better idea about OAS models, the following image shows a sample petstore model and properties.

Refer to the OAS documentation for detailed information on OAS description structure.