{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/docupanda/json-schema/docupanda-create-transformation-request-schema.json",
  "title": "CreateTransformationRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docupanda-transformation-api-openapi.yml#/components/schemas/CreateTransformationRequest",
  "properties": {
    "description": {
      "type": "string",
      "title": "Description",
      "description": "what the transformation should do, in plain words; with basedOnTransformationId and no code, the change to make"
    },
    "code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Code",
      "description": "python source defining transform(data, context); when given, it is reviewed instead of written for you"
    },
    "basedOnTransformationId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Basedontransformationid",
      "description": "an existing transformation to change; saved as a new transformation, the original is kept"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name",
      "description": "short name; written for you when omitted, and required with code unless kept from basedOnTransformationId"
    },
    "standardizationId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Standardizationid",
      "description": "optional sample standardization to test the code on"
    },
    "documentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Documentid",
      "description": "optional sample structured document to test the code on"
    }
  },
  "type": "object",
  "required": [
    "description"
  ]
}