{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "sailpoint.isc.transforms.leftPad.schema.json",
  "title": "SailPoint ISC Transform Schema - leftPad",
  "description": "Strict schema derived from the SailPoint official Left Pad operation documentation. Left-pads the incoming string to the specified length using an optional padding string (default single space).",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "name",
    "attributes"
  ],
  "properties": {
    "type": {
      "const": "leftPad"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "requiresPeriodicRefresh": {
      "type": "boolean",
      "default": false,
      "description": "Whether the transform should be reevaluated nightly as part of identity refresh. Default false."
    },
    "attributes": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "length"
      ],
      "properties": {
        "length": {
          "type": "integer",
          "minimum": 0,
          "description": "Desired output length after padding."
        },
        "padding": {
          "type": "string",
          "default": " ",
          "description": "Padding string to use (default is a single space)."
        },
        "input": {
          "description": "Optional explicit input string (nested transform). If omitted, uses UI-configured input.",
          "oneOf": [
            {
              "$ref": "#/$defs/NestedTransform"
            }
          ]
        }
      }
    }
  },
  "$defs": {
    "NestedTransform": {
      "type": "object",
      "description": "Nested transform object used as explicit input (name optional in docs).",
      "additionalProperties": false,
      "required": [
        "type",
        "attributes"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "type": {
          "type": "string",
          "minLength": 1
        },
        "requiresPeriodicRefresh": {
          "type": "boolean"
        },
        "attributes": {
          "type": "object",
          "additionalProperties": true,
          "description": "Operation-specific attributes for the nested transform."
        }
      }
    }
  },
  "examples": [
    {
      "type": "leftPad",
      "name": "Left Pad Transform",
      "attributes": {
        "length": 8,
        "padding": "0"
      }
    }
  ]
}
