{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/revyl/json-schema/revyl-script-usage-response-schema.json",
  "title": "ScriptUsageResponse",
  "description": "Response model for script usage lookup",
  "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/ScriptUsageResponse",
  "properties": {
    "modules": {
      "items": {
        "$ref": "#/$defs/ScriptUsageModuleItem"
      },
      "title": "Modules",
      "type": "array"
    },
    "tests": {
      "items": {
        "$ref": "#/$defs/ScriptUsageTestItem"
      },
      "title": "Tests",
      "type": "array"
    },
    "total": {
      "title": "Total",
      "type": "integer"
    }
  },
  "required": [
    "tests",
    "modules",
    "total"
  ],
  "type": "object",
  "$defs": {
    "ScriptUsageModuleItem": {
      "description": "A module that uses a specific script as a step, and is itself used by\nat least one test",
      "properties": {
        "id": {
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "ScriptUsageModuleItem",
      "type": "object"
    },
    "ScriptUsageTestItem": {
      "description": "A test that uses a specific script directly as a step",
      "properties": {
        "id": {
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "title": "ScriptUsageTestItem",
      "type": "object"
    }
  }
}