Introduction #
OpenAPI 3.0 is the next evolution of the Swagger specification. The OpenAPI 3.0 is also used to define a set of files required to describe and document of Rest API. This tutorial will show you how to export OpenAPI 3.0 file which API that you want to generate.
- The interface could be Request, Response.
- The Request/outbound interface will get the IStructure/MessageTye based on the interface and get extra fields as the SKYVVA__MessageId field. The SKYVVA__MessageId field will generate for all levels of messageType.
- The Response/inbound interface will get the IStructure/MessageTye based on the interface and get extra fields such as SKYVVA__MessageId, SKYVVA__MESSAGE, and SKYVVA__Response_Code field. The SKYVVA fields generate only the parent level with messageType.
- When the interface doesn’t link with Request Interface, it will automatically generate as Request. If the interface link with Request Interface, it will generate as Response.
- The SKYVVA fields will not generate from Interface ISturcture that uploads from the file.
- The old ways check box will generate old or new ways of file format.
- It will export the normal message type and Rest template in the generic page and interface page, but the message type of repository will generate only the Rest template.
- If you generate metadata from the message type section of the repository, it will not get SKYVVA fields.
Pre-Require #
First, you need to do some prerequisite steps before you can use the function “Generate Metadata“:
- Create Integration
- Create Inbound/Outbound Interface
- Create MetaData
- Create Repository
- IStructure/Message type add into the interface
How to get message type in OpenAPI 3.0 File Format? #
The OpenAPI 3.0 be generated at three places e.g. in the generic page (the custom link of Integration), the interface details page, and the messsage type of the Repository page.
We pick up one for sample using the inbound interface and having Message Type. Before getting the message type, we need to have a MetaData provider, a Repository.
Here is the Message Type sample:
Inbound interface using with Message Type
Checking structure message type in mapping tool at the left side because we are using an inbound interface.
How to generate OpenAPI 3.0 from the Generic Page? #
Now you are able to generate MetaData. we will show you how to generate metadata on the generic page (the customs link of Integration Details). Please enter the integration details page and you will able to see the “Generate MetaData“ in the Custom Links section. Please click the Generate MetaData link:
Generate metadata in the new way of OpenAPI 3.0. Please choose the interface name on “Create WSDL For Interface”, Choose OpenAPI 3.0 file format in “Chose a format file”, uncheck the checkbox “As old way?”, Chose an api name, chose an operation, and click the “Export” button.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/generatefromGenericPageOpenAPI3.0.png)
You will get an OpenAPI 3.0 file format under the “Outbound Interfaces (Related List)” section. You can download it by clicking the link “View”. You will able to see the file after download in the download folder or download bar chrome browser.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/DownloadOPenAPI3.0InGenericPage.png)
How to generate OpenAPI 3.0 from Interface Details Page? #
This is the second way to generate OpenAPI 3.0 format, you can go to Interface Details Page that you want to generate. You will see the “Generate MetaData” button on the header section page. Please click this button to see the pop-up screen.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/InterfaceDetailPageGeneric.png)
Please choose Swagger 2.0/OpenAPI 2.0 in the “Chose a format file” picklist and click the “Export” button.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/PopUpScreenToChooseFileFormatFromInterfaceDetailsPage.png)
You will get OpenAPI 3.0 file in the download bar section or you can check on download folder on your local pc.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/AfterDownloadinInterfaceDetailsPage.png)
Here is the result of generating meta from the generic page and interface details page. It will generate the Request message type includes the message Type name and its fields that you have link the message type with this interface.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/ToptheFileOfOpenAPI3.0InGenericPageandInterfacePage.png)
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/TheButtomFileOfOpenAPI3.0InGenericandInterfaceDetailPage.png)
How to generate OpenAPI 3.0 from Message Type of Repository? #
This is the third way to generate OpenAPI 3.0 format from the message type. Please enter the message type section in the repository. Then you will see the “Generate MetaData” Action button in the message type section.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/MessageTypeasRestTemplate.png)
We will show you to export the “Rest Service” message type. Please click the Export MetaData button.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/ExportRestService.png)
It will pop-up to export metadata, then please choose the OpenAPI 3.0 file format, Chose an API name, and Chose an operation.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/PopUpScreenToChooseFileFormatFromMessageTypeOfRepository.png)
You will get the file in the download bar section or you can check on the download folder on your local pc.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/DownlaodfilefromMessageTypeofRepository.png)
Here is the OpenAPI 3.0 file format after generating from message type of Repository.
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/TheTopFileGenericFromMessageTypeOFRepository.png)
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/TheMiddleFileOfOpenAPI3.0FromMessageTypeOfRepository.png)
![](https://docs.skyvva-dev.com/wp-content/uploads/2020/11/TheButtomFileOfOpenAPI3.0InMessageTypeOFRepository.png)
Summary #
Finally, you have learned how to generate metadata with OpenAPI 3.0 file format was in the generic page, Interface details page, and message type.