Files
adastra_api/MIGRATION_REPORT.md
T

2.5 KiB

═══════════════════════════════════════════════════════════════════════════════ API STRUCTURE MIGRATION REPORT ═══════════════════════════════════════════════════════════════════════════════

MIGRATION: v1/v2/v3 → Domain-Based (skydive/cms/herowars)

OLD STRUCTURE: └── routes/api/ ├── v1/ (Skydive routes) ├── v2/ (CMS + misc routes) └── v3/ (Hero Wars routes)

NEW STRUCTURE: └── routes/api/ ├── skydive/ ├── cms/ └── herowars/

ROUTE MAPPINGS: ✓ /api/v1/* → /api/skydive/* - applications, aeronefs, canopies, dropzones, jumps, pages, profiles, qcm

✓ /api/v2/* → /api/cms/* - user, articles, comments, product, products, profiles, tags

✓ /api/v3/* → /api/herowars/* - clans, members, herowars (moved from v2)

FILES CREATED/UPDATED: ✓ src/routes/api/skydive/index.js ✓ src/routes/api/cms/index.js ✓ src/routes/api/herowars/index.js ✓ src/routes/api/index.js ✓ All route files copied to appropriate domains

MANUAL STEPS REQUIRED:

  1. Update Swagger/OpenAPI documentation:

    • Review MIGRATION_SWAGGER_TODO.md
    • Update path prefixes in src/swagger/*.yaml files
    • Update paths in src/config/swagger.js if needed
  2. Update app.js (if direct version references exist):

    • Search for 'v1', 'v2', 'v3' strings
    • Replace with domain names where appropriate
  3. Update tests and client calls:

    • Replace /api/v1/ with /api/skydive/
    • Replace /api/v2/ with /api/cms/
    • Replace /api/v3/ with /api/herowars/
  4. Update any documentation:

    • README.md API endpoints section
    • API documentation and guides
  5. Test all endpoints:

    • Verify each domain routes work correctly
    • Check authentication/authorization still functions
    • Validate error handling

OPTIONAL: Old v1/v2/v3 directories can be removed after verification: rm -rf src/routes/api/v1 rm -rf src/routes/api/v2 rm -rf src/routes/api/v3

═══════════════════════════════════════════════════════════════════════════════