API: specs
GET /api/v1/specs
Заголовок раздела «GET /api/v1/specs»List Specs
: list all specs sorted by id descending.
Авторизация: нужен Authorization: Bearer <token>
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | SpecListResponse |
401 | Missing or invalid authentication credentials | ErrorResponse |
GET /api/v1/specs/{spec_id}
Заголовок раздела «GET /api/v1/specs/{spec_id}»Get Spec
: detail with frontmatter, body, sections, tests_status.
Авторизация: нужен Authorization: Bearer <token>
| Параметр | Где | Обязателен | Тип | Описание |
|---|---|---|---|---|
spec_id | path | да | string |
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | SpecDetailResponse |
400 | Malformed spec id (expected SPEC-NNN) | — |
401 | Missing or invalid authentication credentials | ErrorResponse |
404 | Spec not found | — |
422 | Validation Error | HTTPValidationError |
GET /api/v1/specs/{spec_id}/history
Заголовок раздела «GET /api/v1/specs/{spec_id}/history»Get Spec History
: git log per file. Empty if.git not mounted.
Авторизация: нужен Authorization: Bearer <token>
| Параметр | Где | Обязателен | Тип | Описание |
|---|---|---|---|---|
spec_id | path | да | string |
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | массив object |
400 | Malformed spec id (expected SPEC-NNN) | — |
401 | Missing or invalid authentication credentials | ErrorResponse |
404 | Spec not found | — |
422 | Validation Error | HTTPValidationError |
GET /api/v1/specs/{spec_id}/progress
Заголовок раздела «GET /api/v1/specs/{spec_id}/progress»Get Spec Progress
Implementation progress grouped by spec section — each leaf §-anchor
with its label and whether a test covers it (SPEC-NNN §X.Y citation).
Авторизация: нужен Authorization: Bearer <token>
| Параметр | Где | Обязателен | Тип | Описание |
|---|---|---|---|---|
spec_id | path | да | string |
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | массив ProgressSection |
400 | Malformed spec id (expected SPEC-NNN) | — |
401 | Missing or invalid authentication credentials | ErrorResponse |
404 | Spec not found | — |
422 | Validation Error | HTTPValidationError |
PATCH /api/v1/specs/{spec_id}/status
Заголовок раздела «PATCH /api/v1/specs/{spec_id}/status»Patch Spec Status
: status transition with validation.
Авторизация: нужен Authorization: Bearer <token>
| Параметр | Где | Обязателен | Тип | Описание |
|---|---|---|---|---|
spec_id | path | да | string | |
Idempotency-Key | header | нет | string | Optional. |
Тело запроса: application/json — схема StatusPatch
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
status | string | да | One of draft/review/accepted/implemented/obsolete |
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | object |
401 | Missing or invalid authentication credentials | ErrorResponse |
422 | Validation Error | HTTPValidationError |
GET /api/v1/specs/{spec_id}/tests
Заголовок раздела «GET /api/v1/specs/{spec_id}/tests»Get Spec Tests
Return individual pytest test-cases for this spec from junit.xml.
Авторизация: нужен Authorization: Bearer <token>
| Параметр | Где | Обязателен | Тип | Описание |
|---|---|---|---|---|
spec_id | path | да | string |
Ответы:
| Код | Смысл | Тело |
|---|---|---|
200 | Successful Response | массив SpecTestCase |
400 | Malformed spec id (expected SPEC-NNN) | — |
401 | Missing or invalid authentication credentials | ErrorResponse |
404 | Spec not found | — |
422 | Validation Error | HTTPValidationError |