The Astah SysML OpenAPI Importer plugin enables you to import OpenAPI specifications into Astah SysML and Astah System Safety. Importing OpenAPI Specifications into Astah offers significant benefits, including quickly generating consistent models, improving system understanding and communication through visualization, aligning design documents with implementation, reusing components across projects…etc.
This process enhances the overall quality and efficiency of system design and development.
In Astah, navigate to [Plugin] -> [Installed Plugins].
In the dialogue box, click [Install], then select the downloaded .jar file.
Restart Astah and either start a new project or open an existing file.
The installation is successful if you see the [OpenAPI] menu under [Tools].
How to use:
Create a new project or open an existing one.
Create a new package.
Select the package and go to [Tools] – [OpenAPI] – [Import OpenAPI].
Select the OpenAPI Specification (either JSON or YAML, for example petstore3).
Click Open.
This will results in:
Creating a package named [OpenAPI] will be created with basic types such as Boolean, DataTime, Email, Integer,etc.
and
Importing blocks for each component (a kind of DTO) with the corresponding fields, types, and multiplicity in the selected package.
(Using a sample OpenAPI Specification)
More Information:
For each endpoint’s operation a Request and Response block will be created with the name of the operation as prefix
For each tag an interface block is created with << REST Interface >> stereotype
Each endpoint’s operation an operation of the corresponding block will be created with matching name
This block operation will have a request parameter of type Request and return parameter of type Response
The operation will be also stereotyped according to the HTTP Action (Get, Post, Put, etc.)
For each operation a separate block definition diagram is created