"""Shared serializers (wire shapes for the OpenAPI schema). Plain Serializers, not ORM/Model —
Andrea services own their storage, so these describe the JSON contract, not a table."""
from rest_framework import serializers


class HealthSerializer(serializers.Serializer):
    status = serializers.CharField(help_text="ok | degraded")
    service = serializers.CharField(required=False, help_text="SERVICE_NAME of the responding service")
    posture = serializers.CharField(
        required=False, help_text="enforcing | unconfigured | degraded — the credential posture. "
                                  "'unconfigured' means this service is running with NO auth "
                                  "material at all, i.e. its data plane is open.")
    creds_missing = serializers.ListField(
        child=serializers.CharField(), required=False,
        help_text="NAMES of declared-required credentials that did not resolve. Never values.")
