class HealthController(Controller):
path = "health"
@get(path="", cache=False, tags=["health"])
async def get_health_status(self, health_service: HealthService) -> Response[HealthStatusDto]:
result = await health_service.get_health_status()
return Response(result, status_code=HTTP_200_OK if result.all_ok else HTTP_400_BAD_REQUEST)
class HealthService:
def __init__(self,
ldap_connection_pool: LdapConnectionPool
):
self._ldap_connection_pool: LdapConnectionPool = ldap_connection_pool
# rest of class
class LdapConnectionPool:
def __init__(self, config_service: ConfigService):
self._config_service = config_service
# rest of class
class ConfigService:
def __init__(self, config: Config | None = None):
if config:
self._internal_config = config
else:
self._internal_config = None
self.read_config()
# rest of class
class Config(BaseModel):
# Allow none for testing
a_config: AConfig | None
b_config: BConfig | None
after this our swagger showed:
I would assume, qParams (and such) would only be picked u in the signature of the method in the controller?
No response
No response
No response
No response
No response
2.2.1
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too