仆人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次)。 –