Adding API Documentation using Swagger
Install Swagger Editor & Dependencies
Install Node.js
Instructions for installing on Ubuntu are below. Find instructions for other operating systems here.
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs
Install Swagger Editor
git clone https://github.com/swagger-api/swagger-editor.git
Run Swagger Editor
cd swagger-editor npm start
If the build fails with error code ELIFECYCLE (see /swagger-editor/npm-debug.log), run the following commands (workaround source):
npm install -g bower grunt-cli npm install bower install grunt serve
This will launch a browser window containing the editor. You can test a demo editor here.
Add API Specifications
In the Editor, open the yaml file containing the specification you wish to edit, such as FrontEnd/restapi/DMCInterfaceSwagger.yaml
Reference the Swagger documentation here.
Compare Your Changes
After making changes in the editor, compare your new version with the existing DMC API Specification at https://dev-rest1.opendmc.org/rest/swagger-ui.html#/.