Modeling OpenAPI3 elements

You can create modeling by using the OpenAPI Specification (formerly known as the Swagger Specification) version 3.0 elements.

Procedure

  1. Modeling Global Parameters and Global Responses
    1. Creation of Global Parameters and Global Responses
      1. Select OpenAPI Application Class from OpenAPI3 palette and drop on to the UML diagram.
      2. OpenAPI3 application class element is added to the model.
      3. Newly added class element has Globals as the default UML Operation.
      4. Adding Global responses:
        1. Select OpenAPI Response Parameter from OpenAPI3 palette and add to the Globals operation.
        2. Ensure that the other details of OpenAPI response parameter are set as needed.
      5. Adding Global parameters:
        • Select OpenAPI Parameter from the OpenAPI3 palette and add to the Globals operation.
        • Ensure that the other details of OpenAPI parameter are set as needed.
    2. Referencing Global parameter and Response from Resource operations
      1. Select OpenAPI Parameter or OpenAPI Response Parameter from OpenAPI3 palette.
      2. While adding OpenAPI Parameter or OpenAPI Response Parameter to a Resource operation, options to select an existing element or to create a new element appears.
      3. Select the Select Existing element option to open a Select Element dialog box.
      4. Select the global response or parameter and click OK.
  2. Modeling the Inline schemas

    To model an inline schema for a OpenAPI Parameter or a OpenAPI Response Object, you need to perform the following steps:

    1. Select the OpenAPI Parameter or OpenAPI Response Object element in Project Explorer
    2. Open the Properties view.
    3. Ensure that the type is set to the corresponding schema definition class.
    4. Open the REST tab and enable the Inline Schema option.

Feedback