Files
browser/openspec/changes/implement-platform-api-surface/tasks.md
T
2026-07-11 14:56:10 +08:00

31 lines
1.5 KiB
Markdown

## 1. DTO And Router Contracts
- [x] 1.1 Add named DTO list/error response contracts and request-to-domain conversion helpers for core resource create requests.
- [x] 1.2 Add injectable platform router construction that wires health and core API routes through `service.Core` with an in-memory default.
## 2. Core API Handlers
- [x] 2.1 Implement users, AI providers, game plugins, server instances, and run endpoints create/list/detail handlers.
- [x] 2.2 Implement jobs, artifacts, log streams, and audit events create/list/detail handlers.
- [x] 2.3 Implement shared JSON decode, encode, method, and error mapping behavior using named DTO responses.
- [x] 2.4 Update `platform/api/routes.md` to identify implemented routes and deferred transport/bridge behavior.
## 3. API Tests
- [x] 3.1 Add handler tests for successful create/list/detail workflows and query filters.
- [x] 3.2 Add handler tests for malformed JSON, validation errors, duplicates, missing resources, dependency failures, and AI provider redaction.
## 4. Verification
- [x] 4.1 Run `go test ./...` from `platform/` and record evidence.
- [x] 4.2 Run `scripts/check-structure.sh` and record evidence.
- [x] 4.3 Run `openspec validate implement-platform-api-surface --strict` and record evidence.
## Evidence
- `go test ./api`: passed.
- `go test ./dto`: passed.
- `go test ./...` from `platform/`: passed.
- `scripts/check-structure.sh`: passed.
- `openspec validate implement-platform-api-surface --strict`: passed.