{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/repowise-dev/json-schema/repowise-dev-external-systems-summary-response-schema.json",
  "title": "ExternalSystemsSummaryResponse",
  "description": "Bounded package summaries for the external-dependency scan surface.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/repowise-dev-external-systems-api-openapi.yml#/components/schemas/ExternalSystemsSummaryResponse",
  "properties": {
    "items": {
      "items": {
        "$ref": "#/$defs/ExternalSystemSummaryEntry"
      },
      "type": "array",
      "title": "Items"
    },
    "returned": {
      "type": "integer",
      "title": "Returned"
    },
    "total_packages": {
      "type": "integer",
      "title": "Total Packages"
    },
    "limit": {
      "type": "integer",
      "title": "Limit"
    },
    "offset": {
      "type": "integer",
      "title": "Offset"
    },
    "truncated": {
      "type": "boolean",
      "title": "Truncated"
    },
    "scope": {
      "type": "string",
      "enum": [
        "primary",
        "all"
      ],
      "title": "Scope"
    },
    "excluded_declarations": {
      "type": "integer",
      "title": "Excluded Declarations"
    },
    "total_declarations": {
      "type": "integer",
      "title": "Total Declarations"
    },
    "runtime_packages": {
      "type": "integer",
      "title": "Runtime Packages"
    },
    "dev_only_packages": {
      "type": "integer",
      "title": "Dev Only Packages"
    },
    "observed_packages": {
      "type": "integer",
      "title": "Observed Packages"
    },
    "linked_packages": {
      "type": "integer",
      "title": "Linked Packages"
    },
    "unlinked_packages": {
      "type": "integer",
      "title": "Unlinked Packages"
    },
    "linked_without_imports": {
      "type": "integer",
      "title": "Linked Without Imports"
    },
    "ecosystems": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Ecosystems"
    },
    "manifest_count": {
      "type": "integer",
      "title": "Manifest Count"
    }
  },
  "type": "object",
  "required": [
    "items",
    "returned",
    "total_packages",
    "limit",
    "offset",
    "truncated",
    "scope",
    "excluded_declarations",
    "total_declarations",
    "runtime_packages",
    "dev_only_packages",
    "observed_packages",
    "linked_packages",
    "unlinked_packages",
    "linked_without_imports",
    "ecosystems",
    "manifest_count"
  ],
  "$defs": {
    "ExternalSystemSummaryEntry": {
      "properties": {
        "package_key": {
          "type": "string",
          "title": "Package Key"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "display_name": {
          "type": "string",
          "title": "Display Name"
        },
        "ecosystem": {
          "type": "string",
          "title": "Ecosystem"
        },
        "category": {
          "type": "string",
          "title": "Category"
        },
        "io_kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Io Kind"
        },
        "runtime_declared": {
          "type": "boolean",
          "title": "Runtime Declared"
        },
        "dev_declared": {
          "type": "boolean",
          "title": "Dev Declared"
        },
        "declaration_count": {
          "type": "integer",
          "title": "Declaration Count"
        },
        "manifest_count": {
          "type": "integer",
          "title": "Manifest Count"
        },
        "versions": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Versions"
        },
        "versions_total": {
          "type": "integer",
          "title": "Versions Total"
        },
        "versions_truncated": {
          "type": "boolean",
          "title": "Versions Truncated"
        },
        "multiple_versions": {
          "type": "boolean",
          "title": "Multiple Versions"
        },
        "external_node_count": {
          "type": "integer",
          "title": "External Node Count"
        },
        "import_edge_count": {
          "type": "integer",
          "title": "Import Edge Count"
        },
        "importing_file_count": {
          "type": "integer",
          "title": "Importing File Count"
        },
        "link_state": {
          "type": "string",
          "enum": [
            "linked",
            "unlinked"
          ],
          "title": "Link State"
        }
      },
      "type": "object",
      "required": [
        "package_key",
        "name",
        "display_name",
        "ecosystem",
        "category",
        "runtime_declared",
        "dev_declared",
        "declaration_count",
        "manifest_count",
        "versions",
        "versions_total",
        "versions_truncated",
        "multiple_versions",
        "external_node_count",
        "import_edge_count",
        "importing_file_count",
        "link_state"
      ],
      "title": "ExternalSystemSummaryEntry",
      "description": "One canonical package with declaration and graph-usage aggregates."
    }
  }
}