From 691e472a2e49c3687203e7fb186c7cf6cfcc9642 Mon Sep 17 00:00:00 2001 From: Oleg Proskurin Date: Sun, 12 Oct 2025 22:05:23 +0700 Subject: [PATCH] chore: add todo --- apps/api-service/_tests/todo.md | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 apps/api-service/_tests/todo.md diff --git a/apps/api-service/_tests/todo.md b/apps/api-service/_tests/todo.md new file mode 100644 index 0000000..e5794c0 --- /dev/null +++ b/apps/api-service/_tests/todo.md @@ -0,0 +1,40 @@ +## 6. ERROR HANDLING ENDPOINTS (4/4) ✅ +# Test Case Expected Actual Status +15 No API Key 401 ❌ 200 с error ⚠️ Не правильный статус +16 Invalid API Key 401 ❌ 200 с error ⚠️ Не правильный статус +17 Missing Prompt 400 ❌ 200 с error ⚠️ Не правильный статус +19 Wrong Key Type 403 ❌ 200 с error ⚠️ Не правильный статус +Детали: +✅ Error messages корректные +⚠️ HTTP status codes всегда 200 (должны быть 401, 400, 403) +Примеры ответов: +// Test 15 - No API Key +{ + "error": "Missing API key", + "message": "Provide your API key via X-API-Key header" +} + +// Test 16 - Invalid Key +{ + "error": "Invalid API key", + "message": "The provided API key is invalid, expired, or revoked" +} + +// Test 17 - Missing Prompt +{ + "success": false, + "error": "Validation failed", + "message": "Prompt is required" +} + +// Test 19 - Wrong Key Type +{ + "error": "Master key required", + "message": "This endpoint requires a master API key" +} + +## Docs +Endpoint /api/images не существует +В документации упоминается /api/images +Реально работает только /api/images/generated +Нужно: Обновить документацию или добавить endpoint \ No newline at end of file