# API Fixture 样例（v1.3.20 门禁 + v1.7.0 活探针）

将**联调/抓包**得到的真实后端 JSON 放在此目录（保持 **snake_case** 键名）。

## v1.7.0 活探针（推荐，禁止猜 listPath）

```bash
# 1. 复制配置模板到项目根
cp node_modules/sdd-flow-kit/src/templates/.api-probe.config.json.template .api-probe.config.json

# 2. 配置 backendRoot、apiBaseUrl、API_PROBE_TOKEN

# 3. 实现前执行（扫描 Java Controller + curl 真调）
API_PROBE_TOKEN=<token> npx sdd-flow-kit api-probe --project-root . --change <name>
```

产出：

- `tests/fixtures/api-probe/<path-slug>.json` — curl 原始响应
- `tests/fixtures/api-probe/.api-probe-manifest.json` — `listPath` / `totalPath` SSOT

## 命名建议

- `finance-subject-page.json` — 列表分页响应
- `finance-subject-info.json` — 详情 subject-info
- `finance-subject-detail.json` — 详情 subject-detail

## 要求

1. 须含 `_` 分隔的后端字段（如 `subject_id`），禁止手写全 camelCase 空对象
2. 配套单测：`tests/**/caseTransform.test.ts` 加载本目录 JSON，`snakeToCamelDeep` 后 `expect` 关键 camelCase 字段
3. 04 技术文档 §4.3.1 字段映射表须与 fixture 字段一致

## 门禁

`assess-api-field-coverage.mjs` 在 deliver 阶段校验。
