{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revyl/json-schema/revyl-code-execution-script-schema.json",
  "title": "CodeExecutionScript",
  "description": "Full script model with database fields.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/revyl-code-execution-scripts-api-openapi.yml#/components/schemas/CodeExecutionScript",
  "properties": {
    "code": {
      "description": "Script code content",
      "title": "Code",
      "type": "string"
    },
    "created_at": {
      "description": "Creation timestamp",
      "format": "date-time",
      "title": "Created At",
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Script description",
      "title": "Description"
    },
    "id": {
      "description": "Script ID",
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "name": {
      "description": "Script name",
      "title": "Name",
      "type": "string"
    },
    "org_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Organization ID",
      "title": "Org Id"
    },
    "runtime": {
      "description": "Runtime language",
      "enum": [
        "python",
        "javascript",
        "typescript",
        "bash"
      ],
      "title": "Runtime",
      "type": "string"
    },
    "updated_at": {
      "description": "Last update timestamp",
      "format": "date-time",
      "title": "Updated At",
      "type": "string"
    },
    "user_id": {
      "description": "User ID who owns the script",
      "format": "uuid",
      "title": "User Id",
      "type": "string"
    }
  },
  "required": [
    "name",
    "code",
    "runtime",
    "id",
    "user_id",
    "created_at",
    "updated_at"
  ],
  "type": "object"
}