{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pkgseek-com/json-schema/pkgseek-com-package-detail-schema.json",
  "title": "PackageDetail",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pkgseek-com-openapi.yml#/components/schemas/PackageDetail",
  "type": "object",
  "required": [
    "name",
    "version",
    "arch",
    "summary",
    "distro",
    "distro_name",
    "source",
    "repo",
    "release",
    "repository_indexed_at",
    "format",
    "dependencies",
    "required_by",
    "required_by_total",
    "across_distros",
    "cves",
    "cve_scanned",
    "arches",
    "files"
  ],
  "properties": {
    "across_distros": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DistroVersion"
      }
    },
    "arch": {
      "type": "string"
    },
    "arches": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Architectures this package is built for in this distro+release (e.g.\n`x86_64`, `aarch64`), newest build's arch shown in `arch`."
    },
    "binary_artifacts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BinaryArtifact"
      },
      "description": "Direct binary package objects proven by the indexed repository's native\nartifact metadata (for example APT Filename or RPM-MD location).\nEmpty means the record has not been backfilled or the source did not\npublish a safe direct path."
    },
    "cve_scanned": {
      "type": "boolean",
      "description": "Whether this package's (distro, release) is covered by CVE ingestion.\nWhen false, an empty `cves` means \"not scanned\", not \"no vulnerabilities\"."
    },
    "cves": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Cve"
      }
    },
    "dependencies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Dependency"
      }
    },
    "distro": {
      "type": "string"
    },
    "distro_name": {
      "type": "string"
    },
    "download_size": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Indexed file paths (capped at 2000). Empty when the detail was fetched\nwith `files=0`; use `GET /v1/packages/{distro}/{name}/files` then."
    },
    "files_count": {
      "type": "integer",
      "format": "int64",
      "description": "Total indexed file paths for the resolved build (un-truncated), always\npopulated even when `files` is omitted."
    },
    "format": {
      "type": "string"
    },
    "homepage": {
      "type": [
        "string",
        "null"
      ]
    },
    "installed_size": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64"
    },
    "license": {
      "type": [
        "string",
        "null"
      ]
    },
    "maintainer": {
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": "string"
    },
    "origin": {
      "type": [
        "string",
        "null"
      ]
    },
    "release": {
      "type": "string"
    },
    "repo": {
      "type": "string"
    },
    "repository_indexed_at": {
      "type": "string",
      "description": "Timestamp of the repository index that supplied this exact coordinate.\nDirect artifact links remain absent until their native metadata supplies\na safe exact path."
    },
    "required_by": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ReverseDep"
      },
      "description": "Packages in the same distro that depend on this one (capped list)."
    },
    "required_by_total": {
      "type": "integer",
      "format": "int64",
      "description": "Total number of reverse dependents (may exceed `required_by.len()`)."
    },
    "resolution": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/PackageResolution"
        }
      ]
    },
    "source": {
      "type": "string"
    },
    "source_package": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/SourcePackage",
          "description": "Exact matching source package, when the corresponding APT Sources\nrecord is indexed. This is absent rather than guessed from an upstream\nproject page."
        }
      ]
    },
    "summary": {
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  },
  "$defs": {
    "BinaryArtifact": {
      "type": "object",
      "required": [
        "arch",
        "filename",
        "url"
      ],
      "properties": {
        "arch": {
          "type": "string",
          "description": "Exact binary architecture from the repository record."
        },
        "checksum": {
          "type": [
            "string",
            "null"
          ]
        },
        "checksum_algorithm": {
          "type": [
            "string",
            "null"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Repository-provided payload filename (not a synthesized package name)."
        },
        "priority": {
          "type": [
            "string",
            "null"
          ]
        },
        "section": {
          "type": [
            "string",
            "null"
          ]
        },
        "size": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "url": {
          "type": "string",
          "description": "Safe direct URL built from the configured repository base and exact path."
        }
      }
    },
    "Cve": {
      "type": "object",
      "required": [
        "id",
        "evidence"
      ],
      "properties": {
        "evidence": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CveVendorEvidence"
          }
        },
        "fixed_in": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "score": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "severity": {
          "type": [
            "string",
            "null"
          ]
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "CveVendorEvidence": {
      "type": "object",
      "description": "Auditable distribution-native evidence for an effective package/CVE match.",
      "required": [
        "provider",
        "advisory_id",
        "status",
        "source_url",
        "priority",
        "verified_at"
      ],
      "properties": {
        "advisory_id": {
          "type": "string"
        },
        "fixed_in": {
          "type": [
            "string",
            "null"
          ]
        },
        "priority": {
          "type": "integer",
          "format": "int32"
        },
        "provider": {
          "type": "string"
        },
        "reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "verified_at": {
          "type": "string"
        }
      }
    },
    "Dependency": {
      "type": "object",
      "required": [
        "kind",
        "name"
      ],
      "properties": {
        "constraint": {
          "type": [
            "string",
            "null"
          ]
        },
        "kind": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "DistroVersion": {
      "type": "object",
      "required": [
        "id",
        "version",
        "source"
      ],
      "properties": {
        "arch": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "release": {
          "type": [
            "string",
            "null"
          ],
          "description": "Release the newest build came from (e.g. `42`, `trixie`). Only populated\nwhen the caller needs canonical package links."
        },
        "repo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Repository/component name for the selected build, when known."
        },
        "resolution": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/PackageResolution"
            }
          ]
        },
        "source": {
          "type": "string",
          "description": "Repository source (`official` for distro-owned repos, otherwise a\nthird-party channel such as `epel` or `remi`)."
        },
        "version": {
          "type": "string"
        }
      }
    },
    "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
    },
    "ReverseDep": {
      "type": "object",
      "description": "A package that depends on this one (reverse dependency / \"required by\").",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "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."
        }
      }
    },
    "SourcePackage": {
      "type": "object",
      "required": [
        "name",
        "version",
        "artifacts"
      ],
      "properties": {
        "artifacts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SourcePackageArtifact"
          }
        },
        "format": {
          "type": [
            "string",
            "null"
          ]
        },
        "homepage": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "vcs_browser": {
          "type": [
            "string",
            "null"
          ]
        },
        "vcs_git": {
          "type": [
            "string",
            "null"
          ]
        },
        "version": {
          "type": "string"
        }
      }
    },
    "SourcePackageArtifact": {
      "type": "object",
      "required": [
        "filename",
        "kind",
        "url"
      ],
      "properties": {
        "checksum": {
          "type": [
            "string",
            "null"
          ]
        },
        "checksum_algorithm": {
          "type": [
            "string",
            "null"
          ]
        },
        "filename": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "description": "descriptor, source-rpm, upstream-source, packaging, signature, or other."
        },
        "size": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "url": {
          "type": "string"
        }
      }
    }
  }
}