Apidoc – API document generator

http://apidocjs.com/

apidoc.json is must in project root folder

{
  "name": "Tougue Friends",
  "version": "0.1.0",
  "description": "Tougue Friends API document.",
  "title": "Tougue Friends API",
  "url" : "http://demo.wikirex.com/2015/tfapi",
  "sampleUrl": "http://demo.wikirex.com/2015/tfapi"
}

Run

apidoc -i application/controllers -o doc/

Examples:

    /**
        * @api {get} /map/editors Show editors of a map.
        * @apiName editors_get
        * @apiGroup Map
        * @apiDescription Get all editors of a map. Only owner of this map have permission to get this list.
        *
        * @apiHeader {String} X-API-KEY Users unique access-key.
        *
        * @apiParam {Number} user_id User ID.
        * @apiParam {Number} [map_id] Map ID. (Optional)
        * @apiParam {String[]} emails Email array
        *
        * @apiSuccess {Number} status <ul><li>1: Pending</li><li>2: Accepted</li><li>3: Rejected</li></ul>
        *
        * @apiSuccessExample {json} Success-Response:
        *{
        *    "status": "success",
        *    "data": [
        *        {
        *            "id": "40",
        *            "pic": "https://scontent.xx.fbcdn.net/",
        *            "name": "Mark",
        *            "email": "[email protected]",
        *            "status": "1",
        *            "status_name": "Pending"
        *        },
        *        {
        *            "id": "19",
        *            "pic": "https://scontent.xx.fbcdn.net/",
        *            "name": "Mahsiu",
        *            "email": "[email protected]",
        *            "status": "3",
        *            "status_name": "Rejected"
        *        }
        *    ]
        *}
        *
        * @apiSuccessExample {json} Fail-Response:
        *{
        *    "status": "fail",
        *    "error": 0,
        *    "message": "Invalid map ID"
        *}
        * 
    */