feat(REQ-005): implement TrEx Basic V1 API contract with auth, assets, ledger, and user endpoints
- Add V1 API routes for assets, ledger, and user info with complete CRUD operations - Implement authentication scopes and request validation via auth_routes.py - Extend schemas with V1-specific models for accounts, holdings, and positions - Add database queries and aggregations for P&L, performance, and account data - Include comprehensive test coverage for all V1 endpoints and integration flows - Update batch and release documentation with implementation and verification evidence - Sync project structure and runtime flows per V1 API contract requirements Closes implementation phase of BAT-001 (TrEx Basic V1 API Contract)
This commit is contained in:
@@ -68,6 +68,9 @@ class _BootstrapRepo:
|
||||
self.closed = True
|
||||
|
||||
|
||||
_TEST_ENC_KEY = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
|
||||
|
||||
|
||||
def test_startup_bootstraps_initial_user_when_users_table_empty() -> None:
|
||||
repo = _BootstrapRepo()
|
||||
settings = Settings(
|
||||
@@ -76,6 +79,7 @@ def test_startup_bootstraps_initial_user_when_users_table_empty() -> None:
|
||||
bootstrap_email="admin@example.com",
|
||||
bootstrap_password="bootstrap123",
|
||||
allowed_origins_raw="http://localhost:3000",
|
||||
credential_encryption_key=_TEST_ENC_KEY,
|
||||
)
|
||||
bootstrap_app = create_app(settings_factory=lambda: settings, repository_factory=lambda current: repo)
|
||||
|
||||
@@ -99,6 +103,7 @@ def test_startup_does_not_bootstrap_when_users_exist() -> None:
|
||||
bootstrap_email="admin@example.com",
|
||||
bootstrap_password="bootstrap123",
|
||||
allowed_origins_raw="http://localhost:3000",
|
||||
credential_encryption_key=_TEST_ENC_KEY,
|
||||
)
|
||||
bootstrap_app = create_app(settings_factory=lambda: settings, repository_factory=lambda current: repo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user