Weitere ähnliche Inhalte
Mehr von Mu Chun Wang (20)
API Blueprint - API 文件規範的三大領頭之一
- 3. 3
API Blueprint (Markdown-like)
# Group Questions
Resources related to questions in the API.
## Question Collection [/questions]
### List All Questions [GET]
+ Response 200 (application/json)
[
{
"question": "Favourite programming language?",
"published_at": "2014-11-11T08:40:51.620Z",
"choices": [
{
"choice": "Swift",
"url": "/questions/1/choices/1",
"votes": 2048
}
]
}
]
- 4. 4
RAML (YAML-like)
/questions:
displayName: Resources related to questions in the API.
get:
description: List All Questions
responses:
200:
body:
application/json:
type: array
example: |
[
{
"question": "Favourite programming language?",
"published_at": "2014-11-11T08:40:51.620Z",
"choices": [
{
"choice": "Swift",
"url": "/questions/1/choices/1",
"votes": 2048
}
]
}
]
- 8. 8
相關工具
● Apiary :整合環境
– sample code 、 REST client 、 mock server 、 renderer
– 本機執行: Apiary CLI
● aglio: renderer
● Drakov: mock server
● 其他: curl, Postman, Paw
- 10. 10
Drakov – mock server
●
規格修改後可即時更新
● 可模擬 server 執行時間
● 支援 CORS
● 支援 HTTPS
● 支援 Access-Control-Allow-Methods 及 Access-
Control-Allow-Headers
● 有 npm library
- 11. 11
相關工具
● Apiary :整合環境
– sample code 、 REST client 、 mock server 、 renderer
– 本機執行: Apiary CLI
● aglio: renderer
● Drakov: mock server
● 其他: curl, Postman, Paw
- 17. 17
範例:公文
## 公文
### 函 三竹資訊
* address: " 台北市中山區帥哥路 2 號 "
* contact: "Kewang"
* phone: "02-23456789"
* fax: "02-23456780"
* email: "service@mitake.com.tw"
### 受文者 王慕群
* address: 美國白宮
* date: 106/02/03 (date)
* post-number-name: 三竹
* post-number-number: 20170726001
* level: secret
### 主旨 想睡覺的方式有幾種?
#### 說明
1. 因為想睡覺
2. 所以想睡覺