{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/docupanda/json-schema/docupanda-transformation-summary-schema.json",
  "title": "TransformationSummary",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docupanda-transformation-api-openapi.yml#/components/schemas/TransformationSummary",
  "properties": {
    "transformationId": {
      "type": "string",
      "title": "Transformationid"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "description": {
      "type": "string",
      "title": "Description"
    },
    "code": {
      "type": "string",
      "title": "Code"
    },
    "origin": {
      "type": "string",
      "enum": [
        "script",
        "ai",
        "user"
      ],
      "title": "Origin"
    },
    "basedOnTransformationId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Basedontransformationid"
    },
    "authoringJobId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Authoringjobid",
      "description": "the job that created this transformation; its preview is the saved example"
    },
    "createdAt": {
      "type": "string",
      "title": "Createdat"
    },
    "verifications": {
      "items": {
        "$ref": "#/$defs/TransformationVerification"
      },
      "type": "array",
      "title": "Verifications"
    }
  },
  "type": "object",
  "required": [
    "transformationId",
    "name",
    "description",
    "code",
    "origin",
    "basedOnTransformationId",
    "createdAt",
    "verifications"
  ],
  "$defs": {
    "TransformationVerification": {
      "properties": {
        "approved": {
          "type": "boolean",
          "title": "Approved",
          "description": "whether the review approved the code"
        },
        "reason": {
          "type": "string",
          "title": "Reason",
          "description": "the review's reasoning, in plain words"
        }
      },
      "type": "object",
      "required": [
        "approved",
        "reason"
      ],
      "title": "TransformationVerification"
    }
  }
}