僕人provides a way從API定義中生成文檔。但是,我認爲沒有辦法(非正式)記錄每個端點的功能。對於上面的鏈接使用的示例中,生成的文檔包含:在僕人中生成端點描述
## Welcome
This is our super webservice's API.
Enjoy!
## GET /hello
#### GET Parameters:
- name
- **Values**: *Alp, John Doe, ...*
- **Description**: Name of the person to say hello to.
#### Response:
在上面的例子中,我懷念的是記錄了GET /hello
終點呢,這是,我想有什麼辦法一種通過對每個端點的非正式描述來擴充API文檔的方法。
## Welcome
This is our super webservice's API.
Enjoy!
## GET /hello
Send a hello message to the given user. /<-- My description.../
#### GET Parameters:
- name
- **Values**: *Alp, John Doe, ...*
- **Description**: Name of the person to say hello to.
#### Response:
我的猜測是,這將需要標記不同的端點,以唯一標識它們,據我所知,僕人不支持。但是,我想知道如何用現在可用的解決方案來解決這個問題。
我簡要地看了一下這個文檔機制。對我來說沒有任何實際的投資是有用的,所以我只需託管一個靜態頁面,手工製作並手動保持API的最新狀態。在我的情況下,API幾乎不會改變(可能在一年內改變1次)。 –