본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)48k · #5377

openapi-spec-generator

하는 일

이 도구는 API(소프트웨어가 통신에 사용하는 서비스)가 어떻게 작동하는지 설명하는 기술 문서(OpenAPI 또는 Swagger 명세라고 부름)를 만듭니다. 자연어 설명, 코드, 또는 불완전한 문서로부터 이 문서를 생성할 수 있습니다.

사용하는 경우

  • ✓다른 개발자에게 API를 설명해야 할 때.
  • ✓웹 서비스의 기술 문서를 만들 때.
  • ✓API 초안이 있고 이를 표준 형식으로 바꾸고 싶은 경우.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/openapi-spec-generator/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/openapi-spec-generator/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“작업 목록을 조회하고, 생성하고, 수정하는 엔드포인트가 있는 작업 관리 API의 OpenAPI 명세를 만들어 주세요. YAML 형식을 사용해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 여러분의 설명이나 코드를 분석해 API의 세부 사항(사용하는 데이터, 수행할 수 있는 작업 등)을 이해합니다. 그다음 OpenAPI 또는 Swagger 표준을 따르는 완전한 기술 문서를 조립합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

OpenAPI / Swagger Specification Generator

When to Use

Use this skill when you need generate complete, production-ready OpenAPI 3.x and Swagger 2.0 specifications from natural language descriptions, code, or partial specs. Use this skill whenever the user mentions OpenAPI, Swagger, API spec, REST API documentation, YAML/JSON API schema, endpoint documentation, API...

Generate complete, valid OpenAPI 3.x or Swagger 2.0 specifications from descriptions, code, or partial specs.

Workflow

Step 1 — Gather Context

Before writing any YAML/JSON, ask (or infer from context) the following:

Question Why it matters
OpenAPI 3.x or Swagger 2.0? Different info, servers/host, components/definitions structure
Output format: YAML or JSON? YAML default unless user specifies JSON
What does this API do? Sets info.title, info.description, tags
List of endpoints (or code to extract from)? Core paths object
Authentication type(s)? securitySchemes — see reference
Common data models or entities? components/schemas / definitions
Any existing partial spec to extend? Merge rather than overwrite

If the user provides code (Express routes, FastAPI, Django URLs, Spring controllers, etc.), extract endpoints automatically — do not ask what the user already told you.

Step 2 — Build the Spec

Follow the structure guide for the chosen version. Always produce a complete, valid spec — never leave placeholder comments like # TODO: add schema.

OpenAPI 3.x Skeleton

openapi: "3.1.0"
info:
  title: <API Title>
  version: "1.0.0"
  description: <Short description>
  contact:
    name: <Team or Author>
    email: <contact@example.com>
servers:
  - url: https://api.example.com/v1
    description: Production
  - url: https://staging-api.example.com/v1
    description: Staging
tags:
  - name: <Tag>
    description: <Tag description>
paths:
  /resource:
    get:
      summary: List resources
      operationId: listResources
      tags: [<Tag>]
      parameters: []
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ResourceList"
              example:
                items: []
                total: 0
        "401":
          $ref: "#/components/responses/Unauthorized"
        "500":
          $ref: "#/components/responses/InternalError"
      security:
        - BearerAuth: []
components:
  schemas: {}
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
  securitySchemes: {}

Swagger 2.0 Skeleton

swagger: "2.0"
info:
  title: <API Title>
  version: "1.0.0"
  description: <Short description>
host: api.example.com
basePath: /v1
schemes: [https]
consumes: [application/json]
produces: [application/json]
tags: []
paths: {}
definitions: {}
securityDefinitions: {}

Step 3 — Schemas and Models

  • Always use $ref for any schema used in more than one place.
  • Include example or examples on every schema and response body.
  • Mark required fields with the required array.
  • Use nullable: true (OAS 3.0) or x-nullable: true (Swagger 2.0) for optional nullable fields.
  • Prefer format keywords: int32, int64, float, date, date-time, uuid, email, uri, byte, binary.

Common schema patterns:

# Pagination wrapper
PagedResult:
  type: object
  required: [items, total, page, pageSize]
  properties:
    items:
      type: array
      items:
        $ref: "#/components/schemas/Resource"
    total:
      type: integer
      format: int64
      example: 100
    page:
      type: integer
      format: int32
      example: 1
    pageSize:
      type: integer
      format: int32
      example: 20

# Standard error
Error:
  type: object
  required: [code, message]
  properties:
    code:
      type: string
      example: RESOURCE_NOT_FOUND
    message:
      type: string
      example: The requested resource was not found.
    details:
      type: object
      additionalProperties: true

# Timestamps mixin (use allOf)
Timestamps:
  type: object
  properties:
    createdAt:

…
자주 묻는 질문

OpenAPI/Swagger란 무엇인가요?

API를 설명하기 위한 표준입니다. 웹 서비스가 어떻게 작동하는지 문서화하여 서로 다른 소프트웨어가 쉽게 통합되도록 돕습니다.

OpenAPI와 Swagger의 차이는 무엇인가요?

OpenAPI는 현재 표준의 이름입니다. Swagger는 이 표준을 구현하는 인기 도구이며, 이전 버전의 표준을 가리키기도 합니다.

이것을 쓰려면 코딩을 알아야 하나요?

꼭 그렇지는 않습니다. 자연어로 API를 설명하면 도구가 이를 기술 문서로 바꿔 줍니다.

상세 정보

작성자의 원본 설명

Generate complete, production-ready OpenAPI 3.x and Swagger 2.0 specifications from natural language descriptions, code, or partial specs.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5377
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬