Coverage for src/data_api/domain/buses/adapters.py: 100%
1 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-11-13 19:28 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-11-13 19:28 +0000
1"""
2Buses domain adapters.
4Convert between domain models and API schemas.
5In this case, the domain service returns dict structures that match
6the Pydantic schemas, so conversion is minimal.
7"""
9__all__ = []
11# Note: The buses service returns dict structures that are directly
12# compatible with Pydantic schemas, so no explicit adapters are needed.
13# If domain models were returned directly, we would add:
14#
15# def bus_stop_to_schema(stop: models.Stop) -> dict:
16# return {
17# "name": stop.name,
18# "name_en": stop.name_en,
19# "latitude": stop.latitude,
20# "longitude": stop.longitude,
21# }