# OpenAPI spec and docs UI for admin API
## Summary
Provide an OpenAPI spec and a local docs UI for the admin API.
## Status (2026-02-03)
- [x] `assets/openapi.json` exists and is served at `GET /openapi.json`.
- [x] Swagger UI served at `GET /docs` (static HTML).
- [x] Tests: `tests/http_openapi_ui.rs`.
- [x] Docs: `/docs` mentioned in `README.md`.
## Motivation
GreenMail exposes an OpenAPI UI for its admin REST API.
## Scope
- Add `assets/openapi.json` that describes all admin endpoints.
- Serve spec at `GET /openapi.json`.
- Serve a docs UI at `GET /docs` using a static Swagger UI bundle.
## Acceptance Criteria
- `GET /openapi.json` returns valid JSON with all admin endpoints.
- `GET /docs` loads and renders the API spec.
## Tests
- Add a test that asserts `GET /openapi.json` returns 200 and JSON.
- Optional: test that `/docs` returns 200 and HTML.
## Implementation Notes
- Prefer static assets; avoid dynamic generation to keep dependencies minimal.
## Docs
- Mention `/docs` in `README.md`.