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

openapi-spec-generation

하는 일

이 도구는 API 문서(프로그램끼리 소통하게 해 주는 인터페이스)를 만들고 정리하도록 돕습니다. 코드나 이전 설계로부터 이 문서를 생성할 수 있습니다.

사용하는 경우

  • ✓새 API를 문서화해야 할 때.
  • ✓코드 안의 기존 API 문서를 생성하고 싶을 때.
  • ✓다른 프로그램이 API를 사용할 수 있도록 안내서를 만들어야 하는 경우.

스킬 링크

https://github.com/wshobson/agents/blob/main/plugins/documentation-generation/skills/openapi-spec-generation/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/documentation-generation/skills/openapi-spec-generation/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 문서를 만들어 주세요.”

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

작동 방식

도구는 코드나 설계 파일을 분석해 API가 어떻게 작동하는지 이해합니다. 그다음 API의 모든 세부 사항을 설명하는 표준화된 파일(OpenAPI 3.1)을 생성합니다.

기술 내용 (원본 SKILL.md)

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

OpenAPI Spec Generation

Comprehensive patterns for creating, maintaining, and validating OpenAPI 3.1 specifications for RESTful APIs.

When to Use This Skill

  • Creating API documentation from scratch
  • Generating OpenAPI specs from existing code
  • Designing API contracts (design-first approach)
  • Validating API implementations against specs
  • Generating client SDKs from specs
  • Setting up API documentation portals

Core Concepts

1. OpenAPI 3.1 Structure

openapi: 3.1.0
info:
  title: API Title
  version: 1.0.0
servers:
  - url: https://api.example.com/v1
paths:
  /resources:
    get: ...
components:
  schemas: ...
  securitySchemes: ...

2. Design Approaches

Approach Description Best For
Design-First Write spec before code New APIs, contracts
Code-First Generate spec from code Existing APIs
Hybrid Annotate code, generate spec Evolving APIs

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's

  • Use $ref - Reuse schemas, parameters, responses
  • Add examples - Real-world values help consumers
  • Document errors - All possible error codes
  • Version your API - In URL or header
  • Use semantic versioning - For spec changes

Don'ts

  • Don't use generic descriptions - Be specific
  • Don't skip security - Define all schemes
  • Don't forget nullable - Be explicit about null
  • Don't mix styles - Consistent naming throughout
  • Don't hardcode URLs - Use server variables
자주 묻는 질문

OpenAPI란 무엇인가요?

API를 설명하는 표준 형식입니다. 온라인 서비스를 어떻게 쓰는지 설명하는 지도와 같습니다.

'Design-First'와 'Code-First'는 어떻게 다른가요?

'Design-First'는 도로(API)를 만들기 전에 지도(문서)를 만드는 것입니다. 'Code-First'는 도로를 먼저 만들고 그것으로부터 지도를 생성하는 것입니다.

'$ref'는 왜 쓰나요?

정보를 반복하지 않으려고 만드는 바로가기와 같습니다. 데이터 타입을 한 곳에 설명해 두면, '$ref'로 다른 곳에서 그 설명을 재사용할 수 있습니다.

상세 정보

작성자의 원본 설명

Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.

repo: wshobson/agents

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬