코드에서 API 문서 뽑는 프롬프트
엔드포인트 정의를 받아 쓰는 사람이 필요한 순서로 문서를 만듭니다. 에러 응답을 빠뜨리지 않게 합니다.
| 분류 | 개발 › 기술 문서 |
|---|---|
| 태그 | 초안작성코드개발자 |
Write API reference documentation from this code. Per endpoint, in this order: 1. What it does, in one sentence, from the caller's point of view. 2. Request — path, method, auth, parameters. Mark required versus optional, with types and constraints. 3. A working example request. 4. Success response, with a real example body and what each field means. 5. **Error responses — every status the code can return, what triggers it, and what the caller should do.** *This is the section that is always missing and the one callers actually need.* 6. Constraints not visible in the signature: rate limits, size limits, idempotency, ordering guarantees, pagination behavior. 7. What changes state and what does not, and whether retrying is safe. Rules: - *Document only what the code shows.* Where behavior is unclear, write "not determinable from the code" and say what to check — do not write the plausible answer. - Field descriptions say what the value means, not its type. The type is already in the table. - Flag any parameter whose name does not match what it does. That is a documentation finding and a design finding. - Note where the code and any existing comments disagree.
붙여 넣으면 맨 아래에 채울 칸(엔드포인트 코드·정의 · 문서 읽는 사람)이 나옵니다
어떤 프롬프트인가
API 문서에서 늘 빠지는 건 에러 응답과 경계값이다. 성공 예시만 있으면 붙여 넣고 나서 막힌다. 이 프롬프트는 실패 경로를 먼저 채우고, 코드에서 확인 안 되는 건 추측하지 않는다.
같은 분류의 프롬프트
| FTTH 통신 전문가 역할을 맡기는 프롬프트 | |
| 개발자 아키텍처 안내 프롬프트 | |
| LLM 입문서 작성 프롬프트 | |
| 프로그래밍 팀 구성 프롬프트 | |
| CLAUDE.md 조립 프롬프트 |