To transform OpenAPI3 into a UML model with the
corresponding stereotypes applied, configure a OpenAPI 3.0 to REST Service Model transformation and
then run the transformation.
Before you begin
You must be in the Modeling perspective and the REST Modeling capability must be enabled.
Procedure
- To create a model project and a model from the REST Service Model (OpenAPI3) template, complete
the following steps:
- Click , and complete the pages in the Model Project wizard.
- On the Create Model page of the wizard, in the Categories pane, click REST
Modeling, then in the Templates pane, click REST Service Model
(OpenAPI3).
- Optional: Complete the remaining pages in the wizard.
- Click Finish. The modeling project is displayed in the Project Explorer
view and the REST and OpenAPI 3.0 profiles are applied to the model.
- Create a OpenAPI 3.0 to REST Service Model transformation configuration: Click , select OpenAPI 3.0 to REST Service Model under
Service Oriented Architecture Transformations category, and complete the
steps in the wizard. Specify the following values in the transformation configuration file:
- On the Source and Target Page, select the OpenAPI3 input file as source and select the model
that is created as target.
Note: The OpenAPI3 input file must be compliant with the OpenAPI Specification
version 3.0.
- Optional: Specify additional properties that are unique to the OpenAPI3 to REST model
transformation:
- Generate a UML association for each OpenAPI Schema type
- Select this check box to generate a UML association for every OpenAPI schema type.
- Set minItems to 1 for required array type OpenAPI properties
- Set the default value for minItems to 1 for the array type OpenAPI properties.
- Click .
- In the Transformation configuration editor, click Run to run the
transformation. The transformation is run and a model is generated from the source OpenAPI3
file.