/**
* @api {get} /user/:id api获取用户信息
* @apiName apiName获取用户信息
* @apiGroup apiGroup分组
* @apiDescription description描述信息
*/
------ api_data.json -------
{
"type": "get",
"url": "/user/:id",
"title": "api获取用户信息",
"name": "apiName______",
"group": "apiGroup__",
"description": "description描述信息"
}
apiName and apiGroup encoded error in chinese, but title and description is right.
apidoc version is 0.15.1
Hi.我也是用中文的,没问题的啊,但是我遇到了另外的问题,@api 的path 一样 会导致 无法显示。看我发的issue
Currently Unicode is not supported.
After did below actions, Apidoc can support Chinese.
node_modules/apidoc-core/lib/workers/api_group.js
group = group.replace(/[^\w]/g, '_'); --> group = group.replace(/[^\w\u4E00-\u9FA5]/g, '_');
api_name.js
name = name.replace(/[^\w]/g, '_'); --> name = name.replace(/[^\w\u4E00-\u9FA5]/g, '_');
But it's very not convenient if I do it manually, please think about it and update the package, thanks a lot in advance.
Most helpful comment
After did below actions, Apidoc can support Chinese.
node_modules/apidoc-core/lib/workers/api_group.js
group = group.replace(/[^\w]/g, '_'); --> group = group.replace(/[^\w\u4E00-\u9FA5]/g, '_');
api_name.js
name = name.replace(/[^\w]/g, '_'); --> name = name.replace(/[^\w\u4E00-\u9FA5]/g, '_');
But it's very not convenient if I do it manually, please think about it and update the package, thanks a lot in advance.