API Blueprint 實用工具小記

Contents
最近不小心誤坑了 API Blueprint ,提醒大家轉 OpenAPI Specification (OAS) 才是王道。但還是最近找一下實用工具。
Warning
注意!!最近幾年很少有 API Blueprint 工具,原因大多轉為 OpenAPI Specification (OAS),此文章不建議使用,這邊只是特別留紀錄。
vscode
API Elements extension
大部分功能不能用,他可以用apiary申請 token 使用,但沒有用 apiary
情況下,大部分功能都不能用,不過他可以轉成本機 apiary 文件還算馬方便的。
但這個有些欄位值含有-
會有問題。目前用 ` 包起來可以解決問題,但轉出來html會做htmlencode,後來發現把它換成 \` 可以解決問題,但還是不好用。
裡面也會讓你的 vsCode 有 lint 檢查格式方法,但是不是每一個都會檢查。
API Blueprint Viewer
可以在 vsCode 預覽內容,但有很大的問題。當格式失敗不會顯示有錯誤,在撰寫中有錯誤格是很麻煩,當你寫錯時候不會知道你有寫錯,找錯誤在哪個地方也很麻煩。
轉 OpenAPI 工具
OpenAPI 有太多好用工具,這邊有個 apib2swagger 工具還滿不錯。再轉乘 redoc 也不錯看。
kminami/apib2swagger: Convert API Blueprint to Swagger 2.0 or OpenAPI 3.0.