{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pkgseek-com/json-schema/pkgseek-com-package-files-schema.json",
  "title": "PackageFiles",
  "description": "File list payload for `GET /v1/packages/{distro}/{name}/files`: the same\nbuild resolution as the detail endpoint, but only the file paths, so clients\ncan lazy-load them instead of paying for them in every detail response.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pkgseek-com-openapi.yml#/components/schemas/PackageFiles",
  "type": "object",
  "required": [
    "name",
    "distro",
    "release",
    "source",
    "repo",
    "files",
    "total",
    "truncated"
  ],
  "properties": {
    "arch": {
      "type": [
        "string",
        "null"
      ]
    },
    "distro": {
      "type": "string"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Indexed file paths for the resolved build (capped at 2000)."
    },
    "name": {
      "type": "string"
    },
    "release": {
      "type": "string"
    },
    "repo": {
      "type": "string"
    },
    "resolution": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/PackageResolution"
        }
      ]
    },
    "source": {
      "type": "string"
    },
    "total": {
      "type": "integer",
      "format": "int64",
      "description": "Total indexed file paths for the resolved build (un-truncated)."
    },
    "truncated": {
      "type": "boolean",
      "description": "True when `total` exceeds the returned `files` cap."
    },
    "version": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "PackageResolution": {
      "type": "object",
      "required": [
        "requested",
        "resolved",
        "match_type",
        "selection",
        "catalog_revision",
        "policy",
        "coverage",
        "warnings"
      ],
      "properties": {
        "catalog_revision": {
          "type": "string"
        },
        "coverage": {
          "$ref": "#/$defs/ScopeCoverage"
        },
        "match_type": {
          "type": "string"
        },
        "policy": {
          "type": "string"
        },
        "requested": {
          "$ref": "#/$defs/PackageScope"
        },
        "resolved": {
          "$ref": "#/$defs/PackageScope"
        },
        "selection": {
          "type": "string"
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "PackageScope": {
      "type": "object",
      "description": "An explicit ordinary-repository request uses one exact release snapshot.",
      "required": [
        "distro",
        "release",
        "source",
        "arch"
      ],
      "properties": {
        "arch": {
          "type": "string"
        },
        "distro": {
          "type": "string"
        },
        "release": {
          "type": "string"
        },
        "repo": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ScopeCoverage": {
      "type": "object",
      "required": [
        "state",
        "reason"
      ],
      "properties": {
        "generation": {
          "type": [
            "string",
            "null"
          ]
        },
        "observed_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "reason": {
          "type": "string"
        },
        "state": {
          "type": "string",
          "description": "Legacy index timestamps cannot prove a complete import generation."
        }
      }
    }
  }
}