Modeling OpenAPI3 elements
You can create modeling by using the OpenAPI Specification (formerly
known as the Swagger Specification) version 3.0 elements.
Procedure
- Modeling Global Parameters and Global Responses
- Creation of Global Parameters and Global Responses
- Select OpenAPI Application Class from OpenAPI3 palette and drop on to the UML diagram.
- OpenAPI3 application class element is added to the model.
- Newly added class element has Globals as the default UML Operation.
- Adding Global responses:
- Select OpenAPI Response Parameter from OpenAPI3 palette and add to the Globals operation.
- Ensure that the other details of OpenAPI response parameter are set as needed.
- 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.
- Referencing Global parameter and Response from Resource operations
- Select OpenAPI Parameter or OpenAPI Response Parameter from OpenAPI3 palette.
- 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.
- Select the Select Existing element option to open a Select Element dialog box.
- Select the global response or parameter and click OK.
- Creation of Global Parameters and Global Responses
- 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:
- Select the OpenAPI Parameter or OpenAPI Response Object element in Project Explorer
- Open the Properties view.
- Ensure that the type is set to the corresponding schema definition class.
- Open the REST tab and enable the Inline Schema option.
Feedback