360 Secure SkillHub
360 安全技能中心

Rest Api Generator

该 Skill 以模板文本方式指导生成 OpenAPI 3.0 规范,用于记录 REST 接口,示例包含 info、paths、query 参数与 responses 结构,并给出补充响应 schema、使用 $ref 复用、用 tags 分组、添加请求与响应示例等编写建议;未包含代码解析、文件读写或规范校验工具。

分类:开发
sky-lv
sky-lv
热度 5.58
最近更新 2026-05-11 17:46:45

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add sky-lv/rest-api-generator
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
skylv-openapi-generator
slug
skylv-openapi-generator
version
1.0.0
description
Generates OpenAPI 3.0 specs from code. Creates API documentation for REST endpoints. Triggers: openapi spec, generate api doc, swagger.
author
SKY-lv
license
MIT
tags
["automation","tools"]
keywords
["automation","tools"]
triggers
openapi-generator

OpenAPI Generator

Overview

Creates OpenAPI 3.0 specifications for REST APIs.

When to Use

  • User asks to "generate API documentation"
  • Documenting new API endpoints

Template Structure

openapi: 3.0.0 info: title: My API version: 1.0.0 paths: /users: get: summary: List users parameters: - name: page in: query schema: { type: integer } responses: 200: description: Success

Tips

  • Always specify response schemas
  • Use $ref to avoid duplication
  • Group endpoints with tags
  • Add examples for request/response bodies