首页/ AI 技能 / @skilllib/skill-2014279412265463810
Skill站外收录 @skilllib/skill-2014279412265463810

validate-openapi-spec

检查 OpenAPI 规范的有效性,识别语法错误与潜在问题,提供修复建议以确保接口定义符合标准,支持自动化校验与代码生成流程。

0.0 (0) 544 次安装 原作者 编程导航
收录于 2026-01-22
测试与安全 AI 技能

Skills.MD

# validate-openapi-spec Use `speakeasy lint` to check for errors and warnings. ## Command ```bash speakeasy lint openapi -s <path-to-spec> ``` ## Output Categories | Severity | Meaning | Action | |----------|---------|--------| | Error | Blocks SDK generation | Must fix | | Warning | May cause issues | Should fix | | Hint | Best practice suggestion | Consider fixing | ## Common Validation Issues | Issue | Solution | |-------|----------| | Missing operationId | Add operationId or use `speakeasy suggest operation-ids` | | Invalid $ref | Fix the reference path | | Missing response schema | Add response schema definitions | | Duplicate operationId | Make operation IDs unique | ## AI-Friendly Output For commands with large outputs, pipe to `grep` or `tail` to reduce context: ```bash speakeasy lint openapi -s ./openapi.yaml 2>&1 | grep -E "(error|warning)" ```

评论 0

还没有评论,来抢沙发。