{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://thruput.se/agents/schemas/review/surface.schema.json",
  "title": "Surface",
  "description": "One changed file of a [[Change]] that has surface lines, whole: its fragments in file order at the head commit, then the fragments the change removed",
  "type": "object",
  "required": [
    "path",
    "fragments"
  ],
  "properties": {
    "path": {
      "$ref": "change-set.schema.json#/$defs/Path"
    },
    "fragments": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "fragment.schema.json"
      }
    }
  },
  "examples": [
    {
      "path": "scripts/verify.sh",
      "fragments": [
        {
          "kind": "context",
          "lines": {
            "20": "npx --yes @sourcemeta/jsonschema@17.0.0 lint \"$PROJECT_ROOT/schemas\""
          }
        },
        {
          "kind": "surface",
          "side": "head",
          "lines": {
            "21": "npx --yes @sourcemeta/jsonschema@17.0.0 metaschema \"$PROJECT_ROOT/schemas\" || true"
          }
        },
        {
          "kind": "surface",
          "side": "base",
          "lines": {
            "21": "npx --yes @sourcemeta/jsonschema@17.0.0 metaschema \"$PROJECT_ROOT/schemas\""
          }
        }
      ]
    }
  ]
}
