前后端 API 兼容性检查
原名:api-breaking-change-detector
对照 C# 接口和 TypeScript、JavaScript 调用代码,找出字段与状态码不一致。
中文 Skills 技能说明
适合后端改过 DTO、参数或返回结构,担心网页出现静默错误的项目。检查序列化命名、必填字段、路由和客户端读取逻辑,区分编译错误、运行风险与无害的多余字段,并给出文件位置和匹配可信度。默认只读;没有找到调用方不等于接口无人使用,不能据此删除。无需把源码上传到外部审查平台。
上游能力依据
上游原始适用说明:Cross-references C# Web API controllers/DTOs against their TypeScript/JavaScript consumers (React, Angular, Vue, Svelte, Node.js, or hand-written/auto-generated HTTP clients like Fetch, Axios, NSwag) to catch contract drift in both directions: backend changes that break client applications (renamed/removed JSON keys, new required parameters, status code shifts) and frontend code sending fields the backend no longer reads. Works directly against source code, not exported OpenAPI spec files. Use when the user asks to check for breaking API changes, verify frontend/backend contract sync, or audit a DTO/controller change against its TypeScript/JS consumers before merging. Not for generating new API code from a spec (see openapi-to-application-code) or scaffolding new endpoints (see aspnet-minimal-api-openapi).
上游 SKILL.md 主要章节(保留原文标题):
- When to use this
- Process
- Output Format
- Guidelines
使用边界
先复现问题并固定测试范围,再生成或执行测试。测试通过只能证明已覆盖的场景,不能代替生产环境验收。
作者、翻译与许可证
- 原作者
- GitHub, Inc. 与 awesome-copilot contributors
- 中文翻译
- CEOFans翻译
- 许可证
- MIT
- 上游来源
- https://github.com/github/awesome-copilot/tree/a19b3101cc797a35de8b1c1698c13d1344703522/skills/api-breaking-change-detector
适用范围
平台:linux、macos、windows;标签:测试与质量、前后端 API 兼容性检查、开源技能
安全提示
基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。
如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。