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

get-ai-suggestions

基于 OpenAPI 规范自动生成更符合开发直觉的 SDK 方法命名与结构化错误类型定义,支持以覆盖文件形式输出建议并集成到代码生成流程中,提升 API 描述的可读性与客户端体验。

0.0 (0) 567 次安装 原作者 编程导航
收录于 2026-01-22
效率工具 AI 技能

Skills.MD

# get-ai-suggestions Use `speakeasy suggest` for AI-powered improvements. ## Prerequisites For non-interactive environments (CI/CD, AI agents), set: ```bash export SPEAKEASY_API_KEY="<your-api-key>" ``` See `configure-authentication` skill for details. ## Commands ```bash # Suggest better operation IDs (method names) speakeasy suggest operation-ids -s <spec-path> # Suggest error type definitions speakeasy suggest error-types -s <spec-path> # Output suggestions as overlay file speakeasy suggest operation-ids -s <spec-path> -o suggested-overlay.yaml ``` ## Operation ID Suggestions Transforms auto-generated names into intuitive SDK method names: - `get_api_v1_users_list` → `listUsers` - `post_api_v1_users_create` → `createUser` ## Error Type Suggestions Analyzes your API and suggests structured error responses: - Common HTTP error codes (400, 401, 404, 500) - Custom error schemas ## Applying Suggestions ```bash # Generate overlay with suggestions speakeasy suggest operation-ids -s openapi.yaml -o operation-ids-overlay.yaml # Add to workflow.yaml sources: my-api: inputs: - location: ./openapi.yaml overlays: - location: ./operation-ids-overlay.yaml # Regenerate speakeasy run ```

评论 0

还没有评论,来抢沙发。