"""Healthcheck response schemas"""
from typing import Dict
from pydantic import BaseModel, Field, Extra
[docs]
class BasicHealthCheckResponse(BaseModel):
"""Basic healthcheck, basically are we running at all..."""
[docs]
healthcheck: str = Field(description="Should contain 'success'")
[docs]
dns: str = Field(description="Contains the FQDN of this instance")
[docs]
deployment: str = Field(description="Contains the deployment name of this instance (host part of the FQDN)")
[docs]
version: str = Field(description="Version number of the API package")
[docs]
class Config: # pylint: disable=too-few-public-methods
"""Example values for schema"""
[docs]
class AllProductsHealthCheckResponse(BaseModel):
"""Check status of all products in manifest"""
[docs]
all_ok: bool = Field(description="Is everything ok ?")
[docs]
products: Dict[str, bool] = Field(description="Status for each product")
[docs]
class Config: # pylint: disable=too-few-public-methods
"""Example values for schema"""