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

Succession Plan

继任计划。关键岗位识别、人才评估、发展路径、过渡方案、知识转移、紧急继任。Succession planning. 继任、人才管理。

Registry SourceRecently Updated
General

Debate Helper

辩论助手。论点构建、反驳策略、辩论结构、论据搜集、评判标准。Debate helper with arguments, rebuttals, structure. 辩论、论点、思辨。

Registry SourceRecently Updated
General

Story Writer

小说创作、角色设计、情节设计(三幕式)、对话生成、世界观构建、续写。Story writing with character design, three-act plot structure, dialogue generation, worldbuilding, and continuation. Use wh...

Registry SourceRecently Updated
3040ckchzh
General

Inventory Manager

库存管理。库存盘点、补货策略、ABC分析、安全库存、周转率、预警系统。Inventory management helper. 库存、进销存。

Registry SourceRecently Updated
2090ckchzh