Repository navigation
docs: clarify OpenAPI access contract - #94
Conversation
📝 WalkthroughWalkthroughChangesOpenAPI 契约对齐
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/API.md`:
- Around line 9-10: 更新 docs/API.md 中关于 GET /api/health 的接口描述,使其明确包含失败场景的非 2xx
响应及对应 schema;如果错误由代理层统一处理,则收窄“每个 operation 都显式列出错误响应”的概括表述并注明该边界。
In `@docs/openapi.yaml`:
- Line 225: 将 docs/openapi.yaml 中该字段的 x-data-classification 值改为仅包含机器可读分类值
case-restricted,移除分号及其后的自然语言说明;如需保留敏感字段说明,移至独立的描述字段。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ce2658f9-34d7-42b2-97d3-0069768b3099
📒 Files selected for processing (3)
docs/API.mddocs/README.mddocs/openapi.yaml
| - bearerAuth: [] | ||
| x-roles: [family, commander, volunteer] | ||
| x-case-roles: [family, commander, volunteer] | ||
| x-data-classification: case-restricted; elder_profile.health_notes is sensitive |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
保持 x-data-classification 为单一机器可读值。
阅读约定将该字段定义为分类值,但这里把分类和自然语言说明拼成了一个字符串。严格匹配 case-restricted 的客户端可能将其识别为未知分类,从而跳过隐私裁剪或缓存限制。
建议修改
- x-data-classification: case-restricted; elder_profile.health_notes is sensitive
+ x-data-classification: case-restricted📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| x-data-classification: case-restricted; elder_profile.health_notes is sensitive | |
| x-data-classification: case-restricted |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/openapi.yaml` at line 225, 将 docs/openapi.yaml 中该字段的
x-data-classification 值改为仅包含机器可读分类值
case-restricted,移除分号及其后的自然语言说明;如需保留敏感字段说明,移至独立的描述字段。
Closes #54
变更内容
验收对应
测试与质量检查
风险与边界
Summary by CodeRabbit