360 Secure SkillHub
360 安全技能中心

Rest Api Generator

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

sky-lv
sky-lv
热度 41.24
最近更新 2026-05-11 17:46:45
分类:开发依赖:纯提示词应用场景:API 集成 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add 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