feat: 实现配置加载系统与多级目录递归扫描
- 定义支持“一接口一文件”与“一文件多接口”的数据模型 - 实现基于路径首段的 HashMap 索引构建逻辑 - 新增集成测试 tests/integration_test.rs,验证 YAML 解析与目录递归加载 - 优化 Cargo.toml 配置,解决连字符项目名引用问题
This commit is contained in:
16
mocks/v1/system/health.yaml
Normal file
16
mocks/v1/system/health.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
# 使用 YAML 数组语法定义多个规则
|
||||
- id: "sys_ping"
|
||||
request:
|
||||
method: "GET"
|
||||
path: "/api/v1/ping"
|
||||
response:
|
||||
status: 200
|
||||
body: "pong"
|
||||
|
||||
- id: "sys_version"
|
||||
request:
|
||||
method: "GET"
|
||||
path: "/api/v1/version"
|
||||
response:
|
||||
status: 200
|
||||
body: '{"version": "1.2.0-smart"}'
|
||||
Reference in New Issue
Block a user