{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/KeyCredential",
  "title": "KeyCredential",
  "type": "object",
  "description": "Contains a key credential (certificate) associated with an application or service principal",
  "properties": {
    "keyId": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for the key",
      "example": "500123"
    },
    "displayName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Friendly name for the key",
      "example": "example_value"
    },
    "type": {
      "type": "string",
      "description": "Type of key credential",
      "enum": [
        "AsymmetricX509Cert",
        "X509CertAndPassword"
      ],
      "example": "AsymmetricX509Cert"
    },
    "usage": {
      "type": "string",
      "description": "Describes the purpose of the key",
      "enum": [
        "Sign",
        "Verify"
      ],
      "example": "Sign"
    },
    "key": {
      "type": "string",
      "format": "byte",
      "description": "The certificate's raw data in byte array converted to Base64 string",
      "example": "example_value"
    },
    "startDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time at which the credential becomes valid",
      "example": "2026-01-15T10:30:00Z"
    },
    "endDateTime": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time at which the credential expires",
      "example": "2026-01-15T10:30:00Z"
    }
  }
}