/**
* <strong i="5">@api</strong> {get} /user/:id api่ทๅ็จๆทไฟกๆฏ
* <strong i="6">@apiName</strong> apiName่ทๅ็จๆทไฟกๆฏ
* <strong i="7">@apiGroup</strong> apiGroupๅ็ป
* <strong i="8">@apiDescription</strong> descriptionๆ่ฟฐไฟกๆฏ
*/
------ api_data.json -------
{
"์ ํ": "๊ฐ์ ธ์ค๊ธฐ",
"URL": "/์ฌ์ฉ์/:ID",
"์ ๋ชฉ": "api่ทๅ็จๆทไฟกๆฏ",
"์ด๋ฆ": "apiName______",
"๊ทธ๋ฃน": "apiGroup__",
"์ค๋ช
": "์ค๋ช
ๆ่ฟฐไฟกๆฏ"
}
apiName ๋ฐ apiGroup ์ธ์ฝ๋ฉ ์ค๋ฅ๊ฐ ์ค๊ตญ์ด๋ก ํ์๋์ง๋ง ์ ๋ชฉ๊ณผ ์ค๋ช
์ ๋ง์ต๋๋ค.
apidoc ๋ฒ์ ์ 0.15.1์
๋๋ค.
์๋ ํ์ธ์. ์ ๋ ์ค๊ตญ์ด๋ฅผ ์ฌ์ฉํ๋๋ฐ ๋ฌธ์ ๋ ์์ต๋๋ค๋ง ๋ ๋ค๋ฅธ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ฌ @api ๊ฒฝ๋ก๋ ํ์๋์ง ์์ต๋๋ค. ๋ด ๋ฌธ์ ๋ณด๊ธฐ
ํ์ฌ ์ ๋์ฝ๋๋ ์ง์๋์ง ์์ต๋๋ค.
์๋ ์์ ์ ์ํํ ํ Apidoc์ ์ค๊ตญ์ด๋ฅผ ์ง์ํ ์ ์์ต๋๋ค.
node_modules/apidoc-core/lib/workers/api_group.js
๊ทธ๋ฃน = group.replace(/[^\w]/g, '_'); --> ๊ทธ๋ฃน = group.replace(/[^\w\u4E00-\u9FA5]/g, '_');
api_name.js
์ด๋ฆ = name.replace(/[^\w]/g, '_'); --> ์ด๋ฆ = name.replace(/[^\w\u4E00-\u9FA5]/g, '_');
ํ์ง๋ง ์๋์ผ๋ก ํ๋ฉด ๋ณ๋ก ๋ถํธํ์ง ์์ผ๋ ์ ์๊ฐํด๋ณด์๊ณ ํจํค์ง ์ ๋ฐ์ดํธ ํด์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์๋ ์์ ์ ์ํํ ํ Apidoc์ ์ค๊ตญ์ด๋ฅผ ์ง์ํ ์ ์์ต๋๋ค.
node_modules/apidoc-core/lib/workers/api_group.js
๊ทธ๋ฃน = group.replace(/[^\w]/g, '_'); --> ๊ทธ๋ฃน = group.replace(/[^\w\u4E00-\u9FA5]/g, '_');
api_name.js
์ด๋ฆ = name.replace(/[^\w]/g, '_'); --> ์ด๋ฆ = name.replace(/[^\w\u4E00-\u9FA5]/g, '_');
ํ์ง๋ง ์๋์ผ๋ก ํ๋ฉด ๋ณ๋ก ๋ถํธํ์ง ์์ผ๋ ์ ์๊ฐํด๋ณด์๊ณ ํจํค์ง ์ ๋ฐ์ดํธ ํด์ฃผ์๋ฉด ๊ฐ์ฌํ๊ฒ ์ต๋๋ค.