feat(api-docs): 요청/응답 예시 블록 + 8종 결함 근본 수정 + audit error 승격

API 레퍼런스에 요청 예시(raw HTTP)·응답 예시(envelope 전문)를 표준 포맷에
편입하고, 전 대상(코어+전 모듈+전 플러그인)에 방출했다. 예시 결함 8종
(multipart·Host 마스킹·write 실측·path 치환·현실적 바디·query 반영·중복
제거·민감값 마스킹)을 스캐폴더/프로브 공용 수정으로 근본 해소했다.

추가로 검증에서 드러난 결함을 마감했다:
- 응답 예시 body 의 절대 URL(페이지네이터·콜백) 호스트를 placeholder 로
 마스킹(maskResponseHost) — 요청 Host 헤더만 마스킹되던 누락 보완, 확장
 39건 정정
- api:docgen 커맨드 통합 테스트 신설(라우트 수집·확장 라우팅·rules 추출·
 멱등 재생성·check drift)
- module-routing.md URL 스킴 오류 정정(/api/admin → /api/modules)
- README·cheatsheet·api-documentation 에 API 문서 커맨드/레퍼런스 진입점 반영

전 대상 3칸 완료로 api-doc-coverage 룰을 warn→error 승격.
This commit is contained in:
HeuJung committed 2026-07-08 18:22:34 +09:00
1 parent 70452745c4
commit 56a78e1d55
114 files changed
+60782 -197

No files matched your search

+58
View File
@@ -27,6 +27,15 @@
_요청 파라미터 없음._
**요청 예시**
```http
GET /api/admin/notification-channels HTTP/1.1
Host: api.example.com
Accept: application/json
Authorization: Bearer {YOUR_TOKEN}
```
**응답 필드** (`data` 내부)
_단건 응답: `data` 객체의 필드._
@@ -35,6 +44,55 @@ _단건 응답: `data` 객체의 필드._
| --- | --- | --- | --- |
| channels | array | `[{"id":"mail","name_key":"notification.channels.mail.name…` | 사용 가능한 알림 채널 메타데이터 목록. 각 원소는 `id`(채널 식별자: mail, database 등), `name`/`name_key`·`description`/`description_key`(활성 locale 기준 해석된 라벨/설명과 원본 다국어 키), `icon`(Font Awesome 클래스), `source`(제공 주체: core/module/plugin)·`source_label`(출처 표시 라벨), `allow_guest`(비회원 발송 허용 여부), `readiness`(컨트롤러가 `ChannelReadinessCheckerInterface`로 붙인 채널 설정 완료 여부 정보)로 구성됩니다. config 기본 채널(mail, database)에 `core.notification.filter_available_channels` 훅으로 추가된 확장 채널이 병합됩니다. |
**응답 예시**
```http
HTTP/1.1 200
```
```json
{
"success": true,
"message": "알림 채널 목록을 조회했습니다.",
"data": {
"channels": [
{
"id": "mail",
"name_key": "notification.channels.mail.name",
"icon": "fas fa-envelope",
"description_key": "notification.channels.mail.description",
"source": "core",
"source_label_key": "notification.channels.core_default",
"allow_guest": true,
"name": "메일",
"description": "이메일로 알림 발송",
"source_label": "코어 기본 채널",
"readiness": {
"ready": false,
"reason": "notification.readiness.mail_smtp_host_empty"
}
},
{
"id": "database",
"name_key": "notification.channels.database.name",
"icon": "fas fa-bell",
"description_key": "notification.channels.database.description",
"source": "core",
"source_label_key": "notification.channels.core_default",
"allow_guest": false,
"name": "사이트내 알림",
"description": "사이트내 알림 센터에 표시",
"source_label": "코어 기본 채널",
"readiness": {
"ready": true,
"reason": null
}
}
]
}
}
```
**에러 응답**
| 상태코드 | 의미 | 발생 조건 |