Skip to content

Create Mock APIs for All Services in Documentation and Demo Pages #419

@anuragxxd

Description

@anuragxxd

Description:

Currently, our documentation and demo pages are using live API deployments (TRS, DRS, WES, TES, Service Registry, etc.), which causes issues with rate limiting, downtime, unreliable data, and dependencies on external services. We should create mock APIs for all GA4GH and ELIXIR services to provide consistent, predictable data for documentation and testing purposes.

Expected Behaviour:

  • Mock API endpoints for all services (TRS, DRS, WES, TES, Service Registry, etc.)
  • Consistent, reliable data for all demo scenarios
  • No dependencies on live deployments for docs and demos
  • Faster page loads in documentation site
  • Ability to showcase edge cases, error states, and loading states
  • Works offline for local development
  • Easy to update mock data for different scenarios

Approach:

  1. Create centralized mock API server or static JSON responses for all services:
    • GA4GH TRS (Tool Registry Service)
    • GA4GH DRS (Data Repository Service)
    • GA4GH WES (Workflow Execution Service)
    • GA4GH TES (Task Execution Service)
    • GA4GH Service Registry
    • ELIXIR Cloud Registry
    • ELIXIR DRS/TRS Filers
  2. Implement mock data generators with realistic response structures for each service
  3. Update all demo pages across packages to use mock APIs
  4. Configure documentation site (apps/documentation/) to use mock endpoints
  5. Add environment variable to toggle between mock and live APIs
  6. Create documentation for adding/updating mock data
  7. Consider using tools like MSW (Mock Service Worker) or json-server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions