apidoc windows下安裝

安裝: 必須先安裝node.js?

安裝完node.js, 打開命令行,執(zhí)行?npm install apidoc -g

安裝完成,在項(xiàng)目根目錄添加apidoc.json

內(nèi)容如下:

{

"name": "洗浴erp服務(wù)端",

? "description": "洗浴ERP服務(wù)端 接口說明",

? "title": "The title of this doc",

? "version": "1.0.1",

? "url": ""

}

添加注釋:

""" 上傳數(shù)據(jù)接口

@api {post} /upload/addbill 上傳結(jié)賬數(shù)據(jù)

@apiVersion 1.0.0

@apiGroup 數(shù)據(jù)上傳

@apiName addbill

@apiDescription 上傳結(jié)賬數(shù)據(jù),包含結(jié)賬單、消費(fèi)明細(xì),支付明細(xì),技師上鐘信息

@apiParam {string}? ? shopid? 店鋪標(biāo)識(shí)

@apiParam {json}? ? ? billinfo? 結(jié)賬單

@apiParam {json}? ? ? billdetail? 賬單明細(xì)

@apiParam {json}? ? ? paylist? 支付明細(xì)

@apiParam {json}? ? ? techlist? 技師數(shù)據(jù)

@apiParamExample {json} 參數(shù)格式:


@apiError {int}? ? code 0

@apiError {string}? msg? ""

@apiError {string}? ? data "錯(cuò)誤信息"

@apiErrorExample {json} 成功時(shí)的返回?cái)?shù)據(jù):

{

"code": 0,

"msg": "error",

"data": "錯(cuò)誤信息"

}

? """



在cmd 執(zhí)行命令:apidoc -i? 項(xiàng)目目錄/ -o 生成的文件目錄/

說明:生成的文件目錄,如果不存在,會(huì)自動(dòng)創(chuàng)建.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容