API Generation Interface Documentation Example:
{
"Name": "September premium sharing activity Micro-communication Interface",
"Version": "1.0.0",
"description": "September Gift insurance receive share activity Micro-interface document (T=1)",
"Sampleurl": "http://www.phpernote.com/"
}
Save file Name: Apidoc.json
Apidoc-i The build directory of the project directory-O interface file to generate documents
The interface code file code is as follows:
<?php
/**
* @api {post}/news/lists news information list
* @apiVersion 1.0.0
* @apiName lists
* @apiGroup user
* @apiPermission logged-in user
*
* @apiDescription The user logs on to the page and displays a list of news messages
*
* @apiSampleRequest/v1/news/lists
*
* @apiSuccess (return value) {string} ID primary key ID
& nbsp;* @apiSuccess (return value) {string} name Customer name
* @apiSuccess (return value) {string} user_head_img client head
* @apiSucc ESS (return value) {integer} sex Sex: 0-not set, 1-male, 2-female
* @apiSuccess (return value) {string} Demand customer demand
*
* @apiSu Ccessexample {JSON} success example:
* {"Code": 1, "MSG": "," Data ": {" id ":" 57b3cdb46b787 "," name ":" Yu Hao Miao "," user_head_img " : "Userhead/2016-08-18/1034587522576.jpg", "Sex": "1", "demand": "I want to buy insurance, please contact quickly!" "}}
*
* @apiErrorExample (JSON) Error Example:
* {" Code ":-1," MSG ":" Password Error " , "Data": {}}
*/
///////////////////////////////////////
/**
* @api {post}/news/rob Rob customers
* @apiVersion 1.0.0
* @apiName Rob
* @apiGroup User
* @apiPermission logged in user
*
* @apiDescription Rob Customers
*
* @apiParam {string} ID primary Key ID
*
* @apiSampleRequest/v1/news/rob
*
* @apiSuccessExample {JSON} success example:
* {"Code": 1, "MSG": "", "Data": {}}
*
* @apiErrorExample (JSON) Error Example:
* {"Code":-1, "MSG": "Error Message", "Data": {}}
*/
///////////////////////////////////////
More about Apidoc usage please refer to: http://apidocjs.com/