SwaggerUI部署器Skill swagger-ui-deployer

Swagger UI 部署器是一款用于自动化生成和部署交互式API文档的工具。它能够根据OpenAPI规范文件,快速创建带有自定义品牌、主题和配置的静态HTML文档网站。该工具支持深度链接、多文件集成和身份验证配置,是API开发、文档管理和DevOps流程中的高效解决方案。关键词:API文档生成,Swagger UI部署,OpenAPI规范,静态文档网站,DevOps自动化,API开发工具。

DevOps 0 次安装 0 次浏览 更新于 2/26/2026

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'
      }
    }
  }
}