{
  "$defs": {
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "PiiClass": {
      "description": "Personal-data classification on every record carrying personal data, per\nBDR 0070 / BDR 0069 / BDR 0078. Used by `corpospec-report` to gate\nrendering and by the privacy pillar's RoPA records to determine\nsafeguards.",
      "oneOf": [
        {
          "const": "none",
          "description": "No personal data.",
          "type": "string"
        },
        {
          "const": "public_personal",
          "description": "Public personal data (already disclosed by the subject, e.g. CEO name).",
          "type": "string"
        },
        {
          "const": "internal",
          "description": "Internal-only personal data (employee directory).",
          "type": "string"
        },
        {
          "const": "personal",
          "description": "Personal data per GDPR Art. 4(1).",
          "type": "string"
        },
        {
          "const": "special_category",
          "description": "Special-category data per GDPR Art. 9 (health, biometric, genetic,\nreligion, ethnicity, sex life, political opinion, trade union).",
          "type": "string"
        },
        {
          "const": "criminal_data",
          "description": "Criminal data per GDPR Art. 10.",
          "type": "string"
        },
        {
          "const": "sensitive",
          "description": "CCPA / CPRA \"sensitive personal information\".",
          "type": "string"
        }
      ]
    },
    "ServiceCriticality": {
      "description": "Service criticality (drives SLA / DR posture).",
      "oneOf": [
        {
          "enum": [
            "tier4",
            "tier3",
            "tier2",
            "tier1"
          ],
          "type": "string"
        },
        {
          "const": "tier0",
          "description": "Mission-critical.",
          "type": "string"
        }
      ]
    },
    "ServiceDeploymentPosture": {
      "description": "Deployment posture.",
      "oneOf": [
        {
          "const": "multi_region_active_active",
          "description": "Multi-region active-active.",
          "type": "string"
        },
        {
          "const": "multi_region_active_passive",
          "description": "Active-passive across regions.",
          "type": "string"
        },
        {
          "const": "single_region_multi_az",
          "description": "Single region with multi-AZ HA.",
          "type": "string"
        },
        {
          "const": "single_zone",
          "description": "Single zone (no HA).",
          "type": "string"
        },
        {
          "const": "third_party_hosted",
          "description": "SaaS-hosted (third-party).",
          "type": "string"
        },
        {
          "const": "on_premise",
          "description": "On-premise / colo.",
          "type": "string"
        }
      ]
    },
    "ServiceStatus": {
      "description": "Lifecycle.",
      "oneOf": [
        {
          "const": "development",
          "description": "Under development.",
          "type": "string"
        },
        {
          "const": "alpha",
          "description": "Alpha / internal preview.",
          "type": "string"
        },
        {
          "const": "beta",
          "description": "Beta / external preview.",
          "type": "string"
        },
        {
          "const": "ga",
          "description": "General availability.",
          "type": "string"
        },
        {
          "const": "maintenance",
          "description": "Maintenance mode.",
          "type": "string"
        },
        {
          "const": "deprecated",
          "description": "Deprecated.",
          "type": "string"
        },
        {
          "const": "decommissioned",
          "description": "Decommissioned.",
          "type": "string"
        }
      ]
    },
    "ServiceTier": {
      "description": "Service tier.",
      "oneOf": [
        {
          "const": "business",
          "description": "Business service (customer-facing).",
          "type": "string"
        },
        {
          "const": "customer_facing",
          "description": "Customer-facing application.",
          "type": "string"
        },
        {
          "const": "internal",
          "description": "Internal application.",
          "type": "string"
        },
        {
          "const": "technical",
          "description": "Technical supporting service (databases, queues, caches).",
          "type": "string"
        },
        {
          "const": "infrastructure",
          "description": "Infrastructure (compute, network, storage).",
          "type": "string"
        },
        {
          "const": "third_party",
          "description": "Third-party-provided (SaaS we consume).",
          "type": "string"
        }
      ]
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/service-catalog-entry.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Service-catalogue entry.",
  "properties": {
    "api_endpoints": {
      "description": "PathRefs to API endpoints exposed.",
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "asset_refs": {
      "description": "PathRefs to assets (asset_inventory.rs).",
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "bcp_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "Business-continuity plan reference."
    },
    "criticality": {
      "$ref": "#/$defs/ServiceCriticality"
    },
    "decommission_on": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ],
      "description": "Date decommissioning is scheduled / completed."
    },
    "dependents": {
      "description": "PathRefs to services that depend on this one.",
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "depends_on": {
      "description": "PathRefs to depended-on services.",
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "deployment_posture": {
      "$ref": "#/$defs/ServiceDeploymentPosture"
    },
    "deprecated_on": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ],
      "description": "Date deprecation announced."
    },
    "description": {
      "type": "string"
    },
    "documentation_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "Documentation URL or PathRef."
    },
    "dr_plan_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "Disaster-recovery plan reference."
    },
    "entity": {
      "$ref": "#/$defs/PathRef"
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "name": {
      "type": "string"
    },
    "on_call_rotation_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "On-call rotation reference."
    },
    "owner": {
      "$ref": "#/$defs/PathRef",
      "description": "PathRef to the owning team."
    },
    "pii_class": {
      "$ref": "#/$defs/PiiClass",
      "description": "PII class processed by this service."
    },
    "provisioned_on": {
      "$ref": "#/$defs/IsoDate"
    },
    "sla_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "SLA reference."
    },
    "status": {
      "$ref": "#/$defs/ServiceStatus"
    },
    "tech_stack": {
      "description": "Tech stack (free-form list).",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "tier": {
      "$ref": "#/$defs/ServiceTier"
    }
  },
  "required": [
    "id",
    "entity",
    "name",
    "description",
    "tier",
    "status",
    "criticality",
    "deployment_posture",
    "owner",
    "pii_class",
    "provisioned_on"
  ],
  "title": "ServiceCatalogEntry",
  "type": "object",
  "x-corpospec-pillar": "operations"
}