first commit
This commit is contained in:
30
async-agent-lab/fixture/order-service/docs/api-contract.md
Normal file
30
async-agent-lab/fixture/order-service/docs/api-contract.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# 订单接口约定
|
||||
|
||||
## GET /orders/:id
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "o_1001",
|
||||
"amount": 12900,
|
||||
"status": "PAID",
|
||||
"updatedAt": 1794448946000
|
||||
}
|
||||
```
|
||||
|
||||
| 字段 | 说明 |
|
||||
| --- | --- |
|
||||
| `id` | 订单号 |
|
||||
| `amount` | 金额,单位分 |
|
||||
| `status` | 订单状态,取值 `CREATED`、`PAID`、`SHIPPED`、`CANCELLED` |
|
||||
| `updatedAt` | 最后一次状态变化的毫秒时间戳 |
|
||||
|
||||
## 调用方
|
||||
|
||||
仓库内的调用方在 `src/consumers/`,随本仓库一起发版。
|
||||
|
||||
仓库外还有两个调用方直接读取这个返回体,它们有各自的发版节奏,本仓库改不到:
|
||||
|
||||
- **App 订单详情页**(iOS、Android),按 App 版本灰度,旧版本会在线上留存一段时间。
|
||||
- **合作方对账服务**,由合作方维护,接口变更需要提前通知。
|
||||
|
||||
接口字段的增删要先确认这两个调用方的兼容安排。
|
||||
Reference in New Issue
Block a user