name: swagger-ui-deployer description: 使用Swagger UI部署交互式API文档,支持自定义品牌 allowed-tools:
- Bash
- Read
- Write
- Glob
Swagger UI 部署器技能
概述
使用Swagger UI部署交互式API文档,提供配置选项、自定义品牌和静态HTML生成功能。
能力
- 部署交互式API文档
- 配置Swagger UI选项
- 生成静态HTML文档
- 支持自定义品牌和主题
- 支持多个规范文件
- 身份验证配置
- 深度链接支持
目标流程
- api-design-specification
输入模式
{
"type": "object",
"required": ["specPath"],
"properties": {
"specPath": {
"type": "string",
"description": "OpenAPI规范文件路径"
},
"outputDir": {
"type": "string",
"description": "静态文件输出目录"
},
"config": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "文档标题"
},
"deepLinking": {
"type": "boolean",
"default": true
},
"displayOperationId": {
"type": "boolean",
"default": false
},
"defaultModelsExpandDepth": {
"type": "number",
"default": 1
}
}
},
"branding": {
"type": "object",
"properties": {
"logo": { "type": "string" },
"primaryColor": { "type": "string" },
"favicon": { "type": "string" }
}
}
}
}
输出模式
{
"type": "object",
"properties": {
"outputDir": {
"type": "string"
},
"indexPath": {
"type": "string"
},
"files": {
"type": "array",
"items": { "type": "string" }
}
}
}
使用示例
{
kind: 'skill',
skill: {
name: 'swagger-ui-deployer',
context: {
specPath: 'api/openapi.yaml',
outputDir: 'docs/api',
config: {
title: '我的API文档',
deepLinking: true
},
branding: {
primaryColor: '#3b82f6'
}
}
}
}