Introduction
This page provides instructions on how to use the Swagger Generator Module in SOAJS Dashboard UI to generate a microservice by simply providing the main information it needs and a SWAGGER YAML CODE.
The module offers 2 forms:
- Service information
- Swagger UI editor
The Module also provides inline documentation and guidelines for each input and its usage.
Service Information
Provide the information needed beside the yaml code to create a microserivce. The information is used later on to generate the content of config.js file, which is the main configuration file that every SOAJS microservice requires.
The information in this form is not supported by the Swagger UI Editor.
Red inputs are required, they will turn to green if the input is filled and matches the requirements.
Info |
---|
|
Tip |
---|
|
Swagger UI Editor
This part of the form is divided to two sections: UI Code Editor - Swagger UI Generator
Start writing your APIs Documentation as Swagger Yaml Code in the editor; you will notice that a a green button "Run" will appear at the top right corner of the form.
Once you finish writing your code, press Run and the Swagger UI Generator will render the code.
The Swagger UI Generator won't render the documentation code unless that code follows the swagger specification standards and is well indented. Visit the swagger specification page to learn more.
If you made any change to your code, press Clear to clear the right section and press Run again to validate and render the documentation once again
Note |
---|
|
At this stage if the user wants to use the swagger ui editor to test his APIs, and since the service is not deployed yet in any environment, all calls will be made to a dashboard API providing the input configuration of that API and the later will simulate the API behavior.
The dashboard API "simulate" will return true if everything is in order or an error in the case of imfv conflict.
Empty Swagger | Run code |
---|---|
Valid IMFV response | Wrong IMFV response |
---|---|