360 Secure SkillHub
360 安全技能中心

Skylv Rest Api Generator

核心功能是生成符合OpenAPI3.0标准的REST API规范文档。典型场景包括用户要求生成API文档、新API端点的文档编写,触发词含openapi spec等。输出含路径、请求参数、响应等结构的规范,还提供编写提示如指定响应schema、用$ref避免重复等。

sky-lv
sky-lv
热度 40.74
最近更新 2026-05-11 17:47:22
分类:开发依赖:纯提示词应用场景:代码生成 / API 集成 / 模板

安装技能

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

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