Tool to generate OpenAPI specification for custom services in D365 FO

 

This blog post walks you through the tool created to generate OpenAPI specification (formerly Swagger specification) for D365 FO custom services. Creating an OpenAPI specification from scratch requires lot of effort and time and even requires skill to generate in the correct format to be consumed externally. In order to avoid additional time to manually generate such specifications, I have created a tool which will automatically create an OpenAPI specification directly from D365 FO on a click of a button without the need of additional steps to wrap the D365 FO custom service using a third party tool.

 


 

 

Business Scenario:

Simplified Solution Inc. has requested for OpenAPI specification for the custom services created within D365 FO for external application consumption.

 

Problem Statement:

There is no facility to generate standard OpenAPI specification directly within D365 FO. Even if specification can be created manually from scratch, it still requires knowledge and skill to create the specification in the right JSON or YAML format as per the requirement. As time is of essence and working on a fixed time project, it becomes difficult to produce such a specification on time with limited available resource.

 

Solution:

To overcome the above problem statement, I have created a tool within D365 FO which creates an OpenAPI specification directly from D365 FO just with a click of a button. All you need to do is select the custom service from the available list for which you need to generate the specification document. The generated document from D365 FO can directly be consumed within swagger.io, postman or any other third party tool as required.

 

Pre-requisites:

Following are the pre-requisites to get this tool ready for action:

1)    Download the deployable package from GitHub

2)     Install the deployable package in your D365 FO environment (Detailed instructions available in GitHub for installation and uninstallation of the tool)

3)     swagger.io or postman online free tool to render the OpenAPI specification generated from D365 FO

 

Execution:

Post completion of the above mentioned pre-requisites, follow the below mentioned steps to generate the OpenApi specification document:

1)    Navigate to System Administration >> Enquiries >> 'Generate API spec for custom service' to open generate API spec dialog

 


 

2)    Select the service for which specification needs to be generated

 

3)    Click on ‘Generate Swagger’

 

            

4)    An OpenAPI Json specification file will be generated ready to be consumed in any third party application with a few tweaks to update the description and purpose of the service if required

 


 

5)    Generated specification can now directly be copied in swagger.io editor for instance for further use

 




Conclusion:

Hope this will prove to be helpful in your real life scenarios and ease out the work on generating API specifications. The beauty of this tool is that, you don’t have to be technical to be able to use it.

Feel free to suggest any improvements / enhancement for this tool.

The purpose of the tool is to simplify your work in day to day life so that you don’t have to go through the pain of generating the specification from scratch. Hence, please don't forget to share this blog with your friends and colleagues as well.

Hope you enjoyed reading it.

Happy to connect one to one on LinkedIn.

 

Until next time, See You!!!

Comments

Popular posts from this blog

A Tool To Generate Data Entity Relationship Diagram In Simplified Way In D365 FO

A Tool To Generate Data Entity Relationship Diagram In Simplified Way In D365 FO (Enhanced)