{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/edge-network/json-schema/edge-network-compute-script-schema.json",
  "title": "ComputeScript",
  "description": "Startup script (Edge library or custom) runnable on first boot.",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/edge-network-openapi.json#/components/schemas/ComputeScript",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Script id to pass as \"script\" when creating a VM."
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "edge-library",
        "custom"
      ]
    },
    "parameters": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "description": "Default value, if any."
          }
        },
        "required": [
          "name"
        ]
      }
    }
  },
  "required": [
    "id",
    "name"
  ]
}