PlanMill REST API documentation and issues
Add/Edit API Documentation API documentation project is located on Github at https://github.com/planmill/api
Currently we are running at https://planmill.netlify.app/
To Manage Site use the link https://app.netlify.com/
You may install locally or to Netlify in browser, or to netlify via command line. All three installation options are presented here in sections 1) 2) and 3), pick one most suitable for you. Section 4)is about generating html files only, use it if you do not need a complete installation and for testing html.
I) Local installation guide using node
Install latest LTS version of node.js http://nodejs.org/, if not yet installed
Download the project from Github in a folder on your computer
Before running locally uncomment the below lines in server.js:
/*
start the express web server listening on 3020
app.listen(3020, () => {
console.log("listening on 3020");
});
*/
Navigate to root folder in the downloaded folder from Github
Run the command npm install
to install all the dependencies
Run the command npm run build
to build and run the application
Make sure index.html gets generated inside "api_docs" folder along with the new schema json files
Go to http://localhost:3020 to see the site.
II) Netlify installation guide in deploying from git branch directly.
III) Netlify installation guide in command line from local code
npm install netlify-cli -g -force
as administratornetlify init
to initialize your siteIV) Generating and investigating ramlt2html output html document:
Following steps include the validation of RAML file before generating HTML doc from it:
Navigate to planmill1_5.raml file. This file uses RESTful API Modeling Language (RAML). It makes it easy to manage the whole API lifecycle from design to sharing. Edit the file and save changes. Add or edit schema and sample files.
Run following command in command prompt in api_docs subdirectory: raml2html -i planmill1_5.raml -o index.html. It will generate the HTML file in the same folder where RAML file is present. Open the index.html in browser and you should see the API document (or parsing errors, if any).
V) API Testing
VI) Adding API tests for sample files
Check examples E_insertPortfolioSample() and F_updatePortfoliowithSample() in Portfolio API test module API15PortfolioIT.java of the API tests.
Documentation for formatting