{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://constal.ai/docs/credentials/reference/credential-create.schema.json",
  "title": "Constal Credential creation",
  "type": "object",
  "required": ["id", "provider", "configuration"],
  "additionalProperties": false,
  "properties": {
    "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,62}$" },
    "provider": { "type": "string", "minLength": 1, "description": "Installed CredentialProvider CRN." },
    "configuration": { "type": "object", "description": "Non-secret values validated by the installed provider." },
    "material": { "type": "string", "minLength": 1, "writeOnly": true, "description": "Accepted only by import providers." },
    "version": { "type": "string", "minLength": 1, "maxLength": 64 },
    "vault": { "type": "object", "description": "Optional platform or external vault reference." },
    "policies": { "type": "array", "maxItems": 128, "uniqueItems": true, "items": { "type": "string" } }
  }
}
