Coverage for app/api/v1/endpoints/check_router.py: 100%
7 statements
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-16 20:06 +0000
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-16 20:06 +0000
1from fastapi import APIRouter
2from app.api.v1.dependencies import CheckServiceDependency
3from app.schemas.check import CheckResponse
5check_router = APIRouter()
8@check_router.get(
9 "",
10 response_model=CheckResponse,
11 summary="Retrieve current Mars probe positions",
12 response_description="A list of all stored probes with their current coordinates and direction.",
13 description=(
14 "Fetch the current state of every probe from the repository via the CheckService. "
15 "This endpoint uses the service layer to load probe entities from the repository, "
16 "transform them into response models, and return their current position and direction."
17 ),
18 responses={
19 200: {
20 "description": "Probes fetched successfully",
21 "model": CheckResponse,
22 },
23 500: {
24 "description": "Unexpected server error.",
25 "content": {
26 "application/json": {
27 "example": {
28 "detail": {
29 "code": "CHECK_UNEXPECTED_ERROR",
30 "message": "Unexpected error. Try again in a few seconds.",
31 }
32 }
33 }
34 },
35 },
36 },
37)
38async def check_probes(service: CheckServiceDependency):
39 """
40 Get the current position and orientation of all Mars probes.
41 """
42 return await service.process()