Skip to content

A bunch of RAML open source apps thrown together to create an API Design / Mock Data suite

Notifications You must be signed in to change notification settings

jewelsjacobs/raml-osprey-api-designer

Repository files navigation

RAML API DESIGNER

What is this being used for?

Front end app devs who wish to communicate to back end devs how they would like an application centric API schema to look like.

Back end devs who want to sketch out an API and test it without full development

Easy API Designer based on the RAML spec with nice RAML documentation. The documentation can be found by the name of the RAML file created, ie. if the RAML file is api.raml, the documentation will be found at http://localhost:8081/documentation/api.

Documentation is generated with raml2html.

API Designer

Screenshot

API Documentation

Doc

API Documentation Detail

Doc-Detail

Demo

Overview

This application provides a simple storage API plus a persistence plugin which enables you to run the RAML API Designer locally (rather than use the APIHub cloud service) and still be able to manage and collaborate on your design. Also using osprey to serve sample data defined in RAML definition.

Requirements

The service is built with node.js, using express and mongodb.

Installing Node.js

Go to nodejs.org, and click the Install button.

Installing Node.js via package manager (Debian, Ubuntu, etc.)

View instructions here.

Installing MongoDB

To install MongoDB on your specific platform, refer to the MongoDB QuickStart.

To start mongodb as background process:

cd /usr/local/mongodb (mongodb installation directory)

mongod --fork --logpath /var/log/mongodb.log

Build and Run

Install global tools

npm install -g grunt-cli
npm install -g bower
npm install -g karma # Optional for running the test suite

Install node modules

npm install 

Install bower modules

bower install

Install webdriver required to run localScenario task

node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update

Run the application locally

grunt server

Run the test suite

grunt test

Build the application

grunt

Server info

It runs as a forever-service with nodemon called raml.

Here's the command to install the service:

npm install forever-service -g
npm install nodemon -g
cd /pathtoapp
forever-service install raml --script server.js -f " -c nodemon" -o " --delay 10 --watch dist/assets -e json,raml --exitcrash" -e "PATH=/usr/local/bin:$PATH"

Commands to interact with service raml:

Start   - `sudo service raml start`
Stop    - `sudo service raml stop`
Status  - `sudo service raml status`
Restart - `sudo service raml restart`

Testing the Service

$ curl -i -X POST -H 'Content-Type: application/json' -d 
'{"name":"myfirstapi.raml","path":"/","contents":"#%25RAML%200.8%0Atitle:%20%20%20DONE!!!"}' 
http://localhost:8081/files

$ curl -i -X GET http://localhost:8081/files

Hacking the app

To hack the front end, look at the instructions here: RAML API Designer.

The front end code is all in there except for the server.js and /routes file(s) / folder.

The app uses osprey and osprey-mock-service to serve the example json as mock data.

Coming soon

  • Support for multiple projects
  • Export files

About

A bunch of RAML open source apps thrown together to create an API Design / Mock Data suite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published