Add test stub and API reference docs

This commit is contained in:
Franziska Richter 2026-02-26 09:00:00 +00:00
parent b504db6c03
commit df30f92039
2 changed files with 32 additions and 0 deletions

23
docs/api-reference.md Normal file
View file

@ -0,0 +1,23 @@
# API Reference
## Authentication
All endpoints except `/health` and `/api/v1/auth/login` require a Bearer token.
```
Authorization: Bearer <jwt>
```
## Errors
| Code | Meaning |
|------|---------|
| 400 | Bad request / validation error |
| 401 | Missing or invalid token |
| 403 | Insufficient permissions |
| 404 | Resource not found |
| 500 | Internal server error |
## Rate limiting
100 requests / minute per IP. Headers: `X-RateLimit-Remaining`, `X-RateLimit-Reset`.

9
tests/health_test.rs Normal file
View file

@ -0,0 +1,9 @@
#[cfg(test)]
mod tests {
#[tokio::test]
async fn health_returns_ok() {
// TODO: spin up test server
// For now just assert the handler compiles
assert!(true);
}
}