{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rehearse.kurvball.ca/schema/v1/dependents.schema.json",
  "title": "Rehearse v1: what Rehearse reads from an import graph",
  "description": "What `ashlar dependents <files...> --json` prints, run at the repository's root, for rehearse list --affected. Every file given appears either as a key of dependents (with [] when nothing reaches it) or in unknown. Each key lists every file that reaches it through imports, directly or not, the file itself excluded. Paths are relative to the root, with forward slashes. The command exits 0 and prints this one object on stdout; any other exit, or stdout that isn't this object, is a failure, and Rehearse falls back to packages and says why. v is the version of Rehearse's contract, not of the tool. Any other import-graph tool may print the same and be named in rehearse.yaml under affected.graph.",
  "type": "object",
  "required": ["v", "dependents"],
  "properties": {
    "v": {
      "$ref": "common.schema.json#/$defs/v"
    },
    "dependents": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "uniqueItems": true
      }
    },
    "unknown": {
      "description": "Files given that the graph doesn't hold (not source, or outside what it reads).",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
