返回 Skill 列表
extension
分类: 安全与合规无需 API Key

Api Generator

API代码生成器。生成RESTful端点、GraphQL架构、OpenAPI/Swagger文档、API客户端、模拟服务器,并支持身份验证与速率限制。

person作者: ckchzhhubclawhub

⚡ API Generator

Generate production-ready API code scaffolds from zero. REST, GraphQL, auth, tests — all in one tool.

Usage

bash scripts/apigen.sh <command> <resource_name> [options]

Commands

Core Generation

  • rest <name> — RESTful CRUD endpoints (Express.js)
  • graphql <name> — GraphQL Type + Query + Mutation schema
  • swagger <name> — OpenAPI 3.0 specification document

Utilities

  • client <name> — Python API client class
  • mock <name> — Mock API server with in-memory store
  • auth <type> — Auth code (jwt / oauth / apikey)
  • rate-limit <type> — Rate limiter (token-bucket / sliding-window)
  • test <name> — Jest + Supertest API test suite

Examples

bash scripts/apigen.sh rest user          # RESTful user endpoints
bash scripts/apigen.sh graphql product    # GraphQL product schema
bash scripts/apigen.sh auth jwt           # JWT authentication
bash scripts/apigen.sh test order         # Order API tests

Output

All code prints to stdout. Copy or redirect into your project files. Generated code includes full comments and can serve as a project starting point.

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