{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revyl/json-schema/revyl-code-execution-script-list-response-schema.json",
  "title": "CodeExecutionScriptListResponse",
  "description": "Response model for listing scripts.",
  "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/CodeExecutionScriptListResponse",
  "properties": {
    "count": {
      "description": "Total count of scripts",
      "title": "Count",
      "type": "integer"
    },
    "scripts": {
      "description": "List of scripts",
      "items": {
        "$ref": "#/$defs/CodeExecutionScript"
      },
      "title": "Scripts",
      "type": "array"
    }
  },
  "required": [
    "scripts",
    "count"
  ],
  "type": "object",
  "$defs": {
    "CodeExecutionScript": {
      "description": "Full script model with database fields.",
      "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"
      ],
      "title": "CodeExecutionScript",
      "type": "object"
    }
  }
}