Skip to content

Conversation

@svenvg93
Copy link
Contributor

@svenvg93 svenvg93 commented May 28, 2025

📃 Description

This PR consolidates our individual endpoints into grouped controllers—ResultsController, SpeedtestController, and StatsController—making the API surface more coherent and easier to maintain. It also extracts all OpenAPI annotations into dedicated annotation classes, keeping our controllers focused purely on business logic.

🪵 Changelog

📄 Documentation

N/A

➕ Added

  • ResultsController with consolidated index, show and latest results
  • SpeedtestController with run and listServers methods for running tests and listing servers
  • StatsController with aggregated endpoint for performance metrics
  • AppController with all Application info related endpoints
  • OoklaController for the server list endpoints.
  • Separate annotation classes under App\OpenApi\Annotations\V1 for Results, Speedtests and Stats
  • Updated route definitions to point to the new controllers and methods
  • forApi function to GetOoklaSpeedtestServers to get a more useful API response on /ookla/list-servers
{
    "id": "52365",
    "host": "speedtest.ams.t-mobile.nl.prod.hosts.ooklaserver.net:8080",
    "name": "Odido",
    "location": "Amsterdam",
    "country": "Netherlands"
},

✏️ Changed

  • Move /api/healthcheck from routes to new AppController

📷 Screenshots

If this PR has any UI/UX changes it's strongly suggested you add screenshots here.

@svenvg93 svenvg93 marked this pull request as ready for review May 28, 2025 20:48
@svenvg93 svenvg93 requested a review from alexjustesen as a code owner May 28, 2025 20:48
@svenvg93 svenvg93 changed the title [Chore] Consolidate Results, Speedtest & Stats Endpoints into Dedicated Controllers [Chore] Consolidate Results, Speedtest & Stats API Endpoints into Dedicated Controllers Jun 2, 2025
@alexjustesen alexjustesen added the chore Nothing fancy, just needs to get done label Jun 2, 2025
@svenvg93 svenvg93 marked this pull request as draft June 12, 2025 19:26
@svenvg93 svenvg93 marked this pull request as ready for review June 23, 2025 09:40
@svenvg93 svenvg93 requested a review from alexjustesen June 26, 2025 17:38
@alexjustesen alexjustesen merged commit 2d40d98 into alexjustesen:main Jul 28, 2025
7 checks passed
@svenvg93 svenvg93 deleted the refactor-api branch July 28, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Nothing fancy, just needs to get done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants