swagger-generator

Error: --title required. Use when you need swagger generator capabilities. Triggers on: swagger generator, title, base-url, version, desc, endpoints.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "swagger-generator" with this command: npx skills add xueyetianya/swagger-generator

swagger-generator

Generate complete OpenAPI 3.0/Swagger specification documents from endpoint descriptions. Supports RESTful API documentation with path definitions, request/response schemas, authentication schemes (Bearer JWT, API Key, OAuth2), error responses, pagination, filtering, and example values. Outputs valid YAML or JSON specs that can be rendered by Swagger UI, Redoc, or imported into Postman. Includes model generation, tag grouping, and server configuration.

Commands

CommandDescription
specGenerate a complete OpenAPI spec from API description
endpointGenerate a single endpoint definition
modelGenerate a schema/model definition
crudGenerate CRUD endpoints for a resource
authGenerate authentication scheme definitions
errorGenerate standardized error response schemas
serverGenerate server configuration (dev/staging/prod)
tagGenerate tag definitions for API grouping
mergeMerge multiple endpoint definitions into one spec

Usage

# Generate complete API spec
swagger-generator spec --title "My API" --version "1.0.0" --description "REST API for my app"

# Generate CRUD endpoints for a resource
swagger-generator crud --resource User --fields "id:integer,name:string,email:string"

# Generate single endpoint
swagger-generator endpoint --method POST --path "/users" --body "name:string,email:string" --response "User"

# Generate model/schema
swagger-generator model --name Product --fields "id:integer,name:string,price:number,category:string"

# Add authentication
swagger-generator auth --scheme bearer --format jwt

# Generate error responses
swagger-generator error --codes "400,401,403,404,422,500"

# Server configuration
swagger-generator server --envs "dev,staging,production" --base-url "api.example.com"

Examples

E-commerce API

swagger-generator spec --title "E-commerce API" --resources "products,orders,users,categories"

Blog API

swagger-generator crud --resource Post --fields "id:integer,title:string,body:string,author_id:integer,status:string"

Microservice API

swagger-generator spec --title "Payment Service" --auth bearer --resources "payments,refunds,webhooks"

Features

  • OpenAPI 3.0 — Generates valid OpenAPI 3.0.3 specifications
  • CRUD generation — Complete REST endpoints for any resource
  • Authentication — Bearer JWT, API Key, OAuth2 schemes
  • Models — JSON Schema-based model definitions
  • Error handling — Standardized error response patterns
  • Pagination — Cursor and offset pagination parameters
  • Examples — Request/response example values
  • Tags — Logical API endpoint grouping

Keywords

swagger, openapi, api documentation, rest api, api spec, api design, documentation, endpoints, schema, backend

💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

115 Publish

智能管理115网盘,支持扫码登录、文件浏览、搜索、转存分享、离线下载、智能整理和容量查询。

Registry SourceRecently Updated
039
Profile unavailable
General

Openclaw Diary Setup

OpenClaw Diary 日记系统安装向导。引导用户完成日记系统的初始化设置,包括人设选择、用户身份建立、存储配置和授权管理。 **立即触发当**:用户说「setup my journal」「初始化日记」「配置日记系统」「journal setup」「开始设置日记」。 **主动触发当**:用户首次尝试使用 d...

Registry SourceRecently Updated
058
Profile unavailable
General

Unit Converter

单位换算工具。长度、重量、温度、货币、时间、速度换算,含公式和常用对照表。Unit converter for length, weight, temperature, currency, time, speed with formulas and reference tables. Use when you n...

Registry SourceRecently Updated
0152
Profile unavailable