feat(schemas): T23 add Pydantic API key schemas

- Add ApiKeyCreate schema with OpenRouter key format validation
- Add ApiKeyUpdate schema for partial updates
- Add ApiKeyResponse schema (excludes key value for security)
- Add ApiKeyListResponse schema for pagination
- Export schemas from __init__.py
- 100% coverage on new module (23 tests)

Refs: T23
This commit is contained in:
Luca Sacchi Ricciardi
2026-04-07 14:28:03 +02:00
parent b4fbb74113
commit 2e4c1bb1e5
5 changed files with 1024 additions and 1 deletions

View File

@@ -1,4 +1,10 @@
"""Schemas package for OpenRouter Monitor."""
from openrouter_monitor.schemas.api_key import (
ApiKeyCreate,
ApiKeyListResponse,
ApiKeyResponse,
ApiKeyUpdate,
)
from openrouter_monitor.schemas.auth import (
TokenData,
TokenResponse,
@@ -13,4 +19,8 @@ __all__ = [
"UserResponse",
"TokenResponse",
"TokenData",
"ApiKeyCreate",
"ApiKeyUpdate",
"ApiKeyResponse",
"ApiKeyListResponse",
]