contract-test-generator
Generate contract tests for API migrations with consumer-driven contracts and provider verification
它会碰到什么
扫了多少2 个文本文件,4 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Contract Test Generator Skill
Generates contract tests for API migrations, supporting consumer-driven contracts, provider verification, and breaking change detection.
Purpose
Enable API contract testing for:
- Consumer contract generation
- Provider verification
- Schema validation
- Breaking change detection
- Mock server generation
Capabilities
1. Consumer Contract Generation
- Generate from API usage
- Extract from tests
- Build from specs
- Support multiple formats
2. Provider Verification
- Verify against contracts
- Test all consumers
- Check compatibility
- Document failures
3. Schema Validation
- Validate request schemas
- Check response schemas
- Verify data types
- Enforce constraints
4. Breaking Change Detection
- Detect field removals
- Find type changes
- Identify required additions
- Flag compatibility issues
5. Mock Server Generation
- Generate from contracts
- Support stub responses
- Handle scenarios
- Enable development isolation
6. Contract Versioning
- Track contract versions
- Manage compatibility
- Support migrations
- Document changes
Tool Integrations
| Tool | Purpose | Integration Method |
|------|---------|-------------------|
| Pact | Consumer-driven contracts | CLI |
| Spring Cloud Contract | Java contracts | CLI |
| Dredd | API validation | CLI |
| Prism | Mock server | CLI |
| WireMock | Mock server | CLI |
Output Schema
{
"generationId": "string",
"timestamp": "ISO8601",
"contracts": [
{
"consumer": "string",
"provider": "string",
"interactions": [
{
"description": "string",
"request": {},
"response": {}
}
]
}
],
"verification": {
"passed": "boolean",
"results": []
},
"artifacts": {
"contractFiles": [],
"mockServerConfig": "string"
}
}
Integration with Migration Processes
- api-modernization: Contract verification
- monolith-to-microservices: Service contracts
Related Skills
openapi-generator: Spec generationapi-compatibility-analyzer: Breaking changes
Related Agents
regression-detector: Regression preventioncross-team-integrator: Contract coordination
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
星标★ 1,796
本站分层T1
该仓技能数2115
原文件路径
library/specializations/code-migration-modernization/skills/contract-test-generator/SKILL.md