{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Credential",
  "title": "Credential",
  "type": "object",
  "description": "A credential stored in the Credential Vault with named attributes",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "description": "Unique identifier of the credential"
    },
    "name": {
      "type": "string",
      "description": "Human-readable name of the credential"
    },
    "description": {
      "type": "string",
      "description": "Optional description of the credential's purpose"
    },
    "ownerId": {
      "type": "integer",
      "format": "int64",
      "description": "User ID of the credential owner"
    },
    "attributes": {
      "type": "array",
      "description": "List of attribute definitions associated with this credential",
      "items": {
        "$ref": "#/components/schemas/CredentialAttribute"
      }
    },
    "createdBy": {
      "type": "integer",
      "format": "int64",
      "description": "ID of the user who created this credential"
    },
    "createdOn": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp when the credential was created"
    },
    "updatedBy": {
      "type": "integer",
      "format": "int64",
      "description": "ID of the user who last modified this credential"
    },
    "updatedOn": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 timestamp of the last modification"
    }
  }
}