{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "sailpoint.isc.transforms.generateRandomString.schema.json",
  "title": "SailPoint ISC Transform Schema - Generate Random String (rule-backed)",
  "description": "Strict schema for the SailPoint ISC 'Generate Random String' operation. Per SailPoint docs, this is implemented as a rule transform: type must be 'rule' and attributes must target the 'Cloud Services Deployment Utility' rule with operation 'generateRandomString'.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "name",
    "attributes"
  ],
  "properties": {
    "type": {
      "const": "rule"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Transform name shown in UI."
    },
    "requiresPeriodicRefresh": {
      "type": "boolean",
      "default": false,
      "description": "Whether the transform logic should be reevaluated every evening as part of identity refresh. Default false."
    },
    "attributes": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name",
        "operation",
        "includeNumbers",
        "includeSpecialChars",
        "length"
      ],
      "properties": {
        "name": {
          "const": "Cloud Services Deployment Utility",
          "description": "Referenced rule name must be 'Cloud Services Deployment Utility'."
        },
        "operation": {
          "const": "generateRandomString",
          "description": "Operation must be 'generateRandomString'."
        },
        "includeNumbers": {
          "type": "string",
          "enum": [
            "true",
            "false"
          ],
          "description": "Set to \"true\" or \"false\" to indicate whether the generator includes numbers."
        },
        "includeSpecialChars": {
          "type": "string",
          "enum": [
            "true",
            "false"
          ],
          "description": "Set to \"true\" or \"false\" to indicate whether the generator includes special characters."
        },
        "length": {
          "type": "string",
          "pattern": "^([1-9][0-9]?|[1-3][0-9]{2}|4[0-4][0-9]|450)$",
          "description": "Required length of the generated string. Docs state maximum allowable value is 450."
        }
      }
    }
  },
  "examples": [
    {
      "type": "rule",
      "name": "Generate Random String Transform",
      "attributes": {
        "name": "Cloud Services Deployment Utility",
        "operation": "generateRandomString",
        "includeNumbers": "true",
        "includeSpecialChars": "true",
        "length": "16"
      }
    },
    {
      "type": "rule",
      "name": "Generate Random String Transform",
      "attributes": {
        "name": "Cloud Services Deployment Utility",
        "operation": "generateRandomString",
        "includeNumbers": "true",
        "includeSpecialChars": "false",
        "length": "8"
      }
    }
  ]
}
